mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
B #: fix Firecracker VNM clean hook (#1019)
This commit is contained in:
parent
f360530826
commit
58f8201571
@ -46,19 +46,14 @@ XPATH_HV = '//HISTORY/VM_MAD'
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
|
||||
template = REXML::Document.new(Base64.decode64(template64))
|
||||
|
||||
hypervisor = template.elements[XPATH_HV].text
|
||||
|
||||
exit 0 if hypervisor != 'firecracker'
|
||||
|
||||
if deploy_id.nil? || deploy_id.empty?
|
||||
vm_id = template.elements['/VM/ID'].text
|
||||
deploy_id = "one-#{vm_id}"
|
||||
end
|
||||
|
||||
vm_id = template.elements['/VM/ID'].text
|
||||
deploy_id = "one-#{vm_id}"
|
||||
rc = nil
|
||||
e = nil
|
||||
error = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user