blob: d9d5a21c9981fdbcb753b85eb5b6f234684b3553 [file] [log] [blame]
Chris Austenb29d2e82016-06-07 12:25:35 -05001*** Settings ***
Joy Onyerikwuf4a807b2018-06-20 08:43:54 -05002Documentation Synaccess Protocol Distribution Unit (PDU) library
Chris Austenb29d2e82016-06-07 12:25:35 -05003
4Resource ../../lib/pdu/pdu.robot
5Library RequestsLibrary.RequestsKeywords
6
7*** Keywords ***
8Connect and Login
Joy Onyerikwuf4a807b2018-06-20 08:43:54 -05009 [Documentation] Open PDU connection and login.
Chris Austenb29d2e82016-06-07 12:25:35 -050010 Validate Prereq
Michael Walshe21c3642017-03-21 14:52:21 -050011 SSHLibrary.Open Connection ${PDU_IP}
Chris Austenb29d2e82016-06-07 12:25:35 -050012 ${auth}= Create List ${PDU_USERNAME} ${PDU_PASSWORD}
13 Create Session pdu http://${PDU_IP} auth=${auth}
14
15Power Cycle
Joy Onyerikwuf4a807b2018-06-20 08:43:54 -050016 [Documentation] Perform PDU power cycle.
Chris Austenb29d2e82016-06-07 12:25:35 -050017 Connect and Login
18 ${ret}= Get Request pdu /cmd.cgi?$A4 ${PDU_SLOT_NO}
Steven Sombarac831df2018-01-18 07:28:52 -060019 ${error_message}= Catenate Power cycle of slot ${PDU_SLOT_NO} failed.
20 ... PDU returned RC=${ret}.
21 Should Be Equal As Strings ${ret} ${HTTP_OK} msg=${error_message}