blob: c14231841475c40fe1e01cc6f4de8a8e7b02688f [file] [log] [blame]
George Keishinga47c5d32017-01-09 09:03:17 -06001*** Settings ***
2Documentation Set metadata for test suite.
3
4Library SSHLibrary
5Resource ../lib/connection_client.robot
6Resource ../lib/rest_client.robot
7
8Suite Setup System Driver Data
9
10*** Variables ***
11
12${DRIVER_CMD} cat /etc/os-release | grep ^VERSION_ID=
13
14*** Keyword ***
15
16System 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
21Get 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
32Get 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