blob: 5d0dbe9c2b8d0c2a38f7a20634d1ab619c3357ba [file] [log] [blame]
manashsarma9864c942020-05-26 06:58:59 -05001*** Settings ***
2
3
4Documentation Verify Redfish tool general functionality.
5
6Library OperatingSystem
7Library String
8Library Collections
9
10Resource ../../lib/resource.robot
11Resource ../../lib/bmc_redfish_resource.robot
12Resource ../../lib/openbmc_ffdc.robot
manashsarma579d8252020-05-28 08:10:51 -050013Resource ../../lib/dmtf_redfishtool_utils.robot
manashsarma9864c942020-05-26 06:58:59 -050014
15
16Suite Setup Suite Setup Execution
17
George Keishing54316852023-10-16 14:03:29 +053018Force Tags Redfishtool_General
manashsarma9864c942020-05-26 06:58:59 -050019
20*** Variables ***
21
22
23${root_cmd_args} = SEPARATOR=
George Keishingd4ba2492022-01-10 08:27:34 -060024... redfishtool raw -r ${OPENBMC_HOST}:${HTTPS_PORT} -u ${OPENBMC_USERNAME} -p ${OPENBMC_PASSWORD} -S Always
manashsarma9864c942020-05-26 06:58:59 -050025${min_number_sensors} ${15}
26
27
28*** Test Cases ***
29
30Verify Redfishtool Sensor Commands
31 [Documentation] Verify redfishtool's sensor commands.
32 [Tags] Verify_Redfishtool_Sensor_Commands
33
Tony Lee2b975822021-04-01 11:15:00 +080034 ${sensor_status}= Redfishtool Get /redfish/v1/Chassis/${CHASSIS_ID}/Sensors
manashsarma9864c942020-05-26 06:58:59 -050035 ${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
40Verify Redfishtool Health Check Commands
41 [Documentation] Verify redfishtool's health check command.
42 [Tags] Verify_Redfishtool_Health_Check_Commands
43
Tony Lee2b975822021-04-01 11:15:00 +080044 ${chassis_data}= Redfishtool Get /redfish/v1/Chassis/${CHASSIS_ID}/
manashsarma9864c942020-05-26 06:58:59 -050045 ${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
manashsarma9864c942020-05-26 06:58:59 -050054Suite Setup Execution
55 [Documentation] Do suite setup execution.
56
57 ${tool_exist}= Run which redfishtool
58 Should Not Be Empty ${tool_exist}