blob: 2507b64dac26983385742ec9dd8ec8a2a607b7d3 [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
18
19*** Variables ***
20
21
22${root_cmd_args} = SEPARATOR=
George Keishingd4ba2492022-01-10 08:27:34 -060023... redfishtool raw -r ${OPENBMC_HOST}:${HTTPS_PORT} -u ${OPENBMC_USERNAME} -p ${OPENBMC_PASSWORD} -S Always
manashsarma9864c942020-05-26 06:58:59 -050024${min_number_sensors} ${15}
25
26
27*** Test Cases ***
28
29Verify Redfishtool Sensor Commands
30 [Documentation] Verify redfishtool's sensor commands.
31 [Tags] Verify_Redfishtool_Sensor_Commands
32
Tony Lee2b975822021-04-01 11:15:00 +080033 ${sensor_status}= Redfishtool Get /redfish/v1/Chassis/${CHASSIS_ID}/Sensors
manashsarma9864c942020-05-26 06:58:59 -050034 ${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
39Verify Redfishtool Health Check Commands
40 [Documentation] Verify redfishtool's health check command.
41 [Tags] Verify_Redfishtool_Health_Check_Commands
42
Tony Lee2b975822021-04-01 11:15:00 +080043 ${chassis_data}= Redfishtool Get /redfish/v1/Chassis/${CHASSIS_ID}/
manashsarma9864c942020-05-26 06:58:59 -050044 ${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
manashsarma9864c942020-05-26 06:58:59 -050053Suite Setup Execution
54 [Documentation] Do suite setup execution.
55
56 ${tool_exist}= Run which redfishtool
57 Should Not Be Empty ${tool_exist}