mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-26 10:03:37 +03:00
(cherry picked from commit 52a6aa6c2020c72bd9bcee6b716cc0423f0a756a)
This commit is contained in:
parent
6a9abff5b3
commit
3a547b3716
@ -92,8 +92,6 @@ int VirtualMachine::generate_context(string &files, int &disk_id,
|
||||
return -1;
|
||||
}
|
||||
|
||||
decrypt();
|
||||
|
||||
VectorAttribute * context = obj_template->get("CONTEXT");
|
||||
|
||||
if ( context == 0 )
|
||||
@ -196,6 +194,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";
|
||||
@ -219,6 +219,8 @@ int VirtualMachine::generate_context(string &files, int &disk_id,
|
||||
|
||||
context->vector_value("DISK_ID", disk_id);
|
||||
|
||||
encrypt();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -348,14 +350,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);
|
||||
|
@ -62,6 +62,8 @@ int VMTemplatePool::allocate (
|
||||
goto error_duplicated;
|
||||
}
|
||||
|
||||
vm_template->encrypt();
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Insert the Object in the pool
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -85,6 +85,8 @@ int VNTemplate::insert(SqlDB *db, string& error_str)
|
||||
return -1;
|
||||
}
|
||||
|
||||
encrypt();
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Insert the Template
|
||||
// ------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user