Fail module if unknown state passed to set_vm_power_state (#32631)
This commit is contained in:
parent
aef50eaa40
commit
f6b188e521
1 changed files with 4 additions and 0 deletions
|
@ -724,6 +724,10 @@ def set_vm_power_state(content, vm, state, force):
|
||||||
result['failed'] = True
|
result['failed'] = True
|
||||||
result['msg'] = "Virtual machine %s must be in poweredon state for guest shutdown/reboot" % vm.name
|
result['msg'] = "Virtual machine %s must be in poweredon state for guest shutdown/reboot" % vm.name
|
||||||
|
|
||||||
|
else:
|
||||||
|
result['failed'] = True
|
||||||
|
result['msg'] = "Unsupported expected state provided: %s" % expected_state
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
result['failed'] = True
|
result['failed'] = True
|
||||||
result['msg'] = to_text(e)
|
result['msg'] = to_text(e)
|
||||||
|
|
Loading…
Reference in a new issue