Fixed boot devices test cases.

This change includes:
    - Corrected boot device path.
    - Replaced power on with off.

Resolves openbmc/openbmc-test-automation#1004

Change-Id: I77dbf87d616775e99a67a27d3b4c94874e1a89c5
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/tests/test_boot_devices.robot b/tests/test_boot_devices.robot
index 67c1945..150db15 100644
--- a/tests/test_boot_devices.robot
+++ b/tests/test_boot_devices.robot
@@ -28,7 +28,7 @@
     Set Boot Source  ${BOOT_SOURCE_DEFAULT}
 
     ${boot_source}=
-    ...  Read Attribute  ${CONTROL_HOST_URI}/boot_source  BootSource
+    ...  Read Attribute  ${CONTROL_HOST_URI}/boot/one_time  BootSource
     Should Be Equal As Strings  ${boot_source}  ${BOOT_SOURCE_DEFAULT}
 
     ${output}=  Run IPMI Standard Command  chassis bootparam get 5
@@ -43,7 +43,7 @@
     Run IPMI command  0x0 0x8 0x05 0x80 0x00 0x00 0x00 0x00
 
     ${boot_source}=
-    ...  Read Attribute  ${CONTROL_HOST_URI}/boot_source  BootSource
+    ...  Read Attribute  ${CONTROL_HOST_URI}/boot/one_time  BootSource
     Should Be Equal As Strings  ${boot_source}  ${BOOT_SOURCE_DEFAULT}
 
     ${output}=  Run IPMI Standard Command  chassis bootparam get 5
@@ -58,7 +58,7 @@
     Set Boot Source  ${BOOT_SOURCE_NETWORK}
 
     ${boot_source}=
-    ...  Read Attribute  ${CONTROL_HOST_URI}/boot_source  BootSource
+    ...  Read Attribute  ${CONTROL_HOST_URI}/boot/one_time  BootSource
     Should Be Equal As Strings  ${boot_source}  ${BOOT_SOURCE_NETWORK}
 
     ${output}=  Run IPMI Standard Command  chassis bootparam get 5
@@ -73,7 +73,7 @@
     Run IPMI command  0x0 0x8 0x05 0x80 0x04 0x00 0x00 0x00
 
     ${boot_source}=
-    ...  Read Attribute  ${CONTROL_HOST_URI}/boot_source  BootSource
+    ...  Read Attribute  ${CONTROL_HOST_URI}/boot/one_time  BootSource
     Should Be Equal As Strings  ${boot_source}  ${BOOT_SOURCE_NETWORK}
 
     ${output}=  Run IPMI Standard Command  chassis bootparam get 5
@@ -88,7 +88,7 @@
     Set Boot Source  ${BOOT_SOURCE_DISK}
 
     ${boot_source}=
-    ...  Read Attribute  ${CONTROL_HOST_URI}/boot_source  BootSource
+    ...  Read Attribute  ${CONTROL_HOST_URI}/boot/one_time  BootSource
     Should Be Equal As Strings  ${boot_source}  ${BOOT_SOURCE_DISK}
 
     ${output}=  Run IPMI Standard Command  chassis bootparam get 5
@@ -103,7 +103,7 @@
     Run IPMI command  0x0 0x8 0x05 0x80 0x08 0x00 0x00 0x00
 
     ${boot_source}=
-    ...  Read Attribute  ${CONTROL_HOST_URI}/boot_source  BootSource
+    ...  Read Attribute  ${CONTROL_HOST_URI}/boot/one_time  BootSource
     Should Be Equal As Strings  ${boot_source}  ${BOOT_SOURCE_DISK}
 
     ${output}=  Run IPMI Standard Command  chassis bootparam get 5
@@ -117,7 +117,7 @@
 
     Set Boot Mode  ${BOOT_MODE_SAFE}
 
-    ${boot_mode}=  Read Attribute  ${CONTROL_HOST_URI}/boot_mode  BootMode
+    ${boot_mode}=  Read Attribute  ${CONTROL_HOST_URI}/boot/one_time  BootMode
     Should Be Equal As Strings  ${boot_mode}  ${BOOT_MODE_SAFE}
 
     ${output}=  Run IPMI Standard Command  chassis bootparam get 5
