Set system, chassis, and bmc as global variables

Changes:
  - Add SYSTEM_ID as a global variable and set to default value system
  - Replace redfish/v1/Systems/system to redfish/v1/Systems/SYSTEM_ID
  - Replace redfish/v1/Chassis/chassis to redfish/v1/Chassis/CHASSIS_ID
  - Replace redfish/v1/Managers/bmc to redfish/v1/Managers/MANAGER_ID

Tested:
  - Tested on sandbox with the changes with sample test run with
    sample test ID runs
    1. without SYSTEM_ID provided
    2. with -v SYSTEM_ID:system1
    3. with export SYSTEM_ID=""
    3. with export SYSTEM_ID="system2"

Change-Id: Ifc412b20038cef1eba632caaa6c300be328259bd
Signed-off-by: Wilson Suen <wilsons@supermicro.com>
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/managers/test_bmc_dumps.robot b/redfish/managers/test_bmc_dumps.robot
index 7ec352e..fd24feb 100644
--- a/redfish/managers/test_bmc_dumps.robot
+++ b/redfish/managers/test_bmc_dumps.robot
@@ -374,7 +374,7 @@
     ${dump_id}=  Create User Initiated BMC Dump Via Redfish
 
     # Download BMC dump and verify its size.
-    ${resp}=  Redfish.Get  /redfish/v1/Managers/bmc/LogServices/Dump/Entries/${dump_id}
+    ${resp}=  Redfish.Get  /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries/${dump_id}
     ${redfish_dump_creation_timestamp}=  Set Variable  ${resp.dict["Created"]}
     # Download BMC dump and verify its size.
     ${tarfile}=  Download BMC Dump  ${dump_id}
@@ -438,7 +438,7 @@
     ${dump_entries}=  Get BMC Dump Entries
 
     # Find the timestamp of BMC dump.
-    ${resp}=  Redfish.Get  /redfish/v1/Managers/bmc/LogServices/Dump/Entries/${dump_entries[0]}
+    ${resp}=  Redfish.Get  /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries/${dump_entries[0]}
     ${redfish_dump_creation_timestamp}=  Set Variable  ${resp.dict["Created"]}
 
     # Download BMC dump and verify its size.
@@ -487,13 +487,13 @@
     # Description of argument(s):
     # dump_id                An integer value that identifies a particular dump (e.g. 1, 3).
 
-    ${resp}=  Redfish.Get  /redfish/v1/Managers/bmc/LogServices/Dump/Entries/${dump_id}
+    ${resp}=  Redfish.Get  /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries/${dump_id}
     ${redfish_bmc_dump_size}=  Set Variable  ${resp.dict["AdditionalDataSizeBytes"]}
 
     Initialize OpenBMC
     ${headers}=  Create Dictionary  Content-Type=application/octet-stream  X-Auth-Token=${XAUTH_TOKEN}
 
-    ${ret}=  GET On Session  openbmc  /redfish/v1/Managers/bmc/LogServices/Dump/Entries/${dump_id}/attachment  headers=${headers}
+    ${ret}=  GET On Session  openbmc  /redfish/v1/Managers/${MANAGER_ID}/LogServices/Dump/Entries/${dump_id}/attachment  headers=${headers}
 
     Should Be Equal As Numbers  ${ret.status_code}  200
 
diff --git a/redfish/service_root/test_service_root.robot b/redfish/service_root/test_service_root.robot
index 9e4c2ba..9f83e2e 100644
--- a/redfish/service_root/test_service_root.robot
+++ b/redfish/service_root/test_service_root.robot
@@ -49,7 +49,7 @@
     # Expect status      Resource URL Path
     ${HTTP_OK}           /redfish/v1/SessionService
     ${HTTP_OK}           /redfish/v1/AccountService
-    ${HTTP_OK}           /redfish/v1/Systems/system
+    ${HTTP_OK}           /redfish/v1/Systems/${SYSTEM_ID}
     ${HTTP_OK}           /redfish/v1/Chassis/${CHASSIS_ID}
     ${HTTP_OK}           /redfish/v1/Managers/${MANAGER_ID}
     ${HTTP_OK}           /redfish/v1/UpdateService
