Fixed cases with hard-coded 'chassis'

Reference to
https://www.dmtf.org/sites/default/files/standards/documents/DSP2046_2020.3.pdf

It should not hard-coded as 'chassis' in /redfish/v1/Chassis/chassis.
It could be different name for /redfish/v1/Chassis/{ChassisId}.

Signed-off-by: Tony Lee <tony.lee@quantatw.com>
Change-Id: Ie6e8f37356b88692148bdda7348e715fcac6b4e3
diff --git a/lib/resource.robot b/lib/resource.robot
index 4d8ba43..3dc5eb2 100755
--- a/lib/resource.robot
+++ b/lib/resource.robot
@@ -28,6 +28,8 @@
 ${REST_USERNAME}       root
 ${REST_PASSWORD}       0penBmc
 
+${CHASSIS_ID}  chassis
+
 # MTLS_ENABLED indicates whether mTLS is enabled.
 ${MTLS_ENABLED}        False
 # Valid mTLS certificate for authentication.
diff --git a/redfish/dmtf_tools/test_redfishtool_general.robot b/redfish/dmtf_tools/test_redfishtool_general.robot
index 0286cd8..72f05c1 100644
--- a/redfish/dmtf_tools/test_redfishtool_general.robot
+++ b/redfish/dmtf_tools/test_redfishtool_general.robot
@@ -30,7 +30,7 @@
     [Documentation]  Verify redfishtool's sensor commands.
     [Tags]  Verify_Redfishtool_Sensor_Commands
 
-    ${sensor_status}=  Redfishtool Get  /redfish/v1/Chassis/chassis/Sensors
+    ${sensor_status}=  Redfishtool Get  /redfish/v1/Chassis/${CHASSIS_ID}/Sensors
     ${json_object}=  Evaluate  json.loads('''${sensor_status}''')  json
     Should Be True  ${json_object["Members@odata.count"]} > ${min_number_sensors}
     ...  msg=There should be at least ${min_number_sensors} sensors.
@@ -40,7 +40,7 @@
     [Documentation]  Verify redfishtool's health check command.
     [Tags]  Verify_Redfishtool_Health_Check_Commands
 
-    ${chassis_data}=  Redfishtool Get  /redfish/v1/Chassis/chassis/
+    ${chassis_data}=  Redfishtool Get  /redfish/v1/Chassis/${CHASSIS_ID}/
     ${json_object}=  Evaluate  json.loads('''${chassis_data}''')  json
     ${status}=  Set Variable  ${json_object["Status"]}
     Should Be Equal  OK  ${status["Health"]}
diff --git a/redfish/service_root/test_service_root.robot b/redfish/service_root/test_service_root.robot
index 1f38c48..9426fd2 100644
--- a/redfish/service_root/test_service_root.robot
+++ b/redfish/service_root/test_service_root.robot
@@ -50,7 +50,7 @@
     ${HTTP_OK}           /redfish/v1/SessionService
     ${HTTP_OK}           /redfish/v1/AccountService
     ${HTTP_OK}           /redfish/v1/Systems/system
-    ${HTTP_OK}           /redfish/v1/Chassis/chassis
+    ${HTTP_OK}           /redfish/v1/Chassis/${CHASSIS_ID}
     ${HTTP_OK}           /redfish/v1/Managers/bmc
     ${HTTP_OK}           /redfish/v1/UpdateService
 
diff --git a/redfish/service_root/test_sessions_management.robot b/redfish/service_root/test_sessions_management.robot
index afe68f9..e7a81cc 100644
--- a/redfish/service_root/test_sessions_management.robot
+++ b/redfish/service_root/test_sessions_management.robot
@@ -132,7 +132,7 @@
 
     # Members can be one or more, hence checking in the list.
     Valid List  chassis['Members']
-    ...  required_values=[{'@odata.id': '/redfish/v1/Chassis/chassis'}]
+    ...  required_values=[{'@odata.id': '/redfish/v1/Chassis/${CHASSIS_ID}'}]
 
 
 Verify Systems Defaults
diff --git a/redfish/systems/test_thermal_ambient_temperatures.robot b/redfish/systems/test_thermal_ambient_temperatures.robot
index e5ce228..d893145 100755
--- a/redfish/systems/test_thermal_ambient_temperatures.robot
+++ b/redfish/systems/test_thermal_ambient_temperatures.robot
@@ -46,7 +46,8 @@
     # record_type    The thermal record type (e.g. "Temperatures")
     # reading_type   The thermal temperature readings (e.g. "ReadingCelsius")
 
-    ${records}=  Verify Valid Records  ${record_type}  ${REDFISH_CHASSIS_THERMAL_URI}  ${reading_type}
+    ${records}=  Verify Valid Records  ${record_type}
+    ...  ${REDFISH_CHASSIS_URI}/${CHASSIS_ID}/Thermal  ${reading_type}
 
     ${num_records}=  Get Length  ${records}
     Rprint Vars  num_records  records