@@ -131,7 +131,7 @@
 
     Run IPMI command  0x0 0x8 0x05 0x80 0x0C 0x00 0x00 0x00
 
-    ${boot_mode}=  Read Attribute  ${CONTROL_HOST_URI}/boot_mode  BootMode
+    ${boot_mode}=  Read Attribute  ${CONTROL_HOST_URI}/boot/one_time  BootMode
     Should Be Equal As Strings  ${boot_mode}  ${BOOT_MODE_SAFE}
 
     ${output}=  Run IPMI Standard Command  chassis bootparam get 5
@@ -146,7 +146,7 @@
     Set Boot Source  ${BOOT_SOURCE_CDROM}
 
     ${boot_source}=
-    ...  Read Attribute  ${CONTROL_HOST_URI}/boot_source  BootSource
+    ...  Read Attribute  ${CONTROL_HOST_URI}/boot/one_time  BootSource
     Should Be Equal As Strings  ${boot_source}  ${BOOT_SOURCE_CDROM}
 
     ${output}=  Run IPMI Standard Command  chassis bootparam get 5
@@ -161,7 +161,7 @@
     Run IPMI command  0x0 0x8 0x05 0x80 0x14 0x00 0x00 0x00
 
     ${boot_source}=
-    ...  Read Attribute  ${CONTROL_HOST_URI}/boot_source  BootSource
+    ...  Read Attribute  ${CONTROL_HOST_URI}/boot/one_time  BootSource
     Should Be Equal As Strings  ${boot_source}  ${BOOT_SOURCE_CDROM}
 
     ${output}=  Run IPMI Standard Command  chassis bootparam get 5
@@ -175,7 +175,7 @@
 
     Set Boot Mode  ${BOOT_MODE_SETUP}
 
-    ${boot_mode}=  Read Attribute  ${CONTROL_HOST_URI}/boot_mode  BootMode
+    ${boot_mode}=  Read Attribute  ${CONTROL_HOST_URI}/boot/one_time  BootMode
     Should Be Equal As Strings  ${boot_mode}  ${BOOT_MODE_SETUP}
 
     ${output}=  Run IPMI Standard Command  chassis bootparam get 5
@@ -189,7 +189,7 @@
 
     Run IPMI command  0x0 0x8 0x05 0x80 0x18 0x00 0x00 0x00
 
-    ${boot_mode}=  Read Attribute  ${CONTROL_HOST_URI}/boot_mode  BootMode
+    ${boot_mode}=  Read Attribute  ${CONTROL_HOST_URI}/boot/one_time  BootMode
     Should Be Equal As Strings  ${boot_mode}  ${BOOT_MODE_SETUP}
 
     ${output}=  Run IPMI Standard Command  chassis bootparam get 5
@@ -205,7 +205,8 @@
     # boot_source  Boot source which need to be set.
 
     ${valueDict}=  Create Dictionary  data=${boot_source}
-    Write Attribute  ${CONTROL_HOST_URI}/boot_source  BootSource  data=${valueDict}
+    Write Attribute  ${CONTROL_HOST_URI}/boot/one_time  BootSource
+    ...  data=${valueDict}
 
 
 Set Boot Mode
@@ -215,7 +216,8 @@
     # boot_mode  Boot mode which need to be set.
 
     ${valueDict}=  Create Dictionary  data=${boot_mode}
-    Write Attribute  ${CONTROL_HOST_URI}/boot_mode  BootMode  data=${valueDict}
+    Write Attribute  ${CONTROL_HOST_URI}/boot/one_time  BootMode
+    ...  data=${valueDict}
 
 
 Response Should Be Equal
@@ -244,5 +246,9 @@
 Test Suite Setup
     [Documentation]  Do the initial suite setup.
 
-    # Boot Host.
-    REST Power On
+    Smart Power Off
+
+    # Set boot policy to default i.e. one time enabled.
+    ${valueDict}=  Create Dictionary  data=${1}
+    Write Attribute  ${CONTROL_HOST_URI}/boot/one_time  Enabled
+    ...  data=${valueDict}