Added keyword for automatic reboot
Why this keyword is required:
- System will take action based on this auto reboot setting
in case of quiesce mode/reboot operation.
This change includes:
- Added keywords to Get and Set Auto Reboot setting.
Resolves openbmc/openbmc-test-automation#347
Change-Id: I2e710806eac2ed7057f8d57ea1b0aebd46e4ba43
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index b012450..dbfcb77 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -594,6 +594,24 @@
${currentPolicy}= Read Attribute ${HOST_SETTING} power_policy
[Return] ${currentPolicy}
+Get Auto Reboot
+ [Documentation] Returns auto reboot setting.
+ ${setting}= Read Attribute ${HOST_SETTINGS} auto_reboot
+ [Return] ${setting}
+
+
+Set Auto Reboot
+ [Documentation] Set the given auto reboot setting.
+ [Arguments] ${setting}
+ # setting auto reboot's setting, i.e. yes or no
+
+ ${valueDict}= Set Variable ${setting}
+ ${data}= Create Dictionary data=${valueDict}
+ Write Attribute ${HOST_SETTINGS} auto_reboot data=${data}
+ ${current_setting}= Get Auto Reboot
+ Should Be Equal ${current_setting} ${setting}
+
+
Set BMC Reset Reference Time
[Documentation] Set current boot time as a reference and increment
... boot count.