From a87a62ba8a47e2443b7f37519dbc2813bc41e303 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Mon, 29 Oct 2018 12:08:17 +0530 Subject: [PATCH] VMware: restore timeout in set_vm_power_state operation (#47723) 'state_change_timeout' parameter was removed, this introduced regression. Fixes: #47722 Signed-off-by: Abhijeet Kasurde --- .../47722-vmware_guest_powerstate-restore_timeout.yaml | 2 ++ lib/ansible/modules/cloud/vmware/vmware_guest_powerstate.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/47722-vmware_guest_powerstate-restore_timeout.yaml diff --git a/changelogs/fragments/47722-vmware_guest_powerstate-restore_timeout.yaml b/changelogs/fragments/47722-vmware_guest_powerstate-restore_timeout.yaml new file mode 100644 index 0000000000..217fbc94a4 --- /dev/null +++ b/changelogs/fragments/47722-vmware_guest_powerstate-restore_timeout.yaml @@ -0,0 +1,2 @@ +bugfixes: +- Restore timeout in set_vm_power_state operation in vmware_guest_powerstate module. diff --git a/lib/ansible/modules/cloud/vmware/vmware_guest_powerstate.py b/lib/ansible/modules/cloud/vmware/vmware_guest_powerstate.py index 3d927978a1..522931657d 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_guest_powerstate.py +++ b/lib/ansible/modules/cloud/vmware/vmware_guest_powerstate.py @@ -207,7 +207,7 @@ def main(): "given are invalid: %s" % (module.params.get('state'), to_native(e.msg))) else: - result = set_vm_power_state(pyv.content, vm, module.params['state'], module.params['force']) + result = set_vm_power_state(pyv.content, vm, module.params['state'], module.params['force'], module.params['state_change_timeout']) else: module.fail_json(msg="Unable to set power state for non-existing virtual machine : '%s'" % (module.params.get('uuid') or module.params.get('name')))