George Keishing | a47c5d3 | 2017-01-09 09:03:17 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Set metadata for test suite. |
| 3 | |
| 4 | Library SSHLibrary |
| 5 | Resource ../lib/connection_client.robot |
| 6 | Resource ../lib/rest_client.robot |
| 7 | |
| 8 | Suite Setup System Driver Data |
| 9 | |
| 10 | *** Variables *** |
| 11 | |
| 12 | ${DRIVER_CMD} cat /etc/os-release | grep ^VERSION_ID= |
| 13 | |
| 14 | *** Keyword *** |
| 15 | |
| 16 | System Driver Data |
| 17 | [Documentation] System driver information. |
| 18 | Run Keyword And Ignore Error Get BMC Driver Details |
| 19 | Run Keyword And Ignore Error Get PNOR Driver Details |
| 20 | |
| 21 | Get BMC Driver Details |
| 22 | [Documentation] Get BMC driver details and log. |
| 23 | |
| 24 | Open Connection And Log In |
| 25 | ${output} ${stderr}= Execute Command ${DRIVER_CMD} |
| 26 | ... return_stderr=True |
| 27 | Should Be Empty ${stderr} |
| 28 | Log ${output} |
| 29 | [Return] ${output} |
| 30 | |
| 31 | |
| 32 | Get PNOR Driver Details |
| 33 | [Documentation] Get PNOR driver details and log. |
| 34 | ${resp}= |
| 35 | ... OpenBMC Get Request ${INVENTORY_URI}system/bios |
| 36 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 37 | ${jsondata}= To Json ${resp.content} |
| 38 | Log ${jsondata["data"]["Name"]} |
| 39 | Log ${jsondata["data"]["Version"]} |
| 40 | Log ${jsondata["data"]["Custom Field 1"]} |
| 41 | Log ${jsondata["data"]["Custom Field 2"]} |
| 42 | Log ${jsondata["data"]["Custom Field 3"]} |
| 43 | Log ${jsondata["data"]["Custom Field 4"]} |
| 44 | Log ${jsondata["data"]["Custom Field 5"]} |
| 45 | Log ${jsondata["data"]["Custom Field 6"]} |
| 46 | Log ${jsondata["data"]["Custom Field 7"]} |
| 47 | Log ${jsondata["data"]["Custom Field 8"]} |
| 48 | |