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 |
| 23 | ... Disabled=Options apply to all future boots |
| 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 | |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 34 | *** Test Cases *** |
| 35 | |
| 36 | Verify BMC Redfish Boot Types With BootSource As Once |
| 37 | [Documentation] Verify BMC Redfish Boot Types With BootSource As Once. |
| 38 | [Tags] Verify_BMC_Redfish_Boot_Types_With_BootSource_As_Once |
| 39 | [Template] Set And Verify BootSource And BootType |
| 40 | |
| 41 | #BootSourceEnableType BootTargetType |
| 42 | Once Hdd |
| 43 | Once Pxe |
| 44 | Once Diags |
| 45 | Once Cd |
| 46 | Once BiosSetup |
| 47 | |
| 48 | Verify BMC Redfish Boot Types With BootSource As Continuous |
| 49 | [Documentation] Verify BMC Redfish Boot Types With BootSource As Continuous. |
| 50 | [Tags] Verify_BMC_Redfish_Boot_Types_With_BootSource_As_Continuous |
| 51 | [Template] Set And Verify BootSource And BootType |
| 52 | |
| 53 | #BootSourceEnable BootTargetType |
| 54 | Continuous Hdd |
| 55 | Continuous Pxe |
| 56 | Continuous Diags |
| 57 | Continuous Cd |
| 58 | Continuous BiosSetup |
| 59 | |
| 60 | *** Keywords *** |
| 61 | |
| 62 | Set And Verify BootSource And BootType |
| 63 | [Documentation] Set And Verify BootSource And BootType. |
| 64 | [Arguments] ${override_enabled} ${override_target} |
| 65 | |
| 66 | # Description of argument(s): |
| 67 | # override_enabled Boot source enable type. |
| 68 | # ('Once', 'Continuous', 'Disabled'). |
| 69 | # override_target Boot target type. |
| 70 | # ('Pxe', 'Cd', 'Hdd', 'Diags', 'BiosSetup', 'None'). |
| 71 | |
| 72 | # Example: |
| 73 | # "Boot": { |
| 74 | # "BootSourceOverrideEnabled": "Disabled", |
| 75 | # "BootSourceOverrideMode": "Legacy", |
| 76 | # "BootSourceOverrideTarget": "None", |
| 77 | # "BootSourceOverrideTarget@Redfish.AllowableValues": [ |
| 78 | # "None", |
| 79 | # "Pxe", |
| 80 | # "Hdd", |
| 81 | # "Cd", |
| 82 | # "Diags", |
| 83 | # "BiosSetup"]} |
| 84 | |
Anusha Dathatri | 02a0bb3 | 2019-04-05 00:50:38 -0500 | [diff] [blame] | 85 | # The values set using Redfish are verified via IPMI using the command: |
| 86 | # chassis bootparam get 5 |
| 87 | # Option 5 returns the boot parameters. |
| 88 | # |
| 89 | # Sample output: |
| 90 | # Boot parameter version: 1 |
| 91 | # Boot parameter 5 is valid/unlocked |
| 92 | # Boot parameter data: c000000000 |
| 93 | # Boot Flags : |
| 94 | # - Boot Flag Valid |
| 95 | # - Options apply to all future boots |
| 96 | # - BIOS PC Compatible (legacy) boot |
| 97 | # - Boot Device Selector : No override |
| 98 | # - Console Redirection control : System Default |
| 99 | # - BIOS verbosity : Console redirection occurs per BIOS configuration |
| 100 | # setting (default) |
| 101 | # - BIOS Mux Control Override : BIOS uses recommended setting of the mux at |
| 102 | # the end of POST |
| 103 | |
George Keishing | 1eeff9c | 2020-06-16 04:03:34 -0500 | [diff] [blame] | 104 | Redfish Set Boot Default ${override_enabled} ${override_target} |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 105 | |
Anusha Dathatri | 02a0bb3 | 2019-04-05 00:50:38 -0500 | [diff] [blame] | 106 | ${output}= Run IPMI Standard Command chassis bootparam get 5 |
| 107 | Should Contain ${output} ${redfish_ipmi_enabled_map['${override_enabled}']} |
| 108 | Should Contain ${output} ${redfish_ipmi_target_map['${override_target}']} |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 109 | |
| 110 | Suite Teardown Execution |
| 111 | [Documentation] Do the post suite teardown. |
| 112 | |
George Keishing | 01644e6 | 2019-03-26 04:10:17 -0500 | [diff] [blame] | 113 | Redfish.Login |
Sridevi Ramesh | 484e10c | 2019-02-28 06:14:46 -0600 | [diff] [blame] | 114 | Set And Verify BootSource And BootType Disabled None |
George Keishing | 01644e6 | 2019-03-26 04:10:17 -0500 | [diff] [blame] | 115 | Redfish.Logout |
George Keishing | ac3b095 | 2019-03-11 06:02:28 -0500 | [diff] [blame] | 116 | |
| 117 | |
| 118 | Test Setup Execution |
| 119 | [Documentation] Do test case setup tasks. |
| 120 | |
| 121 | Redfish.Login |
| 122 | |
| 123 | |
| 124 | Test Teardown Execution |
| 125 | [Documentation] Do the post test teardown. |
| 126 | |
| 127 | FFDC On Test Case Fail |
| 128 | Redfish.Logout |