Added IPMI chassis identify testcases with verification via Redfish
- Verify Chassis Identify via IPMI
- Verify Chassis Identify Off And Force Identify On via IPMI
Change-Id: Ieea260199e9754cccbbd0e3b781d684d7f146c19
Signed-off-by: Ashwini Chandrappa <Ashwini.Chandrappa777@ibm.com>
diff --git a/ipmi/test_ipmi_general.robot b/ipmi/test_ipmi_general.robot
index 7cb1944..77f57ce 100644
--- a/ipmi/test_ipmi_general.robot
+++ b/ipmi/test_ipmi_general.robot
@@ -204,6 +204,42 @@
Should Contain ${cmd_output} Closed Session
+Verify Chassis Identify via IPMI
+ [Documentation] Set chassis identify using IPMI and verify.
+ [Tags] Verify_Chassis_Identify_via_IPMI
+ [Setup] Redfish.Login
+ [Teardown] Redfish.logout
+
+ # Set to default "chassis identify" and verify that LED blinks for 15s.
+ Run IPMI Standard Command chassis identify
+ Verify Identify LED State Via Redfish Lit
+
+ Sleep 18s
+ Verify Identify LED State Via Redfish Off
+
+ # Set "chassis identify" to 10s and verify that the LED blinks for 10s.
+ Run IPMI Standard Command chassis identify 10
+ Verify Identify LED State Via Redfish Lit
+
+ Sleep 12s
+ Verify Identify LED State Via Redfish Off
+
+
+Verify Chassis Identify Off And Force Identify On via IPMI
+ [Documentation] Set chassis identify to "off" and "force" using IPMI and verify.
+ [Tags] Verify_Chassis_Identify_Off_And_Force_Identify_On_via_IPMI
+ [Setup] Redfish.Login
+ [Teardown] Redfish.logout
+
+ # Set the LED to "Force Identify On".
+ Run IPMI Standard Command chassis identify force
+ Verify Identify LED State Via Redfish Lit
+
+ # Set "chassis identify" to 0 and verify that the LED turns off.
+ Run IPMI Standard Command chassis identify 0
+ Verify Identify LED State Via Redfish Off
+
+
*** Keywords ***
Set Session Privilege Level And Verify
@@ -229,3 +265,13 @@
${msg}= Run Keyword And Expect Error * Run External IPMI Raw Command
... 0x06 0x3b ${privilege_level}
Should Contain ${msg} Unknown rsp=0x81
+
+
+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}'