1*** Settings ***
2Documentation    Test suite to verify if the Robot setup is ready for use.
3
4Resource         ../lib/resource.robot
5Resource         ../lib/rest_client.robot
6Resource         ../lib/connection_client.robot
7Resource         ../lib/ipmi_client.robot
8Resource        ../lib/bmc_redfish_resource.robot
9
10*** Test Cases ***
11
12Test Redfish Setup
13    [Documentation]  Verify Redfish works.
14
15    Skip If  ${REDFISH_SUPPORT_TRANS_STATE} == ${0}
16    ...  Skipping Redfish check, user explicitly requested for REST.
17
18    Redfish.Login
19    Redfish.Get  /redfish/v1/
20    Redfish.Logout
21
22
23Test REST Setup
24    [Documentation]  Verify REST works.
25
26    Skip If  ${REDFISH_SUPPORT_TRANS_STATE} == ${1}
27    ...  Skipping REST check, user explicitly requested for Redfish.
28
29    # REST Connection and request.
30    Initialize OpenBMC
31    # Raw GET REST operation to verify session is established.
32    ${resp}=  GET On Session  openbmc  /xyz/openbmc_project/  expected_status=any
33    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
34    Log To Console  \n ${resp.json()}
35
36
37Test SSH Setup
38    [Documentation]  Verify SSH works.
39
40    BMC Execute Command  uname -a
41
42
43Test IPMI Setup
44    [Documentation]  Verify Out-of-band works.
45
46    ${chassis_status}=  Run IPMI Standard Command  chassis status
47    Log To Console  \n ${chassis_status}
48