xref: /openbmc/openbmc-test-automation/xcat/test_xcat_inventory.robot (revision f133e8b61580620f1285d5a0413cbea7f078a05f)
1*** Settings ***
2Documentation   Module for testing BMC inventory via XCAT.
3
4Resource        ../lib/xcat/resource.robot
5Resource        ../lib/xcat/xcat_utils.robot
6Resource        ../lib/state_manager.robot
7
8Suite Setup     XCAT Suite Setup
9
10*** Test Cases ***
11
12Verify BMC Version Via XCAT
13    [Documentation]  Verify BMC version using XCAT and REST.
14    [Tags]  Verify_BMC_Version_Via_XCAT
15
16    # Get BMC version info via xcat
17    ${version_via_xcat}=  Execute Command On XCAT  rinv  firm
18
19    # Get BMC version info via rest
20    ${version_via_rest}=  Get BMC Version
21
22    Should Contain  ${version_via_xcat}  ${version_via_rest}
23
24*** Keywords ***
25
26XCAT Suite Setup
27    [Documentation]  XCAT suite setup.
28
29    Open Connection And Login To XCAT
30
31    # Check if XCAT is installed.
32    ${cmd_output}=  Execute Command  ${XCAT_DIR_PATH}/lsxcatd -v
33    Should Not Be Empty  ${cmd_output}  msg=XCAT not installed.
34
35    Add Nodes To XCAT  ${OPENBMC_HOST}
36