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:
parent
f1ee01cffa
commit
25dbb79057
@ -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
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user