Test suites with new URI changes

This changes addresses:
   - variables updation with new URI
   - Fix minor spacing exceeding 80 characters

Change-Id: I1ef68d5fa2010241703422a68f1a9e01524c0f07
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/tests/test_led.robot b/tests/test_led.robot
index 9097104..1c2f442 100644
--- a/tests/test_led.robot
+++ b/tests/test_led.robot
@@ -13,24 +13,26 @@
 ${MIN_TOGGLE_VALUE}    0
 ${SAMPLING_FREQUENCY}  6
 
+${LED_CONTROL}    ${CONTROL_URI}led/
+
 *** Test Cases ***
 
 Validate Heartbeat LEDs Test Cases
     [Documentation]   If heartbeat LED exist then execute the test set.
     [Tags]  Validate_Heartbeat_LEDs_Test_Cases
-    ${resp}=   OpenBMC Get Request   /org/openbmc/control/led/heartbeat
+    ${resp}=   OpenBMC Get Request   ${LED_CONTROL}heartbeat
     Run keyword If  ${resp.status_code} == ${HTTP_OK}   Execute Heartbeat LEDs Test Cases
 
 Validate Identify LEDs Test Cases
     [Documentation]   If identify LED exist then execute the test set.
     [Tags]  Validate_Identify_LEDs_Test_Cases
-    ${resp}=   OpenBMC Get Request   /org/openbmc/control/led/identify
+    ${resp}=   OpenBMC Get Request   ${LED_CONTROL}identify
     Run keyword If  ${resp.status_code} == ${HTTP_OK}   Execute Identify LEDs Test Cases
 
 Validate Beep LEDs Test Cases
     [Documentation]   If beep LED exist then execute the test set.
     [Tags]  Validate_Beep_LEDs_Test_Cases
-    ${resp}=   OpenBMC Get Request   /org/openbmc/control/led/beep
+    ${resp}=   OpenBMC Get Request   ${LED_CONTROL}beep
     Run keyword If  ${resp.status_code} == ${HTTP_OK}  Execute Beep LEDs Test Cases
 
 *** Keywords ***
@@ -198,7 +200,7 @@
 Get LED State
    [arguments]    ${args}
    ${data}=   create dictionary   data=@{EMPTY}
-   ${resp}=   OpenBMC Post Request   /org/openbmc/control/led/${args}/action/GetLedState   data=${data}
+   ${resp}=   OpenBMC Post Request   ${LED_CONTROL}${args}/action/GetLedState   data=${data}
    should be equal as strings   ${resp.status_code}   ${HTTP_OK}
    ${json}=   to json   ${resp.content}
    [return]    ${json['data'][1]}
@@ -206,7 +208,7 @@
 Set On
    [arguments]    ${args}
    ${data}=   create dictionary   data=@{EMPTY}
-   ${resp}=   OpenBMC Post Request   /org/openbmc/control/led/${args}/action/setOn   data=${data}
+   ${resp}=   OpenBMC Post Request   ${LED_CONTROL}${args}/action/setOn   data=${data}
    should be equal as strings   ${resp.status_code}   ${HTTP_OK}
    ${json}=   to json   ${resp.content}
    should be equal as integers   ${json['data']}   0
@@ -214,7 +216,7 @@
 Set Off
    [arguments]    ${args}
    ${data}=   create dictionary   data=@{EMPTY}
-   ${resp}=   OpenBMC Post Request   /org/openbmc/control/led/${args}/action/setOff   data=${data}
+   ${resp}=   OpenBMC Post Request   ${LED_CONTROL}${args}/action/setOff   data=${data}
    should be equal as strings   ${resp.status_code}   ${HTTP_OK}
    ${json}=   to json   ${resp.content}
    should be equal as integers   ${json['data']}   0
@@ -222,7 +224,7 @@
 Set Blink Fast
    [arguments]    ${args}
    ${data}=   create dictionary   data=@{EMPTY}
