add case 7 for I2, add new drivers
Change-Id: Idf2b06b1a80989f0c7a61435b84f05a1a50aae34
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index 1d75ae4..1e22267 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -1235,6 +1235,29 @@
main.exit()
return main.TRUE
+ def switch( self, **switchargs ):
+ """
+ start/stop a switch
+ """
+ args = utilities.parse_args( [ "SW", "OPTION" ], **switchargs )
+ sw = args[ "SW" ] if args[ "SW" ] is not None else ""
+ option = args[ "OPTION" ] if args[ "OPTION" ] is not None else ""
+ command = "switch " + str( sw ) + " " + str( option )
+ main.log.info( command )
+ try:
+ self.handle.sendline( command )
+ self.handle.expect( "mininet>" )
+ except pexpect.TIMEOUT:
+ main.log.error( self.name + ": pexpect.TIMEOUT found" )
+ main.cleanup()
+ main.exit()
+ except pexpect.EOF:
+ main.log.error( self.name + ": EOF exception found" )
+ main.log.error( self.name + ": " + self.handle.before )
+ main.cleanup()
+ main.exit()
+ return main.TRUE
+
def yank( self, **yankargs ):
"""
yank a mininet switch interface to a host"""