1*** Settings *** 2Resource ../../lib/resource.txt 3Resource ../../lib/bmc_redfish_resource.robot 4 5*** Test Cases *** 6 7Login To BMCweb With Invalid Credentials 8 [Documentation] Login to BMC web using invalid credential. 9 [Tags] Login_To_BMCweb_With_Invalid_Credentials 10 [Template] Login And Verify Redfish Response 11 12 # Expect status Username Password 13 InvalidCredentialsError* ${OPENBMC_USERNAME} deadpassword 14 InvalidCredentialsError* groot ${OPENBMC_PASSWORD} 15 InvalidCredentialsError* ${EMPTY} ${OPENBMC_PASSWORD} 16 InvalidCredentialsError* ${OPENBMC_USERNAME} ${EMPTY} 17 InvalidCredentialsError* ${EMPTY} ${EMPTY} 18 19 20Login To BMCweb Using Unsecured HTTP 21 [Documentation] Login to BMC web through http unsecured. 22 [Tags] Login_To_BMCweb_Using_Unsecured_HTTP 23 24 Create Session openbmc http://${OPENBMC_HOST} 25 ${data}= Create Dictionary 26 ... UserName=${OPENBMC_USERNAME} Password=${OPENBMC_PASSWORD} 27 28 ${headers}= Create Dictionary Content-Type=application/json 29 30 Run Keyword And Expect Error *Connection refused* 31 ... Post Request openbmc /redfish/v1/SessionService/Sessions 32 ... data=${data} headers=${headers} 33 34 35*** Keywords *** 36 37Login And Verify Redfish Response 38 [Documentation] Login and verify redfish response. 39 [Arguments] ${expected_response} ${username} ${password} 40 41 # Description of arguments: 42 # expected_response Expected REST status. 43 # username The username to be used to connect to the server. 44 # password The password to be used to connect to the server. 45 46 ${data}= Create Dictionary username=${username} password=${password} 47 Run Keyword And Expect Error ${expected_response} redfish.Login ${data} 48