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 | |
| 18 | |
| 19 | *** Variables *** |
| 20 | |
| 21 | |
| 22 | ${root_cmd_args} = SEPARATOR= |
| 23 | ... redfishtool raw -r ${OPENBMC_HOST} -u ${OPENBMC_USERNAME} -p ${OPENBMC_PASSWORD} -S Always |
| 24 | ${min_number_sensors} ${15} |
| 25 | |
| 26 | |
| 27 | *** Test Cases *** |
| 28 | |
| 29 | Verify Redfishtool Sensor Commands |
| 30 | [Documentation] Verify redfishtool's sensor commands. |
| 31 | [Tags] Verify_Redfishtool_Sensor_Commands |
| 32 | |
| 33 | ${sensor_status}= Redfishtool Get /redfish/v1/Chassis/chassis/Sensors |
| 34 | ${json_object}= Evaluate json.loads('''${sensor_status}''') json |
| 35 | Should Be True ${json_object["Members@odata.count"]} > ${min_number_sensors} |
| 36 | ... msg=There should be at least ${min_number_sensors} sensors. |
| 37 | |
| 38 | |
| 39 | Verify Redfishtool Health Check Commands |
| 40 | [Documentation] Verify redfishtool's health check command. |
| 41 | [Tags] Verify_Redfishtool_Health_Check_Commands |
| 42 | |
| 43 | ${chassis_data}= Redfishtool Get /redfish/v1/Chassis/chassis/ |
| 44 | ${json_object}= Evaluate json.loads('''${chassis_data}''') json |
| 45 | ${status}= Set Variable ${json_object["Status"]} |
| 46 | Should Be Equal OK ${status["Health"]} |
| 47 | ... msg=Health status should be OK. |
| 48 | |
| 49 | |
| 50 | *** Keywords *** |
| 51 | |
| 52 | |
manashsarma | 9864c94 | 2020-05-26 06:58:59 -0500 | [diff] [blame] | 53 | Suite Setup Execution |
| 54 | [Documentation] Do suite setup execution. |
| 55 | |
| 56 | ${tool_exist}= Run which redfishtool |
| 57 | Should Not Be Empty ${tool_exist} |