1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

F #5015: Option to disable raw section validation (#150)

This commit is contained in:
Pavel Czerný 2020-08-14 11:53:07 +02:00 committed by GitHub
parent 1e22db4fb2
commit afbf0e472b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -150,6 +150,14 @@ int VirtualMachineManager::validate_raw(const Template * vmt, string& error_str)
return 0;
}
bool validate;
raw->vector_value("VALIDATE", validate, true);
if (!validate)
{
return 0;
}
string value = raw->vector_value("TYPE");
one_util::tolower(value);
@ -163,9 +171,8 @@ int VirtualMachineManager::validate_raw(const Template * vmt, string& error_str)
value = raw->vector_value("DATA");
return vmd->validate_raw(value, error_str);
return 0;
return vmd->validate_raw(value, error_str);
}
/* -------------------------------------------------------------------------- */