Set boot mode default to regular
Needed for CI and CT at the start of the initial setup.
Resolves openbmc/openbmc-test-automation#1062
Change-Id: I726cc4bd9ede9b7002dc8465e509105130e2c97d
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index 90f0cfb..a341459 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -1179,3 +1179,20 @@
${valueDict}= Create Dictionary data=${setting}
Write Attribute ${SENSORS_URI}host/TurboAllowed value data=${valueDict}
+
+
+Set Control Boot Mode
+ [Documentation] Set given boot mode on the boot object path attribute.
+ [Arguments] ${boot_path} ${boot_mode}
+
+ # Description of argument(s):
+ # boot_path Boot object path.
+ # Example:
+ # /xyz/openbmc_project/control/host0/boot
+ # /xyz/openbmc_project/control/host0/boot/one_time
+ # boot_mode Boot mode which need to be set.
+ # Example:
+ # "xyz.openbmc_project.Control.Boot.Mode.Modes.Regular"
+
+ ${valueDict}= Create Dictionary data=${boot_mode}
+ Write Attribute ${boot_path} BootMode data=${valueDict}