[docker] Renamed hw layer to hardware
[validation.git] / tests / hardware / hp_baremetal / hp_baremetal.robot
1 ##############################################################################
2 # Copyright (c) 2019 AT&T Intellectual Property.                             #
3 # Copyright (c) 2019 Nokia.                                                  #
4 #                                                                            #
5 # Licensed under the Apache License, Version 2.0 (the "License");            #
6 # you maynot use this file except in compliance with the License.            #
7 #                                                                            #
8 # You may obtain a copy of the License at                                    #
9 #       http://www.apache.org/licenses/LICENSE-2.0                           #
10 #                                                                            #
11 # Unless required by applicable law or agreed to in writing, software        #
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
14 # See the License for the specific language governing permissions and        #
15 # limitations under the License.                                             #
16 ##############################################################################
17
18 *** Settings ***
19 Documentation     HP Bare metal HW test cases to verify configuration
20 ...               from given blueprint
21 Library           OperatingSystem
22 Library           BuiltIn
23 Library           Process
24
25 *** Variables ***
26 ${LOGHWHP}        ${LOG_PATH}${/}${SUITE_NAME.replace(' ','_')}.log
27
28 *** Test Cases ***
29 Verify cluster connectivity
30     [Documentation]    Wait a few seconds to prove connectivity
31     @{nodes}  Create List  ${HOST_MR}  ${HOST_WR1}  ${HOST_WR2}  ${HOST_WR3}  ${HOST_WR4}
32     FOR  ${node}  IN  @{nodes}
33          ${output}=        Run    ping ${node} -c 3
34          Append To File    ${LOGHWHP}  ${output}${\n}
35          Should Contain    ${output}    3 packets transmitted, 3 packets received
36     END
37
38 Verify hardware health status
39     [Documentation]   HW health should be ok
40     ${output}=        Run    curl ${BASE_URI} -k | python -m json.tool | grep -A4 '"System":'
41     Append To File    ${LOGHWHP}  ${output}${\n}
42     Should Contain    ${output}    OK
43
44 Verify chassis details
45     [Documentation]   Data should match chassis input
46     ${output}=        Run
47     ...   curl --user ${IPMIUSER}:${IPMIPWRD} ${BASE_URI}Chassis/1/ -k | python -m json.tool | grep "SerialNumber"
48     Append To File    ${LOGHWHP}  ${output}${\n}
49     Should Contain    ${output}    ${CHASSIS}
50
51 Verify iDRAC settings
52     [Documentation]   Data should match idrac input
53     ${output}=        Run
54     ...   curl --user ${IPMIUSER}:${IPMIPWRD} ${BASE_URI}Managers/1/EthernetInterfaces/1/ -k | python -m json.tool | grep -A2 IPv4Addresses
55     Append To File    ${LOGHWHP}  ${output}${\n}
56     Should Contain    ${output}    ${IDRACIP}
57
58 Verify boot registry
59     [Documentation]   Data should match boot input
60     ${output}=        Run
61     ...   curl --user ${IPMIUSER}:${IPMIPWRD} ${BASE_URI}Systems/1/ -k | python -m json.tool | grep BootSourceOverrideMode
62     Append To File    ${LOGHWHP}  ${output}${\n}
63     Should Contain    ${output}    ${BOOTSEQ}
64
65 Verify bios version
66     [Documentation]   Data should match bios input
67     ${output}=        Run
68     ...   curl --user ${IPMIUSER}:${IPMIPWRD} ${BASE_URI}Systems/1/ -k | python -m json.tool | grep BiosVersion
69     Append To File    ${LOGHWHP}  ${output}${\n}
70     Should Contain    ${output}    ${BIOSVER}
71
72 Verify firmware version
73     [Documentation]   Data should match firmware input
74     ${output}=        Run
75     ...   curl --user ${IPMIUSER}:${IPMIPWRD} ${BASE_URI}Managers/1/ -k | python -m json.tool | grep "FirmwareVersion"
76     Append To File    ${LOGHWHP}  ${output}${\n}
77     Should Contain    ${output}   ${FIRMWARE}