-   ${resp}=   OpenBMC Post Request   /org/openbmc/control/led/${args}/action/setBlinkFast   data=${data}
+   ${resp}=   OpenBMC Post Request   ${LED_CONTROL}${args}/action/setBlinkFast   data=${data}
    should be equal as strings   ${resp.status_code}   ${HTTP_OK}
    ${json}=   to json   ${resp.content}
    should be equal as integers   ${json['data']}   0
@@ -230,7 +232,7 @@
 Set Blink Slow
    [arguments]    ${args}
    ${data}=   create dictionary   data=@{EMPTY}
-   ${resp}=   OpenBMC Post Request   /org/openbmc/control/led/${args}/action/setBlinkSlow   data=${data}
+   ${resp}=   OpenBMC Post Request   ${LED_CONTROL}${args}/action/setBlinkSlow   data=${data}
    should be equal as strings   ${resp.status_code}   ${HTTP_OK}
    ${json}=   to json   ${resp.content}
    should be equal as integers   ${json['data']}   0
diff --git a/tests/test_networkd.robot b/tests/test_networkd.robot
index 0dfb897..0e661ac 100755
--- a/tests/test_networkd.robot
+++ b/tests/test_networkd.robot
@@ -13,6 +13,10 @@
 Suite Teardown      Close All Connections
 Test Teardown       FFDC On Test Case Fail
 
+*** Variables ***
+
+${NW_MANAGER}    ${NETWORK_MANAGER_URI}Interface
+
 *** Test Cases ***
 
 Get the Mac address
@@ -21,7 +25,7 @@
     [Tags]   network_test
     @{arglist}=   Create List   eth0
     ${args}=     Create Dictionary   data=@{arglist}
-    ${resp}=   Call Method    /org/openbmc/NetworkManager/Interface/    GetHwAddress    data=${args}
+    ${resp}=   Call Method    ${NW_MANAGER}   GetHwAddress    data=${args}
     should not be empty    ${resp.content}
     ${json}=   to json         ${resp.content}
     should be equal as strings      ${json['status']}      ok
@@ -36,7 +40,7 @@
 
     @{arglist}=   Create List   lo01
     ${args}=     Create Dictionary   data=@{arglist}
-    ${resp}=    Call Method    /org/openbmc/NetworkManager/Interface/   GetAddress4    data=${args}
+    ${resp}=    Call Method   ${NW_MANAGER}  GetAddress4    data=${args}
     should not be equal as strings      ${resp.status_code}     ${HTTP_OK}
     ${json}=   to json         ${resp.content}
     should be equal as strings      ${json['status']}       error
@@ -49,7 +53,7 @@
 
     @{arglist}=   Create List   eth0
     ${args}=     Create Dictionary   data=@{arglist}
-    ${resp}=    Call Method    /org/openbmc/NetworkManager/Interface/   GetAddress4    data=${args}
+    ${resp}=    Call Method   ${NW_MANAGER}  GetAddress4    data=${args}
     should be equal as strings      ${resp.status_code}     ${HTTP_OK}
     ${json}=   to json         ${resp.content}
     should be equal as strings      ${json['status']}      ok
@@ -114,7 +118,7 @@
 
     ${arglist}=    Create List    eth0    ${CURRENT_IP}   ${CURRENT_MASK}   ${CURRENT_GATEWAY}
     ${args}=     Create Dictionary   data=@{arglist}
-    run keyword and ignore error    Call Method    /org/openbmc/NetworkManager/Interface/   SetAddress4    data=${args}
+    run keyword and ignore error   Call Method  ${NW_MANAGER}  SetAddress4  data=${args}
 
     Wait For Host To Ping       ${CURRENT_IP}
 
@@ -122,7 +126,7 @@
 
     @{arglist}=   Create List   eth0
     ${args}=     Create Dictionary   data=@{arglist}
