Package TestON :: Package drivers :: Package common :: Package cli :: Package emulator :: Module remotemininetdriver :: Class RemoteMininetDriver
[hide private]
[frames] | no frames]

Class RemoteMininetDriver

source code


RemoteMininetCliDriver is the basic driver which will handle the Mininet functions. The main different between this and the MininetCliDriver is that this one does not build the mininet. It assumes that there is already a mininet running on the target.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
connect(self, **connectargs)
,user_name, ip_address, pwd,options ): Here the main is the TestON instance after creating all the log handles.
source code
 
checkForLoss(self, pingList)
Returns main.FALSE for 0% packet loss and Returns main.ERROR if "found multiple mininet" is found and Returns main.TRUE else
source code
 
pingLong(self, **pingParams)
Starts a continuous ping on the mininet host outputting to a file in the /tmp dir.
source code
 
pingstatus(self, **pingParams)
Tails the respective ping output file and check that there is a moving "64 bytes"
source code
 
pingKill(self, testONUser, testONIP)
Kills all continuous ping processes.
source code
 
pingLongKill(self) source code
 
pingHostOptical(self, **pingParams)
This function is only for Packet Optical related ping Use the next pingHost() function for all normal scenarios ) Ping from one mininet host to another Currently the only supported Params: SRC and TARGET
source code
 
pingHost(self, **pingParams)
Pings between two hosts on remote mininet
source code
 
checknum(self, num)
Verifies the correct number of switches are running
source code
 
startTcpdump(self, filename, intf="eth0", port="port 6633", user="admin")
Runs tcpdump on an interface and saves the file intf can be specified, or the default eth0 is used
source code
 
stopTcpdump(self)
pkills tcpdump
source code
 
runOpticalMnScript(self, name='onos', ctrllerIP=None) source code
 
attachLincOESession(self)
Since executing opticalTest.py will give you mininet prompt, you would at some point require to get onto console of LincOE ((linc@onosTestBench)1>) to execute commands like bring a optical port up or down on a ROADM You can attach to console of Linc-OE session by a cmd: sudo ~/linc-oe/rel/linc/bin/linc attach
source code
 
disconnect(self)
Called at the end of the test to disconnect the handle.
source code
 
setIpTablesOUTPUT(self, dstIp, dstPort, action='add', packetType='tcp', rule='DROP')
Description: add or remove iptables rule to DROP ( default ) packets from specific IP and PORT Usage: * specify action ( 'add' or 'remove' ) when removing, pass in the same argument as you would add.
source code
 
execute(self, **execparams)
It facilitates the command line execution of a given command. (Inherited from TestON.drivers.common.clidriver.CLI)
source code
 
onfail(self) (Inherited from TestON.drivers.common.clidriver.CLI) source code
 
remove_contol_chars(self, response) (Inherited from TestON.drivers.common.clidriver.CLI) source code
 
runAsSudoUser(self, handle, pwd, default) (Inherited from TestON.drivers.common.clidriver.CLI) source code
 
secureCopy(self, user_name, ip_address, filepath, pwd, dst_path)
Connection will establish to the remote host using ssh. (Inherited from TestON.drivers.common.clidriver.CLI)
source code

Inherited from component.Component: __getattr__, cleanup, close_log_handles, config, experimentRun, get_version, log

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

connect(self, **connectargs)

source code 

,user_name, ip_address, pwd,options ): Here the main is the TestON instance after creating all the log handles.

Overrides: component.Component.connect

pingKill(self, testONUser, testONIP)

source code 

Kills all continuous ping processes. Then copies all the ping files to the TestStation.

disconnect(self)

source code 

Called at the end of the test to disconnect the handle.

Overrides: component.Component.disconnect

setIpTablesOUTPUT(self, dstIp, dstPort, action='add', packetType='tcp', rule='DROP')

source code 

Description:
    add or remove iptables rule to DROP ( default )
    packets from specific IP and PORT
Usage:
* specify action ( 'add' or 'remove' )
  when removing, pass in the same argument as you would add. It will
  delete that specific rule.
* specify the destination ip to block with dstIp
* specify destination port to block to dstPort
* optional packet type to block ( default tcp )
* optional iptables rule ( default DROP )
WARNING:
* This function uses root privilege iptables command which may result
in unwanted network errors. USE WITH CAUTION