1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

Bug #4648: Fix history bug in delete hook

This commit is contained in:
Tino Vazquez 2016-11-24 17:20:50 +01:00
parent 6ac6daa171
commit 5cb9494a05

View File

@ -81,7 +81,7 @@ lcm_state = OpenNebula::VirtualMachine::LCM_STATE[lcm_state_num]
keep_disks = !template['/VM/USER_TEMPLATE/KEEP_DISKS_ON_DONE'].nil? &&
template['/VM/USER_TEMPLATE/KEEP_DISKS_ON_DONE'].downcase=="yes"
disks = [template.to_hash["VM"]["TEMPLATE"]["DISK"]].flatten.compact
host = template["/VM/HISTORY_RECORDS/HISTORY"].first["HOSTNAME"]
host = template.retrieve_elements("/VM/HISTORY_RECORDS/HISTORY/HOSTNAME").last
cloned_tmplt = nil
if !template['/VMM_DRIVER_ACTION_DATA/VM/TEMPLATE/CLONING_TEMPLATE_ID'].nil?