Fix typos and code style issues in drivers
diff --git a/TestON/drivers/common/cli/emulator/remotemininetdriver.py b/TestON/drivers/common/cli/emulator/remotemininetdriver.py
index d842cbb..8e445a9 100644
--- a/TestON/drivers/common/cli/emulator/remotemininetdriver.py
+++ b/TestON/drivers/common/cli/emulator/remotemininetdriver.py
@@ -39,6 +39,7 @@
def __init__( self ):
super( Emulator, self ).__init__()
self.handle = self
+ self.name = None
self.wrapped = sys.modules[ __name__ ]
self.flag = 0
@@ -58,8 +59,6 @@
port=None,
pwd=self.pwd )
- self.sshHandle = self.handle
-
# Copying the readme file to process the
if self.handle:
return main.TRUE
@@ -98,7 +97,7 @@
def pingLong( self, **pingParams ):
"""
- Starts a continuous ping on the mininet host outputing
+ Starts a continuous ping on the mininet host outputting
to a file in the /tmp dir.
"""
self.handle.sendline( "" )
@@ -108,8 +107,9 @@
precmd = "sudo rm /tmp/ping." + args[ "SRC" ]
self.execute( cmd=precmd, prompt="(.*)", timeout=10 )
command = "sudo mininet/util/m " + args[ "SRC" ] + " ping " +\
- args[ "TARGET" ] + " -i .2 -w " + str( args[ 'PINGTIME' ] ) +\
- " -D > /tmp/ping." + args[ "SRC" ] + " &"
+ args[ "TARGET" ] + " -i .2 -w " +\
+ str( args[ 'PINGTIME' ] ) + " -D > /tmp/ping." +\
+ args[ "SRC" ] + " &"
main.log.info( command )
self.execute( cmd=command, prompt="(.*)", timeout=10 )
self.handle.sendline( "" )
@@ -181,7 +181,7 @@
def pingHostOptical( self, **pingParams ):
"""
- This function is only for Packey Optical related ping
+ 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
@@ -280,7 +280,7 @@
port="port 6633",
user="admin" ):
"""
- Runs tpdump on an intferface and saves the file
+ Runs tcpdump on an interface and saves the file
intf can be specified, or the default eth0 is used
"""
try:
@@ -328,7 +328,8 @@
main.exit()
def stopTcpdump( self ):
- "pkills tcpdump"
+ """
+ pkills tcpdump"""
try:
self.handle.sendline( "sudo pkill tcpdump" )
self.handle.sendline( "" )
@@ -369,9 +370,9 @@
if self.handle:
# Close the ssh connection
self.handle.sendline( "" )
- #self.handle.expect( "\$" )
+ # self.handle.expect( "\$" )
i = self.handle.expect( [ '\$', 'mininet>', pexpect.TIMEOUT ],
- timeout = 2)
+ timeout=2)
if i == 0:
self.handle.sendline( "exit" )
self.handle.expect( "closed" )
@@ -390,7 +391,7 @@
def getFlowTable( self, protoVersion, sw ):
"""
TODO document usage
- TODO add option to look at cookies. ignoreing them for now
+ TODO add option to look at cookies. ignoring them for now
print "get_flowTable(" + str( protoVersion ) +" " + str( sw ) +")"
NOTE: Use format to force consistent flow table output across
@@ -563,7 +564,7 @@
str( rule ) )
infoString = "Rules added to " + str( self.name )
- infoString += "iptable rule added to block IP: " + \
+ infoString += "iptables rule added to block IP: " + \
str( dstIp )
infoString += "Port: " + \
str( dstPort ) + " Rule: " + str( rule )