-    ${resp}=    Call Method    /org/openbmc/NetworkManager/Interface/   GetAddressType    data=${args}
+    ${resp}=    Call Method   ${NW_MANAGER}   GetAddressType    data=${args}
     ${json}=   to json         ${resp.content}
     Should Be Equal    ${json['data']}    STATIC
     should be equal as strings      ${json['status']}      ok
@@ -142,7 +146,7 @@
     [arguments]    ${intf}
     @{arglist}=    Create List   ${intf}
     ${args}=       Create Dictionary   data=@{arglist}
-    ${resp}=       Call Method    /org/openbmc/NetworkManager/Interface/   GetAddress4    data=${args}
+    ${resp}=       Call Method   ${NW_MANAGER}  GetAddress4    data=${args}
     should be equal as strings      ${resp.status_code}     ${HTTP_OK}
     ${json}=   to json         ${resp.content}
     log to console   ${json['data'][2]}
@@ -154,7 +158,7 @@
 
     ${arglist}=    Create List    ${intf}    ${address}  ${mask}   ${gateway}
     ${args}=       Create Dictionary   data=@{arglist}
-    ${resp}=       Call Method    /org/openbmc/NetworkManager/Interface/   SetAddress4    data=${args}
+    ${resp}=       Call Method   ${NW_MANAGER}  SetAddress4    data=${args}
     should not be equal as strings      ${resp.status_code}     ${HTTP_OK}
     ${json}=   to json         ${resp.content}
     should be equal as strings      ${json['status']}       ${result}
diff --git a/tests/test_occ_powercap.robot b/tests/test_occ_powercap.robot
index c424b5e..e5ce8f0 100644
--- a/tests/test_occ_powercap.robot
+++ b/tests/test_occ_powercap.robot
@@ -12,6 +12,8 @@
 
 Force Tags   powercapping
 
+*** Variables ***
+
 *** Test Cases ***
 
 Get OCC status
@@ -88,7 +90,7 @@
     ...               value is greater than zero
     [Tags]  Get_System_Power_Consumption
 
-    ${resp}=   OpenBMC Get Request   /org/openbmc/sensors/powercap/system_power
+    ${resp}=   OpenBMC Get Request   ${SENSORS_URI}powercap/system_power
     should be equal as strings   ${resp.status_code}   ${HTTP_OK}
     ${jsondata}=   To Json    ${resp.content}
     Should Be True   ${jsondata["data"]["value"]} > 0
@@ -96,17 +98,18 @@
 *** Keywords ***
 
 Get Minimum PowerCap
-    ${resp}=   OpenBMC Get Request    /org/openbmc/sensors/powercap/min_cap
+    ${resp}=   OpenBMC Get Request
+    ...    ${SENSORS_URI}powercap/min_cap
     ${jsondata}=   To Json    ${resp.content}
     [return]    ${jsondata["data"]["value"]}
 
 Get Maximum PowerCap
-    ${resp}=   OpenBMC Get Request    /org/openbmc/sensors/powercap/max_cap
+    ${resp}=   OpenBMC Get Request   ${SENSORS_URI}powercap/max_cap
     ${jsondata}=   To Json    ${resp.content}
     [return]    ${jsondata["data"]["value"]}
 
 Get User PowerCap
-    ${resp}=   OpenBMC Get Request    /org/openbmc/sensors/powercap/user_cap
+    ${resp}=   OpenBMC Get Request   ${SENSORS_URI}powercap/user_cap
     ${jsondata}=   To Json    ${resp.content}
     [return]    ${jsondata["data"]["value"]}
 
@@ -114,16 +117,19 @@
     [Arguments]    ${powercap_value}
     @{pcap_list}=   Create List     ${powercap_value}
     ${data}=   create dictionary   data=@{pcap_list}
-    ${resp}=   openbmc post request    /org/openbmc/sensors/host/powercap/action/setValue      data=${data}
+    ${resp}=   openbmc post request
+    ...    ${SENSORS_URI}host/powercap/action/setValue      data=${data}
     [return]    ${resp}
 
 Get PowerCap
