Fix filter_query in drac/power interface

While enumerating the DCIM_ComputerSystem class, the filter wasn't set
against the same class but against CIM_ComputerSystem in the query for
get_power_state. It caused inconsistency between 11th and 12th
generation servers. In the response, 11th generation server used the
CIM_ComputerSystem namespace, while 12th generation used
DCIM_ComputerSystem. Ironic looked for DCIM_ComputerSystem in the
response, thus failing for 11th generation servers. With the patch, the
response is in the DCIM_ComputerSystem namespace regardless of the
generation of the server.

Closes-Bug: #1409036
Change-Id: I218a9c3c09208235ee4134eeeb30d878bda6ef6a
This commit is contained in:
Imre Farkas 2015-01-21 13:01:02 +01:00
parent 40c1688dfd
commit 132bf74c19

View File

@ -51,7 +51,7 @@ def _get_power_state(node):
"""
client = drac_client.get_wsman_client(node)
filter_query = ('select EnabledState,ElementName from CIM_ComputerSystem '
filter_query = ('select EnabledState,ElementName from DCIM_ComputerSystem '
'where Name="srv:system"')
try:
doc = client.wsman_enumerate(resource_uris.DCIM_ComputerSystem,