Get/Set power state fails

It's possible for iDRACs to get into a state where the Name element is
not returned when querying DCIM_ComputerSystem.  This results in the
get_power_state command failing against nodes with iDRACs in this
state.

This patch removes selecting on the Name element from get_power_state.
This makes get_power_state work against both nodes with iDRACs in this
state and iDRACs not in this state.

Change-Id: Ide2d69b695376c777e5c4ee847dd0e481474a09f
Closes-Bug: #1667088
This commit is contained in:
Christopher Dearborn 2017-02-22 15:19:41 -05:00
parent d349af3ce6
commit f49efaa1bf
1 changed files with 1 additions and 2 deletions

View File

@ -74,8 +74,7 @@ class PowerManagement(object):
interface
"""
filter_query = ('select EnabledState from '
'DCIM_ComputerSystem where Name="srv:system"')
filter_query = ('select EnabledState from DCIM_ComputerSystem')
doc = self.client.enumerate(uris.DCIM_ComputerSystem,
filter_query=filter_query)
enabled_state = utils.find_xml(doc, 'EnabledState',