| manashsarma | 9864c94 | 2020-05-26 06:58:59 -0500 | [diff] [blame] | 1 | *** Settings *** | 
|  | 2 |  | 
|  | 3 |  | 
|  | 4 | Documentation     Verify Redfish tool general functionality. | 
|  | 5 |  | 
|  | 6 | Library           OperatingSystem | 
|  | 7 | Library           String | 
|  | 8 | Library           Collections | 
|  | 9 |  | 
|  | 10 | Resource          ../../lib/resource.robot | 
|  | 11 | Resource          ../../lib/bmc_redfish_resource.robot | 
|  | 12 | Resource          ../../lib/openbmc_ffdc.robot | 
| manashsarma | 579d825 | 2020-05-28 08:10:51 -0500 | [diff] [blame] | 13 | Resource          ../../lib/dmtf_redfishtool_utils.robot | 
| manashsarma | 9864c94 | 2020-05-26 06:58:59 -0500 | [diff] [blame] | 14 |  | 
|  | 15 |  | 
|  | 16 | Suite Setup       Suite Setup Execution | 
|  | 17 |  | 
| Matt Fischer | 6fb70d9 | 2023-10-24 19:06:33 -0600 | [diff] [blame] | 18 | Test Tags        Redfishtool_General | 
| manashsarma | 9864c94 | 2020-05-26 06:58:59 -0500 | [diff] [blame] | 19 |  | 
|  | 20 | *** Variables *** | 
|  | 21 |  | 
|  | 22 |  | 
|  | 23 | ${root_cmd_args} =  SEPARATOR= | 
| George Keishing | d4ba249 | 2022-01-10 08:27:34 -0600 | [diff] [blame] | 24 | ...  redfishtool raw -r ${OPENBMC_HOST}:${HTTPS_PORT} -u ${OPENBMC_USERNAME} -p ${OPENBMC_PASSWORD} -S Always | 
| manashsarma | 9864c94 | 2020-05-26 06:58:59 -0500 | [diff] [blame] | 25 | ${min_number_sensors}  ${15} | 
|  | 26 |  | 
|  | 27 |  | 
|  | 28 | *** Test Cases *** | 
|  | 29 |  | 
|  | 30 | Verify Redfishtool Sensor Commands | 
|  | 31 | [Documentation]  Verify redfishtool's sensor commands. | 
|  | 32 | [Tags]  Verify_Redfishtool_Sensor_Commands | 
|  | 33 |  | 
| Tony Lee | 2b97582 | 2021-04-01 11:15:00 +0800 | [diff] [blame] | 34 | ${sensor_status}=  Redfishtool Get  /redfish/v1/Chassis/${CHASSIS_ID}/Sensors | 
| manashsarma | 9864c94 | 2020-05-26 06:58:59 -0500 | [diff] [blame] | 35 | ${json_object}=  Evaluate  json.loads('''${sensor_status}''')  json | 
|  | 36 | Should Be True  ${json_object["Members@odata.count"]} > ${min_number_sensors} | 
|  | 37 | ...  msg=There should be at least ${min_number_sensors} sensors. | 
|  | 38 |  | 
|  | 39 |  | 
|  | 40 | Verify Redfishtool Health Check Commands | 
|  | 41 | [Documentation]  Verify redfishtool's health check command. | 
|  | 42 | [Tags]  Verify_Redfishtool_Health_Check_Commands | 
|  | 43 |  | 
| Tony Lee | 2b97582 | 2021-04-01 11:15:00 +0800 | [diff] [blame] | 44 | ${chassis_data}=  Redfishtool Get  /redfish/v1/Chassis/${CHASSIS_ID}/ | 
| manashsarma | 9864c94 | 2020-05-26 06:58:59 -0500 | [diff] [blame] | 45 | ${json_object}=  Evaluate  json.loads('''${chassis_data}''')  json | 
|  | 46 | ${status}=  Set Variable  ${json_object["Status"]} | 
|  | 47 | Should Be Equal  OK  ${status["Health"]} | 
|  | 48 | ...  msg=Health status should be OK. | 
|  | 49 |  | 
|  | 50 |  | 
|  | 51 | *** Keywords *** | 
|  | 52 |  | 
|  | 53 |  | 
| manashsarma | 9864c94 | 2020-05-26 06:58:59 -0500 | [diff] [blame] | 54 | Suite Setup Execution | 
|  | 55 | [Documentation]  Do suite setup execution. | 
|  | 56 |  | 
|  | 57 | ${tool_exist}=  Run  which redfishtool | 
|  | 58 | Should Not Be Empty  ${tool_exist} |