prkatti1 | 195e78d | 2016-11-04 07:12:06 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Verifiy the Network Configuration, Factory Reset and Zero config |
| 3 | ... Address |
| 4 | Resource ../lib/ipmi_client.robot |
| 5 | Resource ../lib/utils.robot |
| 6 | Resource ../lib/connection_client.robot |
| 7 | Resource ../lib/oem/ibm/serial_console_client.robot |
| 8 | Resource ../lib/resource.txt |
| 9 | Library OperatingSystem |
| 10 | |
| 11 | Suite Setup Open Connection And Log In |
| 12 | Suite Teardown Close All Connections |
| 13 | |
| 14 | *** Test Cases *** |
| 15 | |
| 16 | Zero Config |
| 17 | [Documentation] Validate Zero Config IP. |
| 18 | ... Factory-reset system and verify system comes up with Zero Config IP. |
Sivas SRR | ff51089 | 2017-06-01 02:17:18 -0500 | [diff] [blame] | 19 | [Tags] Zero_Config |
prkatti1 | 195e78d | 2016-11-04 07:12:06 -0500 | [diff] [blame] | 20 | 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 | |
| 27 | Factory 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 | |
| 33 | Validate Zero Config IP |
| 34 | [Documentation] Validate zero config IP. |
| 35 | [Arguments] ${ip} |
| 36 | Check Host Connection ${ip} |
| 37 | |
| 38 | Check 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 | |
| 44 | Revert 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} |