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

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

This commit is contained in:
Pavel Czerný 2021-02-09 18:20:40 +01:00 committed by GitHub
parent 5a8b6ef796
commit 07b1656e52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,6 +190,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);
@ -203,9 +211,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);
}
/* -------------------------------------------------------------------------- */