blob: a09ed11f888748629aae879fc69fea970a0f7bb2 [file] [log] [blame]
Tim Lindbergc50276e2013-04-10 11:32:03 -07001#!/usr/bin/expect -f
2# ./neclink.exp <ip of port> <'no' or blank>
3set timeout -1
4set port [lindex $argv 0]
5set no [lindex $argv 1]
6
7spawn ssh ons@10.128.0.11
8expect ": "
9send "onos_test\r"
10expect ">"
11send "enable\r"
12expect ":"
13send "onos_test\r"
14expect "#"
15send "configure\r"
16expect "(config)# "
17send "interface gigabitethernet 0/$port\r"
18expect "if)# "
19send "$no shutdown\r"
20expect "# "
21send "exit\r"
22expect "# "
23send "exit\r"
24expect ": "
25send "y\r"
26expect "#"
27send "exit\r"
28expect "closed."