George Keishing | 4c39401 | 2019-02-01 06:03:02 -0600 | [diff] [blame] | 1 | *** Settings *** |
George Keishing | 2db7bca | 2019-02-14 13:03:08 -0600 | [diff] [blame] | 2 | Resource ../../lib/resource.roboet |
George Keishing | 4c39401 | 2019-02-01 06:03:02 -0600 | [diff] [blame] | 3 | Resource ../../lib/bmc_redfish_resource.robot |
George Keishing | 3298d5c | 2019-02-12 06:59:25 -0600 | [diff] [blame] | 4 | Resource ../../lib/openbmc_ffdc.robot |
| 5 | |
| 6 | Test Teardown FFDC On Test Case Fail |
George Keishing | 4c39401 | 2019-02-01 06:03:02 -0600 | [diff] [blame] | 7 | |
| 8 | *** Test Cases *** |
| 9 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 10 | Redfish Login With Invalid Credentials |
George Keishing | 4c39401 | 2019-02-01 06:03:02 -0600 | [diff] [blame] | 11 | [Documentation] Login to BMC web using invalid credential. |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 12 | [Tags] Redfish_Login_With_Invalid_Credentials |
George Keishing | 4c39401 | 2019-02-01 06:03:02 -0600 | [diff] [blame] | 13 | [Template] Login And Verify Redfish Response |
| 14 | |
| 15 | # Expect status Username Password |
| 16 | InvalidCredentialsError* ${OPENBMC_USERNAME} deadpassword |
| 17 | InvalidCredentialsError* groot ${OPENBMC_PASSWORD} |
| 18 | InvalidCredentialsError* ${EMPTY} ${OPENBMC_PASSWORD} |
| 19 | InvalidCredentialsError* ${OPENBMC_USERNAME} ${EMPTY} |
| 20 | InvalidCredentialsError* ${EMPTY} ${EMPTY} |
| 21 | |
| 22 | |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 23 | Redfish Login Using Unsecured HTTP |
George Keishing | a811693 | 2019-02-05 11:51:47 -0600 | [diff] [blame] | 24 | [Documentation] Login to BMC web through http unsecured. |
George Keishing | 5ee33d9 | 2019-02-02 12:33:25 -0600 | [diff] [blame] | 25 | [Tags] Redfish_Login_Using_Unsecured_HTTP |
George Keishing | a811693 | 2019-02-05 11:51:47 -0600 | [diff] [blame] | 26 | |
| 27 | Create Session openbmc http://${OPENBMC_HOST} |
| 28 | ${data}= Create Dictionary |
| 29 | ... UserName=${OPENBMC_USERNAME} Password=${OPENBMC_PASSWORD} |
| 30 | |
| 31 | ${headers}= Create Dictionary Content-Type=application/json |
| 32 | |
| 33 | Run Keyword And Expect Error *Connection refused* |
| 34 | ... Post Request openbmc /redfish/v1/SessionService/Sessions |
| 35 | ... data=${data} headers=${headers} |
| 36 | |
| 37 | |
George Keishing | b2f0734 | 2019-02-09 05:21:45 -0600 | [diff] [blame] | 38 | Redfish Login Using HTTPS Wrong Port 80 Protocol |
| 39 | [Documentation] Login to BMC web through wrong protocol port 80. |
| 40 | [Tags] Redfish_Login_Using_HTTPS_Wrong_Port_80_Protocol |
| 41 | |
| 42 | Create Session openbmc https://${OPENBMC_HOST}:80 |
| 43 | ${data}= Create Dictionary |
| 44 | ... UserName=${OPENBMC_USERNAME} Password=${OPENBMC_PASSWORD} |
| 45 | |
| 46 | ${headers}= Create Dictionary Content-Type=application/json |
| 47 | |
| 48 | Run Keyword And Expect Error *Connection refused* |
| 49 | ... Post Request openbmc /redfish/v1/SessionService/Sessions |
| 50 | ... data=${data} headers=${headers} |
| 51 | |
| 52 | |
George Keishing | 4c39401 | 2019-02-01 06:03:02 -0600 | [diff] [blame] | 53 | *** Keywords *** |
| 54 | |
| 55 | Login And Verify Redfish Response |
| 56 | [Documentation] Login and verify redfish response. |
| 57 | [Arguments] ${expected_response} ${username} ${password} |
| 58 | |
| 59 | # Description of arguments: |
| 60 | # expected_response Expected REST status. |
| 61 | # username The username to be used to connect to the server. |
| 62 | # password The password to be used to connect to the server. |
| 63 | |
| 64 | ${data}= Create Dictionary username=${username} password=${password} |
| 65 | Run Keyword And Expect Error ${expected_response} redfish.Login ${data} |