Add support in __init__.robot to call REST and redfish defaults
Change-Id: Ie2e332be7d6dcea3fa2baa5c991085201d24bc10
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/tests/__init__.robot b/tests/__init__.robot
index e3699c8..5ddee6e 100644
--- a/tests/__init__.robot
+++ b/tests/__init__.robot
@@ -23,12 +23,30 @@
Run Keyword And Ignore Error Log PNOR Driver Details
Run Keyword And Ignore Error Log BMC Model
Run Keyword And Ignore Error Enable Core Dump On BMC
+
+ Run Keyword If ${REDFISH_SUPPORTED}
+ ... Redfish Default
+ ... ELSE
+ ... REST Default
+
+REST Default
+ [Documentation] Set REST defaults.
+
Run Keyword And Ignore Error Set Boot Defaults
Run Keyword And Ignore Error Set BMC Power Policy ${ALWAYS_POWER_OFF}
Run Keyword If ${FIELD_MODE} == ${True}
... Enable Field Mode And Verify Unmount
Run Keyword And Ignore Error Clear BMC Gard Record
+
+Redfish Default
+ [Documentation] Set REST defaults.
+
+ Redfish.Login
+ Run Keyword And Ignore Error Redfish Set Power Restore Policy AlwaysOff
+ Redfish.Logout
+
+
Set Boot Defaults
[Documentation] Set boot defaults.
Set Control Boot Mode ${CONTROL_HOST_URI}/boot ${BOOT_MODE_REGULAR}