Shad Ansari | 2f7f9be | 2017-06-07 13:34:53 -0700 | [diff] [blame^] | 1 | # $language = "VBScript"
|
| 2 | # $interface = "1.0"
|
| 3 |
|
| 4 |
|
| 5 | Sub Sleep(timewait)
|
| 6 |
|
| 7 | If crt.screen.waitforstring("pause", timewait) = true then msgbox "surprise"
|
| 8 |
|
| 9 | End Sub
|
| 10 |
|
| 11 | Sub SendShellCommand(shell_command)
|
| 12 | crt.Screen.Send shell_command & VbCr
|
| 13 | End Sub
|
| 14 |
|
| 15 | sub main
|
| 16 |
|
| 17 | SendShellCommand("root")
|
| 18 | crt.Sleep 100
|
| 19 | SendShellCommand("root")
|
| 20 | crt.Sleep 100
|
| 21 | SendShellCommand("cd /opt/bcm68620/")
|
| 22 | crt.screen.WaitForString "#"
|
| 23 | crt.Sleep 100
|
| 24 | SendShellCommand("./svk_init.sh")
|
| 25 | crt.screen.WaitForString ">"
|
| 26 | crt.Sleep 1000
|
| 27 | crt.Screen.Send VbCr
|
| 28 |
|
| 29 | 'mandatory
|
| 30 | SendShellCommand("/api/set object=device system_mode=gpon__16_x")
|
| 31 | crt.Sleep 50
|
| 32 |
|
| 33 | 'Optional - configure the NNI speed in order to work with a 1g traffic generator
|
| 34 | SendShellCommand("/api/set object=device nni_speed.first_half=gbps_1 nni_speed.second_half=gbps_1 ")
|
| 35 | crt.Sleep 50
|
| 36 |
|
| 37 | 'Optional - configure the PCIe dma queues sizes or configure the system not to fail on bad AVS check.
|
| 38 | SendShellCommand("/api/set object=device debug.host_dma_rx_queue_size=128 debug.host_dma_tx_queue_size=128 debug.avs_control=yes")
|
| 39 | crt.Sleep 50
|
| 40 |
|
| 41 | 'Optional - configure the keep alive parameters
|
| 42 | SendShellCommand("/api/set object=device keepalive_interval=5 keepalive_tolerance=3")
|
| 43 |
|
| 44 | crt.Screen.Send VbCr
|
| 45 | crt.screen.WaitForString ">"
|
| 46 | crt.Sleep 50
|
| 47 | crt.Screen.Send VbCr
|
| 48 |
|
| 49 |
|
| 50 | SendShellCommand("/user/register_indication_handler")
|
| 51 | crt.Screen.Send VbCr
|
| 52 | crt.Screen.Send VbCr
|
| 53 | crt.screen.WaitForString ">"
|
| 54 |
|
| 55 | crt.Screen.Send VbCr
|
| 56 | crt.Sleep 50
|
| 57 | SendShellCommand("/user/register_proxy_rx_handler ")
|
| 58 | crt.Screen.Send VbCr
|
| 59 | crt.Sleep 50
|
| 60 | crt.Screen.Send VbCr
|
| 61 | SendShellCommand("/api/oper object=device sub=connect ")
|
| 62 | crt.Screen.Send VbCr
|
| 63 | crt.screen.WaitForString ">"
|
| 64 | crt.Screen.Send VbCr
|
| 65 |
|
| 66 | crt.Sleep 50
|
| 67 |
|
| 68 | End Sub
|