Support redfish boot defaults

Changes:
    - Create new keyword in lib/utils.robot.
    - Remove the current redfish setting default and call the new
      keyword.
    - Add the new keyword in redfish default in __init__.robot

Change-Id: I886a638ca47f81f28dbf60f644c6192cfaf14376
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index e56eb8b..26e200a 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -777,3 +777,24 @@
 
     [Return]  ${post_code_update_actions}
 
+
+Redfish Set Boot Default
+    [Documentation]  Set and Verify BootSource and BootType.
+    [Arguments]      ${override_enabled}  ${override_target}
+
+    # Description of argument(s):
+    # override_enabled    Boot source enable type.
+    #                     ('Once', 'Continuous', 'Disabled').
+    # override_target     Boot target type.
+    #                     ('Pxe', 'Cd', 'Hdd', 'Diags', 'BiosSetup', 'None').
+
+    ${data}=  Create Dictionary  BootSourceOverrideEnabled=${override_enabled}
+    ...  BootSourceOverrideTarget=${override_target}
+    ${payload}=  Create Dictionary  Boot=${data}
+
+    Redfish.Patch  /redfish/v1/Systems/system  body=&{payload}
+    ...  valid_status_codes=[${HTTP_OK},${HTTP_NO_CONTENT}]
+
+    ${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}