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
8
9*** Test Cases ***
10
11Test OpenBMC Automation Setup
12    [Documentation]  Verify REST, SSH, Out-of-band IPMI and others.
13
14    Log To Console  \n *** Testing REST Setup ***
15
16    # REST Connection and request.
17    Initialize OpenBMC
18    # Raw GET REST operation to verify session is established.
19    ${resp}=  Get Request  openbmc  /xyz/openbmc_project/
20    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
21    ${content}=  To JSON  ${resp.content}  pretty_print=True
22    Log To Console  \n ${content}
23
24    Log To Console  \n *** Testing SSH Setup ***
25
26    # SSH Connection and request.
27    Open Connection And Log In
28    ${bmc_kernel}=  Execute Command  uname -a
29    Log To Console  \n ${bmc_kernel}
30
31    Log To Console  \n *** Testing Out-of-band IPMI tool Setup ***
32
33    # IPMI Connection and request.
34    ${chassis_status}=  Run IPMI Standard Command  chassis status
35    Log To Console  \n ${chassis_status}
36