blob: 36ad85e23a306d49309848b691ceb865a848b107 [file] [log] [blame]
prkatti1195e78d2016-11-04 07:12:06 -05001*** Settings ***
2Documentation Verifiy the Network Configuration, Factory Reset and Zero config
3... Address
4Resource ../lib/ipmi_client.robot
5Resource ../lib/utils.robot
6Resource ../lib/connection_client.robot
7Resource ../lib/oem/ibm/serial_console_client.robot
8Resource ../lib/resource.txt
9Library OperatingSystem
10
11Suite Setup Open Connection And Log In
12Suite Teardown Close All Connections
13
14*** Test Cases ***
15
16Zero Config
17 [Documentation] Validate Zero Config IP.
18 ... Factory-reset system and verify system comes up with Zero Config IP.
Sivas SRRff510892017-06-01 02:17:18 -050019 [Tags] Zero_Config
prkatti1195e78d2016-11-04 07:12:06 -050020 Factory Reset
21 Validate Zero Config IP ${OPENBMC_HOST}
22 Revert to Initial Setup ${OPENBMC_HOST}
23 Ping Host ${OPENBMC_HOST}
24
25*** Keywords ***
26
27Factory Reset
28 [Documentation] Factory-reset the system.
29 Run Dbus IPMI Raw Command 0x32 0xBA 00 00
30 Run Dbus IPMI Raw Command 0x32 0x66
31 Check Host Connection ${OPENBMC_HOST}
32
33Validate Zero Config IP
34 [Documentation] Validate zero config IP.
35 [Arguments] ${ip}
36 Check Host Connection ${ip}
37
38Check Host Connection
Joy Onyerikwuf4a807b2018-06-20 08:43:54 -050039 [Documentation] Verify that host can be pinged.
prkatti1195e78d2016-11-04 07:12:06 -050040 [Arguments] ${host}
41 ${RC} ${output}= Run and return RC and Output ping -c 4 ${host}
42 Log RC: ${RC}\nOutput:\n${output}
43 Should Not be equal ${RC} ${0}
44
45Revert to Initial Setup
46 [Documentation] Erase zero config IP and restore old IP and route.
47 [Arguments] ${ip}
48 Open Telnet Connection to BMC Serial Console
49 Telnet.write ifconfig eth0 ${ip} netmask ${NMASK}
50 Telnet.write route add default gw ${GW_IP}