Update LED IndicatorLED location lookup from URI(s)
Example:
The logic can fetch one or more from Systems
/redfish/v1/Systems/system
/redfish/v1/Systems/hypervisor
but all of them wont have the IndicatorLED implemented.
The code looks up which URI has the indicator and check against it.
Tested:
robot -v OPENBMC_HOST:xx.xx.xx.xx --include Verify_Chassis_Identify_via_IPMI
ipmi/test_ipmi_general.robot
------------------------------------------------------------------------------
Test Ipmi General :: Module to test IPMI asset tag functionality. | PASS |
1 test, 1 passed, 0 failed
==============================================================================
Change-Id: I8d2ef7ffd1cff410221ae16ed54931331b49f169
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/ipmi/test_ipmi_general.robot b/ipmi/test_ipmi_general.robot
index 7eb4046..5418118 100644
--- a/ipmi/test_ipmi_general.robot
+++ b/ipmi/test_ipmi_general.robot
@@ -308,10 +308,17 @@
# Description of argument(s):
# expected_led_status Expected value of Identify LED.
+ # Get the following URI(s) and iterate to find the attribute IndicatorLED.
+ # Example:
+ # /redfish/v1/Systems/system
+ # /redfish/v1/Systems/hypervisor
+
# 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
+ # Get attribute return None if IndicatorLED doesnt exist in the URI.
+ Continue For Loop If '${led_value}' == 'None'
Should Be True '${led_value}' == '${expected_state}'
END