blob: 8eb52c22948837c86bff08658f82ed187636c7d8 [file] [log] [blame]
Chris Austenb29d2e82016-06-07 12:25:35 -05001*** Settings ***
2
3Documentation This testsuite is for testing the Boot Device Functions
4
George Keishingd55a4be2016-08-26 03:28:17 -05005Resource ../lib/rest_client.robot
6Resource ../lib/ipmi_client.robot
7Resource ../lib/openbmc_ffdc.robot
Chris Austenb29d2e82016-06-07 12:25:35 -05008
George Keishingd55a4be2016-08-26 03:28:17 -05009Suite Setup Open Connection And Log In
10Suite Teardown Close All Connections
11Test Teardown Log FFDC
Chris Austenb29d2e82016-06-07 12:25:35 -050012
13*** Test Cases ***
14
15Set the Boot Device as Default using REST API
16 [Documentation] This testcase is to set the boot device as Default using REST
17 ... URI. The Boot device is read using REST API and ipmitool.
18
19 ${bootDevice} = Set Variable Default
20 ${valueDict} = create dictionary data=${bootDevice}
21 Write Attribute /org/openbmc/settings/host0 boot_flags data=${valueDict}
22 Read the Attribute /org/openbmc/settings/host0 boot_flags
23 Response Should Be Equal Default
24 ${output} = Run IPMI Standard command chassis bootparam get 5
25 Should Contain ${output} No override
26
27Set the Boot Device as Default using ipmitool
28 [Documentation] This testcase is to set the boot device as Default using
29 ... ipmitool. The Boot device is read using REST API and
30 ... ipmitool.
31
32 Run IPMI command 0x0 0x8 0x05 0x80 0x00 0x00 0x00 0x00
33 Read the Attribute /org/openbmc/settings/host0 boot_flags
34 Response Should Be Equal Default
35 ${output} = Run IPMI Standard command chassis bootparam get 5
36 Should Contain ${output} No override
37
38Set the Boot Device as Network using REST API
39 [Documentation] This testcase is to set the boot device as Network using REST
40 ... URI. The Boot device is read using REST API and ipmitool.
41
42 ${bootDevice} = Set Variable Network
43 ${valueDict} = create dictionary data=${bootDevice}
44 Write Attribute /org/openbmc/settings/host0 boot_flags data=${valueDict}
45 Read the Attribute /org/openbmc/settings/host0 boot_flags
46 Response Should Be Equal Network
47 ${output} = Run IPMI Standard command chassis bootparam get 5
48 Should Contain ${output} Force PXE
49
50Set the Boot Device as Network using ipmitool
51 [Documentation] This testcase is to set the boot device as Network using
52 ... ipmitool. The Boot device is read using REST API and
53 ... ipmitool.
54
55 Run IPMI command 0x0 0x8 0x05 0x80 0x04 0x00 0x00 0x00
56 Read the Attribute /org/openbmc/settings/host0 boot_flags
57 Response Should Be Equal Network
58 ${output} = Run IPMI Standard command chassis bootparam get 5
59 Should Contain ${output} Force PXE
60
61Set the Boot Device as Disk using REST API
62 [Documentation] This testcase is to set the boot device as Disk using REST
63 ... URI. The Boot device is read using REST API and ipmitool.
64
65 ${bootDevice} = Set Variable Disk
66 ${valueDict} = create dictionary data=${bootDevice}
67 Write Attribute /org/openbmc/settings/host0 boot_flags data=${valueDict}
68 Read the Attribute /org/openbmc/settings/host0 boot_flags
69 Response Should Be Equal Disk
70 ${output} = Run IPMI Standard command chassis bootparam get 5
71 Should Contain ${output} Force Boot from default Hard-Drive
72
73Set the Boot Device as Disk using ipmitool
74 [Documentation] This testcase is to set the boot device as Disk using
75 ... ipmitool. The Boot device is read using REST API and
76 ... ipmitool.
77
78 Run IPMI command 0x0 0x8 0x05 0x80 0x08 0x00 0x00 0x00
79 Read the Attribute /org/openbmc/settings/host0 boot_flags
80 Response Should Be Equal Disk
81 ${output} = Run IPMI Standard command chassis bootparam get 5
82 Should Contain ${output} Force Boot from default Hard-Drive
83
84Set the Boot Device as Safe using REST API
85 [Documentation] This testcase is to set the boot device as Safe using REST
86 ... URI. The Boot device is read using REST API and ipmitool.
87
88 ${bootDevice} = Set Variable Safe
89 ${valueDict} = create dictionary data=${bootDevice}
90 Write Attribute /org/openbmc/settings/host0 boot_flags data=${valueDict}
91 Read the Attribute /org/openbmc/settings/host0 boot_flags
92 Response Should Be Equal Safe
93 ${output} = Run IPMI Standard command chassis bootparam get 5
94 Should Contain ${output} Force Boot from default Hard-Drive, request Safe-Mode
95
96Set the Boot Device as Safe using ipmitool
97 [Documentation] This testcase is to set the boot device as Safe using
98 ... ipmitool. The Boot device is read using REST API and
99 ... ipmitool.
100
101 Run IPMI command 0x0 0x8 0x05 0x80 0x0C 0x00 0x00 0x00
102 Read the Attribute /org/openbmc/settings/host0 boot_flags
103 Response Should Be Equal Safe
104 ${output} = Run IPMI Standard command chassis bootparam get 5
105 Should Contain ${output} Force Boot from default Hard-Drive, request Safe-Mode
106
107Set the Boot Device as CDROM using REST API
108 [Documentation] This testcase is to set the boot device as CDROM using REST
109 ... URI. The Boot device is read using REST API and ipmitool.
110
111 ${bootDevice} = Set Variable CDROM
112 ${valueDict} = create dictionary data=${bootDevice}
113 Write Attribute /org/openbmc/settings/host0 boot_flags data=${valueDict}
114 Read the Attribute /org/openbmc/settings/host0 boot_flags
115 Response Should Be Equal CDROM
116 ${output} = Run IPMI Standard command chassis bootparam get 5
117 Should Contain ${output} Force Boot from CD/DVD
118
119Set the Boot Device as CDROM using ipmitool
120 [Documentation] This testcase is to set the boot device as CDROM using
121 ... ipmitool. The Boot device is read using REST API and
122 ... ipmitool.
123
124 Run IPMI command 0x0 0x8 0x05 0x80 0x14 0x00 0x00 0x00
125 Read the Attribute /org/openbmc/settings/host0 boot_flags
126 Response Should Be Equal CDROM
127 ${output} = Run IPMI Standard command chassis bootparam get 5
128 Should Contain ${output} Force Boot from CD/DVD
129
130Set the Boot Device as Setup using REST API
131 [Documentation] This testcase is to set the boot device as Setup using REST
132 ... URI. The Boot device is read using REST API and ipmitool.
133
134 ${bootDevice} = Set Variable Setup
135 ${valueDict} = create dictionary data=${bootDevice}
136 Write Attribute /org/openbmc/settings/host0 boot_flags data=${valueDict}
137 Read the Attribute /org/openbmc/settings/host0 boot_flags
138 Response Should Be Equal Setup
139 ${output} = Run IPMI Standard command chassis bootparam get 5
140 Should Contain ${output} Force Boot into BIOS Setup
141
142Set the Boot Device as Setup using ipmitool
143 [Documentation] This testcase is to set the boot device as Setup using
144 ... ipmitool. The Boot device is read using REST API and
145 ... ipmitool.
146
147 Run IPMI command 0x0 0x8 0x05 0x80 0x18 0x00 0x00 0x00
148 Read the Attribute /org/openbmc/settings/host0 boot_flags
149 Response Should Be Equal Setup
150 ${output} = Run IPMI Standard command chassis bootparam get 5
151 Should Contain ${output} Force Boot into BIOS Setup
152
153*** Keywords ***
154
155Response Should Be Equal
156 [arguments] ${args}
157 Should Be Equal ${OUTPUT} ${args}
158
159Read the Attribute
160 [arguments] ${uri} ${parm}
161 ${output} = Read Attribute ${uri} ${parm}
162 set test variable ${OUTPUT} ${output}
163