Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This suite test various boot types with boot source. |
| 3 | Resource ../../lib/resource.robot |
| 4 | Resource ../../lib/bmc_redfish_resource.robot |
| 5 | Resource ../../lib/common_utils.robot |
| 6 | Resource ../../lib/openbmc_ffdc.robot |
| 7 | |
George Keishing | ac3b095 | 2019-03-11 06:02:28 -0500 | [diff] [blame] | 8 | Test Setup Test Setup Execution |
| 9 | Test Teardown Test Teardown Execution |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 10 | Suite Teardown Suite Teardown Execution |
| 11 | |
| 12 | *** Test Cases *** |
| 13 | |
| 14 | Verify 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 | |
| 26 | Verify 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 | |
| 40 | Set 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 Keishing | 01644e6 | 2019-03-26 04:10:17 -0500 | [diff] [blame] | 67 | Redfish.Patch /redfish/v1/Systems/system body=&{payload} |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 68 | |
George Keishing | ac3b095 | 2019-03-11 06:02:28 -0500 | [diff] [blame] | 69 | ${resp}= Redfish.Get /redfish/v1/Systems/system |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 70 | 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 | |
| 76 | Suite Teardown Execution |
| 77 | [Documentation] Do the post suite teardown. |
| 78 | |
George Keishing | 01644e6 | 2019-03-26 04:10:17 -0500 | [diff] [blame] | 79 | Redfish.Login |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 80 | Set And Verify BootSource And BootType Disabled None |
George Keishing | 01644e6 | 2019-03-26 04:10:17 -0500 | [diff] [blame] | 81 | Redfish.Logout |
George Keishing | ac3b095 | 2019-03-11 06:02:28 -0500 | [diff] [blame] | 82 | |
| 83 | |
| 84 | Test Setup Execution |
| 85 | [Documentation] Do test case setup tasks. |
| 86 | |
| 87 | Redfish.Login |
| 88 | |
| 89 | |
| 90 | Test Teardown Execution |
| 91 | [Documentation] Do the post test teardown. |
| 92 | |
| 93 | FFDC On Test Case Fail |
| 94 | Redfish.Logout |
| 95 | |