1 ##############################################################################
2 # Copyright (c) 2019 AT&T Intellectual Property. #
3 # Copyright (c) 2019 Nokia. #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you maynot use this file except in compliance with the License. #
8 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
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 ##############################################################################
19 Documentation HP Bare metal HW test cases to verify configuration
20 ... from given blueprint
21 Library OperatingSystem
26 ${LOGHWHP} ${LOG_PATH}${/}${SUITE_NAME.replace(' ','_')}.log
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
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
44 Verify chassis details
45 [Documentation] Data should match chassis input
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}
52 [Documentation] Data should match idrac input
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}
59 [Documentation] Data should match boot input
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}
66 [Documentation] Data should match bios input
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}
72 Verify firmware version
73 [Documentation] Data should match firmware input
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}