1
0
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:
Jaime Melis 2010-07-26 17:54:06 +02:00
parent 0f0bb611bb
commit 76d839e0f6
2 changed files with 2 additions and 7 deletions

View File

@ -265,7 +265,7 @@ HM_MAD = [
VM_HOOK = [
name = "image",
on = "SHUTDOWN",
on = "DONE",
command = "[HOOKS_LOCATION]/image.rb",
arguments = "$VMID" ]

View File

@ -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)