blob: 2d5b80d35cd5174173a1512f9a55fd55e298f5b1 [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
George Keishingac3b0952019-03-11 06:02:28 -05008Test Setup Test Setup Execution
9Test Teardown Test Teardown Execution
Sridevi Ramesh484e10c2019-02-28 06:14:46 -060010Suite Teardown Suite Teardown Execution
11
12*** Test Cases ***
13
14Verify BMC Redfish Boot Types With BootSource As Once
15 [Documentation] Verify BMC Redfish Boot Types With BootSource As Once.
16 [Tags] Verify_BMC_Redfish_Boot_Types_With_BootSource_As_Once
17 [Template] Set And Verify BootSource And BootType
18
19 #BootSourceEnableType BootTargetType
20 Once Hdd
21 Once Pxe
22 Once Diags
23 Once Cd
24 Once BiosSetup
25
26Verify BMC Redfish Boot Types With BootSource As Continuous
27 [Documentation] Verify BMC Redfish Boot Types With BootSource As Continuous.
28 [Tags] Verify_BMC_Redfish_Boot_Types_With_BootSource_As_Continuous
29 [Template] Set And Verify BootSource And BootType
30
31 #BootSourceEnable BootTargetType
32 Continuous Hdd
33 Continuous Pxe
34 Continuous Diags
35 Continuous Cd
36 Continuous BiosSetup
37
38*** Keywords ***
39
40Set And Verify BootSource And BootType
41 [Documentation] Set And Verify BootSource And BootType.
42 [Arguments] ${override_enabled} ${override_target}
43
44 # Description of argument(s):
45 # override_enabled Boot source enable type.
46 # ('Once', 'Continuous', 'Disabled').
47 # override_target Boot target type.
48 # ('Pxe', 'Cd', 'Hdd', 'Diags', 'BiosSetup', 'None').
49
50 # Example:
51 # "Boot": {
52 # "BootSourceOverrideEnabled": "Disabled",
53 # "BootSourceOverrideMode": "Legacy",
54 # "BootSourceOverrideTarget": "None",
55 # "BootSourceOverrideTarget@Redfish.AllowableValues": [
56 # "None",
57 # "Pxe",
58 # "Hdd",
59 # "Cd",
60 # "Diags",
61 # "BiosSetup"]}
62
63 ${data}= Create Dictionary BootSourceOverrideEnabled=${override_enabled}
64 ... BootSourceOverrideTarget=${override_target}
65 ${payload}= Create Dictionary Boot=${data}
66
George Keishing01644e62019-03-26 04:10:17 -050067 Redfish.Patch /redfish/v1/Systems/system body=&{payload}
Sridevi Ramesh484e10c2019-02-28 06:14:46 -060068
George Keishingac3b0952019-03-11 06:02:28 -050069 ${resp}= Redfish.Get /redfish/v1/Systems/system
Sridevi Ramesh484e10c2019-02-28 06:14:46 -060070 Should Be Equal As Strings ${resp.dict["Boot"]["BootSourceOverrideEnabled"]}
71 ... ${override_enabled}
72 Should Be Equal As Strings ${resp.dict["Boot"]["BootSourceOverrideTarget"]}
73 ... ${override_target}
74
75
76Suite Teardown Execution
77 [Documentation] Do the post suite teardown.
78
George Keishing01644e62019-03-26 04:10:17 -050079 Redfish.Login
Sridevi Ramesh484e10c2019-02-28 06:14:46 -060080 Set And Verify BootSource And BootType Disabled None
George Keishing01644e62019-03-26 04:10:17 -050081 Redfish.Logout
George Keishingac3b0952019-03-11 06:02:28 -050082
83
84Test Setup Execution
85 [Documentation] Do test case setup tasks.
86
87 Redfish.Login
88
89
90Test Teardown Execution
91 [Documentation] Do the post test teardown.
92
93 FFDC On Test Case Fail
94 Redfish.Logout
95