efa9dd96660421de6210cbbf47a070ff68a42ea9
[validation.git] / tests / hardware / bios_version / bios_version_dell.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
19 *** Settings ***
20 Documentation     Check BIOS and HW details
21 Library           SSHLibrary
22 Library           OperatingSystem
23 Suite Setup       Open Connection And Log In
24 Suite Teardown    Close All Connections
25
26 *** Variables ***
27 ${HOST}           localhost
28 ${USERNAME}       localadmin
29 ${LOG}            /opt/akraino/validation/bios_version/print_bios.txt
30 ${SYSINFO}        PowerEdge R740xd
31
32 *** Test Cases ***
33 Get HW Details
34         [Documentation]         Verify HW details
35         Start Command           dmidecode | grep -A3 '^System Information'   sudo=True
36         ${stdout}=              Read Command Output
37         Append To File          ${LOG}  ${stdout}${\n}
38         Should Contain          ${stdout}               ${SYSINFO}
39
40 Verify BIOS Revision
41         [Documentation]         Verify BIOS Revision
42         Start Command           dmidecode | more | grep 'BIOS Revision'    sudo=True
43         ${stdout}=              Read Command Output
44         Append To File          ${LOG}  ${stdout}${\n}
45         Should Contain          ${stdout}               BIOS Revision: 1.3
46
47 Check NUMA and CPU
48         [Documentation]         NUMAs and CPU components
49         ${output}=              Execute Command         lscpu
50         Append To File          ${LOG}  ${output}${\n}
51         Should Contain          ${output}       CPU(s):                88
52
53 Verify Block Devices
54         [Documentation]         Reads the sysfs filesystem
55         ${output}=              Execute Command         lsblk
56         Append To File          ${LOG}  ${output}${\n}
57         Should Contain          ${output}       sdg4
58
59 *** Keywords ***
60 Open Connection And Log In
61   Open Connection       ${HOST}
62   Login With Public Key    ${USERNAME}  /root/.ssh/${USERNAME}_id_rsa
63