From 132bf74c193da563f9bff145169cdded7deba214 Mon Sep 17 00:00:00 2001 From: Imre Farkas Date: Wed, 21 Jan 2015 13:01:02 +0100 Subject: [PATCH] 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 --- ironic/drivers/modules/drac/power.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ironic/drivers/modules/drac/power.py b/ironic/drivers/modules/drac/power.py index e84cc7274c..3ad79b8c69 100644 --- a/ironic/drivers/modules/drac/power.py +++ b/ironic/drivers/modules/drac/power.py @@ -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,