Skip to content
Snippets Groups Projects
Commit 6d3f5d36 authored by Benziane Chakib's avatar Benziane Chakib
Browse files

bug fix for force poweroff

parent 5644c956
No related branches found
No related tags found
No related merge requests found
......@@ -163,9 +163,8 @@ class NodeHandler(RpcHandler):
:param vm_names: the list of vm names to stop
:vm_names type: :class:`list` of strings
:param stop_mode: soft shutown or force poweroff
:type stop_mode: either `FORCE_VM_POWEROFF` or `SOFT_VM_POWEROFF`
default is SOFT_VM_POWEROFF
:param force: soft shutown or force poweroff
:type force: either True or False
'''
if vm_names is None:
#fetch all vm names in hypervisor
......@@ -173,7 +172,7 @@ class NodeHandler(RpcHandler):
logging.debug('stop_vm: stopping vms %s' % vm_names)
for vm in vm_names:
try:
self.hv_handle.stop_vm(vm, stop_mode)
self.hv_handle.stop_vm(vm, force)
except VMError as err:
logging.warning('Error while stopping %s: %s' % (vm, err))
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment