blob: 2a723c61e386ef0e599060c270639d1140c22711 [file] [log] [blame]
Chris Austenb29d2e82016-06-07 12:25:35 -05001*** Settings ***
2
3Documentation This testsuite is for testing the Boot Device Functions
4
Sivas SRRe1143ae2016-08-26 22:31:02 -05005Resource ../lib/rest_client.robot
6Resource ../lib/ipmi_client.robot
7Resource ../lib/openbmc_ffdc.robot
George Keishingddc605f2016-09-15 00:46:32 -05008Resource ../lib/utils.robot
Sweta Potthuriaf741cb2017-07-04 09:41:17 -05009Resource ../lib/boot_utils.robot
Chris Austenb29d2e82016-06-07 12:25:35 -050010
George Keishing3ce958c2017-03-27 01:09:02 -050011Suite Setup Test Suite Setup
Sweta Potthurif93a7462017-03-21 06:38:26 -050012Test Teardown Post Test Case Execution
George Keishingec807372016-12-05 03:54:51 -060013
Sivas SRRe1143ae2016-08-26 22:31:02 -050014*** Variables ***
Chris Austenb29d2e82016-06-07 12:25:35 -050015
Rahul Maheshwari85c4d342017-08-09 21:59:30 -050016${stack_mode} skip
17
George Keishingec807372016-12-05 03:54:51 -060018
Chris Austenb29d2e82016-06-07 12:25:35 -050019*** Test Cases ***
20
Rahul Maheshwari85c4d342017-08-09 21:59:30 -050021Set The Boot Source As Default Using REST API
22 [Documentation] Set default boot source via REST and verify with both
23 ... REST and IPMI.
24 [Tags] Set_The_Boot_Source_As_Default_Using_REST_API
Sivas SRRe1143ae2016-08-26 22:31:02 -050025
Rahul Maheshwari85c4d342017-08-09 21:59:30 -050026 Set Boot Source ${BOOT_SOURCE_DEFAULT}
27
28 ${boot_source}=
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +030029 ... Read Attribute ${CONTROL_HOST_URI}boot BootSource
Rahul Maheshwari85c4d342017-08-09 21:59:30 -050030 Should Be Equal As Strings ${boot_source} ${BOOT_SOURCE_DEFAULT}
31
Rahul Maheshwari56d86752017-04-07 14:25:01 -050032 ${output}= Run IPMI Standard Command chassis bootparam get 5
33 Should Contain ${output} No override
Sivas SRRe1143ae2016-08-26 22:31:02 -050034
Rahul Maheshwari85c4d342017-08-09 21:59:30 -050035
36Set The Boot Source As Default Using Ipmitool
37 [Documentation] Set default boot source via IPMI and verify with both
38 ... REST and IPMI.
39 [Tags] Set_The_Boot_Source_As_Default_Using_Ipmitool
Sivas SRRe1143ae2016-08-26 22:31:02 -050040
Rahul Maheshwari8dc8a482017-01-29 21:41:55 -060041 Run IPMI command 0x0 0x8 0x05 0x80 0x00 0x00 0x00 0x00
Rahul Maheshwari85c4d342017-08-09 21:59:30 -050042
43 ${boot_source}=
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +030044 ... Read Attribute ${CONTROL_HOST_URI}boot BootSource
Rahul Maheshwari85c4d342017-08-09 21:59:30 -050045 Should Be Equal As Strings ${boot_source} ${BOOT_SOURCE_DEFAULT}
46
Rahul Maheshwari56d86752017-04-07 14:25:01 -050047 ${output}= Run IPMI Standard Command chassis bootparam get 5
48 Should Contain ${output} No override
Sivas SRRe1143ae2016-08-26 22:31:02 -050049
Sivas SRRe1143ae2016-08-26 22:31:02 -050050
Rahul Maheshwari85c4d342017-08-09 21:59:30 -050051Set The Boot Source As Network Using REST API
52 [Documentation] Set boot source as Network via REST and verify with both
53 ... REST and IPMI.
54 [Tags] Set_The_Boot_Source_As_Network_Using_REST_API
55
56 Set Boot Source ${BOOT_SOURCE_NETWORK}
57
58 ${boot_source}=
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +030059 ... Read Attribute ${CONTROL_HOST_URI}boot BootSource
Rahul Maheshwari85c4d342017-08-09 21:59:30 -050060 Should Be Equal As Strings ${boot_source} ${BOOT_SOURCE_NETWORK}
61
Rahul Maheshwari56d86752017-04-07 14:25:01 -050062 ${output}= Run IPMI Standard Command chassis bootparam get 5
63 Should Contain ${output} Force PXE
Sivas SRRe1143ae2016-08-26 22:31:02 -050064
Rahul Maheshwari85c4d342017-08-09 21:59:30 -050065
66Set The Boot Source As Network Using Ipmitool
67 [Documentation] Set boot source as Network via IPMI and verify with both
68 ... REST and IPMI.
69 [Tags] Set_The_Boot_Source_As_Network_Using_Ipmitool
Sivas SRRe1143ae2016-08-26 22:31:02 -050070
Rahul Maheshwari8dc8a482017-01-29 21:41:55 -060071 Run IPMI command 0x0 0x8 0x05 0x80 0x04 0x00 0x00 0x00
Rahul Maheshwari85c4d342017-08-09 21:59:30 -050072
73 ${boot_source}=
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +030074 ... Read Attribute ${CONTROL_HOST_URI}boot BootSource
Rahul Maheshwari85c4d342017-08-09 21:59:30 -050075 Should Be Equal As Strings ${boot_source} ${BOOT_SOURCE_NETWORK}
76
Rahul Maheshwari56d86752017-04-07 14:25:01 -050077 ${output}= Run IPMI Standard Command chassis bootparam get 5
78 Should Contain ${output} Force PXE
Sivas SRRe1143ae2016-08-26 22:31:02 -050079
Sivas SRRe1143ae2016-08-26 22:31:02 -050080
Rahul Maheshwari85c4d342017-08-09 21:59:30 -050081Set The Boot Source As Disk Using REST API
82 [Documentation] Set boot source as Disk via REST and verify with both
83 ... REST and IPMI.
84 [Tags] Set_The_Boot_Source_As_Disk_Using_REST_API
85
86 Set Boot Source ${BOOT_SOURCE_DISK}
87
88 ${boot_source}=
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +030089 ... Read Attribute ${CONTROL_HOST_URI}boot BootSource
Rahul Maheshwari85c4d342017-08-09 21:59:30 -050090 Should Be Equal As Strings ${boot_source} ${BOOT_SOURCE_DISK}
91
Rahul Maheshwari56d86752017-04-07 14:25:01 -050092 ${output}= Run IPMI Standard Command chassis bootparam get 5
93 Should Contain ${output} Force Boot from default Hard-Drive
Sivas SRRe1143ae2016-08-26 22:31:02 -050094
Rahul Maheshwari85c4d342017-08-09 21:59:30 -050095
96Set The Boot Source As Disk Using Ipmitool
97 [Documentation] Set boot source as Disk via IPMI and verify with both
98 ... REST and IPMI.
99 [Tags] Set_The_Boot_Source_As_Disk_Using_Ipmitool
Sivas SRRe1143ae2016-08-26 22:31:02 -0500100
Rahul Maheshwari8dc8a482017-01-29 21:41:55 -0600101 Run IPMI command 0x0 0x8 0x05 0x80 0x08 0x00 0x00 0x00
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500102
103 ${boot_source}=
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300104 ... Read Attribute ${CONTROL_HOST_URI}boot BootSource
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500105 Should Be Equal As Strings ${boot_source} ${BOOT_SOURCE_DISK}
106
Rahul Maheshwari56d86752017-04-07 14:25:01 -0500107 ${output}= Run IPMI Standard Command chassis bootparam get 5
108 Should Contain ${output} Force Boot from default Hard-Drive
Sivas SRRe1143ae2016-08-26 22:31:02 -0500109
Sivas SRRe1143ae2016-08-26 22:31:02 -0500110
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500111Set The Boot Mode As Safe Using REST API
112 [Documentation] Set boot mode as Safe via REST and verify with both
113 ... REST and IPMI.
114 [Tags] Set_The_Boot_Mode_As_Safe_Using_REST_API
115
116 Set Boot Mode ${BOOT_MODE_SAFE}
117
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300118 ${boot_mode}= Read Attribute ${CONTROL_HOST_URI}boot BootMode
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500119 Should Be Equal As Strings ${boot_mode} ${BOOT_MODE_SAFE}
120
Rahul Maheshwari56d86752017-04-07 14:25:01 -0500121 ${output}= Run IPMI Standard Command chassis bootparam get 5
122 Should Contain ${output} Safe-Mode
Sivas SRRe1143ae2016-08-26 22:31:02 -0500123
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500124
125Set The Boot Mode As Safe Using Ipmitool
126 [Documentation] Set boot mode as Safe via IPMI and verify with both
127 ... REST and IPMI.
128 [Tags] Set_The_Boot_Mode_As_Safe_Using_Ipmitool
Sivas SRRe1143ae2016-08-26 22:31:02 -0500129
Rahul Maheshwari8dc8a482017-01-29 21:41:55 -0600130 Run IPMI command 0x0 0x8 0x05 0x80 0x0C 0x00 0x00 0x00
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500131
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300132 ${boot_mode}= Read Attribute ${CONTROL_HOST_URI}boot BootMode
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500133 Should Be Equal As Strings ${boot_mode} ${BOOT_MODE_SAFE}
134
Rahul Maheshwari56d86752017-04-07 14:25:01 -0500135 ${output}= Run IPMI Standard Command chassis bootparam get 5
136 Should Contain ${output} Safe-Mode
Chris Austenb29d2e82016-06-07 12:25:35 -0500137
Sivas SRRe1143ae2016-08-26 22:31:02 -0500138
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500139Set The Boot Source As CDROM Using REST API
140 [Documentation] Set boot source as CDROM via REST and verify with both
141 ... REST and IPMI.
142 [Tags] Set_The_Boot_Source_As_CDROM_Using_REST_API
143
144 Set Boot Source ${BOOT_SOURCE_CDROM}
145
146 ${boot_source}=
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300147 ... Read Attribute ${CONTROL_HOST_URI}boot BootSource
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500148 Should Be Equal As Strings ${boot_source} ${BOOT_SOURCE_CDROM}
149
Rahul Maheshwari56d86752017-04-07 14:25:01 -0500150 ${output}= Run IPMI Standard Command chassis bootparam get 5
151 Should Contain ${output} Force Boot from CD/DVD
Sivas SRRe1143ae2016-08-26 22:31:02 -0500152
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500153
154Set The Boot Source As CDROM Using Ipmitool
155 [Documentation] Set boot source as CDROM via IPMI and verify with both
156 ... REST and IPMI.
157 [Tags] Set_The_Boot_Source_As_CDROM_Using_Ipmitool
Sivas SRRe1143ae2016-08-26 22:31:02 -0500158
Rahul Maheshwari8dc8a482017-01-29 21:41:55 -0600159 Run IPMI command 0x0 0x8 0x05 0x80 0x14 0x00 0x00 0x00
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500160
161 ${boot_source}=
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300162 ... Read Attribute ${CONTROL_HOST_URI}boot BootSource
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500163 Should Be Equal As Strings ${boot_source} ${BOOT_SOURCE_CDROM}
164
Rahul Maheshwari56d86752017-04-07 14:25:01 -0500165 ${output}= Run IPMI Standard Command chassis bootparam get 5
166 Should Contain ${output} Force Boot from CD/DVD
Sivas SRRe1143ae2016-08-26 22:31:02 -0500167
Sivas SRRe1143ae2016-08-26 22:31:02 -0500168
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500169Set The Boot Mode As Setup Using REST API
170 [Documentation] Set boot mode as Setup via REST and verify with both
171 ... REST and IPMI.
172 [Tags] Set_The_Boot_Mode_As_Setup_Using_REST_API
173
174 Set Boot Mode ${BOOT_MODE_SETUP}
175
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300176 ${boot_mode}= Read Attribute ${CONTROL_HOST_URI}boot BootMode
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500177 Should Be Equal As Strings ${boot_mode} ${BOOT_MODE_SETUP}
178
Rahul Maheshwari56d86752017-04-07 14:25:01 -0500179 ${output}= Run IPMI Standard Command chassis bootparam get 5
180 Should Contain ${output} Force Boot into BIOS Setup
Sivas SRRe1143ae2016-08-26 22:31:02 -0500181
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500182
183Set The Boot Mode As Setup Using Ipmitool
184 [Documentation] Set boot mode as Setup via IPMI and verify with both
185 ... REST and IPMI.
186 [Tags] Set_The_Boot_Mode_As_Setup_Using_Ipmitool
Sivas SRRe1143ae2016-08-26 22:31:02 -0500187
Rahul Maheshwari8dc8a482017-01-29 21:41:55 -0600188 Run IPMI command 0x0 0x8 0x05 0x80 0x18 0x00 0x00 0x00
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500189
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300190 ${boot_mode}= Read Attribute ${CONTROL_HOST_URI}boot BootMode
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500191 Should Be Equal As Strings ${boot_mode} ${BOOT_MODE_SETUP}
192
Rahul Maheshwari56d86752017-04-07 14:25:01 -0500193 ${output}= Run IPMI Standard Command chassis bootparam get 5
194 Should Contain ${output} Force Boot into BIOS Setup
Chris Austenb29d2e82016-06-07 12:25:35 -0500195
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500196
Konstantin Aladysheve2016fa2021-04-14 12:53:32 +0300197Set The Boot Type As Legacy Using REST API
198 [Documentation] Set boot type as Legacy via REST and verify with both
199 ... REST and IPMI.
200 [Tags] Set_The_Boot_Type_As_Legacy_Using_REST_API
201
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300202 Pass Execution If '${PLATFORM_ARCH_TYPE}' != 'x86'
203 ... BootType selector is implemented only in x86 arch
204
Konstantin Aladysheve2016fa2021-04-14 12:53:32 +0300205 Set Boot Type ${BOOT_TYPE_LEGACY}
206
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300207 ${boot_type}= Read Attribute ${CONTROL_HOST_URI}boot BootType
Konstantin Aladysheve2016fa2021-04-14 12:53:32 +0300208 Should Be Equal As Strings ${boot_type} ${BOOT_TYPE_LEGACY}
209
210 ${output}= Run IPMI Standard Command chassis bootparam get 5
211 Should Contain ${output} BIOS PC Compatible (legacy) boot
212
213
214Set The Boot Type As Legacy Using Ipmitool
215 [Documentation] Set boot type as Legacy via IPMI and verify with both
216 ... REST and IPMI.
217 [Tags] Set_The_Boot_Type_As_Legacy_Using_Ipmitool
218
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300219 Pass Execution If '${PLATFORM_ARCH_TYPE}' != 'x86'
220 ... BootType selector is implemented only in x86 arch
221
Konstantin Aladysheve2016fa2021-04-14 12:53:32 +0300222 Run IPMI command 0x0 0x8 0x05 0x80 0x00 0x00 0x00 0x00
223
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300224 ${boot_type}= Read Attribute ${CONTROL_HOST_URI}boot BootType
Konstantin Aladysheve2016fa2021-04-14 12:53:32 +0300225 Should Be Equal As Strings ${boot_type} ${BOOT_TYPE_LEGACY}
226
227 ${output}= Run IPMI Standard Command chassis bootparam get 5
228 Should Contain ${output} BIOS PC Compatible (legacy) boot
229
230
231Set The Boot Type As EFI Using REST API
232 [Documentation] Set boot type as EFI via REST and verify with both
233 ... REST and IPMI.
234 [Tags] Set_The_Boot_Type_As_EFI_Using_REST_API
235
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300236 Pass Execution If '${PLATFORM_ARCH_TYPE}' != 'x86'
237 ... BootType selector is implemented only in x86 arch
238
Konstantin Aladysheve2016fa2021-04-14 12:53:32 +0300239 Set Boot Type ${BOOT_TYPE_EFI}
240
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300241 ${boot_type}= Read Attribute ${CONTROL_HOST_URI}boot BootType
Konstantin Aladysheve2016fa2021-04-14 12:53:32 +0300242 Should Be Equal As Strings ${boot_type} ${BOOT_TYPE_EFI}
243
244 ${output}= Run IPMI Standard Command chassis bootparam get 5
245 Should Contain ${output} BIOS EFI boot
246
247
248Set The Boot Type As EFI Using Ipmitool
249 [Documentation] Set boot type as EFI via IPMI and verify with both
250 ... REST and IPMI.
251 [Tags] Set_The_Boot_Type_As_EFI_Using_Ipmitool
252
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300253 Pass Execution If '${PLATFORM_ARCH_TYPE}' != 'x86'
254 ... BootType selector is implemented only in x86 arch
255
Konstantin Aladysheve2016fa2021-04-14 12:53:32 +0300256 Run IPMI command 0x0 0x8 0x05 0xA0 0x00 0x00 0x00 0x00
257
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300258 ${boot_type}= Read Attribute ${CONTROL_HOST_URI}boot BootType
Konstantin Aladysheve2016fa2021-04-14 12:53:32 +0300259 Should Be Equal As Strings ${boot_type} ${BOOT_TYPE_EFI}
260
261 ${output}= Run IPMI Standard Command chassis bootparam get 5
262 Should Contain ${output} BIOS EFI boot
263
264
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300265Set Boot As Enabled Using REST API
266 [Documentation] Enable boot override via REST and verify with both
267 ... REST and IPMI.
268 [Tags] Set_Boot_As_Enabled_Using_REST_API
269
270 Set Boot Enable True
271
272 ${boot_enable}= Read Attribute ${CONTROL_HOST_URI}boot Enabled
273 Should Be Equal As Strings ${boot_enable} True
274
275 ${output}= Run IPMI Standard Command chassis bootparam get 5
276 Should Contain ${output} Boot Flag Valid
277
278
279Set Boot As Enabled Using Ipmitool
280 [Documentation] Enable boot override via IPMI and verify with both
281 ... REST and IPMI.
282 [Tags] Set_Boot_As_Enabled_Using_Ipmitool
283
284 Run IPMI command 0x0 0x8 0x05 0x80 0x00 0x00 0x00 0x00
285
286 ${boot_type}= Read Attribute ${CONTROL_HOST_URI}boot Enabled
287 Should Be Equal As Strings ${boot_type} True
288
289 ${output}= Run IPMI Standard Command chassis bootparam get 5
290 Should Contain ${output} Boot Flag Valid
291
292
293Set Boot As Disabled Using REST API
294 [Documentation] Disable boot override via REST and verify with both
295 ... REST and IPMI.
296 [Tags] Set_Boot_As_Disabled_Using_REST_API
297
298 Set Boot Enable False
299
300 ${boot_enable}= Read Attribute ${CONTROL_HOST_URI}boot Enabled
301 Should Be Equal As Strings ${boot_enable} False
302
303 ${output}= Run IPMI Standard Command chassis bootparam get 5
304 Should Contain ${output} Boot Flag Invalid
305
306
307Set Boot As Disabled Using Ipmitool
308 [Documentation] Disable boot override via IPMI and verify with both
309 ... REST and IPMI.
310 [Tags] Set_Boot_As_Disabled_Using_Ipmitool
311
312 Run IPMI command 0x0 0x8 0x05 0x00 0x00 0x00 0x00 0x00
313
314 ${boot_type}= Read Attribute ${CONTROL_HOST_URI}boot Enabled
315 Should Be Equal As Strings ${boot_type} False
316
317 ${output}= Run IPMI Standard Command chassis bootparam get 5
318 Should Contain ${output} Boot Flag Invalid
319
320
Chris Austenb29d2e82016-06-07 12:25:35 -0500321*** Keywords ***
322
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300323Set Boot Enable
324 [Documentation] Set boot enable.
325 [Arguments] ${boot_enable}
326 # Description of argument(s):
327 # boot_enable Boot enable status which need to be set.
328
329 ${valueDict}= Create Dictionary data=${boot_enable}
330 Write Attribute ${CONTROL_HOST_URI}boot Enabled
331 ... data=${valueDict}
332
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500333Set Boot Source
334 [Documentation] Set given boot source.
335 [Arguments] ${boot_source}
336 # Description of argument(s):
337 # boot_source Boot source which need to be set.
338
339 ${valueDict}= Create Dictionary data=${boot_source}
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300340 Write Attribute ${CONTROL_HOST_URI}boot BootSource
Rahul Maheshwari3087f342017-09-22 05:22:44 -0500341 ... data=${valueDict}
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500342
343
344Set Boot Mode
345 [Documentation] Set given boot mode.
346 [Arguments] ${boot_mode}
347 # Description of argument(s):
348 # boot_mode Boot mode which need to be set.
349
350 ${valueDict}= Create Dictionary data=${boot_mode}
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300351 Write Attribute ${CONTROL_HOST_URI}boot BootMode
Rahul Maheshwari3087f342017-09-22 05:22:44 -0500352 ... data=${valueDict}
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500353
354
Konstantin Aladysheve2016fa2021-04-14 12:53:32 +0300355Set Boot Type
356 [Documentation] Set given boot type.
357 [Arguments] ${boot_type}
358 # Description of argument(s):
359 # boot_type Boot type which need to be set.
360
361 ${valueDict}= Create Dictionary data=${boot_type}
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300362 Write Attribute ${CONTROL_HOST_URI}boot BootType
Konstantin Aladysheve2016fa2021-04-14 12:53:32 +0300363 ... data=${valueDict}
364
365
Chris Austenb29d2e82016-06-07 12:25:35 -0500366Response Should Be Equal
Joy Onyerikwuf4a807b2018-06-20 08:43:54 -0500367 [Documentation] Verify that the output is equal to the given args.
Rahul Maheshwari8dc8a482017-01-29 21:41:55 -0600368 [Arguments] ${args}
369 Should Be Equal ${OUTPUT} ${args}
Chris Austenb29d2e82016-06-07 12:25:35 -0500370
Sivas SRRe1143ae2016-08-26 22:31:02 -0500371Read the Attribute
Joy Onyerikwuf4a807b2018-06-20 08:43:54 -0500372 [Documentation] Read the given attribute.
Rahul Maheshwari8dc8a482017-01-29 21:41:55 -0600373 [Arguments] ${uri} ${parm}
374 ${output}= Read Attribute ${uri} ${parm}
375 Set Test Variable ${OUTPUT} ${output}
Sweta Potthurif93a7462017-03-21 06:38:26 -0500376
Sweta Potthurif93a7462017-03-21 06:38:26 -0500377Post Test Case Execution
378 [Documentation] Do the post test teardown.
379
380 FFDC On Test Case Fail
Rahul Maheshwari85c4d342017-08-09 21:59:30 -0500381 Set Boot Source ${BOOT_SOURCE_DEFAULT}
382 Set Boot Mode ${BOOT_MODE_REGULAR}
Konstantin Aladyshev67a36bd2021-06-30 12:08:59 +0300383 Run Keyword If '${PLATFORM_ARCH_TYPE}' == 'x86'
384 ... Set Boot Type ${BOOT_TYPE_EFI}
Konstantin Aladyshevaf5442f2021-06-30 14:29:22 +0300385 Set Boot Enable false
George Keishing3ce958c2017-03-27 01:09:02 -0500386
387Test Suite Setup
388 [Documentation] Do the initial suite setup.
George Keishingf1426682017-07-12 23:17:17 -0500389
Rahul Maheshwari3087f342017-09-22 05:22:44 -0500390 Smart Power Off
391
392 # Set boot policy to default i.e. one time enabled.
393 ${valueDict}= Create Dictionary data=${1}
George Keishingdf3e65f2018-12-18 13:06:56 -0600394 Write Attribute ${CONTROL_HOST_URI}boot/one_time Enabled
Rahul Maheshwari3087f342017-09-22 05:22:44 -0500395 ... data=${valueDict}