Update AutoReboot policy in the test.

Resolves openbmc/openbmc-test-automation#796

Change-Id: Ibf2a36df7ee248fbb9ce11071d8265e34775a7d1
Signed-off-by: Sweta Potthuri <spotthur@in.ibm.com>
diff --git a/extended/test_ras.robot b/extended/test_ras.robot
index e641517..4ffc24f 100644
--- a/extended/test_ras.robot
+++ b/extended/test_ras.robot
@@ -71,7 +71,7 @@
     # fru            FRU value (e.g. 2011400).
     # address        chip address (e.g 4000000000000000).
 
-    Set Auto Reboot  yes
+    Set Auto Reboot  ${1}
     Inject Checkstop Through OS  ${chip_type}  ${fru}  ${address}
     Wait Until Keyword Succeeds  120 sec  20 sec  Is Host Rebooted
     Wait for OS  ${OS_HOST}  ${OS_USERNAME}  ${OS_PASSWORD}
diff --git a/lib/utils.robot b/lib/utils.robot
index bf84dac..ed0d2bb 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -164,7 +164,7 @@
     [Documentation]  Initiate an auto reboot.
 
     # Set the auto reboot policy.
-    Set Auto Reboot  yes
+    Set Auto Reboot  ${1}
     # Set the watchdog timer.  Note: 5000 = milliseconds which is 5 seconds.
     Trigger Host Watchdog Error  5000
 
@@ -738,20 +738,19 @@
 
 Get Auto Reboot
     [Documentation]  Returns auto reboot setting.
-    ${setting}=  Read Attribute  ${HOST_SETTING}  auto_reboot
+    ${setting}=  Read Attribute  ${CONTROL_HOST_URI}/auto_reboot  AutoReboot
     [Return]  ${setting}
 
-
 Set Auto Reboot
     [Documentation]  Set the given auto reboot setting.
     [Arguments]  ${setting}
-    # setting  auto reboot's setting, i.e. yes or no
+    # setting  auto reboot's setting, i.e. 1 for enabling and 0 for disabling.
 
     ${valueDict}=  Set Variable  ${setting}
     ${data}=  Create Dictionary  data=${valueDict}
-    Write Attribute  ${HOST_SETTING}  auto_reboot  data=${data}
+    Write Attribute  ${CONTROL_HOST_URI}/auto_reboot  AutoReboot   data=${data}
     ${current_setting}=  Get Auto Reboot
-    Should Be Equal  ${current_setting}  ${setting}
+    Should Be Equal As Integers  ${current_setting}  ${setting}
 
 
 Set BMC Reset Reference Time
diff --git a/tests/test_host_auto_reboot.robot b/tests/test_host_auto_reboot.robot
index aee5ddd..b0d0d80 100644
--- a/tests/test_host_auto_reboot.robot
+++ b/tests/test_host_auto_reboot.robot
@@ -17,7 +17,7 @@
 Verify Host Quiesce State Without Auto Reboot During Boot
     # Description of template fields:
     # Auto Reboot   Initial Host State     Expected Host Action
-    no              Booting                No Reboot
+    ${0}               Booting                No Reboot
     [Documentation]  Validate "Quiesce" state during IPL.
     [Tags]  Verify_Host_Quiesce_State_Without_Auto_Reboot_During_Boot
     [Template]  Verify Host Quiesce State
@@ -26,7 +26,7 @@
 Verify Host Quiesce State With Auto Reboot During Boot
     # Description of template fields:
     # Auto Reboot   Initial Host State     Expected Host Action
-    yes             Booting                Reboot
+    ${1}               Booting                Reboot
     [Documentation]  Validate "Quiesce" state during IPL.
     [Tags]  Verify_Host_Quiesce_State_With_Auto_Reboot_During_Boot
     [Template]  Verify Host Quiesce State
@@ -39,7 +39,8 @@
     ...  Later recover host from this state.
     [Arguments]  ${auto_reboot}  ${initial_host_state}  ${action}
     # Description of argument(s):
-    # auto_reboot          Auto reboot setting ("yes" or "no").
+    # auto_reboot          Auto reboot setting
+    #                      i.e 1 for enabling and 0 for disabling.
     # initial_host_state   State of host before injecting error.
     # action               Action of host due to error ("No Reboot" or
     #                      "Reboot").
@@ -68,5 +69,5 @@
     ...  3. Close all open SSH connections.
 
     FFDC On Test Case Fail
-    Set Auto Reboot  yes
+    Set Auto Reboot  ${1}
     Close All Connections