Add support for Legacy/EFI selector in Redfish boot tests
BootSourceOverrideMode is the BIOS boot mode to use when
the system boots from the BootSourceOverrideTarget boot source.
Possible values are:
Legacy - The system boots in non-UEFI boot mode to
the boot source override target
UEFI - The system boots in UEFI boot mode to
the boot source override target
This setting is relevant for x86 and is not important for POWER.
Intended design of bmcweb is not to publish BootSourceOverrideMode
interface if it is not used in arch.
Therefore use/check BootSourceOverrideMode only on x86.
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Change-Id: Ib23e3ae2fd5113730d75da4cb7ac352c0ae96e66
diff --git a/lib/utils.robot b/lib/utils.robot
index 264b165..5a6efde 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -801,17 +801,23 @@
Redfish Set Boot Default
- [Documentation] Set and Verify BootSource and BootType.
- [Arguments] ${override_enabled} ${override_target}
+ [Documentation] Set and Verify Boot source override
+ [Arguments] ${override_enabled} ${override_target} ${override_mode}=UEFI
# Description of argument(s):
- # override_enabled Boot source enable type.
+ # override_enabled Boot source override enable type.
# ('Once', 'Continuous', 'Disabled').
- # override_target Boot target type.
+ # override_target Boot source override target.
# ('Pxe', 'Cd', 'Hdd', 'Diags', 'BiosSetup', 'None').
+ # override_mode Boot source override mode (relevant only for x86 arch).
+ # ('Legacy', 'UEFI').
${data}= Create Dictionary BootSourceOverrideEnabled=${override_enabled}
... BootSourceOverrideTarget=${override_target}
+
+ Run Keyword If '${PLATFORM_ARCH_TYPE}' == 'x86'
+ ... Set To Dictionary ${data} BootSourceOverrideMode ${override_mode}
+
${payload}= Create Dictionary Boot=${data}
Redfish.Patch /redfish/v1/Systems/system body=&{payload}
@@ -820,6 +826,8 @@
${resp}= Redfish.Get Attribute /redfish/v1/Systems/system Boot
Should Be Equal As Strings ${resp["BootSourceOverrideEnabled"]} ${override_enabled}
Should Be Equal As Strings ${resp["BootSourceOverrideTarget"]} ${override_target}
+ Run Keyword If '${PLATFORM_ARCH_TYPE}' == 'x86'
+ ... Should Be Equal As Strings ${resp["BootSourceOverrideMode"]} ${override_mode}
# Redfish state keywords.