xref: /openbmc/openbmc-test-automation/openpower/vpd/check_vpd_and_hw_status.robot (revision 94041a34a992d9b5f6418a43e1cd5273a6d9f9b2)
1*** Settings ***
2Documentation       BMC collect VPD and hardware status.
3
4# Test Parameters:
5# OPENBMC_HOST      The BMC host name or IP address.
6
7Resource            ../../lib/bmc_redfish_resource.robot
8Resource            ../../lib/openbmc_ffdc.robot
9
10Suite Setup         Suite Setup Execution
11Test Setup          Printn
12
13Test Tags           Check_VPD_And_HW_Status
14
15*** Variables ***
16${QUIET}  ${1}
17
18*** Test Cases ***
19
20Collect VPD And Hardware Status
21    [Documentation]  Collect VPD and hardware status using Redfish.
22    [Tags]  Collect_VPD_And_Hardware_Status
23    [Setup]  Redfish.Login
24    [Teardown]  Redfish Test Teardown Execution
25
26    ${system_properties}=  Redfish_Utils.Get Properties  ${SYSTEM_BASE_URI}
27    ${system_memory_info}=  Redfish_Utils.Enumerate Request  ${SYSTEM_BASE_URI}/Memory
28    ${system_processors_info}=  Redfish_Utils.Enumerate Request  ${SYSTEM_BASE_URI}/Processors
29    ${system_fans_info}=  Redfish_Utils.Enumerate Request
30    ...  ${REDFISH_CHASSIS_URI}/Chassis/ThermalSubsystem/Fans
31
32    ${collected_values}=  gen_robot_print.Sprint Vars
33    ...  system_properties  system_memory_info  system_processors_info  system_fans_info
34    Log To Console  ${\n}${collected_values}${\n}
35
36
37Run VPD Tool
38    [Documentation]  Run vpd-tool -i.
39    [Tags]  Run_VPD_Tool
40
41    BMC Execute Command  vpd-tool -i  print_out=${1}
42
43*** Keywords ***
44
45Suite Setup Execution
46    [Documentation]  Do test case setup tasks.
47
48    Set Log Level  DEBUG
49    Log To Console  ${OPENBMC_HOST}
50
51
52Redfish Test Teardown Execution
53    [Documentation]  Do the post test teardown for redfish.
54
55    Redfish.Logout
56    FFDC On Test Case Fail
57