Instead, the last element in the path should be determined from the OData entry.
For example, looking at the DTMF mockup Systems resource the entry could look something like this:
So the test case should obtain the path using the OData. For example, with ipmi/test_ipmi_general.robot
instead of defining the keyword Verify Identify LED State Via Redfish as:
Verify Identify LED State Via Redfish
[Documentation] Verify that Redfish identify LED system with given state.
[Arguments] ${expected_state}
# 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}'
it should be
Verify Identify LED State Via Redfish
[Documentation] Verify that Redfish identify LED system with given state.
[Arguments] ${expected_state}
# Description of argument(s):
# expected_led_status Expected value of Identify LED.
${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
Here's the git diff for that change:
diff --git a/ipmi/test_ipmi_general.robot b/ipmi/test_ipmi_general.robot
index 73a0b99d..ec71f699 100644
--- a/ipmi/test_ipmi_general.robot
+++ b/ipmi/test_ipmi_general.robot
@@ -273,5 +273,9 @@ Verify Identify LED State Via Redfish
# 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}'
+ ${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
+
Instead, the last element in the path should be determined from the OData entry. For example, looking at the DTMF mockup Systems resource the entry could look something like this:
and for those cases where that element actually is "systems" (as is true when these test cases are passing), it probably looks something like this:
So the test case should obtain the path using the OData. For example, with ipmi/test_ipmi_general.robot instead of defining the keyword
Verify Identify LED State Via Redfish
as:it should be
Here's the git diff for that change: