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 Request  openbmc  /xyz/openbmc_project/
33    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
34    ${content}=  To JSON  ${resp.content}  pretty_print=True
35    Log To Console  \n ${content}
36
37
38Test SSH Setup
39    [Documentation]  Verify SSH works.
40
41    BMC Execute Command  uname -a
42
43
44Test IPMI Setup
45    [Documentation]  Verify Out-of-band works.
46
47    ${chassis_status}=  Run IPMI Standard Command  chassis status
48    Log To Console  \n ${chassis_status}
49