Fix synaccess response code
Changes:
- Minor changes in the REST response code checking
Tested:
robot -v OPENBMC_HOST:xx.xx.xx.xx -v PDU_IP:yy.yy.yy.yy
-v PDU_USERNAME:admin -v PDU_PASSWORD:*********
-v PDU_TYPE:synaccess -v PDU_SLOT_NO:1
redfish/extended/test_power_restore.robot
With this changes also, it is not fully working in our env.
This is more of a response changes fix for existing PDU.
Change-Id: I8ca64044d614329fb98291cad3c820d0a9a9b0d7
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/pdu/synaccess.robot b/lib/pdu/synaccess.robot
index d9d5a21..c76553c 100644
--- a/lib/pdu/synaccess.robot
+++ b/lib/pdu/synaccess.robot
@@ -15,7 +15,8 @@
Power Cycle
[Documentation] Perform PDU power cycle.
Connect and Login
- ${ret}= Get Request pdu /cmd.cgi?$A4 ${PDU_SLOT_NO}
+ ${resp}= Get Request pdu /cmd.cgi?$A4 ${PDU_SLOT_NO}
+
${error_message}= Catenate Power cycle of slot ${PDU_SLOT_NO} failed.
- ... PDU returned RC=${ret}.
- Should Be Equal As Strings ${ret} ${HTTP_OK} msg=${error_message}
+ ... PDU returned RC=${resp}.
+ Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} msg=${error_message}