Add support for redfish AutomaticRetryConfig
Changes:
- Added get and set for AutomaticRetryConfig policy
Note: Allowed values are "Disabled" and "RetryAttempts"
Change-Id: I9056c0feeefe4e2c655109cb7fca9d47885d251b
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index f05ff31..f5c82b3 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -360,6 +360,15 @@
[Return] ${setting}
+Redfish Get Auto Reboot
+ [Documentation] Returns auto reboot setting.
+
+ Redfish.Login
+ ${resp}= Redfish.get /redfish/v1/Systems/system
+ Redfish.Logout
+ [Return] ${resp.dict["Boot"]["AutomaticRetryConfig"]}
+
+
Trigger Warm Reset
[Documentation] Initiate a warm reset.
@@ -663,6 +672,21 @@
Should Be Equal As Integers ${current_setting} ${setting}
+Redfish Set Auto Reboot
+ [Documentation] Set the given auto reboot setting.
+ [Arguments] ${setting}
+
+ # Description of argument(s):
+ # setting The reboot setting, "RetryAttempts" and "Disabled".
+
+ ${data}= Create Dictionary Boot={"AutomaticRetryConfig":"Disabled"}
+ Redfish.Login
+ Redfish.patch /redfish/v1/Systems/system body={"Boot": {"AutomaticRetryConfig": "${setting}"}}
+ ... valid_status_codes=[200, 204]
+ ${current_setting}= Redfish Get Auto Reboot
+ Should Be Equal As Strings ${current_setting} ${setting}
+
+
Set Control Boot Mode
[Documentation] Set given boot mode on the boot object path attribute.
[Arguments] ${boot_path} ${boot_mode}