-    ${resp}=   OpenBMC Get Request    /org/openbmc/sensors/host/powercap
+    ${resp}=   OpenBMC Get Request
+    ...    ${SENSORS_URI}host/powercap
     ${jsondata}=   To Json    ${resp.content}
     [return]    ${jsondata["data"]["value"]}
 
 Get OCC status link
-    ${resp}=    OpenBMC Get Request     /org/openbmc/sensors/host/list
+    ${resp}=    OpenBMC Get Request
+    ...     ${SENSORS_URI}host/list
     ${jsondata}=   To Json    ${resp.content}
     log     ${jsondata}
     : FOR    ${ELEMENT}    IN    @{jsondata["data"]}
@@ -139,7 +145,7 @@
     [return]    ${jsondata["data"]}
 
 Get Chassis URI
-    ${resp}=    OpenBMC Get Request     /org/openbmc/control/
+    ${resp}=    OpenBMC Get Request     ${OPENBMC_BASE_URI}control/
     ${jsondata}=   To Json    ${resp.content}
     log     ${jsondata}
     : FOR    ${ELEMENT}    IN    @{jsondata["data"]}
@@ -163,13 +169,13 @@
 Powercap Attributes Activated
     [Documentation]   Verify if the response contains the pre-define list
 
-    @{precheck}=   Create List   /org/openbmc/sensors/powercap/user_cap
-    ...                          /org/openbmc/sensors/powercap/system_power
-    ...                          /org/openbmc/sensors/powercap/curr_cap
-    ...                          /org/openbmc/sensors/powercap/max_cap
-    ...                          /org/openbmc/sensors/powercap/min_cap
+    @{precheck}=   Create List   ${SENSORS_URI}powercap/user_cap
+    ...                          ${SENSORS_URI}powercap/system_power
+    ...                          ${SENSORS_URI}powercap/curr_cap
+    ...                          ${SENSORS_URI}powercap/max_cap
+    ...                          ${SENSORS_URI}powercap/min_cap
 
-    ${resp}=    OpenBMC Get Request   /org/openbmc/sensors/powercap/
+    ${resp}=    OpenBMC Get Request  ${SENSORS_URI}powercap/
     ${jsondata}=   To Json    ${resp.content}
     List Should Contain Sub List   ${jsondata["data"]}    ${precheck}
     ...     msg=Failed to activate powercap interface attributes
diff --git a/tests/test_sensors.robot b/tests/test_sensors.robot
index cfa18e1..c46e885 100644
--- a/tests/test_sensors.robot
+++ b/tests/test_sensors.robot
@@ -256,12 +256,14 @@
     [Tags]    Chassis_Present
 
     ${uri}=    Get System component    chassis
-    Read The Attribute   /org/openbmc/inventory/system/chassis    present
+    Read The Attribute
+    ...   ${INVENTORY_URI}system/chassis    present
     Response Should Be Equal    True
 
 Chassis Fault
     ${uri}=    Get System component    chassis
-    Read The Attribute   /org/openbmc/inventory/system/chassis    fault
+    Read The Attribute
+    ...   ${INVENTORY_URI}system/chassis    fault
     Response Should Be Equal    False
 
 io_board Present
@@ -281,7 +283,7 @@
 Setup The Suite
 
     Open Connection And Log In
-    ${resp}=       Read Properties         /org/openbmc/enumerate   timeout=30
+    ${resp}=   Read Properties   ${OPENBMC_BASE_URI}enumerate   timeout=30
     Set Suite Variable      ${SYSTEM_INFO}          ${resp}
     log Dictionary          ${resp}
 
diff --git a/tests/test_time.robot b/tests/test_time.robot
index 5731c64..71f458e 100755
--- a/tests/test_time.robot
+++ b/tests/test_time.robot
@@ -4,6 +4,7 @@
 Resource               ../lib/rest_client.robot
 Resource               ../lib/ipmi_client.robot
 Resource               ../lib/openbmc_ffdc.robot
