1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-11 05:17:41 +03:00

Feature #1556: The parser for context & requirements looks for variables in both VM templates

This commit is contained in:
Carlos Martín 2013-02-26 14:32:31 +01:00
parent f1ee01cffa
commit 25dbb79057
2 changed files with 12 additions and 0 deletions

View File

@ -691,6 +691,13 @@ public:
*/
int replace_template(const string& tmpl_str, string& error);
void get_user_template_attribute(
const char * name,
string& value) const
{
user_obj_template->get(name,value);
}
// ------------------------------------------------------------------------
// States
// ------------------------------------------------------------------------

View File

@ -304,6 +304,11 @@ void insert_single(VirtualMachine * vm,
else
{
vm->get_template_attribute(name.c_str(),value);
if (value.empty())
{
vm->get_user_template_attribute(name.c_str(),value);
}
}
if (!value.empty())