mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-23 21:57:43 +03:00
Merge branch 'master' of dsa-research.org:one
This commit is contained in:
commit
aa33d18c9e
@ -265,7 +265,7 @@ HM_MAD = [
|
||||
|
||||
VM_HOOK = [
|
||||
name = "image",
|
||||
on = "SHUTDOWN",
|
||||
on = "DONE",
|
||||
command = "[HOOKS_LOCATION]/image.rb",
|
||||
arguments = "$VMID" ]
|
||||
|
||||
|
@ -47,12 +47,7 @@ vm.each('TEMPLATE/DISK') do |disk|
|
||||
disk_id = disk["DISK_ID"]
|
||||
source_path = VMDIR+"/#{vm_id}/disk.#{disk_id}"
|
||||
|
||||
image_id = nil
|
||||
if disk["SAVE_AS"]
|
||||
image_id = disk["SAVE_AS"]
|
||||
end
|
||||
|
||||
if image_id and source_path
|
||||
if image_id = disk["SAVE_AS"]
|
||||
image=Image.new(
|
||||
Image.build_xml(image_id),
|
||||
client)
|
||||
|
@ -29,6 +29,7 @@ void RequestManager::ImageEnable::execute(
|
||||
xmlrpc_c::value * const retval)
|
||||
{
|
||||
string session;
|
||||
string err_msg;
|
||||
|
||||
int iid;
|
||||
bool enable_flag;
|
||||
@ -136,7 +137,13 @@ error_authorize:
|
||||
goto error_common;
|
||||
|
||||
error_enable:
|
||||
oss.str(action_error(method_name, "ENABLE/DISABLE", "IMAGE", iid, rc));
|
||||
if (enable_flag == TRUE)
|
||||
{
|
||||
err_msg = "ENABLE";
|
||||
} else {
|
||||
err_msg = "DISABLE";
|
||||
}
|
||||
oss.str(action_error(method_name, err_msg, "IMAGE", iid, rc));
|
||||
image->unlock();
|
||||
goto error_common;
|
||||
|
||||
|
@ -1113,7 +1113,7 @@ int VirtualMachine::save_disk(int disk_id, int img_id)
|
||||
|
||||
num_disks = vm_template->get("DISK",disks);
|
||||
|
||||
for(int i=0; i<num_disks; i++)
|
||||
for(int i=0; i<num_disks; i++, iss.clear())
|
||||
{
|
||||
disk = dynamic_cast<VectorAttribute * >(disks[i]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user