+Resource               ../lib/resource.txt
 
 Library                OperatingSystem
 Library                DateTime
@@ -17,6 +18,8 @@
 ${SYSTEM_TIME_VALID}       02/29/2016 09:10:00
 ${ALLOWED_TIME_DIFF}       2
 
+${SETTING_HOST}     ${SETTINGS_URI}host0
+
 *** Test Cases ***
 
 Get System Time
@@ -71,7 +74,7 @@
 
     Set Time Mode   NTP
 
-    ${boot}=   Read Attribute  /org/openbmc/settings/host0    time_mode
+    ${boot}=   Read Attribute  ${SETTING_HOST}   time_mode
     Should Be Equal    ${boot}    NTP
 
 Set Manual Time Mode
@@ -82,7 +85,7 @@
 
     Set Time Mode   Manual
 
-    ${boot}=   Read Attribute  /org/openbmc/settings/host0    time_mode
+    ${boot}=   Read Attribute  ${SETTING_HOST}   time_mode
     Should Be Equal    ${boot}    Manual
 
 Set Time Owner as BMC
@@ -93,7 +96,7 @@
 
     Set Time Owner   BMC
 
-    ${boot}=   Read Attribute  /org/openbmc/settings/host0    time_owner
+    ${boot}=   Read Attribute  ${SETTING_HOST}   time_owner
     Should Be Equal    ${boot}    BMC
 
 Set Time Owner as Host
@@ -104,7 +107,7 @@
 
     Set Time Owner   Host
 
-    ${boot}=   Read Attribute  /org/openbmc/settings/host0    time_owner
+    ${boot}=   Read Attribute  ${SETTING_HOST}    time_owner
     Should Be Equal    ${boot}    Host
 
 Set Invalid Time Mode
@@ -117,7 +120,7 @@
     ${resp}=   Set Time Mode   abc
     Should Be Equal    ${resp}    error
 
-    ${boot}=   Read Attribute  /org/openbmc/settings/host0    time_mode
+    ${boot}=   Read Attribute   ${SETTING_HOST}   time_mode
     Should Not Be Equal    ${boot}    abc
 
 Set Invalid Time Owner
@@ -130,7 +133,7 @@
     ${resp}=   Set Time Owner   xyz
     Should Be Equal    ${resp}    error
 
-    ${boot}=   Read Attribute  /org/openbmc/settings/host0    time_owner
+    ${boot}=   Read Attribute  ${SETTING_HOST}   time_owner
     Should Not Be Equal    ${boot}    xyz
 
 
@@ -153,7 +156,7 @@
     ${valueDict}=   create dictionary   data=${timeowner}
 
     ${resp}=   OpenBMC Put Request
-    ...         /org/openbmc/settings/host0/attr/time_owner    data=${valueDict}
+    ...    ${SETTING_HOST}/attr/time_owner    data=${valueDict}
     ${jsondata}=    to json    ${resp.content}
     [return]    ${jsondata['status']}
 
@@ -163,7 +166,7 @@
     ${valueDict}=   create dictionary   data=${timemode}
 
     ${resp}=   OpenBMC Put Request
-    ...         /org/openbmc/settings/host0/attr/time_mode    data=${valueDict}
+    ...   ${SETTING_HOST}/attr/time_mode    data=${valueDict}
     ${jsondata}=    to json    ${resp.content}
     [return]    ${jsondata['status']}
 
diff --git a/tests/test_user.robot b/tests/test_user.robot
index 3445697..58316bf 100755
--- a/tests/test_user.robot
+++ b/tests/test_user.robot
@@ -21,6 +21,7 @@
 ${RANDOM_STRING_LENGTH}    ${8}
 ${VALID_PASSWORD}          abc123
 ${NON_EXISTING_USER}       aaaaa
+
 *** Test Cases ***
 
 Create and delete user group
