Include instance status in bmc log message

When querying instance status, include the status itself so
problems can be detected.
This commit is contained in:
Ben Nemec 2017-05-23 16:28:37 -05:00
parent fb68ca551b
commit 4a400d6cdb

View File

@ -122,8 +122,10 @@ class OpenStackBmc(bmc.Bmc):
def get_power_state(self):
"""Returns the current power state of the managed instance"""
self.log('Getting power state for %s' % self.instance)
return self._instance_active()
state = self._instance_active()
self.log('Reporting power state "%s" for instance %s' %
(state, self.instance))
return state
def power_off(self):
"""Stop the managed instance"""