blob: 0b05c854407de13c7c5f56bd6aa9512aa1b776af [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
39 [Arguments] ${host}
40 ${RC} ${output}= Run and return RC and Output ping -c 4 ${host}
41 Log RC: ${RC}\nOutput:\n${output}
42 Should Not be equal ${RC} ${0}
43
44Revert to Initial Setup
45 [Documentation] Erase zero config IP and restore old IP and route.
46 [Arguments] ${ip}
47 Open Telnet Connection to BMC Serial Console
48 Telnet.write ifconfig eth0 ${ip} netmask ${NMASK}
49 Telnet.write route add default gw ${GW_IP}