DMTF redfish system path logic update in test suites
Changes:
- Dynamincally find the logical id and use
Resolves openbmc/openbmc-test-automation#2172
Change-Id: I9af1cc6a3ad4b7ad29270b9b8013fe18e6259bd1
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/ipmi/test_ipmi_general.robot b/ipmi/test_ipmi_general.robot
index faab290..4a8c5a7 100644
--- a/ipmi/test_ipmi_general.robot
+++ b/ipmi/test_ipmi_general.robot
@@ -277,5 +277,9 @@
# Description of argument(s):
# expected_led_status Expected value of Identify LED.
- ${led_value}= Redfish.Get Attribute /redfish/v1/Systems/system IndicatorLED
- Should Be True '${led_value}' == '${expected_state}'
+ # Python module: get_member_list(resource_path)
+ ${systems}= Redfish_Utils.Get Member List /redfish/v1/Systems
+ FOR ${system} IN @{systems}
+ ${led_value}= Redfish.Get Attribute ${system} IndicatorLED
+ Should Be True '${led_value}' == '${expected_state}'
+ END
diff --git a/ipmi/test_ipmi_sensor.robot b/ipmi/test_ipmi_sensor.robot
index 5527465..0bd3347 100644
--- a/ipmi/test_ipmi_sensor.robot
+++ b/ipmi/test_ipmi_sensor.robot
@@ -395,7 +395,10 @@
# "State": "Enabled"
#}
- ${redfish_value}= Redfish.Get Properties /redfish/v1/Systems/system/Processors/${component}
+ # Python module: get_endpoint_path_list(resource_path, end_point_prefix)
+ ${processor_list}= redfish_utils.Get Endpoint Path List /redfish/v1/Systems/ Processors
+
+ ${redfish_value}= Redfish.Get Properties ${processor_list[0]}/${component}
Should Be True '${redfish_value['Status']['State']}' == 'Enabled'
@@ -420,7 +423,10 @@
# "State": "Absent"
#}
- ${redfish_value}= Redfish.Get Properties /redfish/v1/Systems/system/Processors/${component}
+ # Python module: get_endpoint_path_list(resource_path, end_point_prefix)
+ ${processor_list}= redfish_utils.Get Endpoint Path List /redfish/v1/Systems/ Processors
+
+ ${redfish_value}= Redfish.Get Properties ${processor_list[0]}/${component}
Should Be True '${redfish_value['Status']['State']}' == 'Absent'