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 |
Anusha Dathatri | 02a0bb3 | 2019-04-05 00:50:38 -0500 | [diff] [blame] | 7 | Resource ../../lib/ipmi_client.robot |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 8 | |
George Keishing | ac3b095 | 2019-03-11 06:02:28 -0500 | [diff] [blame] | 9 | Test Setup Test Setup Execution |
| 10 | Test Teardown Test Teardown Execution |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 11 | Suite Teardown Suite Teardown Execution |
| 12 | |
Anusha Dathatri | 02a0bb3 | 2019-04-05 00:50:38 -0500 | [diff] [blame] | 13 | *** Variables *** |
| 14 | # Maps for correlating redfish data values to IPMI data values. |
| 15 | # The redfish values are obtained with Redfish.Get or Redfish.Get Properties. |
| 16 | # The corresponding IPMI values are obtained with the "chassis bootparam get |
| 17 | # 5" IPMI command. |
| 18 | |
| 19 | # This dictionary maps the redfish 'BootSourceOverrideEnabled' value to the |
| 20 | # corresponding IPMI output value. |
| 21 | &{redfish_ipmi_enabled_map} Once=Options apply to only next boot |
| 22 | ... Continuous=Options apply to all future boots |
Konstantin Aladyshev | 61d2250 | 2021-06-18 15:47:53 +0300 | [diff] [blame] | 23 | ... Disabled=Boot Flag Invalid |
Anusha Dathatri | 02a0bb3 | 2019-04-05 00:50:38 -0500 | [diff] [blame] | 24 | |
| 25 | # This dictionary maps the redfish 'BootSourceOverrideTarget' value to the |
| 26 | # corresponding IPMI output value. |
| 27 | &{redfish_ipmi_target_map} Hdd=Force Boot from default Hard-Drive |
| 28 | ... Pxe=Force PXE |
| 29 | ... Diags=Force Boot from default Hard-Drive, request Safe-Mode |
| 30 | ... Cd=Force Boot from CD/DVD |
| 31 | ... BiosSetup=Force Boot into BIOS Setup |
| 32 | ... None=No override |
| 33 | |
Konstantin Aladyshev | 0043fc5 | 2021-04-15 12:07:29 +0300 | [diff] [blame] | 34 | # This dictionary maps the redfish 'BootSourceOverrideMode' value to the |
| 35 | # corresponding IPMI output value. |
| 36 | &{redfish_ipmi_mode_map} Legacy=BIOS PC Compatible (legacy) boot |
| 37 | ... UEFI=BIOS EFI boot |
| 38 | |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 39 | *** Test Cases *** |
| 40 | |
Konstantin Aladyshev | 0043fc5 | 2021-04-15 12:07:29 +0300 | [diff] [blame] | 41 | Verify BMC Redfish Boot Source Override with Enabled Mode As Once |
| 42 | [Documentation] Verify BMC Redfish Boot Source Override with Enabled Mode As Once. |
| 43 | [Tags] Verify_BMC_Redfish_Boot_Source_Override_with_Enabled_Mode_As_Once |
| 44 | [Template] Set And Verify Boot Source Override |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 45 | |
Konstantin Aladyshev | 0043fc5 | 2021-04-15 12:07:29 +0300 | [diff] [blame] | 46 | #BootSourceOverrideEnabled BootSourceOverrideTarget BootSourceOverrideMode |
| 47 | Once Hdd UEFI |
| 48 | Once Pxe UEFI |
| 49 | Once Diags UEFI |
| 50 | Once Cd UEFI |
| 51 | Once BiosSetup UEFI |
Konstantin Aladyshev | 61d2250 | 2021-06-18 15:47:53 +0300 | [diff] [blame] | 52 | Once None UEFI |
Konstantin Aladyshev | 0043fc5 | 2021-04-15 12:07:29 +0300 | [diff] [blame] | 53 | Once Hdd Legacy |
| 54 | Once Pxe Legacy |
| 55 | Once Diags Legacy |
| 56 | Once Cd Legacy |
| 57 | Once BiosSetup Legacy |
Konstantin Aladyshev | 61d2250 | 2021-06-18 15:47:53 +0300 | [diff] [blame] | 58 | Once None Legacy |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 59 | |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 60 | |
Konstantin Aladyshev | 0043fc5 | 2021-04-15 12:07:29 +0300 | [diff] [blame] | 61 | Verify BMC Redfish Boot Source Override with Enabled Mode As Continuous |
| 62 | [Documentation] Verify BMC Redfish Boot Source Override with Enabled Mode As Continuous. |
| 63 | [Tags] Verify_BMC_Redfish_Boot_Source_Override_with_Enabled_Mode_As_Continuous |
| 64 | [Template] Set And Verify Boot Source Override |
| 65 | |
| 66 | #BootSourceOverrideEnabled BootSourceOverrideTarget BootSourceOverrideMode |
| 67 | Continuous Hdd UEFI |
| 68 | Continuous Pxe UEFI |
| 69 | Continuous Diags UEFI |
| 70 | Continuous Cd UEFI |
| 71 | Continuous BiosSetup UEFI |
Konstantin Aladyshev | 61d2250 | 2021-06-18 15:47:53 +0300 | [diff] [blame] | 72 | Continuous None UEFI |
Konstantin Aladyshev | 0043fc5 | 2021-04-15 12:07:29 +0300 | [diff] [blame] | 73 | Continuous Hdd Legacy |
| 74 | Continuous Pxe Legacy |
| 75 | Continuous Diags Legacy |
| 76 | Continuous Cd Legacy |
| 77 | Continuous BiosSetup Legacy |
Konstantin Aladyshev | 61d2250 | 2021-06-18 15:47:53 +0300 | [diff] [blame] | 78 | Continuous None Legacy |
| 79 | |
| 80 | |
| 81 | Verify BMC Redfish Boot Source Override with Enabled Mode As Disabled |
| 82 | [Documentation] Verify BMC Redfish Boot Source Override with Enabled Mode As Disabled. |
| 83 | [Tags] Verify_BMC_Redfish_Boot_Source_Override_with_Enabled_Mode_As_Disabled |
| 84 | [Template] Set And Verify Boot Source Override |
| 85 | |
| 86 | #BootSourceOverrideEnabled BootSourceOverrideTarget BootSourceOverrideMode |
| 87 | Disabled Hdd UEFI |
| 88 | Disabled Pxe UEFI |
| 89 | Disabled Diags UEFI |
| 90 | Disabled Cd UEFI |
| 91 | Disabled BiosSetup UEFI |
| 92 | Disabled None UEFI |
| 93 | Disabled Hdd Legacy |
| 94 | Disabled Pxe Legacy |
| 95 | Disabled Diags Legacy |
| 96 | Disabled Cd Legacy |
| 97 | Disabled BiosSetup Legacy |
| 98 | Disabled None Legacy |
Konstantin Aladyshev | 0043fc5 | 2021-04-15 12:07:29 +0300 | [diff] [blame] | 99 | |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 100 | |
| 101 | *** Keywords *** |
| 102 | |
Konstantin Aladyshev | 0043fc5 | 2021-04-15 12:07:29 +0300 | [diff] [blame] | 103 | Set And Verify Boot Source Override |
| 104 | [Documentation] Set and Verify Boot source override |
| 105 | [Arguments] ${override_enabled} ${override_target} ${override_mode}=UEFI |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 106 | |
| 107 | # Description of argument(s): |
Konstantin Aladyshev | 0043fc5 | 2021-04-15 12:07:29 +0300 | [diff] [blame] | 108 | # override_enabled Boot source override enable type. |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 109 | # ('Once', 'Continuous', 'Disabled'). |
Konstantin Aladyshev | 0043fc5 | 2021-04-15 12:07:29 +0300 | [diff] [blame] | 110 | # override_target Boot source override target. |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 111 | # ('Pxe', 'Cd', 'Hdd', 'Diags', 'BiosSetup', 'None'). |
Konstantin Aladyshev | 0043fc5 | 2021-04-15 12:07:29 +0300 | [diff] [blame] | 112 | # override_mode Boot source override mode (relevant only for x86 arch). |
| 113 | # ('Legacy', 'UEFI'). |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 114 | |
| 115 | # Example: |
| 116 | # "Boot": { |
| 117 | # "BootSourceOverrideEnabled": "Disabled", |
| 118 | # "BootSourceOverrideMode": "Legacy", |
| 119 | # "BootSourceOverrideTarget": "None", |
| 120 | # "BootSourceOverrideTarget@Redfish.AllowableValues": [ |
| 121 | # "None", |
| 122 | # "Pxe", |
| 123 | # "Hdd", |
| 124 | # "Cd", |
| 125 | # "Diags", |
| 126 | # "BiosSetup"]} |
| 127 | |
Anusha Dathatri | 02a0bb3 | 2019-04-05 00:50:38 -0500 | [diff] [blame] | 128 | # The values set using Redfish are verified via IPMI using the command: |
| 129 | # chassis bootparam get 5 |
| 130 | # Option 5 returns the boot parameters. |
| 131 | # |
| 132 | # Sample output: |
| 133 | # Boot parameter version: 1 |
| 134 | # Boot parameter 5 is valid/unlocked |
| 135 | # Boot parameter data: c000000000 |
| 136 | # Boot Flags : |
| 137 | # - Boot Flag Valid |
| 138 | # - Options apply to all future boots |
| 139 | # - BIOS PC Compatible (legacy) boot |
| 140 | # - Boot Device Selector : No override |
| 141 | # - Console Redirection control : System Default |
| 142 | # - BIOS verbosity : Console redirection occurs per BIOS configuration |
| 143 | # setting (default) |
| 144 | # - BIOS Mux Control Override : BIOS uses recommended setting of the mux at |
| 145 | # the end of POST |
| 146 | |
Konstantin Aladyshev | 0043fc5 | 2021-04-15 12:07:29 +0300 | [diff] [blame] | 147 | Redfish Set Boot Default ${override_enabled} ${override_target} ${override_mode} |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 148 | |
Anusha Dathatri | 02a0bb3 | 2019-04-05 00:50:38 -0500 | [diff] [blame] | 149 | ${output}= Run IPMI Standard Command chassis bootparam get 5 |
| 150 | Should Contain ${output} ${redfish_ipmi_enabled_map['${override_enabled}']} |
| 151 | Should Contain ${output} ${redfish_ipmi_target_map['${override_target}']} |
Konstantin Aladyshev | 0043fc5 | 2021-04-15 12:07:29 +0300 | [diff] [blame] | 152 | Run Keyword If '${PLATFORM_ARCH_TYPE}' == 'x86' |
| 153 | ... Should Contain ${output} ${redfish_ipmi_mode_map['${override_mode}']} |
| 154 | |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 155 | |
| 156 | Suite Teardown Execution |
| 157 | [Documentation] Do the post suite teardown. |
| 158 | |
George Keishing | 01644e6 | 2019-03-26 04:10:17 -0500 | [diff] [blame] | 159 | Redfish.Login |
Konstantin Aladyshev | 0043fc5 | 2021-04-15 12:07:29 +0300 | [diff] [blame] | 160 | Set And Verify Boot Source Override Disabled None UEFI |
George Keishing | 01644e6 | 2019-03-26 04:10:17 -0500 | [diff] [blame] | 161 | Redfish.Logout |
George Keishing | ac3b095 | 2019-03-11 06:02:28 -0500 | [diff] [blame] | 162 | |
| 163 | |
| 164 | Test Setup Execution |
| 165 | [Documentation] Do test case setup tasks. |
| 166 | |
| 167 | Redfish.Login |
| 168 | |
| 169 | |
| 170 | Test Teardown Execution |
| 171 | [Documentation] Do the post test teardown. |
| 172 | |
| 173 | FFDC On Test Case Fail |
| 174 | Redfish.Logout |