mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Remove state checks from get_image_from_disk. Now they are done in set_saveas_state
This commit is contained in:
parent
60ac51ad22
commit
c9c55aadc3
@ -2461,11 +2461,6 @@ int VirtualMachine::get_image_from_disk(int disk_id, bool hot, string& err_str)
|
||||
|
||||
num_disks = obj_template->get("DISK",disks);
|
||||
|
||||
if ( state == DONE || state == FAILED )
|
||||
{
|
||||
goto error_state;
|
||||
}
|
||||
|
||||
for(int i=0; i<num_disks; i++)
|
||||
{
|
||||
disk = dynamic_cast<VectorAttribute * >(disks[i]);
|
||||
@ -2507,10 +2502,6 @@ int VirtualMachine::get_image_from_disk(int disk_id, bool hot, string& err_str)
|
||||
|
||||
goto error_not_found;
|
||||
|
||||
error_state:
|
||||
oss << "VM cannot be in DONE or FAILED state.";
|
||||
goto error_common;
|
||||
|
||||
error_persistent:
|
||||
oss << "Source image for DISK " << disk_id << " is persistent.";
|
||||
goto error_common;
|
||||
|
Loading…
x
Reference in New Issue
Block a user