@@ -275,14 +276,16 @@
 
 Get UserList
     ${data}=   create dictionary   data=@{EMPTY}
-    ${resp}=   OpenBMC Post Request   /org/openbmc/UserManager/Users/action/UserList   data=${data}
+    ${resp}=   OpenBMC Post Request
+    ...   ${USER_MANAGER_URI}Users/action/UserList   data=${data}
     should be equal as strings    ${resp.status_code}    ${HTTP_OK}
     ${jsondata}=    to json    ${resp.content}
     [return]    ${jsondata['data']}
 
 Get GroupListUsr
     ${data}=   create dictionary   data=@{EMPTY}
-    ${resp}=   OpenBMC Post Request   /org/openbmc/UserManager/Groups/action/GroupListUsr   data=${data}
+    ${resp}=   OpenBMC Post Request
+    ...   ${USER_MANAGER_URI}/Groups/action/GroupListUsr   data=${data}
     should be equal as strings    ${resp.status_code}    ${HTTP_OK}
     ${jsondata}=    to json    ${resp.content}
     [return]    ${jsondata['data']}
@@ -291,7 +294,8 @@
     [Arguments]    ${comment}    ${username}    ${groupname}    ${password}
     @{user_list}=   Create List     ${comment}    ${username}    ${groupname}    ${password}
     ${data}=   create dictionary   data=@{user_list}
-    ${resp}=   OpenBMC Post Request    /org/openbmc/UserManager/Users/action/UserAdd      data=${data}
+    ${resp}=   OpenBMC Post Request
+    ...    ${USER_MANAGER_URI}Users/action/UserAdd      data=${data}
     ${jsondata}=    to json    ${resp.content}
     [return]    ${jsondata['status']}
 
@@ -299,7 +303,8 @@
     [Arguments]    ${username}    ${password}
     @{user_list}=   Create List     ${username}    ${password}
     ${data}=   create dictionary   data=@{user_list}
-    ${resp}=   OpenBMC Post Request    /org/openbmc/UserManager/User/action/Passwd      data=${data}
+    ${resp}=   OpenBMC Post Request
+    ...    ${USER_MANAGER_URI}User/action/Passwd      data=${data}
     ${jsondata}=    to json    ${resp.content}
     [return]    ${jsondata['status']}
 
@@ -307,7 +312,8 @@
     [Arguments]    ${args}
     @{group_list}=   Create List     ${args}
     ${data}=   create dictionary   data=@{group_list}
-    ${resp}=   OpenBMC Post Request    /org/openbmc/UserManager/Groups/action/GroupAddUsr      data=${data}
+    ${resp}=   OpenBMC Post Request
+    ...    ${USER_MANAGER_URI}Groups/action/GroupAddUsr      data=${data}
     ${jsondata}=    to json    ${resp.content}
     [return]    ${jsondata['status']}
 
@@ -315,7 +321,8 @@
     [Arguments]    ${args}
     @{group_list}=   Create List     ${args}
     ${data}=   create dictionary   data=@{group_list}
-    ${resp}=   OpenBMC Post Request    /org/openbmc/UserManager/Group/action/GroupDel      data=${data}
+    ${resp}=   OpenBMC Post Request
+    ...    ${USER_MANAGER_URI}Group/action/GroupDel      data=${data}
     ${jsondata}=    to json    ${resp.content}
     [return]    ${jsondata['status']}
 
@@ -323,7 +330,8 @@
     [Arguments]    ${args}
     @{user_list}=   Create List     ${args}
     ${data}=   create dictionary   data=@{user_list}
-    ${resp}=   OpenBMC Post Request    /org/openbmc/UserManager/User/action/Userdel      data=${data}
+    ${resp}=   OpenBMC Post Request
+    ...    ${USER_MANAGER_URI}User/action/Userdel      data=${data}
     ${jsondata}=    to json    ${resp.content}
     [return]    ${jsondata['status']}