mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
parent
ac0d1dc6d2
commit
39e7aaf266
@ -30,6 +30,9 @@
|
||||
:host: 127.0.0.1
|
||||
:port: 2474
|
||||
|
||||
# Force deletion of VMs on terminate signal
|
||||
:force_deletion: true
|
||||
|
||||
################################################################################
|
||||
# Defaults
|
||||
################################################################################
|
||||
|
@ -349,7 +349,9 @@ module OpenNebula
|
||||
rc = vm.terminate(true)
|
||||
|
||||
if OpenNebula.is_error?(rc)
|
||||
rc = vm.delete
|
||||
if @@force_deletion
|
||||
rc = vm.delete
|
||||
end
|
||||
end
|
||||
|
||||
if OpenNebula.is_error?(rc)
|
||||
@ -600,6 +602,10 @@ module OpenNebula
|
||||
@@default_shutdown = shutdown_action
|
||||
end
|
||||
|
||||
def self.init_force_deletion(force_deletion)
|
||||
@@force_deletion = force_deletion
|
||||
end
|
||||
|
||||
def self.init_default_vm_name_template(vm_name_template)
|
||||
@@vm_name_template = vm_name_template
|
||||
end
|
||||
|
@ -124,6 +124,7 @@ end
|
||||
|
||||
Role.init_default_cooldown(conf[:default_cooldown])
|
||||
Role.init_default_shutdown(conf[:shutdown_action])
|
||||
Role.init_force_deletion(conf[:force_deletion])
|
||||
|
||||
conf[:vm_name_template] ||= DEFAULT_VM_NAME_TEMPLATE
|
||||
Role.init_default_vm_name_template(conf[:vm_name_template])
|
||||
|
Loading…
x
Reference in New Issue
Block a user