mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
parent
1f578e1ad6
commit
52a6aa6c20
@ -91,8 +91,6 @@ int VirtualMachine::generate_context(string &files, int &disk_id,
|
||||
return -1;
|
||||
}
|
||||
|
||||
decrypt();
|
||||
|
||||
VectorAttribute * context = obj_template->get("CONTEXT");
|
||||
|
||||
if ( context == 0 )
|
||||
@ -195,6 +193,8 @@ int VirtualMachine::generate_context(string &files, int &disk_id,
|
||||
files += (" " + history->token_file);
|
||||
}
|
||||
|
||||
decrypt();
|
||||
|
||||
const map<string, string> values = context->value();
|
||||
|
||||
file << "# Context variables generated by OpenNebula\n";
|
||||
@ -218,6 +218,8 @@ int VirtualMachine::generate_context(string &files, int &disk_id,
|
||||
|
||||
context->vector_value("DISK_ID", disk_id);
|
||||
|
||||
encrypt();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -351,14 +353,14 @@ int VirtualMachine::generate_network_context(VectorAttribute* context,
|
||||
continue;
|
||||
}
|
||||
else if (get_nic(nic_id)->is_alias()) // If nic was detached and current is alias
|
||||
{
|
||||
{
|
||||
int parent_id;
|
||||
|
||||
vatts[i]->vector_value("PARENT_ID", parent_id);
|
||||
|
||||
// If parent was detached clear alis
|
||||
if (get_nic(parent_id)->vector_value("ATTACH") == "YES")
|
||||
{
|
||||
{
|
||||
int alias_id;
|
||||
|
||||
vatts[i]->vector_value("ALIAS_ID", alias_id);
|
||||
|
@ -61,6 +61,8 @@ int VMTemplatePool::allocate (
|
||||
goto error_duplicated;
|
||||
}
|
||||
|
||||
vm_template->encrypt();
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Insert the Object in the pool
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -104,6 +104,8 @@ int VNTemplate::insert(SqlDB *db, string& error_str)
|
||||
return -1;
|
||||
}
|
||||
|
||||
encrypt();
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Insert the Template
|
||||
// ------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user