mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
F #2347: Fixes some bugs to VMGroups
This commit is contained in:
parent
a6fc7b23cb
commit
20d10c7b12
@ -2949,7 +2949,7 @@ int VirtualMachine::get_vmgroup(string& error)
|
||||
vmg_uid = get_uid();
|
||||
}
|
||||
|
||||
vmgroup = vmgrouppool->get(gname, vmg_uid, true);
|
||||
vmgroup = vmgrouppool->get(vmg_name, vmg_uid, true);
|
||||
}
|
||||
else if ( thegroup->vector_value("VMGROUP_ID", vmg_id) == 0 )
|
||||
{
|
||||
|
@ -63,6 +63,12 @@ void VMGroupRole::del_vm(int vm_id)
|
||||
|
||||
void VMGroupRole::set_vms()
|
||||
{
|
||||
if ( vms.empty() )
|
||||
{
|
||||
va->remove("VMS");
|
||||
return;
|
||||
}
|
||||
|
||||
std::string vms_str = one_util::join(vms.begin(), vms.end(), ',');
|
||||
|
||||
va->replace("VMS", vms_str);
|
||||
@ -521,6 +527,8 @@ int VMGroup::post_update_template(string& error)
|
||||
return -1;
|
||||
}
|
||||
|
||||
obj_template->erase("ROLE");
|
||||
|
||||
if ( check_affinity("AFFINED", error) == -1 )
|
||||
{
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user