Remove hypen from vmware powerstate (#32295)

This fix removes hypen while comparing to current
virtual machine's powerstate.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2017-11-12 03:09:28 +00:00 committed by ansibot
parent e8c599b0f7
commit 1a0fbd424e

View file

@ -669,7 +669,7 @@ def set_vm_power_state(content, vm, state, force):
requested states. force is forceful requested states. force is forceful
""" """
facts = gather_vm_facts(content, vm) facts = gather_vm_facts(content, vm)
expected_state = state.replace('_', '').lower() expected_state = state.replace('_', '').replace('-', '').lower()
current_state = facts['hw_power_status'].lower() current_state = facts['hw_power_status'].lower()
result = dict( result = dict(
changed=False, changed=False,