Library utility URI changes

In the near future, the OpenBMC URI will start with "/xyz/openbmc_project"
instead of "/org/openbmc". This means all our existing tests and libraries
would be impacted.

Change-Id: I8bc8a684b997f2f6559c8c033de590cb5e60ddd8
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index 76195c3..95c3b91 100644
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -11,11 +11,14 @@
 *** Variables ***
 ${SYSTEM_SHUTDOWN_TIME}       ${5}
 ${dbuscmdBase}
-...  dbus-send --system --print-reply --dest=org.openbmc.settings.Host
+...  dbus-send --system --print-reply --dest=${OPENBMC_BASE_DBUS}.settings.Host
 ${dbuscmdGet}
-...  /org/openbmc/settings/host0  org.freedesktop.DBus.Properties.Get
+...  ${OPENBMC_BASE_URI}settings/host0  org.freedesktop.DBus.Properties.Get
+# Enable when ready with openbmc/openbmc-test-automation#203
+#${dbuscmdString}=  string:"xyz.openbmc_project.settings.Host" string:
 ${dbuscmdString}=   string:"org.openbmc.settings.Host" string:
 
+
 # Assign default value to QUIET for programs which may not define it.
 ${QUIET}  ${0}
 
@@ -40,7 +43,7 @@
 Get Boot Progress
     [Arguments]  ${quiet}=${QUIET}
 
-    ${state}=  Read Attribute  /org/openbmc/sensors/host/BootProgress
+    ${state}=  Read Attribute  ${OPENBMC_BASE_URI}sensors/host/BootProgress
     ...  value  quiet=${quiet}
     [return]  ${state}
 
@@ -59,7 +62,7 @@
 
     @{arglist}=   Create List
     ${args}=     Create Dictionary    data=@{arglist}
-    ${resp}=  Call Method  /org/openbmc/control/chassis0/  powerOn
+    ${resp}=  Call Method  ${OPENBMC_BASE_URI}control/chassis0/  powerOn
     ...  data=${args}
     should be equal as strings      ${resp.status_code}     ${HTTP_OK}
 
@@ -72,7 +75,7 @@
     ...  keyword returns that the power state has switched to off.
     @{arglist}=   Create List
     ${args}=     Create Dictionary    data=@{arglist}
-    ${resp}=  Call Method  /org/openbmc/control/chassis0/  powerOff
+    ${resp}=  Call Method  ${OPENBMC_BASE_URI}control/chassis0/  powerOff
     ...  data=${args}
     should be equal as strings      ${resp.status_code}     ${HTTP_OK}
     Wait Until Keyword Succeeds  1 min  10 sec  Is Power Off
@@ -80,8 +83,8 @@
 Trigger Warm Reset
     log to console    "Triggering warm reset"
     ${data}=   create dictionary   data=@{EMPTY}
-    ${resp}=  openbmc post request  /org/openbmc/control/bmc0/action/warmReset
-    ...  data=${data}
+    ${resp}=  openbmc post request
+    ...  ${OPENBMC_BASE_URI}control/bmc0/action/warmReset  data=${data}
     Should Be Equal As Strings      ${resp.status_code}     ${HTTP_OK}
     ${session_active}=   Check If warmReset is Initiated
     Run Keyword If   '${session_active}' == '${True}'
@@ -174,7 +177,7 @@
 
     @{arglist}=  Create List
     ${args}=  Create Dictionary  data=@{arglist}
-    ${resp}=  Call Method  /org/openbmc/managers/System/  getSystemState
+    ${resp}=  Call Method  ${OPENBMC_BASE_URI}managers/System/  getSystemState
     ...        data=${args}  quiet=${quiet}
     Should be equal as strings  ${resp.status_code}  ${HTTP_OK}
     ${content}=  to json  ${resp.content}
@@ -187,7 +190,7 @@
     @{arglist}=  Create List
     ${args}=  Create Dictionary  data=@{arglist}
 
-    ${resp}=  Call Method  /org/openbmc/control/chassis0/  getPowerState
+    ${resp}=  Call Method  ${OPENBMC_BASE_URI}control/chassis0/  getPowerState
     ...        data=${args}  quiet=${quiet}
     Should be equal as strings  ${resp.status_code}  ${HTTP_OK}
     ${content}=  to json  ${resp.content}
@@ -198,7 +201,8 @@
     ...              equivalent to ipmitool sel clear.
     @{arglist}=   Create List
     ${args}=     Create Dictionary    data=@{arglist}
-    ${resp}=  Call Method  /org/openbmc/records/events/  clear  data=${args}
+    ${resp}=  Call Method
+    ...  ${OPENBMC_BASE_URI}records/events/  clear  data=${args}
     should be equal as strings      ${resp.status_code}     ${HTTP_OK}
 
 Copy PNOR to BMC
@@ -212,7 +216,7 @@
     [arguments]    ${pnor_image}
     @{arglist}=   Create List    ${pnor_image}
     ${args}=     Create Dictionary    data=@{arglist}
-    ${resp}=  Call Method  /org/openbmc/control/flash/bios/  update
+    ${resp}=  Call Method  ${OPENBMC_BASE_URI}control/flash/bios/  update
     ...  data=${args}
     should be equal as strings      ${resp.status_code}     ${HTTP_OK}
     Wait Until Keyword Succeeds    2 min   10 sec    Is PNOR Flashing
@@ -220,7 +224,7 @@
 Get Flash BIOS Status
     [Documentation]  Returns the status of the flash BIOS API as a string. For
     ...              example 'Flashing', 'Flash Done', etc
-    ${data}=      Read Properties     /org/openbmc/control/flash/bios
+    ${data}=      Read Properties     ${OPENBMC_BASE_URI}control/flash/bios
     [return]    ${data['status']}
 
 Is PNOR Flashing