From a820722e5fb87a9408ecfe047fd52995965bda62 Mon Sep 17 00:00:00 2001 From: Miguel Montiel Date: Wed, 5 Jun 2019 23:55:22 +0000 Subject: [PATCH] Add Bare metal hardware test cases for hp: - Connectivity - Health - Chassis - idrac - Bios - Firmware Updated Dockerfile for hw container Updated variable.yaml to have a consolidated list of variables for the robot test cases Change-Id: Ie6b6cbfb8854310665602279872409852e36182e Signed-off-by: Miguel Montiel --- bluval/bluval-base.yaml | 4 +- bluval/bluval-dummy.yaml | 4 +- docker/hw/Dockerfile | 4 ++ tests/hardware/hp_baremetal/hp_baremetal.robot | 77 ++++++++++++++++++++++++++ tests/variables.yaml | 31 ++++++++++- 5 files changed, 114 insertions(+), 6 deletions(-) create mode 100644 tests/hardware/hp_baremetal/hp_baremetal.robot diff --git a/bluval/bluval-base.yaml b/bluval/bluval-base.yaml index 924a476..7a49b83 100644 --- a/bluval/bluval-base.yaml +++ b/bluval/bluval-base.yaml @@ -36,8 +36,8 @@ blueprint: # true or false, default is false show_stopper: false - - name: baremetal_hw - what: baremetal_hw + name: hp_baremetal + what: hp_baremetal os: &os_base - name: cyclictest diff --git a/bluval/bluval-dummy.yaml b/bluval/bluval-dummy.yaml index 0f8a89b..11e8fc2 100644 --- a/bluval/bluval-dummy.yaml +++ b/bluval/bluval-dummy.yaml @@ -31,8 +31,8 @@ blueprint: # true or false, default is false show_stopper: false - - name: baremetal_hw - what: baremetal_hw + name: hp_baremetal + what: hp_baremetal os: &os_base - name: cyclictest diff --git a/docker/hw/Dockerfile b/docker/hw/Dockerfile index 1371402..5b25e76 100644 --- a/docker/hw/Dockerfile +++ b/docker/hw/Dockerfile @@ -47,3 +47,7 @@ RUN pip3 install -r /wheels/requirements/pip-requirements.txt \ # Install blueval dependencies RUN pip install -r /opt/akraino/validation/bluval/requirements.txt + +# Install curl +RUN apk --no-cache add --update \ + curl diff --git a/tests/hardware/hp_baremetal/hp_baremetal.robot b/tests/hardware/hp_baremetal/hp_baremetal.robot new file mode 100644 index 0000000..676b109 --- /dev/null +++ b/tests/hardware/hp_baremetal/hp_baremetal.robot @@ -0,0 +1,77 @@ +############################################################################## +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you maynot use this file except in compliance with the License. # +# # +# You may obtain a copy of the License at # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +############################################################################## + +*** Settings *** +Documentation HP Bare metal HW test cases to verify configuration +... from given blueprint +Library OperatingSystem +Library BuiltIn +Library Process + +*** Variables *** +${LOGHWHP} ${LOG_PATH}${/}${SUITE_NAME.replace(' ','_')}.log + +*** Test Cases *** +Verify cluster connectivity + [Documentation] Wait a few seconds to prove connectivity + @{nodes} Create List ${HOST_MR} ${HOST_WR1} ${HOST_WR2} ${HOST_WR3} ${HOST_WR4} + FOR ${node} IN @{nodes} + ${output}= Run ping ${node} -c 3 + Append To File ${LOGHWHP} ${output}${\n} + Should Contain ${output} 3 packets transmitted, 3 received + END + +Verify hw health status + [Documentation] HW health should be ok + ${output}= Run curl ${BASE_URI} -k | python -m json.tool | grep -A4 '"System":' + Append To File ${LOGHWHP} ${output}${\n} + Should Contain ${output} OK + +Verify chassis details + [Documentation] Data should match chassis input + ${output}= Run + ... curl --user ${IPMIUSER}:${IPMIPWRD} ${BASE_URI}Chassis/1/ -k | python -m json.tool | grep "SerialNumber" + Append To File ${LOGHWHP} ${output}${\n} + Should Contain ${output} ${CHASSIS} + +Verify iDRAC settings + [Documentation] Data should match idrac input + ${output}= Run + ... curl --user ${IPMIUSER}:${IPMIPWRD} ${BASE_URI}Managers/1/EthernetInterfaces/1/ -k | python -m json.tool | grep -A2 IPv4Addresses + Append To File ${LOGHWHP} ${output}${\n} + Should Contain ${output} ${IDRACIP} + +Verify boot registry + [Documentation] Data should match boot input + ${output}= Run + ... curl --user ${IPMIUSER}:${IPMIPWRD} ${BASE_URI}Systems/1/ -k | python -m json.tool | grep BootSourceOverrideMode + Append To File ${LOGHWHP} ${output}${\n} + Should Contain ${output} ${BOOTSEQ} + +Verify bios version + [Documentation] Data should match bios input + ${output}= Run + ... curl --user ${IPMIUSER}:${IPMIPWRD} ${BASE_URI}Systems/1/ -k | python -m json.tool | grep BiosVersion + Append To File ${LOGHWHP} ${output}${\n} + Should Contain ${output} ${BIOSVER} + +Verify firmware version + [Documentation] Data should match firmware input + ${output}= Run + ... curl --user ${IPMIUSER}:${IPMIPWRD} ${BASE_URI}Managers/1/ -k | python -m json.tool | grep "FirmwareVersion" + Append To File ${LOGHWHP} ${output}${\n} + Should Contain ${output} ${FIRMWARE} diff --git a/tests/variables.yaml b/tests/variables.yaml index 016f31b..2949440 100644 --- a/tests/variables.yaml +++ b/tests/variables.yaml @@ -23,7 +23,34 @@ # smallcase and Robot variables notation is UPPERCASE so industry is follwoing # this. -host: aknode109 -username: localadmin +### Input variables cluster's master host +host: aknode109 # cluster's master host address +username: mm747b # user credentials +home: /home/mm747b # Public keys location + +### Input variables for bios_version_dell.robot sysinfo: PowerEdge R740xd bios_revision: 1.3 + +### Input variables for bare metal hw test dell or hp +base_uri: https://192.168.XX.XX/redfish/v1/ # OOB Redfish link address +ipmiuser: ipmi_user # ipmi user +ipmipwrd: ipmi_pwd # ipmi password +host_mr: master_host_ip # cluster's master host address +host_wr1: worker_host_ip # cluster's worker1 host address +host_wr2: worker_host_ip # cluster's worker2 host address +host_wr3: worker_host_ip # cluster's worker3 host address +host_wr4: worker_host_ip # cluster's worker4 host address +macaddr: mac_input # host mac address +chassis: serial_number # host serial number +idracip: idrac_ip # idrac ip address +bootseq: boot_input # boot status +biosver: bios_version # host bios version +firmware: firmware_version # host firmware + +### Input variables for containerized ceph test +nodename: targetnode # target node to test ceph + +### Input variables for ltp +rootuser: rootuser # Required root user to log in to the host +rootpswd: rootpassword # Required root password to log in to the host -- 2.16.6