diff --git a/redfish/service_root/test_sessions_management.robot b/redfish/service_root/test_sessions_management.robot
index a627357..31aa3b4 100644
--- a/redfish/service_root/test_sessions_management.robot
+++ b/redfish/service_root/test_sessions_management.robot
@@ -181,7 +181,7 @@
     Valid Value  systems['Members@odata.count']  [${systems_count}]
     Valid Value  systems['Members@odata.count']  [${systems_count}]
     # Members can be one or more, hence checking in the list.
-    Valid List  systems['Members']  required_values=[{'@odata.id': '/redfish/v1/Systems/system'}]
+    Valid List  systems['Members']  required_values=[{'@odata.id': '/redfish/v1/Systems/${SYSTEM_ID}'}]
 
 
 Verify Session Persistency After BMC Reboot
diff --git a/redfish/systems/LogServices/test_post_codes.robot b/redfish/systems/LogServices/test_post_codes.robot
index f6a859a..214dae8 100644
--- a/redfish/systems/LogServices/test_post_codes.robot
+++ b/redfish/systems/LogServices/test_post_codes.robot
@@ -28,7 +28,7 @@
     Rprint Vars  post_code_list
 
     ${post_codes}=  Redfish.Get Properties
-    ...  /redfish/v1/Systems/system/LogServices/PostCodes/Entries
+    ...  /redfish/v1/Systems/${SYSTEM_ID}/LogServices/PostCodes/Entries
     Log To Console  BIOS POST Codes count: ${post_codes['Members@odata.count']}
     Should Be True  ${post_codes['Members@odata.count']} >= 1  msg=No BIOS POST Codes populated.
 
@@ -46,7 +46,7 @@
     Rprint Vars  post_code_list
 
     ${post_codes}=  Redfish.Get Properties
-    ...  /redfish/v1/Systems/system/LogServices/PostCodes/Entries
+    ...  /redfish/v1/Systems/${SYSTEM_ID}/LogServices/PostCodes/Entries
     Log To Console  BIOS POST Codes count: ${post_codes['Members@odata.count']}
     Should Be True  ${post_codes['Members@odata.count']} >= 1  msg=No BIOS POST Codes populated.
 
@@ -64,7 +64,7 @@
     Rprint Vars  post_code_list
 
     ${post_codes}=  Redfish.Get Properties
-    ...  /redfish/v1/Systems/system/LogServices/PostCodes/Entries
+    ...  /redfish/v1/Systems/${SYSTEM_ID}/LogServices/PostCodes/Entries
     Log To Console  BIOS POST Codes count: ${post_codes['Members@odata.count']}
     Should Be True  ${post_codes['Members@odata.count']} == 0
     ...  msg=BIOS POST Codes populated.
@@ -96,7 +96,7 @@
 
     # Get log count before BMC reboot.
     ${post_codes}=  Redfish.Get Properties
-    ...  /redfish/v1/Systems/system/LogServices/PostCodes/Entries
+    ...  /redfish/v1/Systems/${SYSTEM_ID}/LogServices/PostCodes/Entries
     ${initial_log_count}=  Set Variable  ${post_codes['Members@odata.count']}
 
     # Reboot BMC.
@@ -104,7 +104,7 @@
 
     # Get log count after BMC reboot and compare with initial log count.
     ${post_codes}=  Redfish.Get Properties
-    ...  /redfish/v1/Systems/system/LogServices/PostCodes/Entries
+    ...  /redfish/v1/Systems/${SYSTEM_ID}/LogServices/PostCodes/Entries
     ${current_log_count}=  Set Variable  ${post_codes['Members@odata.count']}
     Should Be True  ${current_log_count} == ${initial_log_count}
 
@@ -117,7 +117,7 @@
     # Perform clear postcode log action.
     Redfish Clear PostCodes
     ${post_codes}=  Redfish.Get Properties
