blob: e38e93bef1eba7a50f76c6d92c4c08d6639c1483 [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
George Keishing847a7bf2017-02-09 11:39:47 -06007Resource ../lib/utils.robot
Sweta Potthuricd966342017-09-06 03:41:32 -05008Resource ../lib/code_update_utils.robot
George Keishinga47c5d32017-01-09 09:03:17 -06009
10Suite Setup System Driver Data
11
12*** Variables ***
13
14${DRIVER_CMD} cat /etc/os-release | grep ^VERSION_ID=
15
16*** Keyword ***
17
18System Driver Data
George Keishingfb762032017-11-14 11:18:21 -060019 [Documentation] System driver information and enable defaults settings.
Vijay1a52c992017-09-19 08:37:26 -050020 Run Keyword And Ignore Error Clear System Entry From Knownhosts
Charles Paul Hoferdcf0c962018-04-24 10:29:55 -050021 Wait Until Keyword Succeeds 2 min 30 sec Open Connection And Log In
George Keishing847a7bf2017-02-09 11:39:47 -060022 Run Keyword And Ignore Error Log BMC Driver Details
23 Run Keyword And Ignore Error Log PNOR Driver Details
24 Run Keyword And Ignore Error Log BMC Model
George Keishing7a520222017-02-27 09:44:30 -060025 Run Keyword And Ignore Error Enable Core Dump On BMC
George Keishingdd917492020-06-16 03:29:38 -050026
27 Run Keyword If ${REDFISH_SUPPORTED}
28 ... Redfish Default
29 ... ELSE
30 ... REST Default
31
32REST Default
33 [Documentation] Set REST defaults.
34
George Keishingef74a8c2017-10-20 10:23:52 -050035 Run Keyword And Ignore Error Set Boot Defaults
Charles Paul Hoferc002d832018-05-30 13:08:07 -050036 Run Keyword And Ignore Error Set BMC Power Policy ${ALWAYS_POWER_OFF}
George Keishing3e28ea32017-12-19 03:13:52 -060037 Run Keyword If ${FIELD_MODE} == ${True}
38 ... Enable Field Mode And Verify Unmount
George Keishing201d8262017-12-19 09:12:25 -060039 Run Keyword And Ignore Error Clear BMC Gard Record
George Keishingef74a8c2017-10-20 10:23:52 -050040
George Keishingdd917492020-06-16 03:29:38 -050041
42Redfish Default
43 [Documentation] Set REST defaults.
44
45 Redfish.Login
George Keishing1eeff9c2020-06-16 04:03:34 -050046 Run Keyword And Ignore Error Redfish Set Boot Default Disabled None
George Keishingdd917492020-06-16 03:29:38 -050047 Run Keyword And Ignore Error Redfish Set Power Restore Policy AlwaysOff
48 Redfish.Logout
49
50
George Keishingef74a8c2017-10-20 10:23:52 -050051Set Boot Defaults
Joy Onyerikwuf4a807b2018-06-20 08:43:54 -050052 [Documentation] Set boot defaults.
George Keishingef74a8c2017-10-20 10:23:52 -050053 Set Control Boot Mode ${CONTROL_HOST_URI}/boot ${BOOT_MODE_REGULAR}
54 Set Control Boot Mode
55 ... ${CONTROL_HOST_URI}/boot/one_time ${BOOT_MODE_REGULAR}
George Keishinga47c5d32017-01-09 09:03:17 -060056
George Keishing847a7bf2017-02-09 11:39:47 -060057Log BMC Driver Details
George Keishinga47c5d32017-01-09 09:03:17 -060058 [Documentation] Get BMC driver details and log.
59
George Keishinga47c5d32017-01-09 09:03:17 -060060 ${output} ${stderr}= Execute Command ${DRIVER_CMD}
61 ... return_stderr=True
62 Should Be Empty ${stderr}
63 Log ${output}
64 [Return] ${output}
65
George Keishing847a7bf2017-02-09 11:39:47 -060066Log PNOR Driver Details
George Keishinga47c5d32017-01-09 09:03:17 -060067 [Documentation] Get PNOR driver details and log.
George Keishing90ab1772017-02-24 05:40:55 -060068 # Until the new REST interface is available using pflash to
69 # capture the PNOR details.
Sweta Potthuricd966342017-09-06 03:41:32 -050070 ${software}= Get Host Software Objects Details
71 Log ${software}
George Keishing847a7bf2017-02-09 11:39:47 -060072
73Log BMC Model
74 [Documentation] Fetch BMC Model name from system and log.
75 ${bmc_model}= Get BMC System Model
76 Log BMC Model=${bmc_model}