1
2 '''
3 Created on 26-Oct-2012
4
5 @author: Anil Kumar (anilkumar.s@paxterrasolutions.com)
6 '''
7 import time
8 import pexpect
9 import struct, fcntl, os, sys, signal
10 import sys
11 sys.path.append("../")
12 from drivers.common.clidriver import CLI
13
15
18
20 for key in connectargs:
21 vars(self)[key] = connectargs[key]
22
23 self.name = self.options['name']
24
25 self.handle = super(RemoteSysDriver,self).connect(user_name = self.user_name, ip_address = self.ip_address,port = self.port, pwd = self.pwd)
26 if self.handle:
27 self.execute(cmd= "\r",prompt= "\$",timeout= 10)
28 self.execute(cmd= "ssh vyatta@192.164.56.81",prompt= "word:",timeout= 10)
29 self.execute(cmd = "vyatta",prompt = "\$",timeout = 10)
30 self.execute(cmd = "reboot",prompt = "(.*)",timeout = 10)
31
32
33 return main.TRUE
34