-    ...  /redfish/v1/Systems/system/LogServices/PostCodes/Entries
+    ...  /redfish/v1/Systems/${SYSTEM_ID}/LogServices/PostCodes/Entries
 
     # Verify if log count becomes zero.
     Should Be True  ${post_codes['Members@odata.count']} == 0
@@ -189,13 +189,13 @@
     #     "Name": "BIOS POST Code Log Entries"
     # }
     ${post_codes}=  Redfish.Get Properties
-    ...  /redfish/v1/Systems/system/LogServices/PostCodes/Entries
+    ...  /redfish/v1/Systems/${SYSTEM_ID}/LogServices/PostCodes/Entries
     ${total_log_count}=  Set Variable  ${post_codes['Members@odata.count']}
 
     IF  ${total_log_count} > ${max_view_count}
         ${skip_count}=  Evaluate  (${total_log_count}//${max_view_count})*${max_view_count}
         ${uri}=  Set Variable
-        ...  /redfish/v1/Systems/system/LogServices/PostCodes/Entries?$skip=${skip_count}
+        ...  /redfish/v1/Systems/${SYSTEM_ID}/LogServices/PostCodes/Entries?$skip=${skip_count}
         ${post_codes}=  Redfish.Get Properties  ${uri}
     END
 
@@ -211,7 +211,7 @@
     ...  to populate postcode logs if there are no prior log entries.
 
     ${post_codes}=  Redfish.Get Properties
-    ...  /redfish/v1/Systems/system/LogServices/PostCodes/Entries
+    ...  /redfish/v1/Systems/${SYSTEM_ID}/LogServices/PostCodes/Entries
     Run Keyword If  ${post_codes['Members@odata.count']} == 0
     ...  RF SYS GracefulRestart
 
diff --git a/redfish/systems/eventlog/test_event_logging.robot b/redfish/systems/eventlog/test_event_logging.robot
index 6c4e22a..42136d3 100644
--- a/redfish/systems/eventlog/test_event_logging.robot
+++ b/redfish/systems/eventlog/test_event_logging.robot
@@ -66,7 +66,7 @@
     Create Test PEL Log
     ${elog_entry}=  Get Event Logs
 
-    Redfish.Delete  /redfish/v1/Systems/system/LogServices/EventLog/Entries/${elog_entry[0]["Id"]}
+    Redfish.Delete  /redfish/v1/Systems/${SYSTEM_ID}/LogServices/EventLog/Entries/${elog_entry[0]["Id"]}
 
     ${error_entries}=  Get Redfish Error Entries
     Should Be Empty  ${error_entries}
@@ -338,7 +338,7 @@
     Create Test PEL Log
     Create Test PEL Log
     ${error_entries_before}=  Get Redfish Error Entries
-    Redfish.Delete  /redfish/v1/Systems/system/LogServices/EventLog/Entries/${error_entries_before[0]}
+    Redfish.Delete  /redfish/v1/Systems/${SYSTEM_ID}/LogServices/EventLog/Entries/${error_entries_before[0]}
 
     ${error_entries_after}=  Get Redfish Error Entries
     Should Not Contain  ${error_entries_after}  ${error_entries_before[0]}
@@ -477,7 +477,7 @@
 
 Get Redfish Error Entries
     [Documentation]  Return Redfish error ids list.
-    ${error_uris}=  redfish_utils.get_member_list  /redfish/v1/Systems/system/LogServices/EventLog/Entries
+    ${error_uris}=  redfish_utils.get_member_list  /redfish/v1/Systems/${SYSTEM_ID}/LogServices/EventLog/Entries
     ${error_ids}=  Create List
 
     FOR  ${error_uri}  IN  @{error_uris}
diff --git a/redfish/systems/test_led_indicator_asserted.robot b/redfish/systems/test_led_indicator_asserted.robot
index 535ae47..df1f4da 100755
--- a/redfish/systems/test_led_indicator_asserted.robot
+++ b/redfish/systems/test_led_indicator_asserted.robot
@@ -231,7 +231,7 @@
 Set Suite LED Indicator Initial Value
     [Documentation]  set suite For LED Initial value.
 
-    ${value}=  Redfish.Get Attribute      /redfish/v1/Systems/system  LocationIndicatorActive
+    ${value}=  Redfish.Get Attribute      /redfish/v1/Systems/${SYSTEM_ID}  LocationIndicatorActive
     Set Suite Variable  ${value}
 
     IF  ${value} == False
@@ -246,10 +246,10 @@
     [Arguments]  ${set_value}
 
     ${payload}=  Create Dictionary    LocationIndicatorActive=${set_value}
-    Redfish.Patch      /redfish/v1/Systems/system    body=&{payload}
+    Redfish.Patch      /redfish/v1/Systems/${SYSTEM_ID}    body=&{payload}
     ...  valid_status_codes=[${HTTP_NO_CONTENT}]
 
-    ${value}=  Redfish.Get Attribute      /redfish/v1/Systems/system  LocationIndicatorActive
+    ${value}=  Redfish.Get Attribute      /redfish/v1/Systems/${SYSTEM_ID}  LocationIndicatorActive
 
     Should Be Equal As Strings  ${value}    ${set_value}
 
@@ -259,8 +259,8 @@
     [Arguments]  ${value}
 
     ${payload}=  Create Dictionary    LocationIndicatorActive=${value}
-    Redfish.Patch      /redfish/v1/Systems/system    body=&{payload}
+    Redfish.Patch      /redfish/v1/Systems/${SYSTEM_ID}    body=&{payload}
     ...  valid_status_codes=[${HTTP_NO_CONTENT}]
 
-    ${intial_value}=  Redfish.Get Attribute      /redfish/v1/Systems/system  LocationIndicatorActive
+    ${intial_value}=  Redfish.Get Attribute      /redfish/v1/Systems/${SYSTEM_ID}  LocationIndicatorActive
     Should Be Equal As Strings  ${intial_value}  ${value}
diff --git a/redfish/update_service/test_firmware_inventory.robot b/redfish/update_service/test_firmware_inventory.robot
index b9b59c7..b50c319 100644
--- a/redfish/update_service/test_firmware_inventory.robot
+++ b/redfish/update_service/test_firmware_inventory.robot
@@ -234,7 +234,7 @@
     [Documentation]  Get host firmware version from system inventory.
     [Tags]  Verify_Redfish_BIOS_Version
 
-    ${bios_version}=  Redfish.Get Attribute  /redfish/v1/Systems/system/  BiosVersion
+    ${bios_version}=  Redfish.Get Attribute  /redfish/v1/Systems/${SYSTEM_ID}/  BiosVersion
     ${pnor_version}=  Get PNOR Version
     Should Be Equal  ${pnor_version}  ${bios_version}
 
diff --git a/redfish/update_service/test_redfish_host_code_update.robot b/redfish/update_service/test_redfish_host_code_update.robot
index db00ad9..c9fc7e3 100644
--- a/redfish/update_service/test_redfish_host_code_update.robot
+++ b/redfish/update_service/test_redfish_host_code_update.robot
@@ -53,9 +53,9 @@
     [Documentation]  Trigger PNOR update and do BMC reboot.
     [Tags]  BMC_Reboot_When_PNOR_Update_Goes_On
 
-    ${bios_version_before}=  Redfish.Get Attribute  /redfish/v1/Systems/system/  BiosVersion
+    ${bios_version_before}=  Redfish.Get Attribute  /redfish/v1/Systems/${SYSTEM_ID}/  BiosVersion
     Redfish Firmware Update And Do BMC Reboot
-    ${bios_version_after}=  Redfish.Get Attribute  /redfish/v1/Systems/system/  BiosVersion
+    ${bios_version_after}=  Redfish.Get Attribute  /redfish/v1/Systems/${SYSTEM_ID}/  BiosVersion
     Valid Value  bios_version_after  ['${bios_version_before}']