blob: 459a8feee96614ffbd8bf6e674177dd02647cef6 [file] [log] [blame]
Sridevi Ramesh484e10c2019-02-28 06:14:46 -06001*** Settings ***
2Documentation This suite test various boot types with boot source.
3Resource ../../lib/resource.robot
4Resource ../../lib/bmc_redfish_resource.robot
5Resource ../../lib/common_utils.robot
6Resource ../../lib/openbmc_ffdc.robot
7
8Test Teardown FFDC On Test Case Fail
9Test Setup redfish.Login
10Test Teardown redfish.Logout
11Suite Teardown Suite Teardown Execution
12
13*** Test Cases ***
14
15Verify BMC Redfish Boot Types With BootSource As Once
16 [Documentation] Verify BMC Redfish Boot Types With BootSource As Once.
17 [Tags] Verify_BMC_Redfish_Boot_Types_With_BootSource_As_Once
18 [Template] Set And Verify BootSource And BootType
19
20 #BootSourceEnableType BootTargetType
21 Once Hdd
22 Once Pxe
23 Once Diags
24 Once Cd
25 Once BiosSetup
26
27Verify BMC Redfish Boot Types With BootSource As Continuous
28 [Documentation] Verify BMC Redfish Boot Types With BootSource As Continuous.
29 [Tags] Verify_BMC_Redfish_Boot_Types_With_BootSource_As_Continuous
30 [Template] Set And Verify BootSource And BootType
31
32 #BootSourceEnable BootTargetType
33 Continuous Hdd
34 Continuous Pxe
35 Continuous Diags
36 Continuous Cd
37 Continuous BiosSetup
38
39*** Keywords ***
40
41Set And Verify BootSource And BootType
42 [Documentation] Set And Verify BootSource And BootType.
43 [Arguments] ${override_enabled} ${override_target}
44
45 # Description of argument(s):
46 # override_enabled Boot source enable type.
47 # ('Once', 'Continuous', 'Disabled').
48 # override_target Boot target type.
49 # ('Pxe', 'Cd', 'Hdd', 'Diags', 'BiosSetup', 'None').
50
51 # Example:
52 # "Boot": {
53 # "BootSourceOverrideEnabled": "Disabled",
54 # "BootSourceOverrideMode": "Legacy",
55 # "BootSourceOverrideTarget": "None",
56 # "BootSourceOverrideTarget@Redfish.AllowableValues": [
57 # "None",
58 # "Pxe",
59 # "Hdd",
60 # "Cd",
61 # "Diags",
62 # "BiosSetup"]}
63
64 ${data}= Create Dictionary BootSourceOverrideEnabled=${override_enabled}
65 ... BootSourceOverrideTarget=${override_target}
66 ${payload}= Create Dictionary Boot=${data}
67
68 ${resp}= redfish.patch Systems/system body=&{payload}
69 Should Be Equal As Strings ${resp.status} ${HTTP_OK}
70
71 ${resp}= redfish.Get /redfish/v1/Systems/system
72 Should Be Equal As Strings ${resp.dict["Boot"]["BootSourceOverrideEnabled"]}
73 ... ${override_enabled}
74 Should Be Equal As Strings ${resp.dict["Boot"]["BootSourceOverrideTarget"]}
75 ... ${override_target}
76
77
78Suite Teardown Execution
79 [Documentation] Do the post suite teardown.
80
81 Set And Verify BootSource And BootType Disabled None