mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-24 21:34:01 +03:00
Changed the default trigger action for the image hook. Improved the image hook legibility
This commit is contained in:
parent
0f0bb611bb
commit
76d839e0f6
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user