initial commit for code clean up
diff --git a/TestON/drivers/common/api/controllerdriver.py b/TestON/drivers/common/api/controllerdriver.py
index f6b941f..5ac112f 100644
--- a/TestON/drivers/common/api/controllerdriver.py
+++ b/TestON/drivers/common/api/controllerdriver.py
@@ -1,14 +1,14 @@
 #!/usr/bin/env python
-'''
-Created on 29-Nov-2012 
+"""
+Created on 29-Nov-2012
 
-@author: Anil Kumar (anilkumar.s@paxterrasolutions.com)      
+author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
 
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 2 of the License, or
-    (at your option) any later version.
+    ( at your option ) any later version.
 
     TestON is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,15 +16,17 @@
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with TestON.  If not, see <http://www.gnu.org/licenses/>.		
+    along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 
-'''  
+"""
 import sys
-sys.path.append("../")
+sys.path.append( "../" )
 from drivers.common.apidriver import API
 
-class Controller(API):
+
+class Controller( API ):
     # The common functions for emulator included in emulatordriver
-    def __init__(self):
-        super(API, self).__init__()
-        
+
+    def __init__( self ):
+        super( API, self ).__init__()
+
diff --git a/TestON/drivers/common/api/fvtapidriver.py b/TestON/drivers/common/api/fvtapidriver.py
index 620b3e9..8203166 100644
--- a/TestON/drivers/common/api/fvtapidriver.py
+++ b/TestON/drivers/common/api/fvtapidriver.py
@@ -1,14 +1,14 @@
 #!/usr/bin/env python
-'''
+"""
 Created on 26-Oct-2012
 
-@author: Anil Kumar (anilkumar.s@paxterrasolutions.com)
+author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
 
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 2 of the License, or
-    (at your option) any later version.
+    ( at your option ) any later version.
 
     TestON is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,18 +16,18 @@
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with TestON.  If not, see <http://www.gnu.org/licenses/>.		
+    along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 
 
 fvtapidriver is the basic driver which will handle the fvtapidriver functions
-'''
-'''
+"""
+"""
 There are two changes required in flowvisor-test framework :
 
 1. In ~/flowvisortests/tests/templatetest.py line : 15 comment 'basic_logger = None'
 2. In ~/flowvisortests/tests/testutils.py line : 50 specify config file path CONFIG_FILE = "~/flowvisor-test/tests/tests-base.json"
 
-'''
+"""
 import pexpect
 import struct
 import fcntl
@@ -35,12 +35,12 @@
 import signal
 import re
 import sys
-sys.path.append("../")
+sys.path.append( "../" )
 from common.apidriver import API
 import logging
 
-sys.path.append(path+"/lib/flowvisor-test/tests")
-sys.path.append(path+"/lib/flowvisor-test/src/python/")
+sys.path.append( path + "/lib/flowvisor-test/tests" )
+sys.path.append( path + "/lib/flowvisor-test/src/python/" )
 
 import templatetest
 import testutils
@@ -53,29 +53,30 @@
 import __builtin__
 
 config_default = {
-    "param"              : None,
-    "fv_cmd"             : "/home/openflow/flowvisor/scripts/flowvisor.sh",
-    "platform"           : "local",
-    "controller_host"    : "127.0.0.1",
-    "controller_port"    : 6633,
-    "timeout"            : 3,
-    "port_count"         : 4,
-    "base_of_port"       : 1,
-    "base_if_index"      : 1,
-    "test_spec"          : "all",
-    "test_dir"           : ".",
-    "log_file"           : "/home/openflow/fvt.log",
-    "list"               : False,
-    "debug"              : "debug",
-    "dbg_level"          : logging.DEBUG,
-    "port_map"           : {},
-    "test_params"        : "None"
+    "param": None,
+    "fv_cmd": "/home/openflow/flowvisor/scripts/flowvisor.sh",
+    "platform": "local",
+    "controller_host": "127.0.0.1",
+    "controller_port": 6633,
+    "timeout": 3,
+    "port_count": 4,
+    "base_of_port": 1,
+    "base_if_index": 1,
+    "test_spec": "all",
+    "test_dir": ".",
+    "log_file": "/home/openflow/fvt.log",
+    "list": False,
+    "debug": "debug",
+    "dbg_level": logging.DEBUG,
+    "port_map": {},
+    "test_params": "None"
 }
 
-def test_set_init(config):
+
+def test_set_init( config ):
     """
     Set up function for basic test classes
-    @param config The configuration dictionary; see fvt
+    config: The configuration dictionary; see fvt
     """
     global basic_port_map
     global basic_fv_cmd
@@ -84,88 +85,89 @@
     global basic_config
     global baisc_logger
 
-    basic_fv_cmd = config["fv_cmd"]
-    basic_timeout = config["timeout"]
-    basic_port_map = config["port_map"]
+    basic_fv_cmd = config[ "fv_cmd" ]
+    basic_timeout = config[ "timeout" ]
+    basic_port_map = config[ "port_map" ]
     basic_config = config
 
-class FvtApiDriver(API,templatetest.TemplateTest):
 
-    def __init__(self):
-        super(API, self).__init__()
+class FvtApiDriver( API, templatetest.TemplateTest ):
+
+    def __init__( self ):
+        super( API, self ).__init__()
         print 'init'
-                                                
 
-    def connect(self,**connectargs):
+    def connect( self, **connectargs ):
         for key in connectargs:
-            vars(self)[key] = connectargs[key]
-        
-        self.name = self.options['name']
-        connect_result = super(API,self).connect()
-        self.logFileName = main.logdir+"/"+self.name+".session"
-        config_default["log_file"] = self.logFileName
-        test_set_init(config_default)
-        __builtin__.basic_logger = vars(main)[self.name+'log']
-        __builtin__.basic_logger.info("Calling my test setup")
-        self.setUp(basic_logger)
+            vars( self )[ key ] = connectargs[ key ]
 
-        (self.fv, self.sv, sv_ret, ctl_ret, sw_ret) = testutils.setUpTestEnv(self, fv_cmd=basic_fv_cmd)
-        
-        self.chkSetUpCondition(self.fv, sv_ret, ctl_ret, sw_ret)
+        self.name = self.options[ 'name' ]
+        connect_result = super( API, self ).connect()
+        self.logFileName = main.logdir + "/" + self.name + ".session"
+        config_default[ "log_file" ] = self.logFileName
+        test_set_init( config_default )
+        __builtin__.basic_logger = vars( main )[ self.name + 'log' ]
+        __builtin__.basic_logger.info( "Calling my test setup" )
+        self.setUp( basic_logger )
+
+        ( self.fv, self.sv, sv_ret, ctl_ret, sw_ret ) = testutils.setUpTestEnv(
+            self, fv_cmd=basic_fv_cmd )
+
+        self.chkSetUpCondition( self.fv, sv_ret, ctl_ret, sw_ret )
         return main.TRUE
 
-    def simplePacket(self,dl_src):
-        dl_src = vars(testutils)[dl_src]
-        return testutils.simplePacket(dl_src = dl_src)
-   
-    def genPacketIn(self, in_port, pkt):
-        return testutils.genPacketIn(in_port=in_port, pkt=pkt)
-     
-    def ofmsgSndCmp(self, snd_list, exp_list, xid_ignore=True, hdr_only=True):
-        return testutils.ofmsgSndCmp(self, snd_list, exp_list, xid_ignore, hdr_only)
-    
-    def setRule(self,sv,rule,num_try) :
-        return testutils.setRule(self,sv,rule,num_try)
-    
-    def chkFlowdb(self,controller_number,switch_number,exp_count,exp_rewrites) :
-        return testutils.chkFlowdb(self,controller_number,switch_number,exp_count,exp_rewrites)
-    
-    def chkSwitchStats(self, switch_number, ofproto, exp_snd_count, exp_rcv_count):
-        return testutils.chkSwitchStats(self, switch_number, ofproto, exp_snd_count, exp_rcv_count)
-    
-    def chkSliceStats(self,controller_number,ofproto,exp_snd_count,exp_rcv_count) :
-        return testutils.chkSliceStats(self,controller_number,ofproto,exp_snd_count,exp_rcv_count)
-    
-    def recvStats(self,swId,typ) :
-        return testutils.recvStats(self,swId,typ)
-    
-    def ofmsgSndCmpWithXid(self,snd_list,exp_list,xid_ignore,hdr_only) :
-        return testutils.ofmsgSndCmpWithXid(self,snd_list,exp_list,xid_ignore,hdr_only)
-    
-    def genPacketOut(self,xid,buffer_id,in_port,action_ports,pkt) :
-        return testutils.genPacketOut(self,xid,buffer_id,in_port,action_ports,pkt)
-    
-    def genFlowModFlush(self) :
+    def simplePacket( self, dl_src ):
+        dl_src = vars( testutils )[ dl_src ]
+        return testutils.simplePacket( dl_src=dl_src )
+
+    def genPacketIn( self, in_port, pkt ):
+        return testutils.genPacketIn( in_port=in_port, pkt=pkt )
+
+    def ofmsgSndCmp( self, snd_list, exp_list, xid_ignore=True, hdr_only=True ):
+        return testutils.ofmsgSndCmp( self, snd_list, exp_list, xid_ignore, hdr_only )
+
+    def setRule( self, sv, rule, num_try ):
+        return testutils.setRule( self, sv, rule, num_try )
+
+    def chkFlowdb( self, controller_number, switch_number, exp_count, exp_rewrites ):
+        return testutils.chkFlowdb( self, controller_number, switch_number, exp_count, exp_rewrites )
+
+    def chkSwitchStats( self, switch_number, ofproto, exp_snd_count, exp_rcv_count ):
+        return testutils.chkSwitchStats( self, switch_number, ofproto, exp_snd_count, exp_rcv_count )
+
+    def chkSliceStats( self, controller_number, ofproto, exp_snd_count, exp_rcv_count ):
+        return testutils.chkSliceStats( self, controller_number, ofproto, exp_snd_count, exp_rcv_count )
+
+    def recvStats( self, swId, typ ):
+        return testutils.recvStats( self, swId, typ )
+
+    def ofmsgSndCmpWithXid( self, snd_list, exp_list, xid_ignore, hdr_only ):
+        return testutils.ofmsgSndCmpWithXid( self, snd_list, exp_list, xid_ignore, hdr_only )
+
+    def genPacketOut( self, xid, buffer_id, in_port, action_ports, pkt ):
+        return testutils.genPacketOut( self, xid, buffer_id, in_port, action_ports, pkt )
+
+    def genFlowModFlush( self ):
         return testutils.genFlowModFlush()
-    
-    def genPhyPort(self,name,addr,port_no) :
-        return testutils.genPhyPort(name,addr,port_no)
-    
-    def disconnect(self,handle):
+
+    def genPhyPort( self, name, addr, port_no ):
+        return testutils.genPhyPort( name, addr, port_no )
+
+    def disconnect( self, handle ):
         response = ''
-        '''
+        """
         if self.handle:
             self.handle = handle
-            response = self.execute(cmd="exit",prompt="(.*)",timeout=120)
+            response = self.execute( cmd="exit",prompt="(.*)",timeout=120 )
         else :
-            main.log.error("Connection failed to the host")
+            main.log.error( "Connection failed to the host" )
             response = main.FALSE
-        '''
-        return response  
-    
-    def setUp(self,basic_logger):
+        """
+        return response
+
+    def setUp( self, basic_logger ):
         self.logger = basic_logger
-        #basic_logger.info("** START TEST CASE " + str(self))
+        # basic_logger.info( "** START TEST CASE " + str( self ) )
         if basic_timeout == 0:
             self.timeout = None
         else:
@@ -174,13 +176,12 @@
         self.sv = None
         self.controllers = []
         self.switches = []
-    
-    def close_log_handles(self) :
-        self.tearDown() 
-        vars(main)[self.name+'log'].removeHandler(self.log_handler)
-        #if self.logfile_handler:
+
+    def close_log_handles( self ):
+        self.tearDown()
+        vars( main )[ self.name + 'log' ].removeHandler( self.log_handler )
+        # if self.logfile_handler:
         #    self.logfile_handler.close()
-        
+
         return main.TRUE
 
-    
diff --git a/TestON/drivers/common/apidriver.py b/TestON/drivers/common/apidriver.py
index 254ab1b..7de283c 100644
--- a/TestON/drivers/common/apidriver.py
+++ b/TestON/drivers/common/apidriver.py
@@ -1,14 +1,14 @@
 #!/usr/bin/env python
-'''
-Created on 22-Nov-2012 
+"""
+Created on 22-Nov-2012
 
-@author: Anil Kumar (anilkumar.s@paxterrasolutions.com)      
+author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
 
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 2 of the License, or
-    (at your option) any later version.
+    ( at your option ) any later version.
 
     TestON is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,29 +16,37 @@
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with TestON.  If not, see <http://www.gnu.org/licenses/>.		
+    along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 
 
-'''
-
-import struct, fcntl, os, sys, signal
-import sys, re
-sys.path.append("../")
+"""
+import struct
+import fcntl
+import os
+import sys
+import signal
+import sys
+import re
+sys.path.append( "../" )
 
 from drivers.component import Component
-class API(Component):
-    '''
+
+
+class API( Component ):
+
+    """
         This will define common functions for CLI included.
-    '''
-    def __init__(self):
-        super(Component, self).__init__()
-        
-    def connect(self):
-        '''
+    """
+    def __init__( self ):
+        super( Component, self ).__init__()
+
+    def connect( self ):
+        """
            Connection will establish to the remote host using ssh.
            It will take user_name ,ip_address and password as arguments<br>
-           and will return the handle. 
-        '''
-        super(API, self).connect()
-         
-        return main.TRUE       
+           and will return the handle.
+        """
+        super( API, self ).connect()
+
+        return main.TRUE
+
diff --git a/TestON/drivers/common/cli/dpclidriver.py b/TestON/drivers/common/cli/dpclidriver.py
index 1e7015c..057a3f1 100644
--- a/TestON/drivers/common/cli/dpclidriver.py
+++ b/TestON/drivers/common/cli/dpclidriver.py
@@ -1,147 +1,190 @@
-'''
-Driver for blank dataplane VMs. Created for SDNIP test. 
-'''
-
+"""
+Driver for blank dataplane VMs. Created for SDNIP test.
+"""
 import time
 import pexpect
-import struct, fcntl, os, sys, signal
+import struct
+import fcntl
+import os
+import sys
+import signal
 import sys
 import re
 import json
-sys.path.append("../")
+sys.path.append( "../" )
 from drivers.common.clidriver import CLI
 
-class DPCliDriver(CLI):
 
-    def __init__(self):
-        super(CLI, self).__init__()
+class DPCliDriver( CLI ):
 
-    def connect(self,**connectargs):
+    def __init__( self ):
+        super( CLI, self ).__init__()
+
+    def connect( self, **connectargs ):
         for key in connectargs:
-           vars(self)[key] = connectargs[key]
+            vars( self )[ key ] = connectargs[ key ]
 
-
-        self.name = self.options['name']
-        self.handle = super(DPCliDriver,self).connect(user_name = self.user_name, ip_address = self.ip_address,port = self.port, pwd = self.pwd)
+        self.name = self.options[ 'name' ]
+        self.handle = super( DPCliDriver, self ).connect( user_name=self.user_name,
+         		ip_address=self.ip_address,
+         		port=self.port,
+         		pwd=self.pwd )
 
         if self.handle:
             return self.handle
-        else :
-            main.log.info("NO HANDLE")
+        else:
+            main.log.info( "NO HANDLE" )
             return main.FALSE
 
-    def create_interfaces(self, net, number, start):
-        '''
+    def create_interfaces( self, net, number, start ):
+        """
         Creates a number,specified by 'number,' of subinterfaces on eth0. Ip addresses start at 'net'.'start'.1.1 with a 24 bit netmask. Addresses increment sequentially in the third quad,
         therefore all interfaces are in different subnets on the same machine. When the third quad reaches 255, it is reset to 1 and the second quad is incremented.
         Every single ip address is placed in a file in /tmp titled 'ip_table{net}.txt'
         The file is used by 'pingall_interfaces()' as a fping argument
         This method returns true if all interfaces are created without a hitch, and false if a single interface has issues
-        '''
+        """
+        self.handle.sendline( "" )
+        self.handle.expect( "\$" )
 
-        self.handle.sendline("")
-        self.handle.expect("\$")
+        self.handle.sendline( "rm /tmp/local_ip.txt" )
+        self.handle.expect( "\$" )
+        self.handle.sendline( "touch /tmp/local_ip.txt" )
+        self.handle.expect( "\$" )
 
-        self.handle.sendline("rm /tmp/local_ip.txt")
-        self.handle.expect("\$")
-        self.handle.sendline("touch /tmp/local_ip.txt")
-        self.handle.expect("\$")
-
-        main.log.info("Creating interfaces")
+        main.log.info( "Creating interfaces" )
         k = 0
         intf = 0
         while number != 0:
-            k= k + 1
+            k = k + 1
             if k == 256:
                 k = 1
                 start = start + 1
             number = number - 1
             intf = intf + 1
-            ip = net+"."+str(start)+"."+str(k)+".1"
-            self.handle.sendline("sudo ifconfig eth0:"+str(intf)+" "+ip+" netmask 255.255.255.0")
+            ip = net + "." + str( start ) + "." + str( k ) + ".1"
+            self.handle.sendline(
+                "sudo ifconfig eth0:" + str(
+                    intf ) + " " + ip + " netmask 255.255.255.0" )
 
-            i = self.handle.expect(["\$","password",pexpect.TIMEOUT,pexpect.EOF], timeout = 120)
-                if i == 0:
-                    self.handle.sendline("echo "+str(ip)+" >> /tmp/local_ip.txt")
-                    self.handle.expect("\$")
-                elif i == 1:
-                    main.log.info("Sending sudo password")
-                    self.handle.sendline(self.pwd) 
-                    self.handle.expect("\$")
-                else:
-                    main.log.error("INTERFACES NOT CREATED")
-                    return main.FALSE
+            i = self.handle.expect( [
+				    "\$",
+                                    "password",
+                                    pexpect.TIMEOUT,
+                                    pexpect.EOF ],
+                		    timeout=120 )
 
+            if i == 0:
+                self.handle.sendline(
+                    "echo " + str( ip ) + " >> /tmp/local_ip.txt" )
+                self.handle.expect( "\$" )
+            elif i == 1:
+                main.log.info( "Sending sudo password" )
+                self.handle.sendline( self.pwd )
+                self.handle.expect( "\$" )
+            else:
+                main.log.error( "INTERFACES NOT CREATED" )
+                return main.FALSE
 
-    def pingall_interfaces(self, netsrc, netstrt, netdst, destlogin, destip):
-        '''
-        Copies the /tmp/ip_table{net}.txt file from the machine you wish to ping, then runs fping with a source address of {netsrc}.{netstrt}.1.1 on the copied file.
+    def pingall_interfaces( self, netsrc, netstrt, netdst, destlogin, destip ):
+        """
+        Copies the /tmp/ip_table{ net }.txt file from the machine you wish to ping, then runs fping with a source address of { netsrc }.{ netstrt }.1.1 on the copied file.
         Check every single response for reachable or unreachable. If all are reachable, function returns true. If a SINGLE host is unreachable, then the function stops and returns false
         If fping is not installed, this function will install fping then run the same command
-        '''
+        """
+        self.handle.sendline( "" )
+        self.handle.expect( "\$" )
 
-        self.handle.sendline("")
-        self.handle.expect("\$")
-      
-        self.handle.sendline("scp "+str(destlogin)+"@"+str(destip)+":/tmp/local_ip.txt /tmp/ip_table"+str(net)+".txt")
-        i = self.handle.expect(["100%","password",pexpect.TIMEOUT], timeout = 30)
+        self.handle.sendline( "scp " + str( destlogin ) + "@" + 
+			      str( destip ) + ":/tmp/local_ip.txt /tmp/ip_table" +
+			      str( net ) + ".txt" )
+        
+	i = self.handle.expect( [
+				"100%",
+                                "password",
+                                pexpect.TIMEOUT ],
+		                timeout=30 )
+
         if i == 0:
-            main.log.info("Copied ping file successfully")
+            main.log.info( "Copied ping file successfully" )
         elif i == 1:
-            self.handle.sendline(self.pwd)
-            self.handle.expect("100%")
-            main.log.info("Copied ping file successfully")
+            self.handle.sendline( self.pwd )
+            self.handle.expect( "100%" )
+            main.log.info( "Copied ping file successfully" )
         elif i == 2:
-            main.log.error("COULD NOT COPY PING FILE FROM "+str(destip))
+            main.log.error( "COULD NOT COPY PING FILE FROM " + str( destip ) )
             result = main.FALSE
             return result
-       
-        self.handle.sendline("")
-        self.handle.expect("\$")
 
-        main.log.info("Pinging interfaces on the "+str(netdst)+" network from "+str(netsrc)+"."+str(netstrt)+".1.1") 
-        self.handle.sendline("sudo fping -S "+str(netsrc)+"."+str(netstrt)+".1.1 -f /tmp/ip_table"+str(netdst)+".txt")
+        self.handle.sendline( "" )
+        self.handle.expect( "\$" )
+
+        main.log.info( "Pinging interfaces on the " + str( netdst ) +
+		       " network from " + str( netsrc ) + "." + 
+		       str( netstrt ) + ".1.1" )
+        self.handle.sendline( "sudo fping -S " + str( netsrc ) + "." +
+			      str( netstrt ) + ".1.1 -f /tmp/ip_table" + 
+			      str( netdst ) + ".txt" )
         while 1:
-            i = self.handle.expect(["reachable","unreachable","\$","password",pexpect.TIMEOUT,"not installed"], timeout=45)
+            i = self.handle.expect( [
+				    "reachable",
+                                    "unreachable",
+                                    "\$",
+                                    "password",
+                                    pexpect.TIMEOUT,
+                                    "not installed" ],
+				    timeout=45 )
             if i == 0:
                 result = main.TRUE
             elif i == 1:
-                main.log.error("An interface was unreachable")
+                main.log.error( "An interface was unreachable" )
                 result = main.FALSE
                 return result
             elif i == 2:
-                main.log.info("All interfaces reachable")
+                main.log.info( "All interfaces reachable" )
                 return result
             elif i == 3:
-                self.handle.sendline(self.pwd)
+                self.handle.sendline( self.pwd )
             elif i == 4:
-                main.log.error("Unable to fping")
+                main.log.error( "Unable to fping" )
                 result = main.FALSE
                 return result
             elif i == 5:
-                main.log.info("fping not installed, installing fping")
-                self.handle.sendline("sudo apt-get install fping")
-                i = self.handle.expect(["password","\$",pexpect.TIMEOUT], timeout = 60)
+                main.log.info( "fping not installed, installing fping" )
+                self.handle.sendline( "sudo apt-get install fping" )
+                i = self.handle.expect(
+                    [ "password",
+                                      "\$",
+                                      pexpect.TIMEOUT ],
+                    timeout=60 )
                 if i == 0:
-                    self.handle.sendline(self.pwd)
-                    self.handle.expect("\$", timeout = 30)
-                    main.log.info("fping installed, now pinging interfaces")
-                    self.handle.sendline("sudo fping -S "+str(netsrc)+"."+str(netstrt)+".1.1 -f /tmp/ip_table"+str(netdst)+".txt")
+                    self.handle.sendline( self.pwd )
+                    self.handle.expect( "\$", timeout=30 )
+                    main.log.info( "fping installed, now pinging interfaces" )
+                    self.handle.sendline(
+                        "sudo fping -S " + str(
+                            netsrc ) + "." + str(
+                                netstrt ) + ".1.1 -f /tmp/ip_table" + str(
+                                    netdst ) + ".txt" )
                 elif i == 1:
-                    main.log.info("fping installed, now pinging interfaces")
-                    self.handle.sendline("sudo fping -S "+str(netsrc)+"."+str(netstrt)+".1.1 -f /tmp/ip_table"+str(netdst)+".txt")
+                    main.log.info( "fping installed, now pinging interfaces" )
+                    self.handle.sendline(
+                        "sudo fping -S " + str(
+                            netsrc ) + "." + str(
+                                netstrt ) + ".1.1 -f /tmp/ip_table" + str(
+                                    netdst ) + ".txt" )
                 elif i == 2:
-                    main.log.error("Could not install fping")
+                    main.log.error( "Could not install fping" )
                     result = main.FALSE
                     return result
 
-    def disconnect(self):
+    def disconnect( self ):
         response = ''
         try:
-            self.handle.sendline("exit")
-            self.handle.expect("closed")
+            self.handle.sendline( "exit" )
+            self.handle.expect( "closed" )
         except:
-            main.log.error("Connection failed to the host")
+            main.log.error( "Connection failed to the host" )
             response = main.FALSE
         return response
 
diff --git a/TestON/drivers/common/cli/emulatordriver.py b/TestON/drivers/common/cli/emulatordriver.py
index b561e9c..bb8da7c 100644
--- a/TestON/drivers/common/cli/emulatordriver.py
+++ b/TestON/drivers/common/cli/emulatordriver.py
@@ -1,13 +1,13 @@
 #!/usr/bin/env python
-'''
-Created on 26-Oct-2012 
+"""
+Created on 26-Oct-2012
 
-@author: Anil Kumar (anilkumar.s@paxterrasolutions.com)      
+author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 2 of the License, or
-    (at your option) any later version.
+    ( at your option ) any later version.
 
     TestON is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,18 +15,24 @@
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with TestON.  If not, see <http://www.gnu.org/licenses/>.		
+    along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 
 
-''' 
+"""
 import pexpect
-import struct, fcntl, os, sys, signal
+import struct
+import fcntl
+import os
 import sys
-sys.path.append("../")
+import signal
+import sys
+sys.path.append( "../" )
 from drivers.common.clidriver import CLI
 
-class Emulator(CLI):
+
+class Emulator( CLI ):
     # The common functions for emulator included in emulatordriver
-    def __init__(self):
-        super(CLI, self).__init__()
-        
+
+    def __init__( self ):
+        super( CLI, self ).__init__()
+
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 838e6f4..32fcc35 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -1,9 +1,9 @@
 #!/usr/bin/env python
 
-'''
+"""
 This driver enters the onos> prompt to issue commands.
 
-Please follow the coding style demonstrated by existing 
+Please follow the coding style demonstrated by existing
 functions and document properly.
 
 If you are a contributor to the driver, please
@@ -15,1116 +15,1112 @@
 
 OCT 13 2014
 
-'''
-
+"""
 import sys
 import pexpect
 import re
 import traceback
-#import os.path
-sys.path.append("../")
+# import os.path
+sys.path.append( "../" )
 from drivers.common.clidriver import CLI
 
-class OnosCliDriver(CLI):
 
-    def __init__(self):
-        '''
-        Initialize client 
-        '''
-        super(CLI, self).__init__()
+class OnosCliDriver( CLI ):
 
-    def connect(self,**connectargs):
-        '''
+    def __init__( self ):
+        """
+        Initialize client
+        """
+        super( CLI, self ).__init__()
+
+    def connect( self, **connectargs ):
+        """
         Creates ssh handle for ONOS cli.
-        '''
+        """
         try:
             for key in connectargs:
-                vars(self)[key] = connectargs[key]
+                vars( self )[ key ] = connectargs[ key ]
             self.home = "~/ONOS"
             for key in self.options:
                 if key == "home":
-                    self.home = self.options['home']
+                    self.home = self.options[ 'home' ]
                     break
 
+            self.name = self.options[ 'name' ]
+            self.handle = super( OnosCliDriver, self ).connect(
+                user_name=self.user_name,
+                    ip_address=self.ip_address,
+                    port=self.port,
+                    pwd=self.pwd,
+                    home=self.home )
 
-            self.name = self.options['name']
-            self.handle = super(OnosCliDriver,self).connect(
-                    user_name = self.user_name, 
-                    ip_address = self.ip_address,
-                    port = self.port, 
-                    pwd = self.pwd, 
-                    home = self.home)
-           
-            self.handle.sendline("cd "+ self.home)
-            self.handle.expect("\$")
+            self.handle.sendline( "cd " + self.home )
+            self.handle.expect( "\$" )
             if self.handle:
                 return self.handle
-            else :
-                main.log.info("NO ONOS HANDLE")
+            else:
+                main.log.info( "NO ONOS HANDLE" )
                 return main.FALSE
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":     " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":     " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name + ":::::::::::::::::::::::")
+            main.log.info( self.name + ":::::::::::::::::::::::" )
             main.log.error( traceback.print_exc() )
-            main.log.info(":::::::::::::::::::::::")
+            main.log.info( ":::::::::::::::::::::::" )
             main.cleanup()
             main.exit()
 
-    def disconnect(self):
-        '''
+    def disconnect( self ):
+        """
         Called when Test is complete to disconnect the ONOS handle.
-        '''
+        """
         response = ''
         try:
-            self.handle.sendline("")
-            i = self.handle.expect(["onos>","\$"])
+            self.handle.sendline( "" )
+            i = self.handle.expect( [ "onos>", "\$" ] )
             if i == 0:
-                self.handle.sendline("system:shutdown")
-                self.handle.expect("Confirm")
-                self.handle.sendline("yes")
-                self.handle.expect("\$")
-            self.handle.sendline("")
-            self.handle.expect("\$")
-            self.handle.sendline("exit")
-            self.handle.expect("closed")
+                self.handle.sendline( "system:shutdown" )
+                self.handle.expect( "Confirm" )
+                self.handle.sendline( "yes" )
+                self.handle.expect( "\$" )
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
+            self.handle.sendline( "exit" )
+            self.handle.expect( "closed" )
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":     " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":     " + self.handle.before )
         except:
-            main.log.error(self.name + ": Connection failed to the host")
+            main.log.error( self.name + ": Connection failed to the host" )
             response = main.FALSE
         return response
 
-    def logout(self):
-        '''
+    def logout( self ):
+        """
         Sends 'logout' command to ONOS cli
-        '''
+        """
         try:
-            self.handle.sendline("")
-            i = self.handle.expect([
+            self.handle.sendline( "" )
+            i = self.handle.expect( [
                 "onos>",
-                "\$"], timeout=10)
+                "\$" ], timeout=10 )
             if i == 0:
-                self.handle.sendline("logout")
-                self.handle.expect("\$")
+                self.handle.sendline( "logout" )
+                self.handle.expect( "\$" )
             elif i == 1:
                 return main.TRUE
-                    
+
         except pexpect.EOF:
-            main.log.error(self.name + ": eof exception found")
-            main.log.error(self.name + ":    " +
-                    self.handle.before)
+            main.log.error( self.name + ": eof exception found" )
+            main.log.error( self.name + ":    " +
+                            self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def set_cell(self, cellname):
-        '''
+    def set_cell( self, cellname ):
+        """
         Calls 'cell <name>' to set the environment variables on ONOSbench
-        
+
         Before issuing any cli commands, set the environment variable first.
-        '''
+        """
         try:
             if not cellname:
-                main.log.error("Must define cellname")
+                main.log.error( "Must define cellname" )
                 main.cleanup()
                 main.exit()
             else:
-                self.handle.sendline("cell "+str(cellname))
-                #Expect the cellname in the ONOS_CELL variable.
-                #Note that this variable name is subject to change
+                self.handle.sendline( "cell " + str( cellname ) )
+                # Expect the cellname in the ONOS_CELL variable.
+                # Note that this variable name is subject to change
                 #   and that this driver will have to change accordingly
-                self.handle.expect("ONOS_CELL="+str(cellname))
+                self.handle.expect( "ONOS_CELL=" + str( cellname ) )
                 handle_before = self.handle.before
                 handle_after = self.handle.after
-                #Get the rest of the handle
-                self.handle.sendline("")
-                self.handle.expect("\$")
+                # Get the rest of the handle
+                self.handle.sendline( "" )
+                self.handle.expect( "\$" )
                 handle_more = self.handle.before
 
-                main.log.info("Cell call returned: "+handle_before+
-                        handle_after + handle_more)
+                main.log.info( "Cell call returned: " + handle_before +
+                               handle_after + handle_more )
 
                 return main.TRUE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": eof exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": eof exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
-        
-    def start_onos_cli(self, ONOS_ip, karafTimeout=""):
-        '''
-        karafTimeout is an optional arugument. karafTimeout value passed by user would be used to set the 
+
+    def start_onos_cli( self, ONOS_ip, karafTimeout="" ):
+        """
+        karafTimeout is an optional arugument. karafTimeout value passed by user would be used to set the
         current karaf shell idle timeout. Note that when ever this property is modified the shell will exit and
         the subsequent login would reflect new idle timeout.
-        Below is an example to start a session with 60 seconds idle timeout (input value is in milliseconds):
-          
+        Below is an example to start a session with 60 seconds idle timeout ( input value is in milliseconds ):
+
         tValue = "60000"
-        main.ONOScli1.start_onos_cli(ONOS_ip, karafTimeout=tValue)
-        
+        main.ONOScli1.start_onos_cli( ONOS_ip, karafTimeout=tValue )
+
         Note: karafTimeout is left as str so that this could be read and passed to start_onos_cli from PARAMS file as str.
-        '''
+        """
         try:
-            self.handle.sendline("")
-            x = self.handle.expect([
-                "\$", "onos>"], timeout=10)
+            self.handle.sendline( "" )
+            x = self.handle.expect( [
+                "\$", "onos>" ], timeout=10 )
 
             if x == 1:
-                main.log.info("ONOS cli is already running")
+                main.log.info( "ONOS cli is already running" )
                 return main.TRUE
 
-            #Wait for onos start (-w) and enter onos cli
-            self.handle.sendline("onos -w "+str(ONOS_ip))
-            i = self.handle.expect([
-                    "onos>",
-                    pexpect.TIMEOUT],timeout=60)
+            # Wait for onos start ( -w ) and enter onos cli
+            self.handle.sendline( "onos -w " + str( ONOS_ip ) )
+            i = self.handle.expect( [
+                "onos>",
+                    pexpect.TIMEOUT ], timeout=60 )
 
             if i == 0:
-                main.log.info(str(ONOS_ip)+" CLI Started successfully")
+                main.log.info( str( ONOS_ip ) + " CLI Started successfully" )
                 if karafTimeout:
-                    self.handle.sendline("config:property-set -p org.apache.karaf.shell sshIdleTimeout "+karafTimeout)
-                    self.handle.expect("\$")
-                    self.handle.sendline("onos -w "+str(ONOS_ip))
-                    self.handle.expect("onos>")
+                    self.handle.sendline(
+                        "config:property-set -p org.apache.karaf.shell sshIdleTimeout " +
+                        karafTimeout )
+                    self.handle.expect( "\$" )
+                    self.handle.sendline( "onos -w " + str( ONOS_ip ) )
+                    self.handle.expect( "onos>" )
                 return main.TRUE
             else:
-                #If failed, send ctrl+c to process and try again
-                main.log.info("Starting CLI failed. Retrying...")
-                self.handle.send("\x03")
-                self.handle.sendline("onos -w "+str(ONOS_ip))
-                i = self.handle.expect(["onos>",pexpect.TIMEOUT],
-                        timeout=30)
+                # If failed, send ctrl+c to process and try again
+                main.log.info( "Starting CLI failed. Retrying..." )
+                self.handle.send( "\x03" )
+                self.handle.sendline( "onos -w " + str( ONOS_ip ) )
+                i = self.handle.expect( [ "onos>", pexpect.TIMEOUT ],
+                                        timeout=30 )
                 if i == 0:
-                    main.log.info(str(ONOS_ip)+" CLI Started "+
-                        "successfully after retry attempt")
+                    main.log.info( str( ONOS_ip ) + " CLI Started " +
+                                   "successfully after retry attempt" )
                     if karafTimeout:
-                        self.handle.sendline("config:property-set -p org.apache.karaf.shell sshIdleTimeout "+karafTimeout)
-                        self.handle.expect("\$")
-                        self.handle.sendline("onos -w "+str(ONOS_ip))
-			self.handle.expect("onos>")
+                        self.handle.sendline(
+                            "config:property-set -p org.apache.karaf.shell sshIdleTimeout " +
+                            karafTimeout )
+                        self.handle.expect( "\$" )
+                        self.handle.sendline( "onos -w " + str( ONOS_ip ) )
+                        self.handle.expect( "onos>" )
                     return main.TRUE
                 else:
-                    main.log.error("Connection to CLI "+\
-                        str(ONOS_ip)+" timeout")
+                    main.log.error( "Connection to CLI " +
+                                    str( ONOS_ip ) + " timeout" )
                     return main.FALSE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def sendline(self, cmd_str):
-        '''
-        Send a completely user specified string to 
-        the onos> prompt. Use this function if you have 
+    def sendline( self, cmd_str ):
+        """
+        Send a completely user specified string to
+        the onos> prompt. Use this function if you have
         a very specific command to send.
-        
+
         Warning: There are no sanity checking to commands
         sent using this method.
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
-            self.handle.sendline(cmd_str)
-            self.handle.expect("onos>")
+            self.handle.sendline( cmd_str )
+            self.handle.expect( "onos>" )
 
             handle = self.handle.before
-            
-            self.handle.sendline("")
-            self.handle.expect("onos>")
-            
+
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
+
             handle += self.handle.before
             handle += self.handle.after
 
-            main.log.info("Command sent.")
-            ansi_escape = re.compile(r'\x1b[^m]*m')
-            handle = ansi_escape.sub('', handle)
+            main.log.info( "Command sent." )
+            ansi_escape = re.compile( r'\x1b[^m]*m' )
+            handle = ansi_escape.sub( '', handle )
 
             return handle
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    #IMPORTANT NOTE:
-    #For all cli commands, naming convention should match
-    #the cli command replacing ':' with '_'.
-    #Ex) onos:topology > onos_topology
+    # IMPORTANT NOTE:
+    # For all cli commands, naming convention should match
+    # the cli command replacing ':' with '_'.
+    # Ex ) onos:topology > onos_topology
     #    onos:links    > onos_links
     #    feature:list  > feature_list
-   
-    def add_node(self, node_id, ONOS_ip, tcp_port=""):
-        '''
+
+    def add_node( self, node_id, ONOS_ip, tcp_port="" ):
+        """
         Adds a new cluster node by ID and address information.
         Required:
             * node_id
             * ONOS_ip
         Optional:
             * tcp_port
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
-            self.handle.sendline("add-node "+
-                    str(node_id)+" "+
-                    str(ONOS_ip)+" "+
-                    str(tcp_port))
-            
-            i = self.handle.expect([
+            self.handle.sendline( "add-node " +
+                                  str( node_id ) + " " +
+                                  str( ONOS_ip ) + " " +
+                                  str( tcp_port ) )
+
+            i = self.handle.expect( [
                 "Error",
-                "onos>" ])
-            
-            #Clear handle to get previous output
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+                "onos>" ] )
+
+            # Clear handle to get previous output
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
             handle = self.handle.before
 
             if i == 0:
-                main.log.error("Error in adding node")
-                main.log.error(handle)
-                return main.FALSE 
+                main.log.error( "Error in adding node" )
+                main.log.error( handle )
+                return main.FALSE
             else:
-                main.log.info("Node "+str(ONOS_ip)+" added")
+                main.log.info( "Node " + str( ONOS_ip ) + " added" )
                 return main.TRUE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def remove_node(self, node_id):
-        '''
+    def remove_node( self, node_id ):
+        """
         Removes a cluster by ID
         Issues command: 'remove-node [<node-id>]'
         Required:
             * node_id
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
-            self.handle.sendline("remove-node "+str(node_id))
-            self.handle.expect("onos>")
+            self.handle.sendline( "remove-node " + str( node_id ) )
+            self.handle.expect( "onos>" )
 
             return main.TRUE
-        
+
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def nodes(self):
-        '''
+    def nodes( self ):
+        """
         List the nodes currently visible
         Issues command: 'nodes'
         Returns: entire handle of list of nodes
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
-            self.handle.sendline("nodes")
-            self.handle.expect("onos>")
+            self.handle.sendline( "nodes" )
+            self.handle.expect( "onos>" )
 
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
             handle = self.handle.before
 
             return handle
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def topology(self):
-        '''
+    def topology( self ):
+        """
         Shows the current state of the topology
         by issusing command: 'onos> onos:topology'
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
-            #either onos:topology or 'topology' will work in CLI
-            self.handle.sendline("onos:topology")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
+            # either onos:topology or 'topology' will work in CLI
+            self.handle.sendline( "onos:topology" )
+            self.handle.expect( "onos>" )
 
             handle = self.handle.before
 
-            main.log.info("onos:topology returned: " +
-                    str(handle))
-            
+            main.log.info( "onos:topology returned: " +
+                           str( handle ) )
+
             return handle
-        
+
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
-       
-    def feature_install(self, feature_str):
-        '''
-        Installs a specified feature 
-        by issuing command: 'onos> feature:install <feature_str>'
-        '''
-        try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
 
-            self.handle.sendline("feature:install "+str(feature_str))
-            self.handle.expect("onos>")
+    def feature_install( self, feature_str ):
+        """
+        Installs a specified feature
+        by issuing command: 'onos> feature:install <feature_str>'
+        """
+        try:
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
+
+            self.handle.sendline( "feature:install " + str( feature_str ) )
+            self.handle.expect( "onos>" )
 
             return main.TRUE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
-            main.log.report("Failed to install feature")
-            main.log.report("Exiting test")
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.log.report( "Failed to install feature" )
+            main.log.report( "Exiting test" )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.report("Failed to install feature")
-            main.log.report("Exiting test")
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.report( "Failed to install feature" )
+            main.log.report( "Exiting test" )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
-       
-    def feature_uninstall(self, feature_str):
-        '''
+
+    def feature_uninstall( self, feature_str ):
+        """
         Uninstalls a specified feature
         by issuing command: 'onos> feature:uninstall <feature_str>'
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
-            self.handle.sendline("feature:uninstall "+str(feature_str))
-            self.handle.expect("onos>")
+            self.handle.sendline( "feature:uninstall " + str( feature_str ) )
+            self.handle.expect( "onos>" )
 
             return main.TRUE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def devices(self, json_format=True):
-        '''
+    def devices( self, json_format=True ):
+        """
         Lists all infrastructure devices or switches
         Optional argument:
             * json_format - boolean indicating if you want output in json
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
             if json_format:
-                self.handle.sendline("devices -j")
-                self.handle.expect("devices -j")
-                self.handle.expect("onos>")
+                self.handle.sendline( "devices -j" )
+                self.handle.expect( "devices -j" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
-                '''
+                """
                 handle variable here contains some ANSI escape color code sequences at the end which are invisible in the print command output
-                To make that escape sequence visible, use repr() function. The repr(handle) output when printed shows the ANSI escape sequences.
-                In json.loads(somestring), this somestring variable is actually repr(somestring) and json.loads would fail with the escape sequence.
+                To make that escape sequence visible, use repr() function. The repr( handle ) output when printed shows the ANSI escape sequences.
+                In json.loads( somestring ), this somestring variable is actually repr( somestring ) and json.loads would fail with the escape sequence.
                 So we take off that escape sequence using
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle1 = ansi_escape.sub('', handle)
-                '''
-                #print "repr(handle) =", repr(handle)
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle1 = ansi_escape.sub('', handle)
-                #print "repr(handle1) = ", repr(handle1)
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle1 = ansi_escape.sub( '', handle )
+                """
+                # print "repr(handle) =", repr( handle )
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle1 = ansi_escape.sub( '', handle )
+                # print "repr(handle1) = ", repr( handle1 )
                 return handle1
             else:
-                self.handle.sendline("devices")
-                self.handle.expect("onos>")
+                self.handle.sendline( "devices" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
-                #print "handle =",handle
+                # print "handle =",handle
                 return handle
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-       
-    def balance_masters(self):
-        '''
+    def balance_masters( self ):
+        """
         This balances the devices across all controllers
         by issuing command: 'onos> onos:balance-masters'
         If required this could be extended to return devices balanced output.
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
-            self.handle.sendline("onos:balance-masters")
-            self.handle.expect("onos>")
+            self.handle.sendline( "onos:balance-masters" )
+            self.handle.expect( "onos>" )
             return main.TRUE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def links(self, json_format=True):
-        '''
+    def links( self, json_format=True ):
+        """
         Lists all core links
         Optional argument:
             * json_format - boolean indicating if you want output in json
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
             if json_format:
-                self.handle.sendline("links -j")
-                self.handle.expect("links -j")
-                self.handle.expect("onos>")
+                self.handle.sendline( "links -j" )
+                self.handle.expect( "links -j" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
-                '''
+                """
                 handle variable here contains some ANSI escape color code sequences at the end which are invisible in the print command output
-                To make that escape sequence visible, use repr() function. The repr(handle) output when printed shows the ANSI escape sequences.
-                In json.loads(somestring), this somestring variable is actually repr(somestring) and json.loads would fail with the escape sequence.
+                To make that escape sequence visible, use repr() function. The repr( handle ) output when printed shows the ANSI escape sequences.
+                In json.loads( somestring ), this somestring variable is actually repr( somestring ) and json.loads would fail with the escape sequence.
                 So we take off that escape sequence using
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle1 = ansi_escape.sub('', handle)
-                '''
-                #print "repr(handle) =", repr(handle)
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle1 = ansi_escape.sub('', handle)
-                #print "repr(handle1) = ", repr(handle1)
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle1 = ansi_escape.sub( '', handle )
+                """
+                # print "repr(handle) =", repr( handle )
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle1 = ansi_escape.sub( '', handle )
+                # print "repr(handle1) = ", repr( handle1 )
                 return handle1
             else:
-                self.handle.sendline("links")
-                self.handle.expect("onos>")
+                self.handle.sendline( "links" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
-                #print "handle =",handle
+                # print "handle =",handle
                 return handle
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-
-    def ports(self, json_format=True):
-        '''
+    def ports( self, json_format=True ):
+        """
         Lists all ports
         Optional argument:
             * json_format - boolean indicating if you want output in json
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
             if json_format:
-                self.handle.sendline("ports -j")
-                self.handle.expect("ports -j")
-                self.handle.expect("onos>")
+                self.handle.sendline( "ports -j" )
+                self.handle.expect( "ports -j" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
-                '''
+                """
                 handle variable here contains some ANSI escape color code sequences at the end which are invisible in the print command output
-                To make that escape sequence visible, use repr() function. The repr(handle) output when printed shows the ANSI escape sequences.
-                In json.loads(somestring), this somestring variable is actually repr(somestring) and json.loads would fail with the escape sequence.
+                To make that escape sequence visible, use repr() function. The repr( handle ) output when printed shows the ANSI escape sequences.
+                In json.loads( somestring ), this somestring variable is actually repr( somestring ) and json.loads would fail with the escape sequence.
                 So we take off that escape sequence using the following commads:
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle1 = ansi_escape.sub('', handle)
-                '''
-                #print "repr(handle) =", repr(handle)
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle1 = ansi_escape.sub('', handle)
-                #print "repr(handle1) = ", repr(handle1)
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle1 = ansi_escape.sub( '', handle )
+                """
+                # print "repr(handle) =", repr( handle )
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle1 = ansi_escape.sub( '', handle )
+                # print "repr(handle1) = ", repr( handle1 )
                 return handle1
 
             else:
-                self.handle.sendline("ports")
-                self.handle.expect("onos>")
-                self.handle.sendline("")
-                self.handle.expect("onos>")
+                self.handle.sendline( "ports" )
+                self.handle.expect( "onos>" )
+                self.handle.sendline( "" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
-                #print "handle =",handle
+                # print "handle =",handle
                 return handle
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-
-    def roles(self, json_format=True):
-        '''
+    def roles( self, json_format=True ):
+        """
         Lists all devices and the controllers with roles assigned to them
         Optional argument:
             * json_format - boolean indicating if you want output in json
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
             if json_format:
-                self.handle.sendline("roles -j")
-                self.handle.expect("roles -j")
-                self.handle.expect("onos>")
+                self.handle.sendline( "roles -j" )
+                self.handle.expect( "roles -j" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
-                '''
+                """
                 handle variable here contains some ANSI escape color code sequences at the
                 end which are invisible in the print command output. To make that escape
-                sequence visible, use repr() function. The repr(handle) output when printed
-                shows the ANSI escape sequences. In json.loads(somestring), this somestring
-                variable is actually repr(somestring) and json.loads would fail with the escape
+                sequence visible, use repr() function. The repr( handle ) output when printed
+                shows the ANSI escape sequences. In json.loads( somestring ), this somestring
+                variable is actually repr( somestring ) and json.loads would fail with the escape
                 sequence.
 
                 So we take off that escape sequence using the following commads:
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle1 = ansi_escape.sub('', handle)
-                '''
-                #print "repr(handle) =", repr(handle)
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle1 = ansi_escape.sub('', handle)
-                #print "repr(handle1) = ", repr(handle1)
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle1 = ansi_escape.sub( '', handle )
+                """
+                # print "repr(handle) =", repr( handle )
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle1 = ansi_escape.sub( '', handle )
+                # print "repr(handle1) = ", repr( handle1 )
                 return handle1
 
             else:
-                self.handle.sendline("roles")
-                self.handle.expect("onos>")
-                self.handle.sendline("")
-                self.handle.expect("onos>")
+                self.handle.sendline( "roles" )
+                self.handle.expect( "onos>" )
+                self.handle.sendline( "" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
-                #print "handle =",handle
+                # print "handle =",handle
                 return handle
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def get_role(self, device_id):
-        '''
-        Given the a string containing the json representation of the "roles" cli command and a 
+    def get_role( self, device_id ):
+        """
+        Given the a string containing the json representation of the "roles" cli command and a
         partial or whole device id, returns a json object containing the
         roles output for the first device whose id contains "device_id"
 
         Returns:
         Dict of the role assignments for the given device or
         None if not match
-        '''
+        """
         try:
             import json
-            if device_id == None:
+            if device_id is None:
                 return None
             else:
                 raw_roles = self.roles()
-                roles_json = json.loads(raw_roles)
-                #search json for the device with id then return the device
+                roles_json = json.loads( raw_roles )
+                # search json for the device with id then return the device
                 for device in roles_json:
-                    #print device
-                    if str(device_id) in device['id']:
+                    # print device
+                    if str( device_id ) in device[ 'id' ]:
                         return device
             return None
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def roles_not_null(self):
-        '''
+    def roles_not_null( self ):
+        """
         Iterates through each device and checks if there is a master assigned
         Returns: main.TRUE if each device has a master
                  main.FALSE any device has no master
-        '''
+        """
         try:
             import json
             raw_roles = self.roles()
-            roles_json = json.loads(raw_roles)
-            #search json for the device with id then return the device
+            roles_json = json.loads( raw_roles )
+            # search json for the device with id then return the device
             for device in roles_json:
-                #print device
-                if device['master'] == "none":
-                    main.log.warn("Device has no master: " + str(device) )
+                # print device
+                if device[ 'master' ] == "none":
+                    main.log.warn( "Device has no master: " + str( device ) )
                     return main.FALSE
             return main.TRUE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-
-    def paths(self, src_id, dst_id):
-        '''
+    def paths( self, src_id, dst_id ):
+        """
         Returns string of paths, and the cost.
         Issues command: onos:paths <src> <dst>
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
-            self.handle.sendline("onos:paths "+
-                    str(src_id) + " " + str(dst_id))
-            i = self.handle.expect([
+            self.handle.sendline( "onos:paths " +
+                                  str( src_id ) + " " + str( dst_id ) )
+            i = self.handle.expect( [
                 "Error",
-                "onos>"])
-            
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+                "onos>" ] )
+
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
             handle = self.handle.before
 
             if i == 0:
-                main.log.error("Error in getting paths")
-                return (handle, "Error")
+                main.log.error( "Error in getting paths" )
+                return ( handle, "Error" )
             else:
-                path = handle.split(";")[0]
-                cost = handle.split(";")[1]
-                return (path, cost)
-        
+                path = handle.split( ";" )[ 0 ]
+                cost = handle.split( ";" )[ 1 ]
+                return ( path, cost )
+
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def hosts(self, json_format=True):
-        '''
+    def hosts( self, json_format=True ):
+        """
         Lists all discovered hosts
         Optional argument:
             * json_format - boolean indicating if you want output in json
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
             if json_format:
-                self.handle.sendline("hosts -j")
-                self.handle.expect("hosts -j")
-                self.handle.expect("onos>")
+                self.handle.sendline( "hosts -j" )
+                self.handle.expect( "hosts -j" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
-                '''
+                """
                 handle variable here contains some ANSI escape color code sequences at the end which are invisible in the print command output
-                To make that escape sequence visible, use repr() function. The repr(handle) output when printed shows the ANSI escape sequences.
-                In json.loads(somestring), this somestring variable is actually repr(somestring) and json.loads would fail with the escape sequence.
+                To make that escape sequence visible, use repr() function. The repr( handle ) output when printed shows the ANSI escape sequences.
+                In json.loads( somestring ), this somestring variable is actually repr( somestring ) and json.loads would fail with the escape sequence.
                 So we take off that escape sequence using
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle1 = ansi_escape.sub('', handle)
-                '''
-                #print "repr(handle) =", repr(handle)
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle1 = ansi_escape.sub('', handle)
-                #print "repr(handle1) = ", repr(handle1)
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle1 = ansi_escape.sub( '', handle )
+                """
+                # print "repr(handle) =", repr( handle )
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle1 = ansi_escape.sub( '', handle )
+                # print "repr(handle1) = ", repr( handle1 )
                 return handle1
             else:
-                self.handle.sendline("hosts")
-                self.handle.expect("onos>")
+                self.handle.sendline( "hosts" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
-                #print "handle =",handle
+                # print "handle =",handle
                 return handle
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def get_host(self, mac):
-        '''
+    def get_host( self, mac ):
+        """
         Return the first host from the hosts api whose 'id' contains 'mac'
         Note: mac must be a colon seperated mac address, but could be a partial mac address
         Return None if there is no match
-        '''
+        """
         import json
         try:
-            if mac == None:
+            if mac is None:
                 return None
             else:
                 mac = mac
                 raw_hosts = self.hosts()
-                hosts_json = json.loads(raw_hosts)
-                #search json for the host with mac then return the device
+                hosts_json = json.loads( raw_hosts )
+                # search json for the host with mac then return the device
                 for host in hosts_json:
-                    #print "%s in  %s?" % (mac, host['id'])
-                    if mac in host['id']:
+                    # print "%s in  %s?" % ( mac, host[ 'id' ] )
+                    if mac in host[ 'id' ]:
                         return host
             return None
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-
-    def get_hosts_id(self, host_list):
-        '''
-        Obtain list of hosts 
+    def get_hosts_id( self, host_list ):
+        """
+        Obtain list of hosts
         Issues command: 'onos> hosts'
-        
+
         Required:
             * host_list: List of hosts obtained by Mininet
         IMPORTANT:
             This function assumes that you started your
-            topology with the option '--mac'. 
+            topology with the option '--mac'.
             Furthermore, it assumes that value of VLAN is '-1'
         Description:
-            Converts mininet hosts (h1, h2, h3...) into 
-            ONOS format (00:00:00:00:00:01/-1 , ...)
-        '''
-        
+            Converts mininet hosts ( h1, h2, h3... ) into
+            ONOS format ( 00:00:00:00:00:01/-1 , ... )
+        """
         try:
             onos_host_list = []
 
             for host in host_list:
-                host = host.replace("h", "")
-                host_hex = hex(int(host)).zfill(12)
-                host_hex = str(host_hex).replace('x','0')
-                i = iter(str(host_hex))
-                host_hex = ":".join(a+b for a,b in zip(i,i))
+                host = host.replace( "h", "" )
+                host_hex = hex( int( host ) ).zfill( 12 )
+                host_hex = str( host_hex ).replace( 'x', '0' )
+                i = iter( str( host_hex ) )
+                host_hex = ":".join( a + b for a, b in zip( i, i ) )
                 host_hex = host_hex + "/-1"
-                onos_host_list.append(host_hex) 
+                onos_host_list.append( host_hex )
 
-            return onos_host_list 
+            return onos_host_list
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def add_host_intent(self, host_id_one, host_id_two):
-        '''
+    def add_host_intent( self, host_id_one, host_id_two ):
+        """
         Required:
             * host_id_one: ONOS host id for host1
             * host_id_two: ONOS host id for host2
         Description:
-            Adds a host-to-host intent (bidrectional) by
+            Adds a host-to-host intent ( bidrectional ) by
             specifying the two hosts.
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
-            self.handle.sendline("add-host-intent "+
-                    str(host_id_one) + " " + str(host_id_two))
-            self.handle.expect("onos>")
+            self.handle.sendline( "add-host-intent " +
+                                  str( host_id_one ) + " " + str( host_id_two ) )
+            self.handle.expect( "onos>" )
 
             handle = self.handle.before
-            #print "handle =", handle
+            # print "handle =", handle
 
-            main.log.info("Host intent installed between "+
-                    str(host_id_one) + " and " + str(host_id_two))
+            main.log.info( "Host intent installed between " +
+                           str( host_id_one ) + " and " + str( host_id_two ) )
 
             return handle
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def add_optical_intent(self, ingress_device, egress_device):
-        '''
+    def add_optical_intent( self, ingress_device, egress_device ):
+        """
         Required:
             * ingress_device: device id of ingress device
             * egress_device: device id of egress device
         Optional:
             TODO: Still needs to be implemented via dev side
-        ''' 
+        """
         try:
-            self.handle.sendline("add-optical-intent "+
-                    str(ingress_device) + " " + str(egress_device))
-            self.handle.expect("add-optical-intent")
-            i = self.handle.expect([
+            self.handle.sendline( "add-optical-intent " +
+                                  str( ingress_device ) + " " + str( egress_device ) )
+            self.handle.expect( "add-optical-intent" )
+            i = self.handle.expect( [
                 "Error",
-                "onos>"])
+                "onos>" ] )
 
             handle = self.handle.before
 
-            #If error, return error message
+            # If error, return error message
             if i == 0:
                 return handle
             else:
                 return main.TRUE
-        
+
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def add_point_intent(self, ingress_device, egress_device,
-            port_ingress="", port_egress="", ethType="", ethSrc="",
-            ethDst="", bandwidth="", lambda_alloc=False, 
-            ipProto="", ipSrc="", ipDst="", tcpSrc="", tcpDst=""):
-        '''
+    def add_point_intent( self, ingress_device, egress_device,
+                          port_ingress="", port_egress="", ethType="", ethSrc="",
+                          ethDst="", bandwidth="", lambda_alloc=False,
+                          ipProto="", ipSrc="", ipDst="", tcpSrc="", tcpDst="" ):
+        """
         Required:
             * ingress_device: device id of ingress device
             * egress_device: device id of egress device
         Optional:
             * ethType: specify ethType
-            * ethSrc: specify ethSrc (i.e. src mac addr)
-            * ethDst: specify ethDst (i.e. dst mac addr)
+            * ethSrc: specify ethSrc ( i.e. src mac addr )
+            * ethDst: specify ethDst ( i.e. dst mac addr )
             * bandwidth: specify bandwidth capacity of link
-            * lambda_alloc: if True, intent will allocate lambda 
+            * lambda_alloc: if True, intent will allocate lambda
               for the specified intent
-            * ipProto: specify ip protocol 
+            * ipProto: specify ip protocol
             * ipSrc: specify ip source address
             * ipDst: specify ip destination address
             * tcpSrc: specify tcp source port
             * tcpDst: specify tcp destination port
         Description:
-            Adds a point-to-point intent (uni-directional) by
+            Adds a point-to-point intent ( uni-directional ) by
             specifying device id's and optional fields
 
-        NOTE: This function may change depending on the 
+        NOTE: This function may change depending on the
               options developers provide for point-to-point
               intent via cli
-        '''
+        """
         try:
             cmd = ""
 
-            #If there are no optional arguments
+            # If there are no optional arguments
             if not ethType and not ethSrc and not ethDst\
                     and not bandwidth and not lambda_alloc \
                     and not ipProto and not ipSrc and not ipDst \
                     and not tcpSrc and not tcpDst:
                 cmd = "add-point-intent"
-      
 
             else:
                 cmd = "add-point-intent"
-                
+
                 if ethType:
-                    cmd += " --ethType " + str(ethType)
+                    cmd += " --ethType " + str( ethType )
                 if ethSrc:
-                    cmd += " --ethSrc " + str(ethSrc) 
-                if ethDst:    
-                    cmd += " --ethDst " + str(ethDst) 
+                    cmd += " --ethSrc " + str( ethSrc )
+                if ethDst:
+                    cmd += " --ethDst " + str( ethDst )
                 if bandwidth:
-                    cmd += " --bandwidth " + str(bandwidth)
+                    cmd += " --bandwidth " + str( bandwidth )
                 if lambda_alloc:
                     cmd += " --lambda "
                 if ipProto:
-                    cmd += " --ipProto " + str(ipProto)
+                    cmd += " --ipProto " + str( ipProto )
                 if ipSrc:
-                    cmd += " --ipSrc " + str(ipSrc)
+                    cmd += " --ipSrc " + str( ipSrc )
                 if ipDst:
-                    cmd += " --ipDst " + str(ipDst)
+                    cmd += " --ipDst " + str( ipDst )
                 if tcpSrc:
-                    cmd += " --tcpSrc " + str(tcpSrc)
+                    cmd += " --tcpSrc " + str( tcpSrc )
                 if tcpDst:
-                    cmd += " --tcpDst " + str(tcpDst)
+                    cmd += " --tcpDst " + str( tcpDst )
 
-            #Check whether the user appended the port 
-            #or provided it as an input
+            # Check whether the user appended the port
+            # or provided it as an input
             if "/" in ingress_device:
-                cmd += " "+str(ingress_device) 
+                cmd += " " + str( ingress_device )
             else:
                 if not port_ingress:
-                    main.log.error("You must specify "+
-                        "the ingress port")
-                    #TODO: perhaps more meaningful return
+                    main.log.error( "You must specify " +
+                                    "the ingress port" )
+                    # TODO: perhaps more meaningful return
                     return main.FALSE
 
-                cmd += " "+ \
-                    str(ingress_device) + "/" +\
-                    str(port_ingress) + " " 
+                cmd += " " + \
+                    str( ingress_device ) + "/" +\
+                    str( port_ingress ) + " "
 
             if "/" in egress_device:
-                cmd += " "+str(egress_device)
+                cmd += " " + str( egress_device )
             else:
                 if not port_egress:
-                    main.log.error("You must specify "+
-                        "the egress port")
+                    main.log.error( "You must specify " +
+                                    "the egress port" )
                     return main.FALSE
-                
-                cmd += " "+\
-                    str(egress_device) + "/" +\
-                    str(port_egress)  
 
-            self.handle.sendline(cmd)
-            
-            main.log.info(cmd + " sent")
-            i = self.handle.expect([
+                cmd += " " +\
+                    str( egress_device ) + "/" +\
+                    str( port_egress )
+
+            self.handle.sendline( cmd )
+
+            main.log.info( cmd + " sent" )
+            i = self.handle.expect( [
                 "Error",
-                "onos>"])
+                "onos>" ] )
 
             if i == 0:
-                main.log.error("Error in adding point-to-point intent")
+                main.log.error( "Error in adding point-to-point intent" )
                 return main.FALSE
             else:
                 return main.TRUE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-
-    def add_multipoint_to_singlepoint_intent(self, ingress_device1, ingress_device2,egress_device,
-            port_ingress="", port_egress="", ethType="", ethSrc="",
-            ethDst="", bandwidth="", lambda_alloc=False, 
-            ipProto="", ipSrc="", ipDst="", tcpSrc="", tcpDst="", setEthSrc="", setEthDst=""):
-        '''
+    def add_multipoint_to_singlepoint_intent(
+                                            self, ingress_device1, ingress_device2, egress_device,
+                                            port_ingress="", port_egress="", ethType="", ethSrc="",
+                                            ethDst="", bandwidth="", lambda_alloc=False,
+                                            ipProto="", ipSrc="", ipDst="", tcpSrc="", tcpDst="", setEthSrc="", setEthDst="" ):
+        """
         Note:
             This function assumes that there would be 2 ingress devices and one egress device
             For more number of ingress devices, this function needs to be modified
@@ -1134,12 +1130,12 @@
             * egress_device: device id of egress device
         Optional:
             * ethType: specify ethType
-            * ethSrc: specify ethSrc (i.e. src mac addr)
-            * ethDst: specify ethDst (i.e. dst mac addr)
+            * ethSrc: specify ethSrc ( i.e. src mac addr )
+            * ethDst: specify ethDst ( i.e. dst mac addr )
             * bandwidth: specify bandwidth capacity of link
-            * lambda_alloc: if True, intent will allocate lambda 
+            * lambda_alloc: if True, intent will allocate lambda
               for the specified intent
-            * ipProto: specify ip protocol 
+            * ipProto: specify ip protocol
             * ipSrc: specify ip source address
             * ipDst: specify ip destination address
             * tcpSrc: specify tcp source port
@@ -1147,273 +1143,272 @@
             * setEthSrc: action to Rewrite Source MAC Address
             * setEthDst: action to Rewrite Destination MAC Address
         Description:
-            Adds a multipoint-to-singlepoint intent (uni-directional) by
+            Adds a multipoint-to-singlepoint intent ( uni-directional ) by
             specifying device id's and optional fields
 
-        NOTE: This function may change depending on the 
+        NOTE: This function may change depending on the
               options developers provide for multipointpoint-to-singlepoint
               intent via cli
-        '''
+        """
         try:
             cmd = ""
 
-            #If there are no optional arguments
+            # If there are no optional arguments
             if not ethType and not ethSrc and not ethDst\
                     and not bandwidth and not lambda_alloc \
                     and not ipProto and not ipSrc and not ipDst \
                     and not tcpSrc and not tcpDst and not setEthSrc and not setEthDst:
                 cmd = "add-multi-to-single-intent"
-      
 
             else:
                 cmd = "add-multi-to-single-intent"
-                
+
                 if ethType:
-                    cmd += " --ethType " + str(ethType)
+                    cmd += " --ethType " + str( ethType )
                 if ethSrc:
-                    cmd += " --ethSrc " + str(ethSrc) 
-                if ethDst:    
-                    cmd += " --ethDst " + str(ethDst) 
+                    cmd += " --ethSrc " + str( ethSrc )
+                if ethDst:
+                    cmd += " --ethDst " + str( ethDst )
                 if bandwidth:
-                    cmd += " --bandwidth " + str(bandwidth)
+                    cmd += " --bandwidth " + str( bandwidth )
                 if lambda_alloc:
                     cmd += " --lambda "
                 if ipProto:
-                    cmd += " --ipProto " + str(ipProto)
+                    cmd += " --ipProto " + str( ipProto )
                 if ipSrc:
-                    cmd += " --ipSrc " + str(ipSrc)
+                    cmd += " --ipSrc " + str( ipSrc )
                 if ipDst:
-                    cmd += " --ipDst " + str(ipDst)
+                    cmd += " --ipDst " + str( ipDst )
                 if tcpSrc:
-                    cmd += " --tcpSrc " + str(tcpSrc)
+                    cmd += " --tcpSrc " + str( tcpSrc )
                 if tcpDst:
-                    cmd += " --tcpDst " + str(tcpDst)
+                    cmd += " --tcpDst " + str( tcpDst )
                 if setEthSrc:
-                    cmd += " --setEthSrc "+ str(setEthSrc)
+                    cmd += " --setEthSrc " + str( setEthSrc )
                 if setEthDst:
-                    cmd += " --setEthDst "+ str(setEthDst)
+                    cmd += " --setEthDst " + str( setEthDst )
 
-            #Check whether the user appended the port 
-            #or provided it as an input
+            # Check whether the user appended the port
+            # or provided it as an input
             if "/" in ingress_device1:
-                cmd += " "+str(ingress_device1) 
+                cmd += " " + str( ingress_device1 )
             else:
                 if not port_ingress1:
-                    main.log.error("You must specify "+
-                        "the ingress port1")
-                    #TODO: perhaps more meaningful return
+                    main.log.error( "You must specify " +
+                                    "the ingress port1" )
+                    # TODO: perhaps more meaningful return
                     return main.FALSE
 
-                cmd += " "+ \
-                    str(ingress_device1) + "/" +\
-                    str(port_ingress1) + " " 
+                cmd += " " + \
+                    str( ingress_device1 ) + "/" +\
+                    str( port_ingress1 ) + " "
 
             if "/" in ingress_device2:
-                cmd += " "+str(ingress_device2)
+                cmd += " " + str( ingress_device2 )
             else:
                 if not port_ingress2:
-                    main.log.error("You must specify "+
-                        "the ingress port2")
-                    #TODO: perhaps more meaningful return
+                    main.log.error( "You must specify " +
+                                    "the ingress port2" )
+                    # TODO: perhaps more meaningful return
                     return main.FALSE
 
-                cmd += " "+ \
-                    str(ingress_device2) + "/" +\
-                    str(port_ingress2) + " "
+                cmd += " " + \
+                    str( ingress_device2 ) + "/" +\
+                    str( port_ingress2 ) + " "
 
             if "/" in egress_device:
-                cmd += " "+str(egress_device)
+                cmd += " " + str( egress_device )
             else:
                 if not port_egress:
-                    main.log.error("You must specify "+
-                        "the egress port")
+                    main.log.error( "You must specify " +
+                                    "the egress port" )
                     return main.FALSE
-                
-                cmd += " "+\
-                    str(egress_device) + "/" +\
-                    str(port_egress)  
-            print "cmd= ",cmd
-            self.handle.sendline(cmd)
-            
-            main.log.info(cmd + " sent")
-            i = self.handle.expect([
+
+                cmd += " " +\
+                    str( egress_device ) + "/" +\
+                    str( port_egress )
+            print "cmd= ", cmd
+            self.handle.sendline( cmd )
+
+            main.log.info( cmd + " sent" )
+            i = self.handle.expect( [
                 "Error",
-                "onos>"])
+                "onos>" ] )
 
             if i == 0:
-                main.log.error("Error in adding point-to-point intent")
+                main.log.error( "Error in adding point-to-point intent" )
                 return self.handle
             else:
                 return main.TRUE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-
-    def remove_intent(self, intent_id):
-        '''
+    def remove_intent( self, intent_id ):
+        """
         Remove intent for specified intent id
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
-            self.handle.sendline("remove-intent "+str(intent_id))
-            i = self.handle.expect([
+            self.handle.sendline( "remove-intent " + str( intent_id ) )
+            i = self.handle.expect( [
                 "Error",
-                "onos>"])
-           
+                "onos>" ] )
+
             handle = self.handle.before
 
             if i == 0:
-                main.log.error("Error in removing intent")
+                main.log.error( "Error in removing intent" )
                 return handle
             else:
-                return handle 
-        
+                return handle
+
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
     # This method should be used after installing application: onos-app-sdnip
-    def routes(self, json_format=False):
-        '''
+    def routes( self, json_format=False ):
+        """
         Optional:
             * json_format: enable output formatting in json
         Description:
             Obtain all routes in the system
-        '''
+        """
         try:
             if json_format:
-                self.handle.sendline("routes -j")
-                self.handle.expect("routes -j")
-                self.handle.expect("onos>")
+                self.handle.sendline( "routes -j" )
+                self.handle.expect( "routes -j" )
+                self.handle.expect( "onos>" )
                 handle_tmp = self.handle.before
-                
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle = ansi_escape.sub('', handle_tmp)
+
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle = ansi_escape.sub( '', handle_tmp )
 
             else:
-                self.handle.sendline("")
-                self.handle.expect("onos>")
+                self.handle.sendline( "" )
+                self.handle.expect( "onos>" )
 
-                self.handle.sendline("routes")
-                self.handle.expect("onos>")
+                self.handle.sendline( "routes" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
 
             return handle
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name + " ::::::")
-            main.log.error(traceback.print_exc())
-            main.log.info(self.name + " ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def intents(self, json_format = True):
-        '''
+    def intents( self, json_format=True ):
+        """
         Optional:
             * json_format: enable output formatting in json
         Description:
-            Obtain intents currently installed 
-        '''
+            Obtain intents currently installed
+        """
         try:
             if json_format:
-                self.handle.sendline("intents -j")
-                self.handle.expect("intents -j")
-                self.handle.expect("onos>")
+                self.handle.sendline( "intents -j" )
+                self.handle.expect( "intents -j" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
-                
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle = ansi_escape.sub('', handle)
-            else:
-                self.handle.sendline("")
-                self.handle.expect("onos>")
 
-                self.handle.sendline("intents")
-                self.handle.expect("onos>")
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle = ansi_escape.sub( '', handle )
+            else:
+                self.handle.sendline( "" )
+                self.handle.expect( "onos>" )
+
+                self.handle.sendline( "intents" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
 
             return handle
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def flows(self, json_format = True):
-        '''
+    def flows( self, json_format=True ):
+        """
         Optional:
             * json_format: enable output formatting in json
         Description:
-            Obtain flows currently installed 
-        '''
+            Obtain flows currently installed
+        """
         try:
             if json_format:
-                self.handle.sendline("flows -j")
-                self.handle.expect("flows -j")
-                self.handle.expect("onos>")
+                self.handle.sendline( "flows -j" )
+                self.handle.expect( "flows -j" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle = ansi_escape.sub('', handle)
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle = ansi_escape.sub( '', handle )
 
             else:
-                self.handle.sendline("")
-                self.handle.expect("onos>")
-                self.handle.sendline("flows")
-                self.handle.expect("onos>")
+                self.handle.sendline( "" )
+                self.handle.expect( "onos>" )
+                self.handle.sendline( "flows" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
-            if re.search("Error\sexecuting\scommand:", handle):
-                main.log.error(self.name + ".flows() response: " + str(handle))
+            if re.search( "Error\sexecuting\scommand:", handle ):
+                main.log.error(
+                    self.name + ".flows() response: " + str( handle ) )
 
             return handle
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def push_test_intents(self, dpid_src, dpid_dst, num_intents, 
-            num_mult="", app_id="", report=True):
-        '''
+    def push_test_intents( self, dpid_src, dpid_dst, num_intents,
+                           num_mult="", app_id="", report=True ):
+        """
         Description:
-            Push a number of intents in a batch format to 
+            Push a number of intents in a batch format to
             a specific point-to-point intent definition
         Required:
             * dpid_src: specify source dpid
@@ -1425,310 +1420,310 @@
             * app_id: specify the application id init to further
               modularize the intents
             * report: default True, returns latency information
-        '''
+        """
         try:
-            cmd = "push-test-intents "+\
-                  str(dpid_src)+" "+str(dpid_dst)+" "+\
-                  str(num_intents)
-            
+            cmd = "push-test-intents " +\
+                  str( dpid_src ) + " " + str( dpid_dst ) + " " +\
+                  str( num_intents )
+
             if num_mult:
-                cmd += " " + str(num_mult)
-                #If app id is specified, then num_mult 
-                #must exist because of the way this command
-                #takes in arguments
+                cmd += " " + str( num_mult )
+                # If app id is specified, then num_mult
+                # must exist because of the way this command
+                # takes in arguments
                 if app_id:
-                    cmd += " " + str(app_id)
-            
-            self.handle.sendline(cmd)
-            self.handle.expect(cmd)
-            self.handle.expect("onos>")
-                
+                    cmd += " " + str( app_id )
+
+            self.handle.sendline( cmd )
+            self.handle.expect( cmd )
+            self.handle.expect( "onos>" )
+
             handle = self.handle.before
-              
-            #Some color thing that we want to escape
-            ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-            handle = ansi_escape.sub('', handle)
-    
+
+            # Some color thing that we want to escape
+            ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+            handle = ansi_escape.sub( '', handle )
+
             if report:
                 lat_result = []
-                main.log.info(handle)
-                #Split result by newline
-                newline = handle.split("\r\r\n")
-                #Ignore the first object of list, which is empty
-                newline = newline[1:]
-                #Some sloppy parsing method to get the latency
+                main.log.info( handle )
+                # Split result by newline
+                newline = handle.split( "\r\r\n" )
+                # Ignore the first object of list, which is empty
+                newline = newline[ 1: ]
+                # Some sloppy parsing method to get the latency
                 for result in newline:
-                    result = result.split(": ")
-                    #Append the first result of second parse
-                    lat_result.append(result[1].split(" ")[0])
+                    result = result.split( ": " )
+                    # Append the first result of second parse
+                    lat_result.append( result[ 1 ].split( " " )[ 0 ] )
 
-                main.log.info(lat_result) 
-                return lat_result 
+                main.log.info( lat_result )
+                return lat_result
             else:
                 return main.TRUE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def intents_events_metrics(self, json_format=True):
-        '''
-        Description:Returns topology metrics 
+    def intents_events_metrics( self, json_format=True ):
+        """
+        Description:Returns topology metrics
         Optional:
             * json_format: enable json formatting of output
-        '''
+        """
         try:
             if json_format:
-                self.handle.sendline("intents-events-metrics -j")
-                self.handle.expect("intents-events-metrics -j")
-                self.handle.expect("onos>")
-                
+                self.handle.sendline( "intents-events-metrics -j" )
+                self.handle.expect( "intents-events-metrics -j" )
+                self.handle.expect( "onos>" )
+
                 handle = self.handle.before
-              
-                #Some color thing that we want to escape
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle = ansi_escape.sub('', handle)
-            
+
+                # Some color thing that we want to escape
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle = ansi_escape.sub( '', handle )
+
             else:
-                self.handle.sendline("intents-events-metrics")
-                self.handle.expect("intents-events-metrics")
-                self.handle.expect("onos>")
-                
+                self.handle.sendline( "intents-events-metrics" )
+                self.handle.expect( "intents-events-metrics" )
+                self.handle.expect( "onos>" )
+
                 handle = self.handle.before
 
             return handle
-        
+
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def topology_events_metrics(self, json_format=True):
-        '''
-        Description:Returns topology metrics 
+    def topology_events_metrics( self, json_format=True ):
+        """
+        Description:Returns topology metrics
         Optional:
             * json_format: enable json formatting of output
-        '''
+        """
         try:
             if json_format:
-                self.handle.sendline("topology-events-metrics -j")
-                self.handle.expect("topology-events-metrics -j")
-                self.handle.expect("onos>")
-                
+                self.handle.sendline( "topology-events-metrics -j" )
+                self.handle.expect( "topology-events-metrics -j" )
+                self.handle.expect( "onos>" )
+
                 handle = self.handle.before
-              
-                #Some color thing that we want to escape
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle = ansi_escape.sub('', handle)
-            
+
+                # Some color thing that we want to escape
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle = ansi_escape.sub( '', handle )
+
             else:
-                self.handle.sendline("topology-events-metrics")
-                self.handle.expect("topology-events-metrics")
-                self.handle.expect("onos>")
-                
+                self.handle.sendline( "topology-events-metrics" )
+                self.handle.expect( "topology-events-metrics" )
+                self.handle.expect( "onos>" )
+
                 handle = self.handle.before
 
             return handle
-        
+
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    #Wrapper functions ****************
-    #Wrapper functions use existing driver
-    #functions and extends their use case.
-    #For example, we may use the output of
-    #a normal driver function, and parse it
-    #using a wrapper function
+    # Wrapper functions ****************
+    # Wrapper functions use existing driver
+    # functions and extends their use case.
+    # For example, we may use the output of
+    # a normal driver function, and parse it
+    # using a wrapper function
 
-    def get_all_intents_id(self):
-        '''
+    def get_all_intents_id( self ):
+        """
         Description:
             Obtain all intent id's in a list
-        '''
+        """
         try:
-            #Obtain output of intents function
+            # Obtain output of intents function
             intents_str = self.intents()
             all_intent_list = []
             intent_id_list = []
 
-            #Parse the intents output for ID's
-            intents_list = [s.strip() for s in intents_str.splitlines()]
+            # Parse the intents output for ID's
+            intents_list = [ s.strip() for s in intents_str.splitlines() ]
             for intents in intents_list:
                 if "onos>" in intents:
                     continue
                 elif "intents" in intents:
                     continue
                 else:
-                    line_list = intents.split(" ")
-                    all_intent_list.append(line_list[0])
-            
-            all_intent_list = all_intent_list[1:-2]
+                    line_list = intents.split( " " )
+                    all_intent_list.append( line_list[ 0 ] )
+
+            all_intent_list = all_intent_list[ 1:-2 ]
 
             for intents in all_intent_list:
                 if not intents:
                     continue
                 else:
-                    intent_id_list.append(intents) 
+                    intent_id_list.append( intents )
 
             return intent_id_list
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def get_all_devices_id(self):
-        '''
+    def get_all_devices_id( self ):
+        """
         Use 'devices' function to obtain list of all devices
         and parse the result to obtain a list of all device
         id's. Returns this list. Returns empty list if no
         devices exist
-        List is ordered sequentially 
-        
+        List is ordered sequentially
+
         This function may be useful if you are not sure of the
-        device id, and wish to execute other commands using 
+        device id, and wish to execute other commands using
         the ids. By obtaining the list of device ids on the fly,
         you can iterate through the list to get mastership, etc.
-        '''
+        """
         try:
-            #Call devices and store result string
-            devices_str = self.devices(json_format=False)
+            # Call devices and store result string
+            devices_str = self.devices( json_format=False )
             id_list = []
-            
+
             if not devices_str:
-                main.log.info("There are no devices to get id from")
+                main.log.info( "There are no devices to get id from" )
                 return id_list
-           
-            #Split the string into list by comma
-            device_list = devices_str.split(",")
-            #Get temporary list of all arguments with string 'id='
-            temp_list = [dev for dev in device_list if "id=" in dev]
-            #Split list further into arguments before and after string
-            # 'id='. Get the latter portion (the actual device id) and
+
+            # Split the string into list by comma
+            device_list = devices_str.split( "," )
+            # Get temporary list of all arguments with string 'id='
+            temp_list = [ dev for dev in device_list if "id=" in dev ]
+            # Split list further into arguments before and after string
+            # 'id='. Get the latter portion ( the actual device id ) and
             # append to id_list
             for arg in temp_list:
-                id_list.append(arg.split("id=")[1])
+                id_list.append( arg.split( "id=" )[ 1 ] )
             return id_list
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def get_all_nodes_id(self):
-        '''
+    def get_all_nodes_id( self ):
+        """
         Uses 'nodes' function to obtain list of all nodes
         and parse the result of nodes to obtain just the
-        node id's. 
+        node id's.
         Returns:
             list of node id's
-        '''
+        """
         try:
             nodes_str = self.nodes()
             id_list = []
 
             if not nodes_str:
-                main.log.info("There are no nodes to get id from")
+                main.log.info( "There are no nodes to get id from" )
                 return id_list
 
-            #Sample nodes_str output
-            #id=local, address=127.0.0.1:9876, state=ACTIVE *
+            # Sample nodes_str output
+            # id=local, address=127.0.0.1:9876, state=ACTIVE *
 
-            #Split the string into list by comma
-            nodes_list = nodes_str.split(",")
-            temp_list = [node for node in nodes_list if "id=" in node]
+            # Split the string into list by comma
+            nodes_list = nodes_str.split( "," )
+            temp_list = [ node for node in nodes_list if "id=" in node ]
             for arg in temp_list:
-                id_list.append(arg.split("id=")[1])
+                id_list.append( arg.split( "id=" )[ 1 ] )
 
             return id_list
-        
+
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def get_device(self, dpid=None):
-        '''
+    def get_device( self, dpid=None ):
+        """
         Return the first device from the devices api whose 'id' contains 'dpid'
         Return None if there is no match
-        '''
+        """
         import json
         try:
-            if dpid == None:
+            if dpid is None:
                 return None
             else:
-                dpid = dpid.replace(':', '')
+                dpid = dpid.replace( ':', '' )
                 raw_devices = self.devices()
-                devices_json = json.loads(raw_devices)
-                #search json for the device with dpid then return the device
+                devices_json = json.loads( raw_devices )
+                # search json for the device with dpid then return the device
                 for device in devices_json:
-                    #print "%s in  %s?" % (dpid, device['id'])
-                    if dpid in device['id']:
+                    # print "%s in  %s?" % ( dpid, device[ 'id' ] )
+                    if dpid in device[ 'id' ]:
                         return device
             return None
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def check_status(self, ip, numoswitch, numolink, log_level="info"):
-        '''
-        Checks the number of swithes & links that ONOS sees against the 
-        supplied values. By default this will report to main.log, but the 
+    def check_status( self, ip, numoswitch, numolink, log_level="info" ):
+        """
+        Checks the number of swithes & links that ONOS sees against the
+        supplied values. By default this will report to main.log, but the
         log level can be specifid.
-        
+
         Params: ip = ip used for the onos cli
                 numoswitch = expected number of switches
                 numlink = expected number of links
@@ -1737,56 +1732,55 @@
 
         log_level can
 
-        Returns: main.TRUE if the number of switchs and links are correct, 
+        Returns: main.TRUE if the number of switchs and links are correct,
                  main.FALSE if the numer of switches and links is incorrect,
                  and main.ERROR otherwise
-        '''
-
+        """
         try:
-            topology = self.get_topology(ip)
+            topology = self.get_topology( ip )
             if topology == {}:
                 return main.ERROR
             output = ""
-            #Is the number of switches is what we expected
-            devices = topology.get('devices',False)
-            links = topology.get('links',False)
+            # Is the number of switches is what we expected
+            devices = topology.get( 'devices', False )
+            links = topology.get( 'links', False )
             if devices == False or links == False:
                 return main.ERROR
-            switch_check = ( int(devices) == int(numoswitch) )
-            #Is the number of links is what we expected
-            link_check = ( int(links) == int(numolink) )
-            if (switch_check and link_check):
-                #We expected the correct numbers
+            switch_check = ( int( devices ) == int( numoswitch ) )
+            # Is the number of links is what we expected
+            link_check = ( int( links ) == int( numolink ) )
+            if ( switch_check and link_check ):
+                # We expected the correct numbers
                 output = output + "The number of links and switches match "\
-                        + "what was expected"
+                    + "what was expected"
                 result = main.TRUE
             else:
                 output = output + \
-                        "The number of links and switches does not match what was expected"
+                    "The number of links and switches does not match what was expected"
                 result = main.FALSE
             output = output + "\n ONOS sees %i devices (%i expected) and %i links (%i expected)"\
-                    % ( int(devices), int(numoswitch), int(links), int(numolink) )
+                % ( int( devices ), int( numoswitch ), int( links ), int( numolink ) )
             if log_level == "report":
-                main.log.report(output)
+                main.log.report( output )
             elif log_level == "warn":
-                main.log.warn(output)
+                main.log.warn( output )
             else:
-                main.log.info(output)
-            return result 
+                main.log.info( output )
+            return result
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def device_role(self, device_id, onos_node, role="master"):
-        '''
+    def device_role( self, device_id, onos_node, role="master" ):
+        """
         Calls the device-role cli command.
         device_id must be the id of a device as seen in the onos devices command
         onos_node is the ip of one of the onos nodes in the cluster
@@ -1795,322 +1789,343 @@
         Returns main.TRUE or main.FALSE based on argument verification.
             When device-role supports errors this should be extended to
             support that output
-        '''
+        """
         try:
-            #print "beginning device_role... \n\tdevice_id:" + device_id
-            #print "\tonos_node: " + onos_node
-            #print "\trole: "+ role
+            # print "beginning device_role... \n\tdevice_id:" + device_id
+            # print "\tonos_node: " + onos_node
+            # print "\trole: "+ role
             if role.lower() == "master" or \
                     role.lower() == "standby" or \
                     role.lower() == "none":
-                        self.handle.sendline("")
-                        self.handle.expect("onos>")
-                        self.handle.sendline("device-role " +
-                                str(device_id) + " " +
-                                str(onos_node) +  " " +
-                                str(role))
-                        i= self.handle.expect(["Error","onos>"])
-                        if i == 0:
-                            output = str(self.handle.before)
-                            self.handle.expect("onos>")
-                            output = output + str(self.handle.before)
-                            main.log.error(self.name + ": " +
-                                    output + '\033[0m')#end color output to escape any colours from the cli
-                            return main.ERROR
-                        self.handle.sendline("")
-                        self.handle.expect("onos>")
-                        return main.TRUE
+                self.handle.sendline( "" )
+                self.handle.expect( "onos>" )
+                self.handle.sendline( "device-role " +
+                                      str( device_id ) + " " +
+                                      str( onos_node ) + " " +
+                                      str( role ) )
+                i = self.handle.expect( [ "Error", "onos>" ] )
+                if i == 0:
+                    output = str( self.handle.before )
+                    self.handle.expect( "onos>" )
+                    output = output + str( self.handle.before )
+                    main.log.error( self.name + ": " +
+                                    output + '\033[0m' )  # end color output to escape any colours from the cli
+                    return main.ERROR
+                self.handle.sendline( "" )
+                self.handle.expect( "onos>" )
+                return main.TRUE
             else:
                 return main.FALSE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def clusters(self, json_format=True):
-        '''
+    def clusters( self, json_format=True ):
+        """
         Lists all clusters
         Optional argument:
             * json_format - boolean indicating if you want output in json
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
             if json_format:
-                self.handle.sendline("clusters -j")
-                self.handle.expect("clusters -j")
-                self.handle.expect("onos>")
+                self.handle.sendline( "clusters -j" )
+                self.handle.expect( "clusters -j" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
-                '''
+                """
                 handle variable here contains some ANSI escape color code
                 sequences at the end which are invisible in the print command
                 output. To make that escape sequence visible, use repr() function.
-                The repr(handle) output when printed shows the ANSI escape sequences.
-                In json.loads(somestring), this somestring variable is actually
-                repr(somestring) and json.loads would fail with the escape sequence.
+                The repr( handle ) output when printed shows the ANSI escape sequences.
+                In json.loads( somestring ), this somestring variable is actually
+                repr( somestring ) and json.loads would fail with the escape sequence.
                 So we take off that escape sequence using
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle1 = ansi_escape.sub('', handle)
-                '''
-                #print "repr(handle) =", repr(handle)
-                ansi_escape = re.compile(r'\r\r\n\x1b[^m]*m')
-                handle1 = ansi_escape.sub('', handle)
-                #print "repr(handle1) = ", repr(handle1)
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle1 = ansi_escape.sub( '', handle )
+                """
+                # print "repr(handle) =", repr( handle )
+                ansi_escape = re.compile( r'\r\r\n\x1b[^m]*m' )
+                handle1 = ansi_escape.sub( '', handle )
+                # print "repr(handle1) = ", repr( handle1 )
                 return handle1
             else:
-                self.handle.sendline("clusters")
-                self.handle.expect("onos>")
+                self.handle.sendline( "clusters" )
+                self.handle.expect( "onos>" )
                 handle = self.handle.before
-                #print "handle =",handle
+                # print "handle =",handle
                 return handle
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def election_test_leader(self):
-        '''
+    def election_test_leader( self ):
+        """
          * CLI command to get the current leader for the Election test application.
          #NOTE: Requires installation of the onos-app-election feature
          Returns: Node IP of the leader if one exists
                   None if none exists
                   Main.FALSE on error
-        '''
+        """
         try:
-            self.handle.sendline("election-test-leader")
-            self.handle.expect("election-test-leader")
-            self.handle.expect("onos>")
+            self.handle.sendline( "election-test-leader" )
+            self.handle.expect( "election-test-leader" )
+            self.handle.expect( "onos>" )
             response = self.handle.before
-            #Leader
-            node_search = re.search("The\scurrent\sleader\sfor\sthe\sElection\sapp\sis\s(?P<node>.+)\.", response)
+            # Leader
+            node_search = re.search(
+                "The\scurrent\sleader\sfor\sthe\sElection\sapp\sis\s(?P<node>.+)\.",
+                response )
             if node_search:
-                node = node_search.group('node')
-                main.log.info("Election-test-leader on "+str(self.name)+" found " + node + " as the leader")
+                node = node_search.group( 'node' )
+                main.log.info( "Election-test-leader on " + str(
+                    self.name ) + " found " + node + " as the leader" )
                 return node
-            #no leader
-            null_search = re.search("There\sis\scurrently\sno\sleader\selected\sfor\sthe\sElection\sapp", response)
+            # no leader
+            null_search = re.search(
+                "There\sis\scurrently\sno\sleader\selected\sfor\sthe\sElection\sapp",
+                response )
             if null_search:
-                main.log.info("Election-test-leader found no leader on " + self.name )
+                main.log.info(
+                    "Election-test-leader found no leader on " +
+                    self.name )
                 return None
-            #error
-            if re.search("Command\snot\sfound", response):
-                main.log.error("Election app is not loaded on " + self.name)
+            # error
+            if re.search( "Command\snot\sfound", response ):
+                main.log.error( "Election app is not loaded on " + self.name )
                 return main.FALSE
             else:
-                main.log.error("Error in election_test_leader: unexpected response")
-                main.log.error( repr(response) )
+                main.log.error(
+                    "Error in election_test_leader: unexpected response" )
+                main.log.error( repr( response ) )
                 return main.FALSE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def election_test_run(self):
-        '''
+    def election_test_run( self ):
+        """
          * CLI command to run for leadership of the Election test application.
          #NOTE: Requires installation of the onos-app-election feature
          Returns: Main.TRUE on success
                   Main.FALSE on error
-        '''
+        """
         try:
-            self.handle.sendline("election-test-run")
-            self.handle.expect("election-test-run")
-            self.handle.expect("onos>")
+            self.handle.sendline( "election-test-run" )
+            self.handle.expect( "election-test-run" )
+            self.handle.expect( "onos>" )
             response = self.handle.before
-            #success
-            search = re.search("Entering\sleadership\selections\sfor\sthe\sElection\sapp.", response)
+            # success
+            search = re.search(
+                "Entering\sleadership\selections\sfor\sthe\sElection\sapp.",
+                response )
             if search:
-                main.log.info(self.name + " entering leadership elections for the Election app.")
+                main.log.info(
+                    self.name +
+                    " entering leadership elections for the Election app." )
                 return main.TRUE
-            #error
-            if re.search("Command\snot\sfound", response):
-                main.log.error("Election app is not loaded on " + self.name)
+            # error
+            if re.search( "Command\snot\sfound", response ):
+                main.log.error( "Election app is not loaded on " + self.name )
                 return main.FALSE
             else:
-                main.log.error("Error in election_test_run: unexpected response")
-                main.log.error( repr(response) )
+                main.log.error(
+                    "Error in election_test_run: unexpected response" )
+                main.log.error( repr( response ) )
                 return main.FALSE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def election_test_withdraw(self):
-        '''
+    def election_test_withdraw( self ):
+        """
          * CLI command to withdraw the local node from leadership election for
          * the Election test application.
          #NOTE: Requires installation of the onos-app-election feature
          Returns: Main.TRUE on success
                   Main.FALSE on error
-        '''
+        """
         try:
-            self.handle.sendline("election-test-withdraw")
-            self.handle.expect("election-test-withdraw")
-            self.handle.expect("onos>")
+            self.handle.sendline( "election-test-withdraw" )
+            self.handle.expect( "election-test-withdraw" )
+            self.handle.expect( "onos>" )
             response = self.handle.before
-            #success
-            search = re.search("Withdrawing\sfrom\sleadership\selections\sfor\sthe\sElection\sapp.", response)
+            # success
+            search = re.search(
+                "Withdrawing\sfrom\sleadership\selections\sfor\sthe\sElection\sapp.",
+                response )
             if search:
-                main.log.info(self.name + " withdrawing from leadership elections for the Election app.")
+                main.log.info(
+                    self.name +
+                    " withdrawing from leadership elections for the Election app." )
                 return main.TRUE
-            #error
-            if re.search("Command\snot\sfound", response):
-                main.log.error("Election app is not loaded on " + self.name)
+            # error
+            if re.search( "Command\snot\sfound", response ):
+                main.log.error( "Election app is not loaded on " + self.name )
                 return main.FALSE
             else:
-                main.log.error("Error in election_test_withdraw: unexpected response")
-                main.log.error( repr(response) )
+                main.log.error(
+                    "Error in election_test_withdraw: unexpected response" )
+                main.log.error( repr( response ) )
                 return main.FALSE
 
-
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
     #***********************************
-    def getDevicePortsEnabledCount(self,dpid):
-        '''
+    def getDevicePortsEnabledCount( self, dpid ):
+        """
         Get the count of all enabled ports on a particular device/switch
-        '''
+        """
         try:
-            dpid = str(dpid)
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            dpid = str( dpid )
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
-            self.handle.sendline("onos:ports -e "+dpid+" | wc -l")
-            i = self.handle.expect([
+            self.handle.sendline( "onos:ports -e " + dpid + " | wc -l" )
+            i = self.handle.expect( [
                 "No such device",
-                "onos>"])
-            
-            #self.handle.sendline("")
-            #self.handle.expect("onos>")
+                "onos>" ] )
+
+            # self.handle.sendline( "" )
+            # self.handle.expect( "onos>" )
 
             output = self.handle.before
 
             if i == 0:
-                main.log.error("Error in getting ports")
-                return (output, "Error")
+                main.log.error( "Error in getting ports" )
+                return ( output, "Error" )
             else:
                 result = output
                 return result
-        
+
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def getDeviceLinksActiveCount(self,dpid):
-        '''
+    def getDeviceLinksActiveCount( self, dpid ):
+        """
         Get the count of all enabled ports on a particular device/switch
-        '''
+        """
         try:
-            dpid = str(dpid)
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            dpid = str( dpid )
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
-            self.handle.sendline("onos:links "+dpid+" | grep ACTIVE | wc -l")
-            i = self.handle.expect([
+            self.handle.sendline(
+                "onos:links " +
+                dpid +
+                " | grep ACTIVE | wc -l" )
+            i = self.handle.expect( [
                 "No such device",
-                "onos>"])
+                "onos>" ] )
 
             output = self.handle.before
 
             if i == 0:
-                main.log.error("Error in getting ports")
-                return (output, "Error")
+                main.log.error( "Error in getting ports" )
+                return ( output, "Error" )
             else:
                 result = output
                 return result
-        
+
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def getAllIntentIds(self):
-        '''
+    def getAllIntentIds( self ):
+        """
         Return a list of all Intent IDs
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("onos>")
+            self.handle.sendline( "" )
+            self.handle.expect( "onos>" )
 
-            self.handle.sendline("onos:intents | grep id=")
-            i = self.handle.expect([
+            self.handle.sendline( "onos:intents | grep id=" )
+            i = self.handle.expect( [
                 "Error",
-                "onos>"])
+                "onos>" ] )
 
             output = self.handle.before
 
             if i == 0:
-                main.log.error("Error in getting ports")
-                return (output, "Error")
+                main.log.error( "Error in getting ports" )
+                return ( output, "Error" )
             else:
                 result = output
                 return result
-        
+
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
+
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index c8713e5..d671f48 100644
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -1,10 +1,10 @@
 #!/usr/bin/env python
 
-'''
-This driver interacts with ONOS bench, the OSGi platform 
-that configures the ONOS nodes. (aka ONOS-next) 
+"""
+This driver interacts with ONOS bench, the OSGi platform
+that configures the ONOS nodes. ( aka ONOS-next )
 
-Please follow the coding style demonstrated by existing 
+Please follow the coding style demonstrated by existing
 functions and document properly.
 
 If you are a contributor to the driver, please
@@ -15,125 +15,126 @@
 
 OCT 9 2014
 
-'''
-
+"""
 import sys
 import time
 import pexpect
 import traceback
 import os.path
-sys.path.append("../")
+sys.path.append( "../" )
 from drivers.common.clidriver import CLI
 
-class OnosDriver(CLI):
 
-    def __init__(self):
-        '''
-        Initialize client 
-        '''
-        super(CLI, self).__init__()
+class OnosDriver( CLI ):
 
-    def connect(self,**connectargs):
-        '''
+    def __init__( self ):
+        """
+        Initialize client
+        """
+        super( CLI, self ).__init__()
+
+    def connect( self, **connectargs ):
+        """
         Creates ssh handle for ONOS "bench".
-        '''
+        """
         try:
             for key in connectargs:
-                vars(self)[key] = connectargs[key]
+                vars( self )[ key ] = connectargs[ key ]
             self.home = "~/ONOS"
             for key in self.options:
                 if key == "home":
-                    self.home = self.options['home']
+                    self.home = self.options[ 'home' ]
                     break
 
+            self.name = self.options[ 'name' ]
+            self.handle = super( OnosDriver, self ).connect(
+                user_name=self.user_name,
+                    ip_address=self.ip_address,
+                    port=self.port,
+                    pwd=self.pwd,
+                    home=self.home )
 
-            self.name = self.options['name']
-            self.handle = super(OnosDriver,self).connect(
-                    user_name = self.user_name, 
-                    ip_address = self.ip_address,
-                    port = self.port, 
-                    pwd = self.pwd, 
-                    home = self.home)
-           
-            self.handle.sendline("cd "+ self.home)
-            self.handle.expect("\$")
+            self.handle.sendline( "cd " + self.home )
+            self.handle.expect( "\$" )
             if self.handle:
                 return self.handle
-            else :
-                main.log.info("NO ONOS HANDLE")
+            else:
+                main.log.info( "NO ONOS HANDLE" )
                 return main.FALSE
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":     " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":     " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name + ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
+            main.log.info(
+                self.name +
+                ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" )
             main.log.error( traceback.print_exc() )
-            main.log.info(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
+            main.log.info(
+                ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" )
             main.cleanup()
             main.exit()
 
-    def disconnect(self):
-        '''
+    def disconnect( self ):
+        """
         Called when Test is complete to disconnect the ONOS handle.
-        '''
+        """
         response = ''
         try:
-            self.handle.sendline("")
-            self.handle.expect("\$")
-            self.handle.sendline("exit")
-            self.handle.expect("closed")
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
+            self.handle.sendline( "exit" )
+            self.handle.expect( "closed" )
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":     " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":     " + self.handle.before )
         except:
-            main.log.error(self.name + ": Connection failed to the host")
+            main.log.error( self.name + ": Connection failed to the host" )
             response = main.FALSE
         return response
 
-    def onos_package(self):
-        '''
+    def onos_package( self ):
+        """
         Produce a self-contained tar.gz file that can be deployed
-        and executed on any platform with Java 7 JRE. 
-        '''
-        
+        and executed on any platform with Java 7 JRE.
+        """
         try:
-            self.handle.sendline("onos-package")
-            self.handle.expect("onos-package")
-            self.handle.expect("tar.gz",timeout=30)
-            handle = str(self.handle.before)
-            main.log.info("onos-package command returned: "+
-                    handle)
-            #As long as the sendline does not time out, 
-            #return true. However, be careful to interpret
-            #the results of the onos-package command return
+            self.handle.sendline( "onos-package" )
+            self.handle.expect( "onos-package" )
+            self.handle.expect( "tar.gz", timeout=30 )
+            handle = str( self.handle.before )
+            main.log.info( "onos-package command returned: " +
+                           handle )
+            # As long as the sendline does not time out,
+            # return true. However, be careful to interpret
+            # the results of the onos-package command return
             return main.TRUE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
         except:
-            main.log.error("Failed to package ONOS")
+            main.log.error( "Failed to package ONOS" )
             main.cleanup()
             main.exit()
 
-    def onos_build(self):
-        '''
+    def onos_build( self ):
+        """
         Use the pre defined script to build onos via mvn
-        '''
-        
+        """
         try:
-            self.handle.sendline("onos-build")
-            self.handle.expect("onos-build")
-            i = self.handle.expect([
-                "BUILD SUCCESS",
-                "ERROR",
-                "BUILD FAILED"], timeout=120)
-            handle = str(self.handle.before)
+            self.handle.sendline( "onos-build" )
+            self.handle.expect( "onos-build" )
+            i = self.handle.expect( [
+                                    "BUILD SUCCESS",
+                                    "ERROR",
+                                    "BUILD FAILED" ],
+                                    timeout=120 )
+            handle = str( self.handle.before )
 
-            main.log.info("onos-build command returned: "+
-                    handle)
+            main.log.info( "onos-build command returned: " +
+                           handle )
 
             if i == 0:
                 return main.TRUE
@@ -141,862 +142,920 @@
                 return handle
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
         except:
-            main.log.error("Failed to build ONOS")
+            main.log.error( "Failed to build ONOS" )
             main.cleanup()
             main.exit()
 
-    def clean_install(self):
-        '''
-        Runs mvn clean install in the root of the ONOS directory. 
-        This will clean all ONOS artifacts then compile each module 
+    def clean_install( self ):
+        """
+        Runs mvn clean install in the root of the ONOS directory.
+        This will clean all ONOS artifacts then compile each module
 
-        Returns: main.TRUE on success 
+        Returns: main.TRUE on success
         On Failure, exits the test
-        '''
+        """
         try:
-            main.log.info("Running 'mvn clean install' on " + str(self.name) + 
-                    ". This may take some time.") 
-            self.handle.sendline("cd "+ self.home)
-            self.handle.expect("\$")
+            main.log.info( "Running 'mvn clean install' on " + str( self.name ) +
+                           ". This may take some time." )
+            self.handle.sendline( "cd " + self.home )
+            self.handle.expect( "\$" )
 
-            self.handle.sendline("")
-            self.handle.expect("\$")
-            self.handle.sendline("mvn clean install")
-            self.handle.expect("mvn clean install")
-            while 1:
-                i=self.handle.expect([
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
+            self.handle.sendline( "mvn clean install" )
+            self.handle.expect( "mvn clean install" )
+            while True:
+                i = self.handle.expect( [
                     'There\sis\sinsufficient\smemory\sfor\sthe\sJava\s\
                             Runtime\sEnvironment\sto\scontinue',
                     'BUILD\sFAILURE',
                     'BUILD\sSUCCESS',
                     'ONOS\$',
-                    pexpect.TIMEOUT],timeout=600)
+                    pexpect.TIMEOUT ], timeout=600 )
                 if i == 0:
-                    main.log.error(self.name + ":There is insufficient memory \
-                            for the Java Runtime Environment to continue.")
-                    #return main.FALSE
+                    main.log.error( self.name + ":There is insufficient memory \
+                            for the Java Runtime Environment to continue." )
+                    # return main.FALSE
                     main.cleanup()
                     main.exit()
                 if i == 1:
-                    main.log.error(self.name + ": Build failure!")
-                    #return main.FALSE
+                    main.log.error( self.name + ": Build failure!" )
+                    # return main.FALSE
                     main.cleanup()
                     main.exit()
                 elif i == 2:
-                    main.log.info(self.name + ": Build success!")
+                    main.log.info( self.name + ": Build success!" )
                 elif i == 3:
-                    main.log.info(self.name + ": Build complete")
-                    #Print the build time
+                    main.log.info( self.name + ": Build complete" )
+                    # Print the build time
                     for line in self.handle.before.splitlines():
                         if "Total time:" in line:
-                            main.log.info(line)
-                    self.handle.sendline("")
-                    self.handle.expect("\$", timeout=60)
+                            main.log.info( line )
+                    self.handle.sendline( "" )
+                    self.handle.expect( "\$", timeout=60 )
                     return main.TRUE
                 elif i == 4:
-                    main.log.error(self.name + ": mvn clean install TIMEOUT!")
-                    #return main.FALSE
+                    main.log.error(
+                        self.name +
+                        ": mvn clean install TIMEOUT!" )
+                    # return main.FALSE
                     main.cleanup()
                     main.exit()
                 else:
-                    main.log.error(self.name + ": unexpected response from \
-                            mvn clean install")
-                    #return main.FALSE
+                    main.log.error( self.name + ": unexpected response from \
+                            mvn clean install" )
+                    # return main.FALSE
                     main.cleanup()
                     main.exit()
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":     " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":     " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name + ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
+            main.log.info(
+                self.name +
+                ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" )
             main.log.error( traceback.print_exc() )
-            main.log.info(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
+            main.log.info(
+                ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" )
             main.cleanup()
             main.exit()
 
-    def git_pull(self, comp1=""):
-        '''
+    def git_pull( self, comp1="" ):
+        """
         Assumes that "git pull" works without login
 
         This function will perform a git pull on the ONOS instance.
-        If used as git_pull("NODE") it will do git pull + NODE. This is
+        If used as git_pull( "NODE" ) it will do git pull + NODE. This is
         for the purpose of pulling from other nodes if necessary.
 
         Otherwise, this function will perform a git pull in the
         ONOS repository. If it has any problems, it will return main.ERROR
-        If it successfully does a git_pull, it will return a 1 (main.TRUE)
+        If it successfully does a git_pull, it will return a 1 ( main.TRUE )
         If it has no updates, it will return 3.
 
-        '''
+        """
         try:
-            # main.log.info(self.name + ": Stopping ONOS")
-            #self.stop()
-            self.handle.sendline("cd " + self.home)
-            self.handle.expect("ONOS\$")
-            if comp1=="":
-                self.handle.sendline("git pull")
+            # main.log.info( self.name + ": Stopping ONOS" )
+            # self.stop()
+            self.handle.sendline( "cd " + self.home )
+            self.handle.expect( "ONOS\$" )
+            if comp1 == "":
+                self.handle.sendline( "git pull" )
             else:
-                self.handle.sendline("git pull " + comp1)
+                self.handle.sendline( "git pull " + comp1 )
 
-            i=self.handle.expect(['fatal',
-                'Username\sfor\s(.*):\s',
-                '\sfile(s*) changed,\s',
-                'Already up-to-date',
-                'Aborting',
-                'You\sare\snot\scurrently\son\sa\sbranch',
-                'You\sasked\sme\sto\spull\swithout\stelling\sme\swhich\sbranch\syou',
-                'Pull\sis\snot\spossible\sbecause\syou\shave\sunmerged\sfiles',
-                pexpect.TIMEOUT],
-                timeout=300)
-            #debug
-           #main.log.report(self.name +": DEBUG:  \n"+"git pull response: " + str(self.handle.before) + str(self.handle.after))
-            if i==0:
-                main.log.error(self.name + ": Git pull had some issue...")
+            i = self.handle.expect( [ 'fatal',
+                                    'Username\sfor\s(.*):\s',
+                                      '\sfile(s*) changed,\s',
+                                      'Already up-to-date',
+                                      'Aborting',
+                                      'You\sare\snot\scurrently\son\sa\sbranch',
+                                      'You\sasked\sme\sto\spull\swithout\stelling\sme\swhich\sbranch\syou',
+                                      'Pull\sis\snot\spossible\sbecause\syou\shave\sunmerged\sfiles',
+                                      pexpect.TIMEOUT ],
+                                    timeout=300 )
+            # debug
+           # main.log.report( self.name +": DEBUG:  \n"+"git pull response: " +
+           # str( self.handle.before ) + str( self.handle.after ) )
+            if i == 0:
+                main.log.error( self.name + ": Git pull had some issue..." )
                 return main.ERROR
-            elif i==1:
-                main.log.error(self.name + ": Git Pull Asking for username. ")
+            elif i == 1:
+                main.log.error(
+                    self.name +
+                    ": Git Pull Asking for username. " )
                 return main.ERROR
-            elif i==2:
-                main.log.info(self.name + ": Git Pull - pulling repository now")
-                self.handle.expect("ONOS\$", 120)
-                return main.TRUE # So that only when git pull is done, we do mvn clean compile
-            elif i==3:
-                main.log.info(self.name + ": Git Pull - Already up to date")
+            elif i == 2:
+                main.log.info(
+                    self.name +
+                    ": Git Pull - pulling repository now" )
+                self.handle.expect( "ONOS\$", 120 )
+                return main.TRUE  # So that only when git pull is done, we do mvn clean compile
+            elif i == 3:
+                main.log.info( self.name + ": Git Pull - Already up to date" )
                 return i
-            elif i==4:
-                main.log.info(self.name + ": Git Pull - Aborting... Are there conflicting git files?")
+            elif i == 4:
+                main.log.info(
+                    self.name +
+                    ": Git Pull - Aborting... Are there conflicting git files?" )
                 return main.ERROR
-            elif i==5:
-                main.log.info(self.name + ": Git Pull - You are not currently on a branch so git pull failed!")
+            elif i == 5:
+                main.log.info(
+                    self.name +
+                    ": Git Pull - You are not currently on a branch so git pull failed!" )
                 return main.ERROR
-            elif i==6:
-                main.log.info(self.name + ": Git Pull - You have not configured an upstream branch to pull from. Git pull failed!")
+            elif i == 6:
+                main.log.info(
+                    self.name +
+                    ": Git Pull - You have not configured an upstream branch to pull from. Git pull failed!" )
                 return main.ERROR
-            elif i==7:
-                main.log.info(self.name + ": Git Pull - Pull is not possible because you have unmerged files.")
+            elif i == 7:
+                main.log.info(
+                    self.name +
+                    ": Git Pull - Pull is not possible because you have unmerged files." )
                 return main.ERROR
-            elif i==8:
-                main.log.error(self.name + ": Git Pull - TIMEOUT")
-                main.log.error(self.name + " Response was: " + str(self.handle.before))
+            elif i == 8:
+                main.log.error( self.name + ": Git Pull - TIMEOUT" )
+                main.log.error(
+                    self.name + " Response was: " + str(
+                        self.handle.before ) )
                 return main.ERROR
             else:
-                main.log.error(self.name + ": Git Pull - Unexpected response, check for pull errors")
+                main.log.error(
+                    self.name +
+                    ": Git Pull - Unexpected response, check for pull errors" )
                 return main.ERROR
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":     " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":     " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name + ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
+            main.log.info(
+                self.name +
+                ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" )
             main.log.error( traceback.print_exc() )
-            main.log.info(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
+            main.log.info(
+                ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" )
             main.cleanup()
             main.exit()
 
-    def git_checkout(self, branch="master"):
-        '''
+    def git_checkout( self, branch="master" ):
+        """
         Assumes that "git pull" works without login
-        
+
         This function will perform a git git checkout on the ONOS instance.
-        If used as git_checkout("branch") it will do git checkout of the "branch".
+        If used as git_checkout( "branch" ) it will do git checkout of the "branch".
 
         Otherwise, this function will perform a git checkout of the master
-        branch of the ONOS repository. If it has any problems, it will return 
-        main.ERROR. 
-        If the branch was already the specified branch, or the git checkout was 
+        branch of the ONOS repository. If it has any problems, it will return
+        main.ERROR.
+        If the branch was already the specified branch, or the git checkout was
         successful then the function will return main.TRUE.
 
-        '''
+        """
         try:
-            self.handle.sendline("cd " + self.home)
-            self.handle.expect("ONOS\$")
-            main.log.info(self.name + ": Checking out git branch: " + branch + "...")
-            cmd = "git checkout "+branch
-            self.handle.sendline(cmd)
-            self.handle.expect(cmd)
-            i=self.handle.expect(['fatal',
-                'Username\sfor\s(.*):\s',
-                'Already\son\s\'',
-                'Switched\sto\sbranch\s\'' + str(branch), 
-                pexpect.TIMEOUT,
-                'error: Your local changes to the following files would be overwritten by checkout:',
-                'error: you need to resolve your current index first'],timeout=60)
+            self.handle.sendline( "cd " + self.home )
+            self.handle.expect( "ONOS\$" )
+            main.log.info(
+                self.name +
+                ": Checking out git branch: " +
+                branch +
+                "..." )
+            cmd = "git checkout " + branch
+            self.handle.sendline( cmd )
+            self.handle.expect( cmd )
+            i = self.handle.expect( [ 'fatal',
+                                    'Username\sfor\s(.*):\s',
+                                      'Already\son\s\'',
+                                      'Switched\sto\sbranch\s\'' +
+                                          str( branch ),
+                                      pexpect.TIMEOUT,
+                                      'error: Your local changes to the following files would be overwritten by checkout:',
+                                      'error: you need to resolve your current index first' ], timeout=60 )
 
-            if i==0:
-                main.log.error(self.name + ": Git checkout had some issue...")
-                main.log.error(self.name + ":     " + self.handle.before)
+            if i == 0:
+                main.log.error(
+                    self.name +
+                    ": Git checkout had some issue..." )
+                main.log.error( self.name + ":     " + self.handle.before )
                 return main.ERROR
-            elif i==1:
-                main.log.error(self.name + ": Git checkout asking for username."\
-                        +" Please configure your local git repository to be able "\
-                        +"to access your remote repository passwordlessly")
+            elif i == 1:
+                main.log.error( self.name + ": Git checkout asking for username."
+                                + " Please configure your local git repository to be able "
+                                + "to access your remote repository passwordlessly" )
                 return main.ERROR
-            elif i==2:
-                main.log.info(self.name + ": Git Checkout %s : Already on this branch" %branch)
-                self.handle.expect("ONOS\$")
-                #main.log.info("DEBUG: after checkout cmd = "+ self.handle.before)
+            elif i == 2:
+                main.log.info(
+                    self.name +
+                    ": Git Checkout %s : Already on this branch" %
+                    branch )
+                self.handle.expect( "ONOS\$" )
+                # main.log.info( "DEBUG: after checkout cmd = "+
+                # self.handle.before )
                 return main.TRUE
-            elif i==3:
-                main.log.info(self.name + ": Git checkout %s - Switched to this branch" %branch)
-                self.handle.expect("ONOS\$")
-                #main.log.info("DEBUG: after checkout cmd = "+ self.handle.before)
+            elif i == 3:
+                main.log.info(
+                    self.name +
+                    ": Git checkout %s - Switched to this branch" %
+                    branch )
+                self.handle.expect( "ONOS\$" )
+                # main.log.info( "DEBUG: after checkout cmd = "+
+                # self.handle.before )
                 return main.TRUE
-            elif i==4:
-                main.log.error(self.name + ": Git Checkout- TIMEOUT")
-                main.log.error(self.name + " Response was: " + str(self.handle.before))
+            elif i == 4:
+                main.log.error( self.name + ": Git Checkout- TIMEOUT" )
+                main.log.error(
+                    self.name + " Response was: " + str(
+                        self.handle.before ) )
                 return main.ERROR
-            elif i==5:
-                self.handle.expect("Aborting")
-                main.log.error(self.name + ": Git checkout error: \n" + \
-                        "Your local changes to the following files would be overwritten by checkout:" + \
-                        str(self.handle.before))
-                self.handle.expect("ONOS\$")
+            elif i == 5:
+                self.handle.expect( "Aborting" )
+                main.log.error( self.name + ": Git checkout error: \n" +
+                                "Your local changes to the following files would be overwritten by checkout:" +
+                                str( self.handle.before ) )
+                self.handle.expect( "ONOS\$" )
                 return main.ERROR
-            elif i==6:
-                main.log.error(self.name + ": Git checkout error: \n" + \
-                        "You need to resolve your current index first:" + \
-                        str(self.handle.before))
-                self.handle.expect("ONOS\$")
+            elif i == 6:
+                main.log.error( self.name + ": Git checkout error: \n" +
+                                "You need to resolve your current index first:" +
+                                str( self.handle.before ) )
+                self.handle.expect( "ONOS\$" )
                 return main.ERROR
             else:
-                main.log.error(self.name + ": Git Checkout - Unexpected response, check for pull errors")
-                main.log.error(self.name + ":     " + self.handle.before)
+                main.log.error(
+                    self.name +
+                    ": Git Checkout - Unexpected response, check for pull errors" )
+                main.log.error( self.name + ":     " + self.handle.before )
                 return main.ERROR
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":     " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":     " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name + ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
+            main.log.info(
+                self.name +
+                ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" )
             main.log.error( traceback.print_exc() )
-            main.log.info(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
+            main.log.info(
+                ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" )
             main.cleanup()
             main.exit()
 
-    def get_version(self, report=False):
-        '''
+    def get_version( self, report=False ):
+        """
         Writes the COMMIT number to the report to be parsed by Jenkins data collecter.
-        '''
+        """
         try:
-            self.handle.sendline("export TERM=xterm-256color")
-            self.handle.expect("xterm-256color")
-            self.handle.expect("\$")
-            self.handle.sendline("")
-            self.handle.expect("\$")
-            self.handle.sendline("cd " + self.home + "; git log -1 --pretty=fuller --decorate=short | grep -A 6 \"commit\" --color=never")
-            #NOTE: for some reason there are backspaces inserted in this phrase when run from Jenkins on some tests
-            self.handle.expect("never")
-            self.handle.expect("\$")
-            response=(self.name +": \n"+ str(self.handle.before + self.handle.after))
-            self.handle.sendline("cd " + self.home)
-            self.handle.expect("\$")
-            lines=response.splitlines()
+            self.handle.sendline( "export TERM=xterm-256color" )
+            self.handle.expect( "xterm-256color" )
+            self.handle.expect( "\$" )
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
+            self.handle.sendline(
+                "cd " +
+                self.home +
+                "; git log -1 --pretty=fuller --decorate=short | grep -A 6 \"commit\" --color=never" )
+            # NOTE: for some reason there are backspaces inserted in this
+            # phrase when run from Jenkins on some tests
+            self.handle.expect( "never" )
+            self.handle.expect( "\$" )
+            response = ( self.name + ": \n" + str(
+                self.handle.before + self.handle.after ) )
+            self.handle.sendline( "cd " + self.home )
+            self.handle.expect( "\$" )
+            lines = response.splitlines()
             for line in lines:
                 print line
             if report:
-                for line in lines[2:-1]:
-                    #Bracket replacement is for Wiki-compliant
-                    #formatting. '<' or '>' are interpreted 
-                    #as xml specific tags that cause errors
-                    line = line.replace("<","[")
-                    line = line.replace(">","]")
-                    main.log.report("\t" + line)
-            return lines[2]
+                for line in lines[ 2:-1 ]:
+                    # Bracket replacement is for Wiki-compliant
+                    # formatting. '<' or '>' are interpreted
+                    # as xml specific tags that cause errors
+                    line = line.replace( "<", "[" )
+                    line = line.replace( ">", "]" )
+                    main.log.report( "\t" + line )
+            return lines[ 2 ]
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":     " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":     " + self.handle.before )
             main.cleanup()
             main.exit()
         except pexpect.TIMEOUT:
-            main.log.error(self.name + ": TIMEOUT exception found")
-            main.log.error(self.name + ":     " + self.handle.before)
+            main.log.error( self.name + ": TIMEOUT exception found" )
+            main.log.error( self.name + ":     " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name + ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
+            main.log.info(
+                self.name +
+                ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" )
             main.log.error( traceback.print_exc() )
-            main.log.info(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
+            main.log.info(
+                ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" )
             main.cleanup()
             main.exit()
 
-    def create_cell_file(self, bench_ip, file_name, mn_ip_addrs,
-            extra_feature_string, *onos_ip_addrs):
-        '''
+    def create_cell_file( self, bench_ip, file_name, mn_ip_addrs,
+                          extra_feature_string, *onos_ip_addrs ):
+        """
         Creates a cell file based on arguments
         Required:
-            * Bench IP address (bench_ip)
+            * Bench IP address ( bench_ip )
                 - Needed to copy the cell file over
-            * File name of the cell file (file_name)
-            * Mininet IP address (mn_ip_addrs)
-                - Note that only 1 ip address is 
+            * File name of the cell file ( file_name )
+            * Mininet IP address ( mn_ip_addrs )
+                - Note that only 1 ip address is
                   supported currently
-            * ONOS IP addresses (onos_ip_addrs) 
+            * ONOS IP addresses ( onos_ip_addrs )
                 - Must be passed in as last arguments
-        
+
         NOTE: Assumes cells are located at:
             ~/<self.home>/tools/test/cells/
-        '''
-        
-        #Variable initialization
+        """
+        # Variable initialization
         cell_directory = self.home + "/tools/test/cells/"
-        #We want to create the cell file in the dependencies directory
-        #of TestON first, then copy over to ONOS bench
+        # We want to create the cell file in the dependencies directory
+        # of TestON first, then copy over to ONOS bench
         temp_directory = "/tmp/"
-        #Create the cell file in the directory for writing (w+)
-        cell_file = open(temp_directory+file_name , 'w+')
-       
-        #Feature string is hardcoded environment variables
-        #That you may wish to use by default on startup.
-        #Note that you  may not want certain features listed
-        #on here.
-        core_feature_string = "export ONOS_FEATURES=webconsole,onos-api,"+\
-                "onos-cli,onos-openflow,"+extra_feature_string
+        # Create the cell file in the directory for writing ( w+ )
+        cell_file = open( temp_directory + file_name, 'w+' )
+
+        # Feature string is hardcoded environment variables
+        # That you may wish to use by default on startup.
+        # Note that you  may not want certain features listed
+        # on here.
+        core_feature_string = "export ONOS_FEATURES=webconsole,onos-api," +\
+            "onos-cli,onos-openflow," + extra_feature_string
         mn_string = "export OCN="
         onos_string = "export OC"
         temp_count = 1
-   
-        #Create ONOS_NIC ip address prefix
-        temp_onos_ip = onos_ip_addrs[0] 
+
+        # Create ONOS_NIC ip address prefix
+        temp_onos_ip = onos_ip_addrs[ 0 ]
         temp_list = []
-        temp_list = temp_onos_ip.split(".")
-        #Omit last element of list to format for NIC
-        temp_list = temp_list[:-1]
-        #Structure the nic string ip
-        nic_addr = ".".join(temp_list) + ".*"
-        onos_nic_string = "export ONOS_NIC="+nic_addr
+        temp_list = temp_onos_ip.split( "." )
+        # Omit last element of list to format for NIC
+        temp_list = temp_list[ :-1 ]
+        # Structure the nic string ip
+        nic_addr = ".".join( temp_list ) + ".*"
+        onos_nic_string = "export ONOS_NIC=" + nic_addr
 
         try:
-            #Start writing to file
-            cell_file.write(onos_nic_string + "\n") 
+            # Start writing to file
+            cell_file.write( onos_nic_string + "\n" )
 
             for arg in onos_ip_addrs:
-                #For each argument in onos_ip_addrs, write to file
-                #Output should look like the following:
+                # For each argument in onos_ip_addrs, write to file
+                # Output should look like the following:
                 #   export OC1="10.128.20.11"
                 #   export OC2="10.128.20.12"
-                cell_file.write(onos_string + str(temp_count) +
-                        "=" + "\"" + arg + "\"" + "\n" )
+                cell_file.write( onos_string + str( temp_count ) +
+                                 "=" + "\"" + arg + "\"" + "\n" )
                 temp_count = temp_count + 1
-            
-            cell_file.write(mn_string +"\""+ mn_ip_addrs +"\""+ "\n") 
-            cell_file.write(core_feature_string + "\n")
+
+            cell_file.write( mn_string + "\"" + mn_ip_addrs + "\"" + "\n" )
+            cell_file.write( core_feature_string + "\n" )
             cell_file.close()
 
-            #We use os.system to send the command to TestON cluster
-            #to account for the case in which TestON is not located
-            #on the same cluster as the ONOS bench
-            #Note that even if TestON is located on the same cluster
-            #as ONOS bench, you must setup passwordless ssh
-            #between TestON and ONOS bench in order to automate the test.
-            os.system("scp "+temp_directory+file_name+
-                    " admin@"+bench_ip+":"+cell_directory)
+            # We use os.system to send the command to TestON cluster
+            # to account for the case in which TestON is not located
+            # on the same cluster as the ONOS bench
+            # Note that even if TestON is located on the same cluster
+            # as ONOS bench, you must setup passwordless ssh
+            # between TestON and ONOS bench in order to automate the test.
+            os.system( "scp " + temp_directory + file_name +
+                       " admin@" + bench_ip + ":" + cell_directory )
 
             return main.TRUE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":     " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":     " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name + ":::::::::")
+            main.log.info( self.name + ":::::::::" )
             main.log.error( traceback.print_exc() )
-            main.log.info(":::::::")
+            main.log.info( ":::::::" )
             main.cleanup()
             main.exit()
 
-    def set_cell(self, cellname):
-        '''
+    def set_cell( self, cellname ):
+        """
         Calls 'cell <name>' to set the environment variables on ONOSbench
-        '''
+        """
         try:
             if not cellname:
-                main.log.error("Must define cellname")
+                main.log.error( "Must define cellname" )
                 main.cleanup()
                 main.exit()
             else:
-                self.handle.sendline("cell "+str(cellname))
-                #Expect the cellname in the ONOS_CELL variable.
-                #Note that this variable name is subject to change
+                self.handle.sendline( "cell " + str( cellname ) )
+                # Expect the cellname in the ONOS_CELL variable.
+                # Note that this variable name is subject to change
                 #   and that this driver will have to change accordingly
-                self.handle.expect("ONOS_CELL="+str(cellname))
+                self.handle.expect( "ONOS_CELL=" + str( cellname ) )
                 handle_before = self.handle.before
                 handle_after = self.handle.after
-                #Get the rest of the handle
-                self.handle.sendline("")
-                self.handle.expect("\$")
+                # Get the rest of the handle
+                self.handle.sendline( "" )
+                self.handle.expect( "\$" )
                 handle_more = self.handle.before
 
-                main.log.info("Cell call returned: "+handle_before+
-                        handle_after + handle_more)
+                main.log.info( "Cell call returned: " + handle_before +
+                               handle_after + handle_more )
 
                 return main.TRUE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def verify_cell(self):
-        '''
+    def verify_cell( self ):
+        """
         Calls 'onos-verify-cell' to check for cell installation
-        '''
-        #TODO: Add meaningful expect value
+        """
+        # TODO: Add meaningful expect value
 
         try:
-            #Clean handle by sending empty and expecting $
-            self.handle.sendline("")
-            self.handle.expect("\$")
-            self.handle.sendline("onos-verify-cell")
-            self.handle.expect("\$")
+            # Clean handle by sending empty and expecting $
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
+            self.handle.sendline( "onos-verify-cell" )
+            self.handle.expect( "\$" )
             handle_before = self.handle.before
             handle_after = self.handle.after
-            #Get the rest of the handle
-            self.handle.sendline("")
-            self.handle.expect("\$")
+            # Get the rest of the handle
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
             handle_more = self.handle.before
 
-            main.log.info("Verify cell returned: "+handle_before+
-                    handle_after + handle_more)
+            main.log.info( "Verify cell returned: " + handle_before +
+                           handle_after + handle_more )
 
             return main.TRUE
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def onos_cli(self, ONOS_ip, cmdstr):
-        '''
+    def onos_cli( self, ONOS_ip, cmdstr ):
+        """
         Uses 'onos' command to send various ONOS CLI arguments.
         Required:
             * ONOS_ip: specify the ip of the cell machine
             * cmdstr: specify the command string to send
-        
-        This function is intended to expose the entire karaf 
+
+        This function is intended to expose the entire karaf
         CLI commands for ONOS. Try to use this function first
         before attempting to write a ONOS CLI specific driver
-        function. 
-        You can see a list of available 'cmdstr' arguments 
+        function.
+        You can see a list of available 'cmdstr' arguments
         by starting onos, and typing in 'onos' to enter the
         onos> CLI. Then, type 'help' to see the list of
-        available commands. 
-        '''
+        available commands.
+        """
         try:
             if not ONOS_ip:
-                main.log.error("You must specify the IP address")
+                main.log.error( "You must specify the IP address" )
                 return main.FALSE
             if not cmdstr:
-                main.log.error("You must specify the command string")
+                main.log.error( "You must specify the command string" )
                 return main.FALSE
 
-            cmdstr = str(cmdstr)
-            self.handle.sendline("")
-            self.handle.expect("\$")
+            cmdstr = str( cmdstr )
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
 
-            self.handle.sendline("onos -w " + ONOS_ip + " " + cmdstr)
-            self.handle.expect("\$")
+            self.handle.sendline( "onos -w " + ONOS_ip + " " + cmdstr )
+            self.handle.expect( "\$" )
 
             handle_before = self.handle.before
             print "handle_before = ", self.handle.before
-            #handle_after = str(self.handle.after)
+            # handle_after = str( self.handle.after )
 
-            #self.handle.sendline("")
-            #self.handle.expect("\$")
-            #handle_more = str(self.handle.before)
+            # self.handle.sendline( "" )
+            # self.handle.expect( "\$" )
+            # handle_more = str( self.handle.before )
 
-            main.log.info("Command sent successfully")
+            main.log.info( "Command sent successfully" )
 
-            #Obtain return handle that consists of result from 
-            #the onos command. The string may need to be 
-            #configured further. 
-            #return_string = handle_before + handle_after
+            # Obtain return handle that consists of result from
+            # the onos command. The string may need to be
+            # configured further.
+            # return_string = handle_before + handle_after
             return_string = handle_before
             print "return_string = ", return_string
             return return_string
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def onos_install(self, options="-f", node = ""):
-        '''
+    def onos_install( self, options="-f", node="" ):
+        """
         Installs ONOS bits on the designated cell machine.
-        If -f option is provided, it also forces an uninstall. 
-        Presently, install also includes onos-push-bits and 
+        If -f option is provided, it also forces an uninstall.
+        Presently, install also includes onos-push-bits and
         onos-config within.
-        The node option allows you to selectively only push the jar 
+        The node option allows you to selectively only push the jar
         files to certain onos nodes
 
         Returns: main.TRUE on success and main.FALSE on failure
-        '''
+        """
         try:
             if options:
-                self.handle.sendline("onos-install " + options + " " + node)
+                self.handle.sendline( "onos-install " + options + " " + node )
             else:
-                self.handle.sendline("onos-install "+node)
-            self.handle.expect("onos-install ")
-            #NOTE: this timeout may need to change depending on the network and size of ONOS
-            i=self.handle.expect(["Network\sis\sunreachable",
-                "onos\sstart/running,\sprocess",
-                "ONOS\sis\salready\sinstalled",
-                pexpect.TIMEOUT],timeout=60)
+                self.handle.sendline( "onos-install " + node )
+            self.handle.expect( "onos-install " )
+            # NOTE: this timeout may need to change depending on the network
+            # and size of ONOS
+            i = self.handle.expect( [ "Network\sis\sunreachable",
+                                    "onos\sstart/running,\sprocess",
+                                      "ONOS\sis\salready\sinstalled",
+                                      pexpect.TIMEOUT ], timeout=60 )
 
             if i == 0:
-                main.log.warn("Network is unreachable")
+                main.log.warn( "Network is unreachable" )
                 return main.FALSE
             elif i == 1:
-                main.log.info("ONOS was installed on " + node + " and started")
+                main.log.info(
+                    "ONOS was installed on " +
+                    node +
+                    " and started" )
                 return main.TRUE
             elif i == 2:
-                main.log.info("ONOS is already installed on "+node)
+                main.log.info( "ONOS is already installed on " + node )
                 return main.TRUE
-            elif i == 3: 
-                main.log.info("Installation of ONOS on " + node + " timed out")
+            elif i == 3:
+                main.log.info(
+                    "Installation of ONOS on " +
+                    node +
+                    " timed out" )
                 return main.FALSE
 
-    
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def onos_start(self, node_ip):
-        '''
+    def onos_start( self, node_ip ):
+        """
         Calls onos command: 'onos-service [<node-ip>] start'
         This command is a remote management of the ONOS upstart daemon
-        '''
-
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("\$")
-            self.handle.sendline("onos-service "+str(node_ip)+
-                " start")
-            i = self.handle.expect([
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
+            self.handle.sendline( "onos-service " + str( node_ip ) +
+                                  " start" )
+            i = self.handle.expect( [
                 "Job\sis\salready\srunning",
                 "start/running",
                 "Unknown\sinstance",
-                pexpect.TIMEOUT],timeout=120)
+                pexpect.TIMEOUT ], timeout=120 )
 
             if i == 0:
-                main.log.info("Service is already running")
+                main.log.info( "Service is already running" )
                 return main.TRUE
             elif i == 1:
-                main.log.info("ONOS service started")
+                main.log.info( "ONOS service started" )
                 return main.TRUE
             else:
-                main.log.error("ONOS service failed to start")
+                main.log.error( "ONOS service failed to start" )
                 main.cleanup()
                 main.exit()
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def onos_stop(self, node_ip):
-        '''
+    def onos_stop( self, node_ip ):
+        """
         Calls onos command: 'onos-service [<node-ip>] stop'
         This command is a remote management of the ONOS upstart daemon
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("\$")
-            self.handle.sendline("onos-service "+str(node_ip)+
-                " stop")
-            i = self.handle.expect([
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
+            self.handle.sendline( "onos-service " + str( node_ip ) +
+                                  " stop" )
+            i = self.handle.expect( [
                 "stop/waiting",
                 "Unknown\sinstance",
-                pexpect.TIMEOUT],timeout=60)
+                pexpect.TIMEOUT ], timeout=60 )
 
             if i == 0:
-                main.log.info("ONOS service stopped")
+                main.log.info( "ONOS service stopped" )
                 return main.TRUE
             elif i == 1:
-                main.log.info("Unknown ONOS instance specified: "+
-                        str(node_ip))
+                main.log.info( "Unknown ONOS instance specified: " +
+                               str( node_ip ) )
                 return main.FALSE
             else:
-                main.log.error("ONOS service failed to stop")
+                main.log.error( "ONOS service failed to stop" )
                 return main.FALSE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
-    
-    def onos_uninstall(self, node_ip=""):
-        '''
+
+    def onos_uninstall( self, node_ip="" ):
+        """
         Calls the command: 'onos-uninstall'
-        Uninstalls ONOS from the designated cell machine, stopping 
+        Uninstalls ONOS from the designated cell machine, stopping
         if needed
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("\$")
-            self.handle.sendline( "onos-uninstall "+str(node_ip) )
-            self.handle.expect("\$")
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
+            self.handle.sendline( "onos-uninstall " + str( node_ip ) )
+            self.handle.expect( "\$" )
 
-            main.log.info("ONOS "+node_ip+" was uninstalled")
+            main.log.info( "ONOS " + node_ip + " was uninstalled" )
 
-            #onos-uninstall command does not return any text
+            # onos-uninstall command does not return any text
             return main.TRUE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def onos_die(self, node_ip):
-        '''
+    def onos_die( self, node_ip ):
+        """
         Issues the command 'onos-die <node-ip>'
         This command calls onos-kill and also stops the node
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("\$")
-            cmd_str = "onos-kill "+str(node_ip)
-            self.handle.sendline(cmd_str)
-            i = self.handle.expect([
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
+            cmd_str = "onos-kill " + str( node_ip )
+            self.handle.sendline( cmd_str )
+            i = self.handle.expect( [
                 "Killing\sONOS",
                 "ONOS\sprocess\sis\snot\srunning",
-                pexpect.TIMEOUT], timeout=20)
+                pexpect.TIMEOUT ], timeout=20 )
             if i == 0:
-                main.log.info("ONOS instance "+str(node_ip)+
-                    " was killed and stopped")
+                main.log.info( "ONOS instance " + str( node_ip ) +
+                               " was killed and stopped" )
                 return main.TRUE
             elif i == 1:
-                main.log.info("ONOS process was not running")
+                main.log.info( "ONOS process was not running" )
                 return main.FALSE
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-
-    def onos_kill(self, node_ip):
-        '''
+    def onos_kill( self, node_ip ):
+        """
         Calls the command: 'onos-kill [<node-ip>]'
         "Remotely, and unceremoniously kills the ONOS instance running on
         the specified cell machine" - Tom V
-        '''
-        
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("\$")
-            self.handle.sendline("onos-kill " + str(node_ip))
-            i = self.handle.expect([
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
+            self.handle.sendline( "onos-kill " + str( node_ip ) )
+            i = self.handle.expect( [
                 "\$",
                 "No\sroute\sto\shost",
                 "password:",
-                pexpect.TIMEOUT], timeout=20)
-            
+                pexpect.TIMEOUT ], timeout=20 )
+
             if i == 0:
-                main.log.info("ONOS instance "+str(node_ip)+" was killed")
+                main.log.info(
+                    "ONOS instance " + str(
+                        node_ip ) + " was killed" )
                 return main.TRUE
             elif i == 1:
-                main.log.info("No route to host")
+                main.log.info( "No route to host" )
                 return main.FALSE
             elif i == 2:
-                main.log.info("Passwordless login for host: "+str(node_ip)+
-                        " not configured")
+                main.log.info( "Passwordless login for host: " + str( node_ip ) +
+                               " not configured" )
                 return main.FALSE
             else:
-                main.log.info("ONOS instasnce was not killed")
+                main.log.info( "ONOS instasnce was not killed" )
                 return main.FALSE
-        
+
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def onos_remove_raft_logs(self):
-        '''
+    def onos_remove_raft_logs( self ):
+        """
         Removes Raft / Copy cat files from ONOS to ensure
         a cleaner environment.
 
         Description:
             Stops all ONOS defined in the cell,
             wipes the raft / copycat log files
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("\$")
-            self.handle.sendline("onos-remove-raft-logs")
-            #Sometimes this command hangs
-            i = self.handle.expect(["\$", pexpect.TIMEOUT],
-                    timeout=120)
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
+            self.handle.sendline( "onos-remove-raft-logs" )
+            # Sometimes this command hangs
+            i = self.handle.expect( [ "\$", pexpect.TIMEOUT ],
+                                    timeout=120 )
             if i == 1:
-                i = self.handle.expect(["\$", pexpect.TIMEOUT],
-                        timeout=120)
+                i = self.handle.expect( [ "\$", pexpect.TIMEOUT ],
+                                        timeout=120 )
                 if i == 1:
                     return main.FALSE
-            self.handle.sendline("")
-            self.handle.expect("\$")
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
             return main.TRUE
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def onos_start_network(self, mntopo):
-        '''
-        Calls the command 'onos-start-network [<mininet-topo>]
-        "remotely starts the specified topology on the cell's 
+    def onos_start_network( self, mntopo ):
+        """
+        Calls the command 'onos-start-network [ <mininet-topo> ]
+        "remotely starts the specified topology on the cell's
         mininet machine against all controllers configured in the
-        cell." 
+        cell."
         * Specify mininet topology file name for mntopo
         * Topo files should be placed at:
           ~/<your-onos-directory>/tools/test/topos
-        
+
         NOTE: This function will take you to the mininet prompt
-        '''
+        """
         try:
             if not mntopo:
-                main.log.error("You must specify a topo file to execute")
+                main.log.error( "You must specify a topo file to execute" )
                 return main.FALSE
-            
-            mntopo = str(mntopo)
-            self.handle.sendline("")
-            self.handle.expect("\$")
 
-            self.handle.sendline("onos-start-network " + mntopo)
-            self.handle.expect("mininet>")
-            main.log.info("Network started, entered mininet prompt")
+            mntopo = str( mntopo )
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
 
-            #TODO: Think about whether return is necessary or not
+            self.handle.sendline( "onos-start-network " + mntopo )
+            self.handle.expect( "mininet>" )
+            main.log.info( "Network started, entered mininet prompt" )
+
+            # TODO: Think about whether return is necessary or not
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-
-    def isup(self, node = ""):
-        '''
-        Run's onos-wait-for-start which only returns once ONOS is at run 
-        level 100(ready for use)
+    def isup( self, node="" ):
+        """
+        Run's onos-wait-for-start which only returns once ONOS is at run
+        level 100( ready for use )
 
         Returns: main.TRUE if ONOS is running and main.FALSE on timeout
-        '''
+        """
         try:
-            self.handle.sendline("onos-wait-for-start " + node )
-            self.handle.expect("onos-wait-for-start")
-            #NOTE: this timeout is arbitrary"
-            i = self.handle.expect(["\$", pexpect.TIMEOUT], timeout = 120)
+            self.handle.sendline( "onos-wait-for-start " + node )
+            self.handle.expect( "onos-wait-for-start" )
+            # NOTE: this timeout is arbitrary"
+            i = self.handle.expect( [ "\$", pexpect.TIMEOUT ], timeout=120 )
             if i == 0:
-                main.log.info(self.name + ": " + node + " is up")
+                main.log.info( self.name + ": " + node + " is up" )
                 return main.TRUE
             elif i == 1:
-                #NOTE: since this function won't return until ONOS is ready,
+                # NOTE: since this function won't return until ONOS is ready,
                 #   we will kill it on timeout
-                main.log.error("ONOS has not started yet")
-                self.handle.send("\x03")    #Control-C
-                self.handle.expect("\$")
+                main.log.error( "ONOS has not started yet" )
+                self.handle.send( "\x03" )  # Control-C
+                self.handle.expect( "\$" )
                 return main.FALSE
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def push_test_intents_shell(self, dpid_src, dpid_dst, num_intents,
-            dir_file, onos_ip, num_mult="", app_id="", report=True,
-            options=""):    
-        '''  
+    def push_test_intents_shell( self, dpid_src, dpid_dst, num_intents,
+                                 dir_file, onos_ip, num_mult="", app_id="", report=True,
+                                 options="" ):
+        """
         Description:
-            Use the linux prompt to push test intents to 
+            Use the linux prompt to push test intents to
             better parallelize the results than the CLI
         Required:
             * dpid_src: specify source dpid
@@ -1005,105 +1064,107 @@
             * dir_file: specify directory and file name to save
               results
             * onos_ip: specify the IP of ONOS to install on
-        NOTE: 
+        NOTE:
             You must invoke this command at linux shell prompt
-        '''
-        try: 
-            #Create the string to sendline 
+        """
+        try:
+            # Create the string to sendline
             if options:
-                base_cmd = "onos "+str(onos_ip)+" push-test-intents "+\
-                options+" "
+                base_cmd = "onos " + str( onos_ip ) + " push-test-intents " +\
+                    options + " "
             else:
-                base_cmd = "onos "+str(onos_ip)+" push-test-intents "
-            
-            add_dpid = base_cmd + str(dpid_src) + " " + str(dpid_dst)  
+                base_cmd = "onos " + str( onos_ip ) + " push-test-intents "
+
+            add_dpid = base_cmd + str( dpid_src ) + " " + str( dpid_dst )
             if not num_mult:
-                add_intents = add_dpid + " " + str(num_intents)
+                add_intents = add_dpid + " " + str( num_intents )
             elif num_mult:
-                add_intents = add_dpid + " " + str(num_intents) + " " +\
-                              str(num_mult)
+                add_intents = add_dpid + " " + str( num_intents ) + " " +\
+                    str( num_mult )
                 if app_id:
-                    add_app = add_intents + " " + str(app_id) 
+                    add_app = add_intents + " " + str( app_id )
                 else:
                     add_app = add_intents
 
             if report:
-                send_cmd = add_app + " > " + str(dir_file) + " &" 
+                send_cmd = add_app + " > " + str( dir_file ) + " &"
             else:
                 send_cmd = add_app + " &"
-            main.log.info("Send cmd: "+send_cmd)
+            main.log.info( "Send cmd: " + send_cmd )
 
-            self.handle.sendline(send_cmd)
+            self.handle.sendline( send_cmd )
 
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
-            main.exit() 
+            main.exit()
 
-    def get_topology(self,topology_output):
-        '''
+    def get_topology( self, topology_output ):
+        """
         parses the onos:topology output
-        Returns: a topology dict populated by the key values found in 
+        Returns: a topology dict populated by the key values found in
                  the cli command.
-        '''
-
+        """
         try:
-            #call the cli to get the topology summary
-            #cmdstr = "onos:topology"
-            #cli_result = self.onos_cli(ip, cmdstr)
-            #print "cli_result = ", cli_result
+            # call the cli to get the topology summary
+            # cmdstr = "onos:topology"
+            # cli_result = self.onos_cli( ip, cmdstr )
+            # print "cli_result = ", cli_result
 
-            #Parse the output
+            # Parse the output
             topology = {}
-            #for line in cli_result.split("\n"):
+            # for line in cli_result.split( "\n" ):
             for line in topology_output.splitlines():
-                if not line.startswith("time="):
+                if not line.startswith( "time=" ):
                     continue
-                #else
-                #print line
-                for var in line.split(","):
-                    #print "'"+var+"'"
-                    #print "'"+var.strip()+"'"
-                    key, value = var.strip().split("=")
-                    topology[key] = value
-            #print "topology = ", topology
-            #devices = topology.get('devices', False)
-            #print "devices = ", devices
-            #links = topology.get('links', False)
-            #print "links = ", links
-            #SCCs = topology.get('SCC(s)', False)
-            #print "SCCs = ", SCCs
-            #paths = topology.get('paths', False)
-            #print "paths = ", paths
+                # else
+                # print line
+                for var in line.split( "," ):
+                    # print "'"+var+"'"
+                    # print "'"+var.strip()+"'"
+                    key, value = var.strip().split( "=" )
+                    topology[ key ] = value
+            # print "topology = ", topology
+            # devices = topology.get( 'devices', False )
+            # print "devices = ", devices
+            # links = topology.get( 'links', False )
+            # print "links = ", links
+            # SCCs = topology.get( 'SCC(s)', False )
+            # print "SCCs = ", SCCs
+            # paths = topology.get( 'paths', False )
+            # print "paths = ", paths
 
             return topology
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
-    
-   
 
-    def check_status(self, topology_result, numoswitch, numolink, log_level="info"):
-        '''
-        Checks the number of swithes & links that ONOS sees against the 
-        supplied values. By default this will report to main.log, but the 
+    def check_status(
+        self,
+        topology_result,
+        numoswitch,
+        numolink,
+        log_level="info" ):
+        """
+        Checks the number of swithes & links that ONOS sees against the
+        supplied values. By default this will report to main.log, but the
         log level can be specifid.
-        
+
         Params: ip = ip used for the onos cli
                 numoswitch = expected number of switches
                 numlink = expected number of links
@@ -1112,283 +1173,280 @@
 
         log_level can
 
-        Returns: main.TRUE if the number of switchs and links are correct, 
+        Returns: main.TRUE if the number of switchs and links are correct,
                  main.FALSE if the numer of switches and links is incorrect,
                  and main.ERROR otherwise
-        '''
-
+        """
         try:
-            topology = self.get_topology(topology_result)
+            topology = self.get_topology( topology_result )
             if topology == {}:
                 return main.ERROR
             output = ""
-            #Is the number of switches is what we expected
-            devices = topology.get('devices',False)
-            links = topology.get('links',False)
+            # Is the number of switches is what we expected
+            devices = topology.get( 'devices', False )
+            links = topology.get( 'links', False )
             if devices == False or links == False:
                 return main.ERROR
-            switch_check = ( int(devices) == int(numoswitch) )
-            #Is the number of links is what we expected
-            link_check = ( int(links) == int(numolink) )
-            if (switch_check and link_check):
-                #We expected the correct numbers
+            switch_check = ( int( devices ) == int( numoswitch ) )
+            # Is the number of links is what we expected
+            link_check = ( int( links ) == int( numolink ) )
+            if ( switch_check and link_check ):
+                # We expected the correct numbers
                 output = output + "The number of links and switches match "\
-                        + "what was expected"
+                    + "what was expected"
                 result = main.TRUE
             else:
                 output = output + \
-                        "The number of links and switches does not match what was expected"
+                    "The number of links and switches does not match what was expected"
                 result = main.FALSE
             output = output + "\n ONOS sees %i devices (%i expected) and %i links (%i expected)"\
-                    % ( int(devices), int(numoswitch), int(links), int(numolink) )
+                % ( int( devices ), int( numoswitch ), int( links ), int( numolink ) )
             if log_level == "report":
-                main.log.report(output)
+                main.log.report( output )
             elif log_level == "warn":
-                main.log.warn(output)
+                main.log.warn( output )
             else:
-                main.log.info(output)
-            return result 
+                main.log.info( output )
+            return result
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def tshark_pcap(self, interface, dir_file):
-        '''
+    def tshark_pcap( self, interface, dir_file ):
+        """
         Capture all packet activity and store in specified
         directory/file
 
         Required:
             * interface: interface to capture
             * dir: directory/filename to store pcap
-        '''
-        self.handle.sendline("")
-        self.handle.expect("\$")
+        """
+        self.handle.sendline( "" )
+        self.handle.expect( "\$" )
 
-        self.handle.sendline("tshark -i "+str(interface)+
-                " -t e -w "+str(dir_file)+ " &")
-        self.handle.sendline("\r")
-        self.handle.expect("Capturing on")
-        self.handle.sendline("\r")
-        self.handle.expect("\$")
+        self.handle.sendline( "tshark -i " + str( interface ) +
+                              " -t e -w " + str( dir_file ) + " &" )
+        self.handle.sendline( "\r" )
+        self.handle.expect( "Capturing on" )
+        self.handle.sendline( "\r" )
+        self.handle.expect( "\$" )
 
-        main.log.info("Tshark started capturing files on "+
-                str(interface)+ " and saving to directory: "+
-                str(dir_file))
+        main.log.info( "Tshark started capturing files on " +
+                       str( interface ) + " and saving to directory: " +
+                       str( dir_file ) )
 
-
-    def run_onos_topo_cfg(self, instance_name, json_file):
-        '''
+    def run_onos_topo_cfg( self, instance_name, json_file ):
+        """
          On ONOS bench, run this command: ./~/ONOS/tools/test/bin/onos-topo-cfg $OC1 filename
             which starts the rest and copies the json file to the onos instance
-        '''
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("\$")
-            self.handle.sendline("cd ~/ONOS/tools/test/bin")
-            self.handle.expect("/bin$")
-            cmd = "./onos-topo-cfg " +instance_name +" " +json_file
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
+            self.handle.sendline( "cd ~/ONOS/tools/test/bin" )
+            self.handle.expect( "/bin$" )
+            cmd = "./onos-topo-cfg " + instance_name + " " + json_file
             print "cmd = ", cmd
-            self.handle.sendline(cmd)
-            self.handle.expect("\$")
-            self.handle.sendline("cd ~")
-            self.handle.expect("\$")
+            self.handle.sendline( cmd )
+            self.handle.expect( "\$" )
+            self.handle.sendline( "cd ~" )
+            self.handle.expect( "\$" )
             return main.TRUE
         except:
             return main.FALSE
-            
-    def tshark_grep(self, grep, directory, interface='eth0'):
-        '''
+
+    def tshark_grep( self, grep, directory, interface='eth0' ):
+        """
         Required:
-            * grep string 
+            * grep string
             * directory to store results
         Optional:
             * interface - default: eth0
         Description:
             Uses tshark command to grep specific group of packets
             and stores the results to specified directory.
-            The timestamp is hardcoded to be in epoch 
-        '''
-        self.handle.sendline("")
-        self.handle.expect("\$")
-        self.handle.sendline("")
-        self.handle.sendline("tshark -i "+str(interface)+
-                " -t e | grep --line-buffered \""+str(grep)+"\" >"+directory+" &")
-        self.handle.sendline("\r")
-        self.handle.expect("Capturing on")
-        self.handle.sendline("\r")
-        self.handle.expect("\$")
+            The timestamp is hardcoded to be in epoch
+        """
+        self.handle.sendline( "" )
+        self.handle.expect( "\$" )
+        self.handle.sendline( "" )
+        self.handle.sendline( "tshark -i " + str( interface ) +
+                              " -t e | grep --line-buffered \"" + str(grep) + "\" >" + directory + " &" )
+        self.handle.sendline( "\r" )
+        self.handle.expect( "Capturing on" )
+        self.handle.sendline( "\r" )
+        self.handle.expect( "\$" )
 
-    def tshark_stop(self):
-        '''
+    def tshark_stop( self ):
+        """
         Removes wireshark files from /tmp and kills all tshark processes
-        '''
-        #Remove all pcap from previous captures
-        self.execute(cmd="sudo rm /tmp/wireshark*")
-        self.handle.sendline("")
-        self.handle.sendline("sudo kill -9 `ps -ef | grep \"tshark -i\" |"+
-                " grep -v grep | awk '{print $2}'`")
-        self.handle.sendline("")
-        main.log.info("Tshark stopped")
+        """
+        # Remove all pcap from previous captures
+        self.execute( cmd="sudo rm /tmp/wireshark*" )
+        self.handle.sendline( "" )
+        self.handle.sendline( "sudo kill -9 `ps -ef | grep \"tshark -i\" |" +
+                              " grep -v grep | awk '{print $2}'`" )
+        self.handle.sendline( "" )
+        main.log.info( "Tshark stopped" )
 
-    def ptpd(self, args):
-        '''
+    def ptpd( self, args ):
+        """
         Initiate ptp with user-specified args.
         Required:
             * args: specify string of args after command
               'sudo ptpd'
-        '''
+        """
         try:
-            self.handle.sendline("sudo ptpd "+str(args))
-            i = self.handle.expect([
+            self.handle.sendline( "sudo ptpd " + str( args ) )
+            i = self.handle.expect( [
                 "Multiple",
                 "Error",
-                "\$"])
-            self.handle.expect("\$")
+                "\$" ] )
+            self.handle.expect( "\$" )
 
             if i == 0:
                 handle = self.handle.before
-                main.log.info("ptpd returned an error: "+
-                    str(handle))
+                main.log.info( "ptpd returned an error: " +
+                               str( handle ) )
                 return handle
             elif i == 1:
                 handle = self.handle.before
-                main.log.error("ptpd returned an error: "+
-                    str(handle))
+                main.log.error( "ptpd returned an error: " +
+                                str( handle ) )
                 return handle
             else:
                 return main.TRUE
-        
+
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
-    def cp_logs_to_dir(self, log_to_copy, 
-            dest_dir, copy_file_name=""):
-        '''
-        Copies logs to a desired directory. 
+    def cp_logs_to_dir( self, log_to_copy,
+                        dest_dir, copy_file_name="" ):
+        """
+        Copies logs to a desired directory.
         Current implementation of ONOS deletes its karaf
         logs on every iteration. For debugging purposes,
-        you may want to use this function to capture 
-        certain karaf logs. (or any other logs if needed)
+        you may want to use this function to capture
+        certain karaf logs. ( or any other logs if needed )
         Localtime will be attached to the filename
 
         Required:
             * log_to_copy: specify directory and log name to
               copy.
-              ex) /opt/onos/log/karaf.log.1
+              ex ) /opt/onos/log/karaf.log.1
               For copying multiple files, leave copy_file_name
-              empty and only specify dest_dir - 
-              ex) /opt/onos/log/karaf*
+              empty and only specify dest_dir -
+              ex ) /opt/onos/log/karaf*
             * dest_dir: specify directory to copy to.
-              ex) /tmp/
-        Optional:   
+              ex ) /tmp/
+        Optional:
             * copy_file_name: If you want to rename the log
               file, specify copy_file_name. This will not work
               with multiple file copying
-        '''
+        """
         try:
-            localtime = time.strftime('%x %X')
-            localtime = localtime.replace("/","")
-            localtime = localtime.replace(" ","_")
-            localtime = localtime.replace(":","")
-            if dest_dir[-1:] != "/":
+            localtime = time.strftime( '%x %X' )
+            localtime = localtime.replace( "/", "" )
+            localtime = localtime.replace( " ", "_" )
+            localtime = localtime.replace( ":", "" )
+            if dest_dir[ -1: ] != "/":
                 dest_dir += "/"
 
             if copy_file_name:
-                self.handle.sendline("cp "+str(log_to_copy)+
-                        " "+str(dest_dir)+str(copy_file_name)+
-                        localtime)
-                self.handle.expect("cp")
-                self.handle.expect("\$")
+                self.handle.sendline( "cp " + str( log_to_copy ) +
+                                      " " + str( dest_dir ) + str( copy_file_name ) +
+                                      localtime )
+                self.handle.expect( "cp" )
+                self.handle.expect( "\$" )
             else:
-                self.handle.sendline("cp "+str(log_to_copy)+
-                        " "+str(dest_dir))
-                self.handle.expect("cp")
-                self.handle.expect("\$")
-                
-            return self.handle.before
-        
-        except pexpect.EOF:
-            main.log.error("Copying files failed")
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
-        except:
-            main.log.error("Copying files failed")
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+                self.handle.sendline( "cp " + str( log_to_copy ) +
+                                      " " + str( dest_dir ) )
+                self.handle.expect( "cp" )
+                self.handle.expect( "\$" )
 
-    def check_logs(self, onos_ip):
-        '''
+            return self.handle.before
+
+        except pexpect.EOF:
+            main.log.error( "Copying files failed" )
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+        except:
+            main.log.error( "Copying files failed" )
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
+
+    def check_logs( self, onos_ip ):
+        """
         runs onos-check-logs on the given onos node
         returns the response
-        '''
+        """
         try:
-            cmd = "onos-check-logs " + str(onos_ip)
-            self.handle.sendline(cmd)
-            self.handle.expect(cmd)
-            self.handle.expect("\$")
+            cmd = "onos-check-logs " + str( onos_ip )
+            self.handle.sendline( cmd )
+            self.handle.expect( cmd )
+            self.handle.expect( "\$" )
             response = self.handle.before
             return response
         except pexpect.EOF:
-            main.log.error("Lost ssh connection")
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( "Lost ssh connection" )
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
         except:
-            main.log.error("Some error in check_logs:")
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.error( "Some error in check_logs:" )
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
 
-    def onos_status(self, node=""):
-        '''
+    def onos_status( self, node="" ):
+        """
         Calls onos command: 'onos-service [<node-ip>] status'
-        '''
-
+        """
         try:
-            self.handle.sendline("")
-            self.handle.expect("\$")
-            self.handle.sendline("onos-service "+str(node)+
-                " status")
-            i = self.handle.expect([
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
+            self.handle.sendline( "onos-service " + str( node ) +
+                                  " status" )
+            i = self.handle.expect( [
                 "start/running",
                 "stop/waiting",
-                pexpect.TIMEOUT],timeout=120)
+                pexpect.TIMEOUT ], timeout=120 )
 
             if i == 0:
-                main.log.info("ONOS is running")
+                main.log.info( "ONOS is running" )
                 return main.TRUE
             elif i == 1:
-                main.log.info("ONOS is stopped")
+                main.log.info( "ONOS is stopped" )
                 return main.FALSE
             else:
-                main.log.error("ONOS service failed to check the status")
+                main.log.error( "ONOS service failed to check the status" )
                 main.cleanup()
                 main.exit()
         except pexpect.EOF:
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":    " + self.handle.before)
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
             main.cleanup()
             main.exit()
         except:
-            main.log.info(self.name+" ::::::")
-            main.log.error( traceback.print_exc())
-            main.log.info(self.name+" ::::::")
+            main.log.info( self.name + " ::::::" )
+            main.log.error( traceback.print_exc() )
+            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
diff --git a/TestON/drivers/common/cli/quaggaclidriver.py.fixed b/TestON/drivers/common/cli/quaggaclidriver.py.fixed
new file mode 100644
index 0000000..09b7614
--- /dev/null
+++ b/TestON/drivers/common/cli/quaggaclidriver.py.fixed
@@ -0,0 +1,596 @@
+#!/usr/bin/env python
+
+import time
+import pexpect
+import struct
+import fcntl
+import os
+import sys
+import signal
+import sys
+import re
+import json
+sys.path.append( "../" )
+from drivers.common.clidriver import CLI
+
+
+class QuaggaCliDriver( CLI ):
+
+    def __init__( self ):
+        super( CLI, self ).__init__()
+
+    # TODO: simplify this method
+    def connect( self, **connectargs ):
+        for key in connectargs:
+            vars( self )[ key ] = connectargs[ key ]
+
+        self.name = self.options[ 'name' ]
+        # self.handle = super( QuaggaCliDriver,self ).connect(
+        # user_name=self.user_name, ip_address=self.ip_address,port=self.port,
+        # pwd=self.pwd )
+        self.handle = super(
+            QuaggaCliDriver,
+            self ).connect(
+                user_name=self.user_name,
+         ip_address="1.1.1.1",
+         port=self.port,
+         pwd=self.pwd )
+        main.log.info(
+            "connect parameters:" + str(
+                self.user_name ) + ";" + str(
+                    self.ip_address ) + ";" + str(
+                 self.port ) + ";" + str(
+                     self.pwd ) )
+
+        if self.handle:
+            # self.handle.expect( "",timeout=10 )
+            # self.handle.expect( "\$",timeout=10 )
+            self.handle.sendline( "telnet localhost 2605" )
+            # self.handle.expect( "Password:", timeout=5 )
+            self.handle.expect( "Password:" )
+            self.handle.sendline( "hello" )
+            # self.handle.expect( "bgpd", timeout=5 )
+            self.handle.expect( "bgpd" )
+            self.handle.sendline( "enable" )
+            # self.handle.expect( "bgpd#", timeout=5 )
+            self.handle.expect( "bgpd#" )
+            return self.handle
+        else:
+            main.log.info( "NO HANDLE" )
+            return main.FALSE
+
+    def loginQuagga( self, ip_address ):
+        self.name = self.options[ 'name' ]
+        self.handle = super( QuaggaCliDriver, self ).connect(
+            user_name=self.user_name, ip_address=ip_address,
+            port=self.port, pwd=self.pwd )
+        main.log.info( "connect parameters:" + str( self.user_name ) + ";"
+                       + str( self.ip_address ) + ";" + str( self.port ) + ";" + str( self.pwd ) )
+
+        if self.handle:
+            # self.handle.expect( "" )
+            # self.handle.expect( "\$" )
+            self.handle.sendline( "telnet localhost 2605" )
+            # self.handle.expect( "Password:", timeout=5 )
+            self.handle.expect( "Password:" )
+            self.handle.sendline( "hello" )
+            # self.handle.expect( "bgpd", timeout=5 )
+            self.handle.expect( "bgpd" )
+            self.handle.sendline( "enable" )
+            # self.handle.expect( "bgpd#", timeout=5 )
+            self.handle.expect( "bgpd#" )
+            main.log.info( "I in quagga on host " + str( ip_address ) )
+
+            return self.handle
+        else:
+            main.log.info( "NO HANDLE" )
+            return main.FALSE
+
+    def enter_config( self, asn ):
+        main.log.info( "I am in enter_config method!" )
+        try:
+            self.handle.sendline( "" )
+            self.handle.expect( "bgpd#" )
+        except:
+            main.log.warn( "Probably not currently in enable mode!" )
+            self.disconnect()
+            return main.FALSE
+        self.handle.sendline( "configure terminal" )
+        self.handle.expect( "config", timeout=5 )
+        routerAS = "router bgp " + str( asn )
+        try:
+            self.handle.sendline( routerAS )
+            self.handle.expect( "config-router", timeout=5 )
+            return main.TRUE
+        except:
+            return main.FALSE
+
+    def generate_prefixes( self, net, numRoutes ):
+        main.log.info( "I am in generate_prefixes method!" )
+
+        # each IP prefix will be composed by "net" + "." + m + "." + n + "." + x
+        # the length of each IP prefix is 24
+        routes = []
+        routes_gen = 0
+        m = numRoutes / 256
+        n = numRoutes % 256
+
+        for i in range( 0, m ):
+            for j in range( 0, 256 ):
+                network = str(
+                    net ) + "." + str(
+                        i ) + "." + str(
+                            j ) + ".0/24"
+                routes.append( network )
+                routes_gen = routes_gen + 1
+
+        for j in range( 0, n ):
+            network = str( net ) + "." + str( m ) + "." + str( j ) + ".0/24"
+            routes.append( network )
+            routes_gen = routes_gen + 1
+
+        if routes_gen == numRoutes:
+            main.log.info( "Successfully generated " + str( numRoutes )
+                           + " prefixes!" )
+            return routes
+        return main.FALSE
+
+    # This method generates a multiple to single point intent(
+    # MultiPointToSinglePointIntent ) for a given route
+    def generate_expected_singleRouteIntent(
+        self,
+     prefix,
+     nextHop,
+     nextHopMac,
+     sdnip_data ):
+
+        ingress = []
+        egress = ""
+        for peer in sdnip_data[ 'bgpPeers' ]:
+            if peer[ 'ipAddress' ] == nextHop:
+                egress = "of:" + str(
+                    peer[ 'attachmentDpid' ] ).replace( ":",
+                                                        "" ) + ":" + str( peer[ 'attachmentPort' ] )
+            else:
+                ingress.append(
+                    "of:" + str( peer[ 'attachmentDpid' ] ).replace( ":",
+                                                                     "" ) + ":" + str( peer[ 'attachmentPort' ] ) )
+
+        selector = "ETH_TYPE{ethType=800},IPV4_DST{ip=" + prefix + "}"
+        treatment = "[ETH_DST{mac=" + str( nextHopMac ) + "}]"
+
+        intent = egress + "/" + \
+            str( sorted( ingress ) ) + "/" + selector + "/" + treatment
+        return intent
+
+    def generate_expected_onePeerRouteIntents(
+        self,
+     prefixes,
+     nextHop,
+     nextHopMac,
+     sdnip_json_file_path ):
+        intents = []
+        sdnip_json_file = open( sdnip_json_file_path ).read()
+
+        sdnip_data = json.loads( sdnip_json_file )
+
+        for prefix in prefixes:
+            intents.append(
+                self.generate_expected_singleRouteIntent(
+                    prefix,
+                    nextHop,
+                    nextHopMac,
+                    sdnip_data ) )
+        return sorted( intents )
+
+    # TODO
+    # This method generates all expected route intents for all BGP peers
+    def generate_expected_routeIntents( self ):
+        intents = []
+        return intents
+
+    # This method extracts all actual routes from ONOS CLI
+    def extract_actual_routes( self, get_routes_result ):
+        routes_json_obj = json.loads( get_routes_result )
+
+        allRoutes_actual = []
+        for route in routes_json_obj:
+            if route[ 'prefix' ] == '172.16.10.0/24':
+                continue
+            allRoutes_actual.append(
+                route[ 'prefix' ] + "/" + route[ 'nextHop' ] )
+
+        return sorted( allRoutes_actual )
+
+    # This method extracts all actual route intents from ONOS CLI
+    def extract_actual_routeIntents( self, get_intents_result ):
+        intents = []
+        # TODO: delete the line below when change to Mininet demo script
+        # get_intents_result=open( "../tests/SdnIpTest/intents.json" ).read()
+        intents_json_obj = json.loads( get_intents_result )
+
+        for intent in intents_json_obj:
+            if intent[ 'appId' ] != "org.onosproject.sdnip":
+                continue
+            if intent[ 'type' ] == "MultiPointToSinglePointIntent" and intent[ 'state' ] == 'INSTALLED':
+                egress = str( intent[ 'egress' ][ 'device' ] ) + ":" + str(
+                    intent[ 'egress' ][ 'port' ] )
+                ingress = []
+                for attachmentPoint in intent[ 'ingress' ]:
+                    ingress.append(
+                        str( attachmentPoint[ 'device' ] ) + ":" + str( attachmentPoint[ 'port' ] ) )
+
+                selector = intent[ 'selector' ].replace(
+                    "[", "" ).replace( "]", "" ).replace( " ", "" )
+                if str( selector ).startswith( "IPV4" ):
+                    str1, str2 = str( selector ).split( "," )
+                    selector = str2 + "," + str1
+
+                intent = egress + "/" + \
+                    str( sorted( ingress ) ) + "/" + \
+                        selector + "/" + intent[ 'treatment' ]
+                intents.append( intent )
+        return sorted( intents )
+
+    # This method extracts all actual BGP intents from ONOS CLI
+    def extract_actual_bgpIntents( self, get_intents_result ):
+        intents = []
+        # TODO: delete the line below when change to Mininet demo script
+        # get_intents_result=open( "../tests/SdnIpTest/intents.json" ).read()
+        intents_json_obj = json.loads( get_intents_result )
+
+        for intent in intents_json_obj:
+            if intent[ 'appId' ] != "org.onosproject.sdnip":
+                continue
+            if intent[ 'type' ] == "PointToPointIntent" and "protocol=6" in str( intent[ 'selector' ] ):
+                ingress = str( intent[ 'ingress' ][ 'device' ] ) + ":" + str(
+                    intent[ 'ingress' ][ 'port' ] )
+                egress = str( intent[ 'egress' ][ 'device' ] ) + ":" + str(
+                    intent[ 'egress' ][ 'port' ] )
+                selector = str(
+                    intent[ 'selector' ] ).replace( " ",
+                                                    "" ).replace( "[",
+                                                                  "" ).replace( "]",
+                                                                                "" ).split( "," )
+                intent = ingress + "/" + egress + \
+                    "/" + str( sorted( selector ) )
+                intents.append( intent )
+
+        return sorted( intents )
+
+    # This method generates a single point to single point intent(
+    # PointToPointIntent ) for BGP path
+    def generate_expected_bgpIntents( self, sdnip_json_file_path ):
+        from operator import eq
+
+        sdnip_json_file = open( sdnip_json_file_path ).read()
+        sdnip_data = json.loads( sdnip_json_file )
+
+        intents = []
+        bgpPeerAttachmentPoint = ""
+        bgpSpeakerAttachmentPoint = "of:" + str(
+            sdnip_data[ 'bgpSpeakers' ][ 0 ][ 'attachmentDpid' ] ).replace( ":",
+                                                                            "" ) + ":" + str( sdnip_data[ 'bgpSpeakers' ][ 0 ][ 'attachmentPort' ] )
+        for peer in sdnip_data[ 'bgpPeers' ]:
+            bgpPeerAttachmentPoint = "of:" + str(
+                peer[ 'attachmentDpid' ] ).replace( ":",
+                                                    "" ) + ":" + str( peer[ 'attachmentPort' ] )
+            # find out the BGP speaker IP address for this BGP peer
+            bgpSpeakerIpAddress = ""
+            for interfaceAddress in sdnip_data[ 'bgpSpeakers' ][ 0 ][ 'interfaceAddresses' ]:
+                # if eq( interfaceAddress[ 'interfaceDpid' ],sdnip_data[
+                # 'bgpSpeakers' ][ 0 ][ 'attachmentDpid' ] ) and eq(
+                # interfaceAddress[ 'interfacePort' ], sdnip_data[
+                # 'bgpSpeakers' ][ 0 ][ 'attachmentPort' ] ):
+                if eq( interfaceAddress[ 'interfaceDpid' ], peer[ 'attachmentDpid' ] ) and eq( interfaceAddress[ 'interfacePort' ], peer[ 'attachmentPort' ] ):
+                    bgpSpeakerIpAddress = interfaceAddress[ 'ipAddress' ]
+                    break
+                else:
+                    continue
+
+            # from bgpSpeakerAttachmentPoint to bgpPeerAttachmentPoint
+            # direction
+            selector_str = "IPV4_SRC{ip=" + bgpSpeakerIpAddress + "/32}," + "IPV4_DST{ip=" + peer[
+                'ipAddress' ] + "/32}," + "IP_PROTO{protocol=6}, ETH_TYPE{ethType=800}, TCP_DST{tcpPort=179}"
+            selector = selector_str.replace( " ", "" ).replace(
+                "[", "" ).replace( "]", "" ).split( "," )
+            intent = bgpSpeakerAttachmentPoint + "/" + \
+                bgpPeerAttachmentPoint + "/" + str( sorted( selector ) )
+            intents.append( intent )
+
+            selector_str = "IPV4_SRC{ip=" + bgpSpeakerIpAddress + "/32}," + "IPV4_DST{ip=" + peer[
+                'ipAddress' ] + "/32}," + "IP_PROTO{protocol=6}, ETH_TYPE{ethType=800}, TCP_SRC{tcpPort=179}"
+            selector = selector_str.replace( " ", "" ).replace(
+                "[", "" ).replace( "]", "" ).split( "," )
+            intent = bgpSpeakerAttachmentPoint + "/" + \
+                bgpPeerAttachmentPoint + "/" + str( sorted( selector ) )
+            intents.append( intent )
+
+            # from bgpPeerAttachmentPoint to bgpSpeakerAttachmentPoint
+            # direction
+            selector_str = "IPV4_SRC{ip=" + peer[ 'ipAddress' ] + "/32}," + "IPV4_DST{ip=" + bgpSpeakerIpAddress + "/32}," + \
+                "IP_PROTO{protocol=6}, ETH_TYPE{ethType=800}, TCP_DST{tcpPort=179}"
+            selector = selector_str.replace( " ", "" ).replace(
+                "[", "" ).replace( "]", "" ).split( "," )
+            intent = bgpPeerAttachmentPoint + "/" + \
+                bgpSpeakerAttachmentPoint + "/" + str( sorted( selector ) )
+            intents.append( intent )
+
+            selector_str = "IPV4_SRC{ip=" + peer[ 'ipAddress' ] + "/32}," + "IPV4_DST{ip=" + bgpSpeakerIpAddress + "/32}," + \
+                "IP_PROTO{protocol=6}, ETH_TYPE{ethType=800}, TCP_SRC{tcpPort=179}"
+            selector = selector_str.replace( " ", "" ).replace(
+                "[", "" ).replace( "]", "" ).split( "," )
+            intent = bgpPeerAttachmentPoint + "/" + \
+                bgpSpeakerAttachmentPoint + "/" + str( sorted( selector ) )
+            intents.append( intent )
+
+        return sorted( intents )
+
+    def add_routes( self, routes, routeRate ):
+        main.log.info( "I am in add_routes method!" )
+
+        routes_added = 0
+        try:
+            self.handle.sendline( "" )
+            # self.handle.expect( "config-router" )
+            self.handle.expect( "config-router", timeout=5 )
+        except:
+            main.log.warn( "Probably not in config-router mode!" )
+            self.disconnect()
+        main.log.info( "Start to add routes" )
+
+        for i in range( 0, len( routes ) ):
+            routeCmd = "network " + routes[ i ]
+            try:
+                self.handle.sendline( routeCmd )
+                self.handle.expect( "bgpd", timeout=5 )
+            except:
+                main.log.warn( "Failed to add route" )
+                self.disconnect()
+            waitTimer = 1.00 / routeRate
+            time.sleep( waitTimer )
+        if routes_added == len( routes ):
+            main.log.info( "Finished adding routes" )
+            return main.TRUE
+        return main.FALSE
+
+    def delete_routes( self, routes, routeRate ):
+        main.log.info( "I am in delete_routes method!" )
+
+        routes_added = 0
+        try:
+            self.handle.sendline( "" )
+            # self.handle.expect( "config-router" )
+            self.handle.expect( "config-router", timeout=5 )
+        except:
+            main.log.warn( "Probably not in config-router mode!" )
+            self.disconnect()
+        main.log.info( "Start to delete routes" )
+
+        for i in range( 0, len( routes ) ):
+            routeCmd = "no network " + routes[ i ]
+            try:
+                self.handle.sendline( routeCmd )
+                self.handle.expect( "bgpd", timeout=5 )
+            except:
+                main.log.warn( "Failed to add route" )
+                self.disconnect()
+            waitTimer = 1.00 / routeRate
+            time.sleep( waitTimer )
+        if routes_added == len( routes ):
+            main.log.info( "Finished deleting routes" )
+            return main.TRUE
+        return main.FALSE
+
+    def ping_test( self, ip_address, ping_test_file, ping_test_result_file ):
+        main.log.info( "Start the ping test on host:" + str( ip_address ) )
+
+        self.name = self.options[ 'name' ]
+        self.handle = super( QuaggaCliDriver, self ).connect(
+            user_name=self.user_name, ip_address=ip_address,
+            port=self.port, pwd=self.pwd )
+        main.log.info( "connect parameters:" + str( self.user_name ) + ";"
+                       + str( self.ip_address ) + ";" + str( self.port ) + ";" + str( self.pwd ) )
+
+        if self.handle:
+            # self.handle.expect( "" )
+            # self.handle.expect( "\$" )
+            main.log.info( "I in host " + str( ip_address ) )
+            main.log.info(
+                ping_test_file +
+                " > " +
+                ping_test_result_file +
+                " &" )
+            self.handle.sendline(
+                ping_test_file +
+                " > " +
+                ping_test_result_file +
+                " &" )
+            self.handle.expect( "\$", timeout=60 )
+            handle = self.handle.before
+
+            return handle
+        else:
+            main.log.info( "NO HANDLE" )
+            return main.FALSE
+
+    # Please use the generate_routes plus add_routes instead of this one
+    def add_route( self, net, numRoutes, routeRate ):
+        try:
+            self.handle.sendline( "" )
+            self.handle.expect( "config-router" )
+        except:
+            main.log.warn( "Probably not in config-router mode!" )
+            self.disconnect()
+        main.log.info( "Adding Routes" )
+        j = 0
+        k = 0
+        while numRoutes > 255:
+            numRoutes = numRoutes - 255
+            j = j + 1
+        k = numRoutes % 254
+        routes_added = 0
+        if numRoutes > 255:
+            numRoutes = 255
+        for m in range( 1, j + 1 ):
+            for n in range( 1, numRoutes + 1 ):
+                network = str(
+                    net ) + "." + str(
+                        m ) + "." + str(
+                            n ) + ".0/24"
+                routeCmd = "network " + network
+                try:
+                    self.handle.sendline( routeCmd )
+                    self.handle.expect( "bgpd" )
+                except:
+                    main.log.warn( "failed to add route" )
+                    self.disconnect()
+                waitTimer = 1.00 / routeRate
+                time.sleep( waitTimer )
+                routes_added = routes_added + 1
+        for d in range( j + 1, j + 2 ):
+            for e in range( 1, k + 1 ):
+                network = str(
+                    net ) + "." + str(
+                        d ) + "." + str(
+                            e ) + ".0/24"
+                routeCmd = "network " + network
+                try:
+                    self.handle.sendline( routeCmd )
+                    self.handle.expect( "bgpd" )
+                except:
+                    main.log.warn( "failed to add route" )
+                    self.disconnect
+                waitTimer = 1.00 / routeRate
+                time.sleep( waitTimer )
+                routes_added = routes_added + 1
+        if routes_added == numRoutes:
+            return main.TRUE
+        return main.FALSE
+
+    def del_route( self, net, numRoutes, routeRate ):
+        try:
+            self.handle.sendline( "" )
+            self.handle.expect( "config-router" )
+        except:
+            main.log.warn( "Probably not in config-router mode!" )
+            self.disconnect()
+        main.log.info( "Deleting Routes" )
+        j = 0
+        k = 0
+        while numRoutes > 255:
+            numRoutes = numRoutes - 255
+            j = j + 1
+        k = numRoutes % 254
+        routes_deleted = 0
+        if numRoutes > 255:
+            numRoutes = 255
+        for m in range( 1, j + 1 ):
+            for n in range( 1, numRoutes + 1 ):
+                network = str(
+                    net ) + "." + str(
+                        m ) + "." + str(
+                            n ) + ".0/24"
+                routeCmd = "no network " + network
+                try:
+                    self.handle.sendline( routeCmd )
+                    self.handle.expect( "bgpd" )
+                except:
+                    main.log.warn( "Failed to delete route" )
+                    self.disconnect()
+                waitTimer = 1.00 / routeRate
+                time.sleep( waitTimer )
+                routes_deleted = routes_deleted + 1
+        for d in range( j + 1, j + 2 ):
+            for e in range( 1, k + 1 ):
+                network = str(
+                    net ) + "." + str(
+                        d ) + "." + str(
+                            e ) + ".0/24"
+                routeCmd = "no network " + network
+                try:
+                    self.handle.sendline( routeCmd )
+                    self.handle.expect( "bgpd" )
+                except:
+                    main.log.warn( "Failed to delete route" )
+                    self.disconnect()
+                waitTimer = 1.00 / routeRate
+                time.sleep( waitTimer )
+                routes_deleted = routes_deleted + 1
+        if routes_deleted == numRoutes:
+            return main.TRUE
+        return main.FALSE
+
+    def check_routes( self, brand, ip, user, pw ):
+        def pronto( ip, user, passwd ):
+            print "Connecting to Pronto switch"
+            child = pexpect.spawn( "telnet " + ip )
+            i = child.expect( [ "login:", "CLI#", pexpect.TIMEOUT ] )
+            if i == 0:
+                print "Username and password required. Passing login info."
+                child.sendline( user )
+                child.expect( "Password:" )
+                child.sendline( passwd )
+                child.expect( "CLI#" )
+            print "Logged in, getting flowtable."
+            child.sendline( "flowtable brief" )
+            for t in range( 9 ):
+                t2 = 9 - t
+                print "\r" + str( t2 )
+                sys.stdout.write( "\033[F" )
+                time.sleep( 1 )
+            print "Scanning flowtable"
+            child.expect( "Flow table show" )
+            count = 0
+            while True:
+                i = child.expect(
+                    [ '17\d\.\d{1,3}\.\d{1,3}\.\d{1,3}',
+                                'CLI#',
+                                pexpect.TIMEOUT ] )
+                if i == 0:
+                    count = count + 1
+                elif i == 1:
+                    print "Pronto flows: " + str( count ) + "\nDone\n"
+                    break
+                else:
+                    break
+
+        def cisco( ip, user, passwd ):
+            print "Establishing Cisco switch connection"
+            child = pexpect.spawn( "ssh " + user + "@" + ip )
+            i = child.expect( [ "Password:", "CLI#", pexpect.TIMEOUT ] )
+            if i == 0:
+                print "Password required. Passing now."
+                child.sendline( passwd )
+                child.expect( "#" )
+            print "Logged in. Retrieving flow table then counting flows."
+            child.sendline( "show openflow switch all flows all" )
+            child.expect( "Logical Openflow Switch" )
+            print "Flow table retrieved. Counting flows"
+            count = 0
+            while True:
+                i = child.expect( [ "nw_src=17", "#", pexpect.TIMEOUT ] )
+                if i == 0:
+                    count = count + 1
+                elif i == 1:
+                    print "Cisco flows: " + str( count ) + "\nDone\n"
+                    break
+                else:
+                    break
+            if brand == "pronto" or brand == "PRONTO":
+                pronto( ip, user, passwd )
+            # elif brand  == "cisco" or brand == "CISCO":
+            #    cisco( ip,user,passwd )
+
+    def disconnect( self ):
+        """
+        Called when Test is complete to disconnect the Quagga handle.
+        """
+        response = ''
+        try:
+            self.handle.close()
+        except:
+            main.log.error( "Connection failed to the host" )
+            response = main.FALSE
+        return response
+
diff --git a/TestON/drivers/common/cli/tool/dpctlclidriver.py b/TestON/drivers/common/cli/tool/dpctlclidriver.py
index 3ad5bba..252fb8c 100644
--- a/TestON/drivers/common/cli/tool/dpctlclidriver.py
+++ b/TestON/drivers/common/cli/tool/dpctlclidriver.py
@@ -1,14 +1,14 @@
 #/usr/bin/env python
-'''
+"""
 Created on 26-Nov-2012
-       
-@author: Raghav Kashyap(raghavkashyap@paxterrasolutions.com)
+
+author:: Raghav Kashyap( raghavkashyap@paxterrasolutions.com )
 
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 2 of the License, or
-    (at your option) any later version.
+    ( at your option ) any later version.
 
     TestON is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,14 +16,18 @@
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with TestON.  If not, see <http://www.gnu.org/licenses/>.		
+    along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 
 
 
 DPCTL driver class provides the basic functions of DPCTL controller
-'''
+"""
 import pexpect
-import struct, fcntl, os, sys, signal
+import struct
+import fcntl
+import os
+import sys
+import signal
 import sys
 from drivers.common.cli.toolsdriver import Tools
 import pydoc
@@ -32,214 +36,280 @@
 import os
 import sys
 
-class DpctlCliDriver(Tools):
-    '''
+
+class DpctlCliDriver( Tools ):
+
+    """
      DpctlCliDriver driver class provides the basic functions of DPCTL controller
-    '''
-    def __init__(self):
-        super(DpctlCliDriver, self).__init__()
+    """
+    def __init__( self ):
+        super( DpctlCliDriver, self ).__init__()
         self.handle = self
-        self.wrapped = sys.modules[__name__]
-    
-    def connect(self,**connectargs):
-        
+        self.wrapped = sys.modules[ __name__ ]
+
+    def connect( self, **connectargs ):
+
         for key in connectargs:
-            vars(self)[key] = connectargs[key]       
-        
-        self.name = self.options['name']
-        
-        self.handle = super(DpctlCliDriver, self).connect(user_name = self.user_name, ip_address = self.ip_address,port = None, pwd = self.pwd)
-        if self.handle :
-            main.log.info("Connected to the host")
-            return main.TRUE
-        else :
-            main.log.error("Connection failed to the host "+self.user_name+"@"+self.ip_address)
-            return main.FALSE 
+            vars( self )[ key ] = connectargs[ key ]
 
-    def addFlow(self,**flowParameters):
-        '''
+        self.name = self.options[ 'name' ]
+
+        self.handle = super( 
+		      DpctlCliDriver, self ).connect( user_name=self.user_name,
+         	      ip_address=self.ip_address,
+         	      port=None,
+         	      pwd=self.pwd )
+        if self.handle:
+            main.log.info( "Connected to the host" )
+            return main.TRUE
+        else:
+            main.log.error(
+                "Connection failed to the host " +
+                self.user_name +
+                "@" +
+                self.ip_address )
+            return main.FALSE
+
+    def addFlow( self, **flowParameters ):
+        """
          addFlow create a new flow entry into flow table using "dpctl"
-        '''
-        args = utilities.parse_args(["TCPIP","TCPPORT","INPORT","ACTION","TIMEOUT"],**flowParameters)
+        """
+        args = utilities.parse_args( [
+				     "TCPIP",
+                                     "TCPPORT",
+                                     "INPORT",
+                                     "ACTION",
+                                     "TIMEOUT" ],
+            			     **flowParameters )
+
         cmd = "dpctl add-flow tcp:"
-        tcpIP = args["TCPIP"] if args["TCPIP"] != None else "127.0.0.1"
-        tcpPort = args["TCPPORT"] if args["TCPPORT"] != None else "6634"
-        timeOut = args["TIMEOUT"] if args["TIMEOUT"] != None else 120
-        cmd = cmd + tcpIP + ":" + tcpPort + " in_port=" + str(args["INPORT"]) + ",idle_timeout=" + str(args["TIMEOUT"]) +",actions=" + args["ACTION"]   
-        response = self.execute(cmd=cmd,prompt="\~\$",timeout=60 )
-        if utilities.assert_matches(expect="openflow",actual=response,onpass="Flow Added Successfully",onfail="Adding Flow Failed!!!"):
+        tcpIP = args[ "TCPIP" ] if args[ "TCPIP" ] is not None else "127.0.0.1"
+        tcpPort = args[ "TCPPORT" ] if args[
+            "TCPPORT" ] is not None else "6634"
+        timeOut = args[ "TIMEOUT" ] if args[ "TIMEOUT" ] is not None else 120
+        cmd = cmd + tcpIP + ":" + tcpPort + " in_port=" + \
+            str( args[ "INPORT" ] ) + ",idle_timeout=" + str(
+                args[ "TIMEOUT" ] ) + ",actions=" + args[ "ACTION" ]
+        response = self.execute( cmd=cmd, prompt="\~\$", timeout=60 )
+        if utilities.assert_matches( expect="openflow", actual=response, onpass="Flow Added Successfully", onfail="Adding Flow Failed!!!" ):
             return main.TRUE
-        else :
+        else:
             return main.FALSE
 
-    def showFlow(self,**flowParameters):
-        '''
+    def showFlow( self, **flowParameters ):
+        """
          showFlow dumps the flow entries of flow table using "dpctl"
-        '''
-        args = utilities.parse_args(["TCPIP","TCPPORT"],**flowParameters)
-        tcpIP = args["TCPIP"] if args["TCPIP"] != None else "127.0.0.1"
-        tcpPort = args["TCPPORT"] if args["TCPPORT"] != None else "6634"
-        command = "dpctl show tcp:" + str(tcpIP) + ":" + str(tcpPort)
-        response = self.execute(cmd=command,prompt="get_config_reply",timeout=240)
-        if utilities.assert_matches(expect='features_reply',actual=response,onpass="Show flow executed",onfail="Show flow execution Failed"):
+        """
+        args = utilities.parse_args( [ "TCPIP", "TCPPORT" ], **flowParameters )
+        tcpIP = args[ "TCPIP" ] if args[ "TCPIP" ] is not None else "127.0.0.1"
+        tcpPort = args[ "TCPPORT" ] if args[
+            "TCPPORT" ] is not None else "6634"
+        command = "dpctl show tcp:" + str( tcpIP ) + ":" + str( tcpPort )
+        response = self.execute(
+            cmd=command,
+            prompt="get_config_reply",
+            timeout=240 )
+        if utilities.assert_matches( expect='features_reply', actual=response, onpass="Show flow executed", onfail="Show flow execution Failed" ):
             main.last_result = main.TRUE
             return main.TRUE
-        else :
+        else:
             main.last_result = main.FALSE
             return main.FALSE
 
-    def dumpFlow(self,**flowParameters):
-        '''
+    def dumpFlow( self, **flowParameters ):
+        """
          dumpFlow  gives installed flow information
-        '''
-        args = utilities.parse_args(["TCPIP","TCPPORT"],**flowParameters)
-        tcpIP = args["TCPIP"] if args["TCPIP"] != None else "127.0.0.1"
-        tcpPort = args["TCPPORT"] if args["TCPPORT"] != None else "6634"
-        command = "dpctl dump-flows tcp:" + str(tcpIP) + ":" + str(tcpPort)
-        response = self.execute(cmd=command,prompt="type=",timeout=240)
-        if utilities.assert_matches(expect='stats_reply',actual=response,onpass="Dump flow executed",onfail="Dump flow execution Failed"):
+        """
+        args = utilities.parse_args( [ "TCPIP", "TCPPORT" ], **flowParameters )
+        tcpIP = args[ "TCPIP" ] if args[ "TCPIP" ] is not None else "127.0.0.1"
+        tcpPort = args[ "TCPPORT" ] if args[
+            "TCPPORT" ] is not None else "6634"
+        command = "dpctl dump-flows tcp:" + str( tcpIP ) + ":" + str( tcpPort )
+        response = self.execute( cmd=command, prompt="type=", timeout=240 )
+        if utilities.assert_matches( expect='stats_reply', actual=response, onpass="Dump flow executed", onfail="Dump flow execution Failed" ):
             main.last_result = main.TRUE
             return main.TRUE
-        else :
+        else:
             main.last_result = main.FALSE
             return main.FALSE
 
-    
-    def dumpTables(self,**flowParameters):
-        '''
+    def dumpTables( self, **flowParameters ):
+        """
          dumpTables gives statistics for each of the flow tables used by datapath switch.
-        '''
-        args = utilities.parse_args(["TCPIP","TCPPORT"],**flowParameters)
-        tcpIP = args["TCPIP"] if args["TCPIP"] != None else "127.0.0.1"
-        tcpPort = args["TCPPORT"] if args["TCPPORT"] != None else "6634"
-        command = "dpctl dump-tables tcp:" + str(tcpIP) + ":" + str(tcpPort)
-        response = self.execute(cmd=command,prompt="matched",timeout=240)
-        if utilities.assert_matches(expect='lookup=3',actual=response,onpass="Dump Tables executed",onfail="Dump Tables execution Failed"):
+        """
+        args = utilities.parse_args( [ "TCPIP", "TCPPORT" ], **flowParameters )
+        tcpIP = args[ "TCPIP" ] if args[ "TCPIP" ] is not None else "127.0.0.1"
+        tcpPort = args[ "TCPPORT" ] if args[
+            "TCPPORT" ] is not None else "6634"
+        command = "dpctl dump-tables tcp:" + \
+            str( tcpIP ) + ":" + str( tcpPort )
+        response = self.execute( cmd=command, prompt="matched", timeout=240 )
+        if utilities.assert_matches( expect='lookup=3', actual=response, onpass="Dump Tables executed", onfail="Dump Tables execution Failed" ):
             main.last_result = main.TRUE
             return main.TRUE
-        else :
+        else:
             main.last_result = main.FALSE
             return main.FALSE
-         
-    def dumpPorts(self,**flowParameters):
-        '''
+
+    def dumpPorts( self, **flowParameters ):
+        """
          dumpPorts gives ports information
-        '''
-        args = utilities.parse_args(["TCPIP","TCPPORT"],**flowParameters)
-        tcpIP = args["TCPIP"] if args["TCPIP"] != None else "127.0.0.1"
-        tcpPort = args["TCPPORT"] if args["TCPPORT"] != None else "6634"
-        command = "dpctl dump-ports tcp:" + str(tcpIP) + ":" + str(tcpPort)
-        response = self.execute(cmd=command,prompt="rx pkts",timeout=240)
-        if utilities.assert_matches(expect='ports',actual=response,onpass="Dump Ports executed",onfail="Dump Ports execution Failed"):
+        """
+        args = utilities.parse_args( [ "TCPIP", "TCPPORT" ], **flowParameters )
+        tcpIP = args[ "TCPIP" ] if args[ "TCPIP" ] is not None else "127.0.0.1"
+        tcpPort = args[ "TCPPORT" ] if args[
+            "TCPPORT" ] is not None else "6634"
+        command = "dpctl dump-ports tcp:" + str( tcpIP ) + ":" + str( tcpPort )
+        response = self.execute( cmd=command, prompt="rx pkts", timeout=240 )
+        if utilities.assert_matches( expect='ports', actual=response, onpass="Dump Ports executed", onfail="Dump Ports execution Failed" ):
             main.last_result = main.TRUE
             return main.TRUE
-        else :
+        else:
             main.last_result = main.FALSE
             return main.FALSE
 
-
-    def dumpAggregate(self,**flowParameters):
-        '''
+    def dumpAggregate( self, **flowParameters ):
+        """
          dumpAggregate  gives installed flow information.ggregate statistics for flows in datapath WITCH's tables that match flows.
          If flows is omitted, the statistics are aggregated across all flows in the datapath's flow tables
-        '''
-        args = utilities.parse_args(["TCPIP","TCPPORT","FLOW"],**flowParameters)
-        tcpIP = args["TCPIP"] if args["TCPIP"] != None else "127.0.0.1"
-        tcpPort = args["TCPPORT"] if args["TCPPORT"] != None else "6634"
-        flow = args["FLOW"] if args["FLOW"] != None else ""
-        command = "dpctl dump-aggregate tcp:" + str(tcpIP) + ":" + str(tcpPort) + " " + str (flow)
-        response = self.execute(cmd=command,prompt="flow_count=",timeout=240)
-        if utilities.assert_matches(expect='stats_reply',actual=response,onpass="Dump Aggregate executed",onfail="Dump Aggregate execution Failed"):
+        """
+        args = utilities.parse_args(
+            [ "TCPIP", "TCPPORT", "FLOW" ], **flowParameters )
+        tcpIP = args[ "TCPIP" ] if args[ "TCPIP" ] is not None else "127.0.0.1"
+        tcpPort = args[ "TCPPORT" ] if args[
+            "TCPPORT" ] is not None else "6634"
+        flow = args[ "FLOW" ] if args[ "FLOW" ] is not None else ""
+        command = "dpctl dump-aggregate tcp:" + \
+            str( tcpIP ) + ":" + str( tcpPort ) + " " + str( flow )
+        response = self.execute(
+            cmd=command,
+            prompt="flow_count=",
+            timeout=240 )
+        if utilities.assert_matches( expect='stats_reply', actual=response, onpass="Dump Aggregate executed", onfail="Dump Aggregate execution Failed" ):
             main.last_result = main.TRUE
             return main.TRUE
-        else :
+        else:
             main.last_result = main.FALSE
             return main.FALSE
 
-    def delFlow(self,**flowParameters):
-        '''
+    def delFlow( self, **flowParameters ):
+        """
          delFlow Deletes entries from the datapath switch's tables that match flow
-        '''
-        args = utilities.parse_args(["TCPIP","TCPPORT","FLOW"],**flowParameters)
-        tcpIP = args["TCPIP"] if args["TCPIP"] != None else "127.0.0.1"
-        tcpPort = args["TCPPORT"] if args["TCPPORT"] != None else "6634"
-        flow = args["FLOW"] if args["FLOW"] != None else ""
-        command = "dpctl del-flows tcp:" + str(tcpIP) + ":" + str(tcpPort) + " " +str(flow)
-        response = self.execute(cmd=command,prompt="ETH-Tutorial",timeout=240)
-        if utilities.assert_matches(expect='@',actual=response,onpass="Delete flow executed",onfail="Delete flow execution Failed"):
+        """
+        args = utilities.parse_args(
+            [ "TCPIP", "TCPPORT", "FLOW" ], **flowParameters )
+        tcpIP = args[ "TCPIP" ] if args[ "TCPIP" ] is not None else "127.0.0.1"
+        tcpPort = args[ "TCPPORT" ] if args[
+            "TCPPORT" ] is not None else "6634"
+        flow = args[ "FLOW" ] if args[ "FLOW" ] is not None else ""
+        command = "dpctl del-flows tcp:" + \
+            str( tcpIP ) + ":" + str( tcpPort ) + " " + str( flow )
+        response = self.execute(
+            cmd=command,
+            prompt="ETH-Tutorial",
+            timeout=240 )
+        if utilities.assert_matches( expect='@', actual=response, onpass="Delete flow executed", onfail="Delete flow execution Failed" ):
             main.last_result = main.TRUE
             return main.TRUE
-        else :
+        else:
             main.last_result = main.FALSE
             return main.FALSE
 
-    def show(self,**flowParameters):
-        '''
+    def show( self, **flowParameters ):
+        """
          show gives information on datapath switch including information on its flow tables and ports.
-        '''
-        args = utilities.parse_args(["TCPIP","TCPPORT"],**flowParameters)
-        tcpIP = args["TCPIP"] if args["TCPIP"] != None else "127.0.0.1"
-        tcpPort = args["TCPPORT"] if args["TCPPORT"] != None else "6634"
-        command = "dpctl show tcp:" + str(tcpIP) + ":" + str(tcpPort)
-        response = self.execute(cmd=command,prompt="miss_send_len=",timeout=240)
-        if utilities.assert_matches(expect='get_config_reply',actual=response,onpass="show command executed",onfail="show command execution Failed"):
+        """
+        args = utilities.parse_args( [ "TCPIP", "TCPPORT" ], **flowParameters )
+        tcpIP = args[ "TCPIP" ] if args[ "TCPIP" ] is not None else "127.0.0.1"
+        tcpPort = args[ "TCPPORT" ] if args[
+            "TCPPORT" ] is not None else "6634"
+        command = "dpctl show tcp:" + str( tcpIP ) + ":" + str( tcpPort )
+        response = self.execute(
+            cmd=command,
+            prompt="miss_send_len=",
+            timeout=240 )
+        if utilities.assert_matches( expect='get_config_reply', actual=response, onpass="show command executed", onfail="show command execution Failed" ):
             main.last_result = main.TRUE
             return main.TRUE
-        else :
+        else:
             main.last_result = main.FALSE
             return main.FALSE
 
-    def showStatus(self,**flowParameters):
-        '''
-         showStatus gives a series of key-value pairs that report the status of switch. 
-         If key is specified, only the key-value pairs whose key names begin with key are printed. 
-        '''
-        args = utilities.parse_args(["TCPIP","TCPPORT","KEY"],**flowParameters)
-        tcpIP = args["TCPIP"] if args["TCPIP"] != None else "127.0.0.1"
-        tcpPort = args["TCPPORT"] if args["TCPPORT"] != None else "6634"
-        key = args["KEY"] if args["KEY"] != None else ""
-        command = "dpctl status tcp:" + str(tcpIP) + ":" + str(tcpPort) + " " + key
-        response = self.execute(cmd=command,prompt="(.*)",timeout=240)
-        if utilities.assert_matches(expect='(.*)',actual=response,onpass="show command executed",onfail="show command execution Failed"):
+    def showStatus( self, **flowParameters ):
+        """
+         showStatus gives a series of key-value pairs that report the status of switch.
+         If key is specified, only the key-value pairs whose key names begin with key are printed.
+        """
+        args = utilities.parse_args(
+            [ "TCPIP", "TCPPORT", "KEY" ], **flowParameters )
+        tcpIP = args[ "TCPIP" ] if args[ "TCPIP" ] is not None else "127.0.0.1"
+        tcpPort = args[ "TCPPORT" ] if args[
+            "TCPPORT" ] is not None else "6634"
+        key = args[ "KEY" ] if args[ "KEY" ] is not None else ""
+        command = "dpctl status tcp:" + \
+            str( tcpIP ) + ":" + str( tcpPort ) + " " + key
+        response = self.execute( cmd=command, prompt="(.*)", timeout=240 )
+        if utilities.assert_matches( expect='(.*)', actual=response, onpass="show command executed", onfail="show command execution Failed" ):
             main.last_result = main.TRUE
             return main.TRUE
-        else :
+        else:
             main.last_result = main.FALSE
             return main.FALSE
 
-    def desc_set(self,**flowParameters):
-        '''
-         desc_set Sets the switch description (as returned in ofp_desc_stats) to string (max length is DESC_STR_LEN)
-        '''
-        args = utilities.parse_args(["TCPIP","TCPPORT","STRING"],**flowParameters)
-        tcpIP = args["TCPIP"] if args["TCPIP"] != None else "127.0.0.1"
-        tcpPort = args["TCPPORT"] if args["TCPPORT"] != None else "6634"
-        string = " " + args["STRING"] if args["STRING"] != None else " DESC_STR_LEN"
-        command = "dpctl desc tcp:" + str(tcpIP) + ":" + str(tcpPort) + str(string)
-        response = self.execute(cmd=command,prompt="ETH-Tutorial",timeout=240)
-        if utilities.assert_matches(expect='@',actual=response,onpass="desc command executed",onfail="desc command execution Failed"):
+    def desc_set( self, **flowParameters ):
+        """
+         desc_set Sets the switch description ( as returned in ofp_desc_stats ) to string ( max length is DESC_STR_LEN )
+        """
+        args = utilities.parse_args( [
+				     "TCPIP",
+                                     "TCPPORT",
+                                     "STRING" ],
+           			     **flowParameters )
+
+        tcpIP = args[ "TCPIP" ] if args[ "TCPIP" ] is not None else "127.0.0.1"
+        tcpPort = args[ "TCPPORT" ] if args[
+            "TCPPORT" ] is not None else "6634"
+        string = " " + args[ "STRING" ] if args[
+            "STRING" ] is not None else " DESC_STR_LEN"
+        command = "dpctl desc tcp:" + \
+            str( tcpIP ) + ":" + str( tcpPort ) + str( string )
+        response = self.execute(
+            cmd=command,
+            prompt="ETH-Tutorial",
+            timeout=240 )
+        if utilities.assert_matches( expect='@', actual=response, onpass="desc command executed", onfail="desc command execution Failed" ):
             main.last_result = main.TRUE
             return main.TRUE
-        else :
+        else:
             main.last_result = main.FALSE
             return main.FALSE
 
-    def dumpDesc(self,**flowParameters):
-        '''
-         dumpDesc Sets the switch description (as returned in ofp_desc_stats) to string (max length is DESC_STR_LEN)
-        '''
-        args = utilities.parse_args(["TCPIP","TCPPORT","STRING"],**flowParameters)
-        tcpIP = args["TCPIP"] if args["TCPIP"] != None else "127.0.0.1"
-        tcpPort = args["TCPPORT"] if args["TCPPORT"] != None else "6634"
-        command = "dpctl dump-desc tcp:" + str(tcpIP) + ":" + str(tcpPort) 
-        response = self.execute(cmd=command,prompt="Serial Num:",timeout=240)
-        if utilities.assert_matches(expect='stats_reply',actual=response,onpass="desc command executed",onfail="desc command execution Failed"):
+    def dumpDesc( self, **flowParameters ):
+        """
+         dumpDesc Sets the switch description ( as returned in ofp_desc_stats ) to string ( max length is DESC_STR_LEN )
+        """
+        args = utilities.parse_args( [
+				     "TCPIP",
+                                     "TCPPORT",
+                                     "STRING" ],
+            			     **flowParameters )
+
+        tcpIP = args[ "TCPIP" ] if args[ "TCPIP" ] is not None else "127.0.0.1"
+        tcpPort = args[ "TCPPORT" ] if args[
+            "TCPPORT" ] is not None else "6634"
+        command = "dpctl dump-desc tcp:" + str( tcpIP ) + ":" + str( tcpPort )
+        response = self.execute(
+            cmd=command,
+            prompt="Serial Num:",
+            timeout=240 )
+        if utilities.assert_matches( expect='stats_reply', actual=response, onpass="desc command executed", onfail="desc command execution Failed" ):
             main.last_result = main.TRUE
             return main.TRUE
-        else :
+        else:
             main.last_result = main.FALSE
             return main.FALSE
 
 if __name__ != "__main__":
     import sys
-    sys.modules[__name__] = DpctlCliDriver()
+    sys.modules[ __name__ ] = DpctlCliDriver()
+
diff --git a/TestON/drivers/common/clidriver.py b/TestON/drivers/common/clidriver.py
index 878839e..55ff522 100644
--- a/TestON/drivers/common/clidriver.py
+++ b/TestON/drivers/common/clidriver.py
@@ -1,15 +1,15 @@
 #!/usr/bin/env python
-'''
+"""
 Created on 24-Oct-2012
-    
-@authors: Anil Kumar (anilkumar.s@paxterrasolutions.com),
-          Raghav Kashyap(raghavkashyap@paxterrasolutions.com)
+
+author:s: Anil Kumar ( anilkumar.s@paxterrasolutions.com ),
+          Raghav Kashyap( raghavkashyap@paxterrasolutions.com )
 
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 2 of the License, or
-    (at your option) any later version.
+    ( at your option ) any later version.
 
     TestON is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,78 +17,117 @@
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with TestON.  If not, see <http://www.gnu.org/licenses/>.		
+    along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 
 
-          
-'''
+
+"""
 import pexpect
-import struct, fcntl, os, sys, signal
-import sys, re
-sys.path.append("../")
+import struct
+import fcntl
+import os
+import sys
+import signal
+import sys
+import re
+sys.path.append( "../" )
 
 from drivers.component import Component
-class CLI(Component):
-    '''
+
+
+class CLI( Component ):
+
+    """
         This will define common functions for CLI included.
-    '''
-    def __init__(self):
-        super(Component, self).__init__()
-        
-    def connect(self,**connectargs):
-        '''
+    """
+    def __init__( self ):
+        super( Component, self ).__init__()
+
+    def connect( self, **connectargs ):
+        """
            Connection will establish to the remote host using ssh.
            It will take user_name ,ip_address and password as arguments<br>
-           and will return the handle. 
-        '''
+           and will return the handle.
+        """
         for key in connectargs:
-            vars(self)[key] = connectargs[key]
+            vars( self )[ key ] = connectargs[ key ]
 
-        connect_result = super(CLI, self).connect()
+        connect_result = super( CLI, self ).connect()
         ssh_newkey = 'Are you sure you want to continue connecting'
-        refused = "ssh: connect to host "+self.ip_address+" port 22: Connection refused"
+        refused = "ssh: connect to host " + \
+            self.ip_address + " port 22: Connection refused"
         if self.port:
-            self.handle =pexpect.spawn('ssh -p '+self.port+' '+self.user_name+'@'+self.ip_address, env = {"TERM": "vt100"} , maxread=50000)
-        else :
-            self.handle =pexpect.spawn('ssh -X '+self.user_name+'@'+self.ip_address,maxread=1000000,timeout=60)
+            self.handle = pexpect.spawn(
+                'ssh -p ' +
+                self.port +
+                ' ' +
+                self.user_name +
+                '@' +
+                self.ip_address,
+                env={
+                    "TERM": "vt100" },
+                maxread=50000 )
+        else:
+            self.handle = pexpect.spawn(
+                'ssh -X ' +
+                self.user_name +
+                '@' +
+                self.ip_address,
+                maxread=1000000,
+                timeout=60 )
 
         self.handle.logfile = self.logfile_handler
-	i = 5
-	while i == 5:
-	    i=self.handle.expect([ssh_newkey,'password:',pexpect.EOF,pexpect.TIMEOUT,refused,'teston>','>|#|\$'],120)
-	    if i==0:
-	        main.log.info("ssh key confirmation received, send yes")
-	        self.handle.sendline('yes')
-	        i=self.handle.expect([ssh_newkey,'password:',pexpect.EOF])
-	    if i==1:
-	        main.log.info("ssh connection asked for password, gave password")
-	        self.handle.sendline(self.pwd)
-	        self.handle.expect('>|#|\$')
-	    elif i==2:
-	        main.log.error("Connection timeout")
-	        return main.FALSE
-	    elif i==3: #timeout
-	        main.log.error("No route to the Host "+self.user_name+"@"+self.ip_address)
-	        return main.FALSE
-	    elif i==4:
-	        main.log.error("ssh: connect to host "+self.ip_address+" port 22: Connection refused")
-	        return main.FALSE
-	    elif i==6:
-	        main.log.info("Password not required logged in")
+        i = 5
+        while i == 5:
+            i = self.handle.expect( [
+				    ssh_newkey,
+                                    'password:',
+                                    pexpect.EOF,
+                                    pexpect.TIMEOUT,
+                                    refused,
+                                    'teston>',
+                                    '>|#|\$' ],
+                		    120 )
+            if i == 0:
+                main.log.info( "ssh key confirmation received, send yes" )
+                self.handle.sendline( 'yes' )
+                i = self.handle.expect(
+                    [ ssh_newkey, 'password:', pexpect.EOF ] )
+            if i == 1:
+                main.log.info(
+                    "ssh connection asked for password, gave password" )
+                self.handle.sendline( self.pwd )
+                self.handle.expect( '>|#|\$' )
+            elif i == 2:
+                main.log.error( "Connection timeout" )
+                return main.FALSE
+            elif i == 3:  # timeout
+                main.log.error(
+                    "No route to the Host " +
+                    self.user_name +
+                    "@" +
+                    self.ip_address )
+                return main.FALSE
+            elif i == 4:
+                main.log.error(
+                    "ssh: connect to host " +
+                    self.ip_address +
+                    " port 22: Connection refused" )
+                return main.FALSE
+            elif i == 6:
+                main.log.info( "Password not required logged in" )
 
-        self.handle.sendline("")
-        self.handle.expect('>|#|\$')
+        self.handle.sendline( "" )
+        self.handle.expect( '>|#|\$' )
         return self.handle
 
-    
-    def disconnect(self):
-        result = super(CLI, self).disconnect(self)
+    def disconnect( self ):
+        result = super( CLI, self ).disconnect( self )
         result = main.TRUE
-        #self.execute(cmd="exit",timeout=120,prompt="(.*)")
-    
-    
-    def execute(self, **execparams):
-        '''
+        # self.execute( cmd="exit",timeout=120,prompt="(.*)" )
+
+    def execute( self, **execparams ):
+        """
         It facilitates the command line execution of a given command. It has arguments as :
         cmd => represents command to be executed,
         prompt => represents expect command prompt or output,
@@ -96,127 +135,171 @@
         more => to provide a key press if it is on.
 
         It will return output of command exection.
-        '''
-
-        result = super(CLI, self).execute(self)
+        """
+        result = super( CLI, self ).execute( self )
         defaultPrompt = '.*[$>\#]'
-        args = utilities.parse_args(["CMD", "TIMEOUT", "PROMPT", "MORE"], **execparams)
-        expectPrompt = args["PROMPT"] if args["PROMPT"] else defaultPrompt
+        args = utilities.parse_args( [
+				     "CMD",
+                                     "TIMEOUT",
+                                     "PROMPT",
+                                     "MORE" ],
+            			     **execparams )
+
+        expectPrompt = args[ "PROMPT" ] if args[ "PROMPT" ] else defaultPrompt
         self.LASTRSP = ""
-        timeoutVar = args["TIMEOUT"] if args["TIMEOUT"] else 10
+        timeoutVar = args[ "TIMEOUT" ] if args[ "TIMEOUT" ] else 10
         cmd = ''
-        if args["CMD"]:
-            cmd = args["CMD"]
-        else :
+        if args[ "CMD" ]:
+            cmd = args[ "CMD" ]
+        else:
             return 0
-        if args["MORE"] == None:
-            args["MORE"] = " "
-        self.handle.sendline(cmd)
+        if args[ "MORE" ] is None:
+            args[ "MORE" ] = " "
+        self.handle.sendline( cmd )
         self.lastCommand = cmd
-        index = self.handle.expect([expectPrompt, "--More--", 'Command not found.', pexpect.TIMEOUT,"^:$"], timeout = timeoutVar)
+        index = self.handle.expect( [
+				    expectPrompt,
+                                    "--More--",
+                                    'Command not found.',
+                                    pexpect.TIMEOUT,
+                                    "^:$" ],
+            			    timeout=timeoutVar )
         if index == 0:
-            self.LASTRSP = self.LASTRSP + self.handle.before + self.handle.after
-            main.log.info("Executed :"+str(cmd)+" \t\t Expected Prompt '"+ str(expectPrompt)+"' Found")
+            self.LASTRSP = self.LASTRSP + \
+                self.handle.before + self.handle.after
+            main.log.info(
+                "Executed :" + str(
+                    cmd ) + " \t\t Expected Prompt '" + str(
+                        expectPrompt) + "' Found" )
         elif index == 1:
             self.LASTRSP = self.LASTRSP + self.handle.before
-            self.handle.send(args["MORE"])
-            main.log.info("Found More screen to go , Sending a key to proceed")
-            indexMore = self.handle.expect(["--More--", expectPrompt], timeout = timeoutVar)
+            self.handle.send( args[ "MORE" ] )
+            main.log.info(
+                "Found More screen to go , Sending a key to proceed" )
+            indexMore = self.handle.expect(
+                [ "--More--", expectPrompt ], timeout=timeoutVar )
             while indexMore == 0:
-                main.log.info("Found anoother More screen to go , Sending a key to proceed")
-                self.handle.send(args["MORE"])
-                indexMore = self.handle.expect(["--More--", expectPrompt], timeout = timeoutVar)
+                main.log.info(
+                    "Found anoother More screen to go , Sending a key to proceed" )
+                self.handle.send( args[ "MORE" ] )
+                indexMore = self.handle.expect(
+                    [ "--More--", expectPrompt ], timeout=timeoutVar )
                 self.LASTRSP = self.LASTRSP + self.handle.before
-        elif index ==2:
-            main.log.error("Command not found")
+        elif index == 2:
+            main.log.error( "Command not found" )
             self.LASTRSP = self.LASTRSP + self.handle.before
-        elif index ==3:
-            main.log.error("Expected Prompt not found , Time Out!!") 
-            main.log.error( expectPrompt ) 
+        elif index == 3:
+            main.log.error( "Expected Prompt not found , Time Out!!" )
+            main.log.error( expectPrompt )
             return "Expected Prompt not found , Time Out!!"
-        
+
         elif index == 4:
             self.LASTRSP = self.LASTRSP + self.handle.before
-            #self.handle.send(args["MORE"])
-            self.handle.sendcontrol("D")
-            main.log.info("Found More screen to go , Sending a key to proceed")
-            indexMore = self.handle.expect(["^:$", expectPrompt], timeout = timeoutVar)
+            # self.handle.send( args[ "MORE" ] )
+            self.handle.sendcontrol( "D" )
+            main.log.info(
+                "Found More screen to go , Sending a key to proceed" )
+            indexMore = self.handle.expect(
+                [ "^:$", expectPrompt ], timeout=timeoutVar )
             while indexMore == 0:
-                main.log.info("Found another More screen to go , Sending a key to proceed")
-                self.handle.sendcontrol("D")
-                indexMore = self.handle.expect(["^:$", expectPrompt], timeout = timeoutVar)
+                main.log.info(
+                    "Found another More screen to go , Sending a key to proceed" )
+                self.handle.sendcontrol( "D" )
+                indexMore = self.handle.expect(
+                    [ "^:$", expectPrompt ], timeout=timeoutVar )
                 self.LASTRSP = self.LASTRSP + self.handle.before
-        
-        main.last_response = self.remove_contol_chars(self.LASTRSP)
+
+        main.last_response = self.remove_contol_chars( self.LASTRSP )
         return self.LASTRSP
-    
-    def remove_contol_chars(self,response):
-        #RE_XML_ILLEGAL = '([\u0000-\u0008\u000b-\u000c\u000e-\u001f\ufffe-\uffff])|([%s-%s][^%s-%s])|([^%s-%s][%s-%s])|([%s-%s]$)|(^[%s-%s])'%(unichr(0xd800),unichr(0xdbff),unichr(0xdc00),unichr(0xdfff),unichr(0xd800),unichr(0xdbff),unichr(0xdc00),unichr(0xdfff),unichr(0xd800),unichr(0xdbff),unichr(0xdc00),unichr(0xdfff))  
-        #response = re.sub(RE_XML_ILLEGAL, "\n", response) 
-        response = re.sub(r"[\x01-\x1F\x7F]", "", response)
-        #response = re.sub(r"\[\d+\;1H", "\n", response)
-        response = re.sub(r"\[\d+\;\d+H", "", response)
+
+    def remove_contol_chars( self, response ):
+        # RE_XML_ILLEGAL = '([\u0000-\u0008\u000b-\u000c\u000e-\u001f\ufffe-\uffff])|([%s-%s][^%s-%s])|([^%s-%s][%s-%s])|([%s-%s]$)|(^[%s-%s])'%( unichr( 0xd800 ),unichr( 0xdbff ),unichr( 0xdc00 ),unichr( 0xdfff ),unichr( 0xd800 ),unichr( 0xdbff ),unichr( 0xdc00 ),unichr( 0xdfff ),unichr( 0xd800 ),unichr( 0xdbff ),unichr( 0xdc00 ),unichr( 0xdfff ) )
+        # response = re.sub( RE_XML_ILLEGAL, "\n", response )
+        response = re.sub( r"[\x01-\x1F\x7F]", "", response )
+        # response = re.sub( r"\[\d+\;1H", "\n", response )
+        response = re.sub( r"\[\d+\;\d+H", "", response )
         return response
-        
-    def runAsSudoUser(self,handle,pwd,default):
-        
-        i = handle.expect([".ssword:*",default, pexpect.EOF])
-        if i==0:
-            handle.sendline(pwd)
-            handle.sendline("\r")
 
-        if i==1:
-            handle.expect(default)
-        
-        if i==2:
-            main.log.error("Unable to run as Sudo user")
-            
+    def runAsSudoUser( self, handle, pwd, default ):
+
+        i = handle.expect( [ ".ssword:*", default, pexpect.EOF ] )
+        if i == 0:
+            handle.sendline( pwd )
+            handle.sendline( "\r" )
+
+        if i == 1:
+            handle.expect( default )
+
+        if i == 2:
+            main.log.error( "Unable to run as Sudo user" )
+
         return handle
-        
-    def onfail(self):
-        if main.componentDictionary[self.name].has_key('onfail'):
-            commandList = main.componentDictionary[self.name]['onfail'].split(",")
-            for command in commandList :
-                response = self.execute(cmd=command,prompt="(.*)",timeout=120)
 
-    def secureCopy(self,user_name, ip_address,filepath, pwd,dst_path):
-        
-        #scp openflow@192.168.56.101:/home/openflow/sample /home/paxterra/Desktop/
+    def onfail( self ):
+        if 'onfail' in main.componentDictionary[ self.name ]:
+            commandList = main.componentDictionary[
+                self.name ][ 'onfail' ].split( "," )
+            for command in commandList:
+                response = self.execute(
+                    cmd=command,
+                    prompt="(.*)",
+                    timeout=120 )
 
-        '''
+    def secureCopy( self, user_name, ip_address, filepath, pwd, dst_path ):
+
+        # scp openflow@192.168.56.101:/home/openflow/sample
+        # /home/paxterra/Desktop/
+        """
            Connection will establish to the remote host using ssh.
            It will take user_name ,ip_address and password as arguments<br>
-           and will return the handle. 
-        '''
+           and will return the handle.
+        """
         ssh_newkey = 'Are you sure you want to continue connecting'
-        refused = "ssh: connect to host "+ip_address+" port 22: Connection refused"
-        cmd = 'scp '+str(user_name)+'@'+str(ip_address)+':'+str(filepath)+' '+str(dst_path)
-        main.log.info("Sending: " + cmd )
-        self.handle =pexpect.spawn( cmd )
-        i=self.handle.expect([ssh_newkey,'password:',pexpect.EOF,pexpect.TIMEOUT,refused],120)
+        refused = "ssh: connect to host " + \
+            ip_address + " port 22: Connection refused"
         
-        if i==0:    
-            main.log.info("ssh key confirmation received, send yes")
-            self.handle.sendline('yes')
-            i=self.handle.expect([ssh_newkey,'password:',pexpect.EOF])
-        if i==1:
-            main.log.info("ssh connection asked for password, gave password")
-            self.handle.sendline(pwd)
-            #self.handle.expect(user_name)
-            
-        elif i==2:
-            main.log.error("Connection timeout")
+	cmd = 'scp ' + str( user_name ) + '@' + str( ip_address ) + ':' + \
+	      str( filepath ) + ' ' + str(dst_path )
+
+        main.log.info( "Sending: " + cmd )
+        self.handle = pexpect.spawn( cmd )
+        i = self.handle.expect( [
+				ssh_newkey,
+                              	'password:',
+                              	pexpect.EOF,
+                              	pexpect.TIMEOUT,
+                              	refused ],
+            			120 )
+
+        if i == 0:
+            main.log.info( "ssh key confirmation received, send yes" )
+            self.handle.sendline( 'yes' )
+            i = self.handle.expect( [ ssh_newkey, 'password:', pexpect.EOF ] )
+        if i == 1:
+            main.log.info( "ssh connection asked for password, gave password" )
+            self.handle.sendline( pwd )
+            # self.handle.expect( user_name )
+
+        elif i == 2:
+            main.log.error( "Connection timeout" )
             pass
-        elif i==3: #timeout
-            main.log.error("No route to the Host "+user_name+"@"+ip_address)
+        elif i == 3:  # timeout
+            main.log.error(
+                "No route to the Host " +
+                user_name +
+                "@" +
+                ip_address )
             return main.FALSE
-        elif i==4:
-            main.log.error("ssh: connect to host "+ip_address+" port 22: Connection refused")
+        elif i == 4:
+            main.log.error(
+                "ssh: connect to host " +
+                ip_address +
+                " port 22: Connection refused" )
             return main.FALSE
 
-        self.handle.sendline("")
-        self.handle.expect("$")
+        self.handle.sendline( "" )
+        self.handle.expect( "$" )
         print self.handle.before
-        
+
         return self.handle
-    
+
diff --git a/TestON/drivers/component.py.fixed b/TestON/drivers/component.py.fixed
new file mode 100644
index 0000000..1e87d03
--- /dev/null
+++ b/TestON/drivers/component.py.fixed
@@ -0,0 +1,121 @@
+#!/usr/bin/env python
+import logging
+"""
+Created on 24-Oct-2012
+
+author:s: Anil Kumar ( anilkumar.s@paxterrasolutions.com ),
+          Raghav Kashyap( raghavkashyap@paxterrasolutions.com )
+
+
+    TestON is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 2 of the License, or
+    ( at your option ) any later version.
+
+    TestON is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with TestON.  If not, see <http://www.gnu.org/licenses/>.
+
+
+
+"""
+import re
+from logging import Logger
+
+
+class Component( object ):
+
+    """
+    This is the tempalte class for components
+    """
+    def __init__( self ):
+        self.default = ''
+        self.wrapped = sys.modules[ __name__ ]
+
+    def __getattr__( self, name ):
+        """
+         This will invoke, if the attribute wasn't found the usual ways.
+          Here it will look for assert_attribute and will execute when AttributeError occurs.
+          It will return the result of the assert_attribute.
+        """
+        try:
+            return getattr( self.wrapped, name )
+        except AttributeError:
+            try:
+                def experimentHandling( **kwargs ):
+                    if main.EXPERIMENTAL_MODE == main.TRUE:
+                        result = self.experimentRun( **kwargs )
+                        main.log.info( "EXPERIMENTAL MODE. API " + str(
+                            name ) + " not yet implemented. Returning dummy values" )
+                        return result
+                    else:
+                        return main.FALSE
+                return experimentHandling
+            except TypeError as e:
+                main.log.error(
+                    "Arguments for experimental mode does not have key 'retruns'" +
+                    e )
+
+    def connect( self ):
+
+        vars( main )[ self.name + 'log' ] = logging.getLogger( self.name )
+
+        session_file = main.logdir + "/" + self.name + ".session"
+        self.log_handler = logging.FileHandler( session_file )
+        self.log_handler.setLevel( logging.DEBUG )
+
+        vars( main )[ self.name + 'log' ].setLevel( logging.DEBUG )
+        _formatter = logging.Formatter(
+            "%(asctime)s  %(name)-10s: %(levelname)-8s: %(message)s" )
+        self.log_handler.setFormatter( _formatter )
+        vars( main )[ self.name + 'log' ].addHandler( self.log_handler )
+        # Adding header for the component log
+        vars( main )[ self.name + 'log' ].info( main.logHeader )
+        # Opening the session log to append command's execution output
+        self.logfile_handler = open( session_file, "a" )
+
+        return "Dummy"
+
+    def execute( self, cmd ):
+        return main.TRUE
+        # import commands
+        # return commands.getoutput( cmd )
+
+    def disconnect( self ):
+        return main.TRUE
+
+    def config( self ):
+        self = self
+        # Need to update the configuration code
+
+    def cleanup( self ):
+        return main.TRUE
+
+    def log( self, message ):
+        """
+        Here finding the for the component to which the
+        log message based on the called child object.
+        """
+        vars( main )[ self.name + 'log' ].info( "\n" + message + "\n" )
+
+    def close_log_handles( self ):
+        vars( main )[ self.name + 'log' ].removeHandler( self.log_handler )
+        if self.logfile_handler:
+            self.logfile_handler.close()
+
+    def get_version( self ):
+        return "Version unknown"
+
+    def experimentRun( self, **kwargs ):
+        args = utilities.parse_args( [ "RETURNS" ], **kwargs )
+        return args[ "RETURNS" ]
+
+
+if __name__ != "__main__":
+    import sys
+    sys.modules[ __name__ ] = Component()
+
diff --git a/TestON/tests/OnosCHO/OnosCHO.params b/TestON/tests/OnosCHO/OnosCHO.params
index 7856a28..c0325a9 100644
--- a/TestON/tests/OnosCHO/OnosCHO.params
+++ b/TestON/tests/OnosCHO/OnosCHO.params
@@ -12,7 +12,7 @@
     # 10. Remove all intents on ONOS
     # 1,2,3,[4,5,6,5,7,8,5,10,5,9,5,7,8,5,10,5]*2
 
-    <testcases>1,2,3,9</testcases>
+    <testcases>1,2,3,[4,5,6,5,70,80,5,10,5,9,5,71,81,5,10,5]*100</testcases>
     <ENV>
         <cellName>choTest5</cellName>
     </ENV>
diff --git a/TestON/tests/OnosCHO/OnosCHO.py b/TestON/tests/OnosCHO/OnosCHO.py
index 3a838fa..228843e 100644
--- a/TestON/tests/OnosCHO/OnosCHO.py
+++ b/TestON/tests/OnosCHO/OnosCHO.py
@@ -6,7 +6,9 @@
 import json
 import itertools
 
+
 class OnosCHO:
+
     def __init__(self):
         self.default = ''
         global deviceDPIDs
@@ -16,6 +18,7 @@
         global devicePortsEnabledCount
         global installedIntents
         global randomLink1, randomLink2, randomLink3, numSwitches, numLinks
+
     def CASE1(self, main):
         '''
         Startup sequence:
@@ -109,12 +112,13 @@
 
         main.step("Start ONOS CLI on all nodes")
         cliResult = main.TRUE
+        karafTimeout = "3600000"
         time.sleep(15) # need to wait here for sometime. This will be removed once ONOS is stable enough
         for i in range(1,int(numCtrls)+1):
             ONOS_ip = main.params['CTRL']['ip'+str(i)]
             ONOScli = 'ONOScli'+str(i)
             main.log.info("ONOS Node "+ONOS_ip+" cli start:")
-            exec "startcli=main."+ONOScli+".start_onos_cli(ONOS_ip)"
+            exec "startcli=main."+ONOScli+".start_onos_cli(ONOS_ip, karafTimeout=karafTimeout)"
             utilities.assert_equals(expect=main.TRUE, actual=startcli,
                 onpass="Test step PASS",
                 onfail="Test step FAIL")
@@ -267,6 +271,7 @@
             ONOScli = 'ONOScli'+str(i)
             main.log.info("Enabling Reactive mode on ONOS Node "+ONOS_ip)
             exec "inResult=main."+ONOScli+".feature_install(onosFeature)"
+            time.sleep(3)
             installResult = inResult and installResult
 
         time.sleep(5)
@@ -388,9 +393,9 @@
                 onpass="Install 300 Host Intents and Ping All test PASS",
                 onfail="Install 300 Host Intents and Ping All test FAIL")
 
-    def CASE7(self,main):
+    def CASE70(self,main):
         '''
-        Randomly bring some core links down and verify ping all
+        Randomly bring some core links down and verify ping all (Host Intents Scenario)
         '''
         import random
         ONOS1_ip = main.params['CTRL']['ip1']
@@ -403,9 +408,9 @@
         switchLinksToToggle = main.params['CORELINKS']['toggleLinks']
         link_sleep = int(main.params['timers']['LinkDiscovery'])
 
-        main.log.report("Randomly bring some core links down and verify ping all")
-        main.log.report("____________________________________________________")        
-        main.case("Randomly bring some core links down and verify ping all")
+        main.log.report("Host intents - Randomly bring some core links down and verify ping all")
+        main.log.report("_________________________________________________________________")        
+        main.case("Host intents - Randomly bring some core links down and verify ping all")
         main.step("Verify number of Switch links to toggle on each Core Switch are between 1 - 5")
         if (int(switchLinksToToggle) == 0 or int(switchLinksToToggle) > 5):
             main.log.info("Please check you PARAMS file. Valid range for number of switch links to toggle is between 1 to 5")
@@ -446,9 +451,9 @@
                 onpass="Random Link cut Test PASS",
                 onfail="Random Link cut Test FAIL")
 
-    def CASE8(self,main):
+    def CASE80(self,main):
         '''
-        Bring the core links up that are down and verify ping all
+        Bring the core links up that are down and verify ping all (Host Intents Scenario)
         '''
         import random
         ONOS1_ip = main.params['CTRL']['ip1']
@@ -458,9 +463,9 @@
         link_sleep = int(main.params['timers']['LinkDiscovery'])
         switchLinksToToggle = main.params['CORELINKS']['toggleLinks']
 
-        main.log.report("Bring the core links up that are down and verify ping all")
-        main.log.report("_____________________________________________________")        
-        main.case("Bring the core links up that are down and verify ping all")
+        main.log.report("Host intents - Bring the core links up that are down and verify ping all")
+        main.log.report("__________________________________________________________________")        
+        main.case("Host intents - Bring the core links up that are down and verify ping all")
         main.step("Bring randomly cut links on Core devices up")
         for i in range(int(switchLinksToToggle)): 
             main.Mininet1.link(END1=link1End1,END2=randomLink1[i],OPTION="up")
@@ -490,6 +495,108 @@
                 onpass="Link Up Test PASS",
                 onfail="Link Up Test FAIL")    
 
+    def CASE71(self,main):
+        '''
+        Randomly bring some core links down and verify ping all (Point Intents Scenario)
+        '''
+        import random
+        ONOS1_ip = main.params['CTRL']['ip1']
+        link1End1 = main.params['CORELINKS']['linkS3a']
+        link1End2 = main.params['CORELINKS']['linkS3b'].split(',')
+        link2End1 = main.params['CORELINKS']['linkS14a']
+        link2End2 = main.params['CORELINKS']['linkS14b'].split(',')
+        link3End1 = main.params['CORELINKS']['linkS18a']
+        link3End2 = main.params['CORELINKS']['linkS18b'].split(',')
+        switchLinksToToggle = main.params['CORELINKS']['toggleLinks']
+        link_sleep = int(main.params['timers']['LinkDiscovery'])
+
+        main.log.report("Point Intents - Randomly bring some core links down and verify ping all")
+        main.log.report("__________________________________________________________________")        
+        main.case("Point Intents - Randomly bring some core links down and verify ping all")
+        main.step("Verify number of Switch links to toggle on each Core Switch are between 1 - 5")
+        if (int(switchLinksToToggle) == 0 or int(switchLinksToToggle) > 5):
+            main.log.info("Please check you PARAMS file. Valid range for number of switch links to toggle is between 1 to 5")
+            main.cleanup()
+            main.exit()
+        else:
+            main.log.info("User provided Core switch links range to toggle is correct, proceeding to run the test")
+
+        main.step("Cut links on Core devices using user provided range")
+        randomLink1 = random.sample(link1End2,int(switchLinksToToggle))
+        randomLink2 = random.sample(link2End2,int(switchLinksToToggle))
+        randomLink3 = random.sample(link3End2,int(switchLinksToToggle))
+        for i in range(int(switchLinksToToggle)):
+            main.Mininet1.link(END1=link1End1,END2=randomLink1[i],OPTION="down")
+            main.Mininet1.link(END1=link2End1,END2=randomLink2[i],OPTION="down")
+            main.Mininet1.link(END1=link3End1,END2=randomLink3[i],OPTION="down")
+        time.sleep(link_sleep)
+
+        topology_output = main.ONOScli2.topology()
+        linkDown = main.ONOSbench.check_status(topology_output,numSwitches,str(int(numLinks)-int(switchLinksToToggle)*6))
+        utilities.assert_equals(expect=main.TRUE,actual=linkDown,
+                onpass="Link Down discovered properly",
+                onfail="Link down was not discovered in "+ str(link_sleep) + " seconds")
+
+        main.step("Verify Ping across all hosts")
+        pingResultLinkDown = main.FALSE
+        time1 = time.time()
+        pingResultLinkDown = main.Mininet1.pingall()
+        time2 = time.time()
+        timeDiff = round((time2-time1),2)
+        main.log.report("Time taken for Ping All: "+str(timeDiff)+" seconds")
+        utilities.assert_equals(expect=main.TRUE, actual=pingResultLinkDown,
+                onpass="PING ALL PASS",
+                onfail="PING ALL FAIL")
+
+        caseResult7 = linkDown and pingResultLinkDown
+        utilities.assert_equals(expect=main.TRUE, actual=caseResult7,
+                onpass="Random Link cut Test PASS",
+                onfail="Random Link cut Test FAIL")
+
+    def CASE81(self,main):
+        '''
+        Bring the core links up that are down and verify ping all (Point Intents Scenario)
+        '''
+        import random
+        ONOS1_ip = main.params['CTRL']['ip1']
+        link1End1 = main.params['CORELINKS']['linkS3a']
+        link2End1 = main.params['CORELINKS']['linkS14a']
+        link3End1 = main.params['CORELINKS']['linkS18a']
+        link_sleep = int(main.params['timers']['LinkDiscovery'])
+        switchLinksToToggle = main.params['CORELINKS']['toggleLinks']
+
+        main.log.report("Point intents - Bring the core links up that are down and verify ping all")
+        main.log.report("___________________________________________________________________")        
+        main.case("Point intents - Bring the core links up that are down and verify ping all")
+        main.step("Bring randomly cut links on Core devices up")
+        for i in range(int(switchLinksToToggle)): 
+            main.Mininet1.link(END1=link1End1,END2=randomLink1[i],OPTION="up")
+            main.Mininet1.link(END1=link2End1,END2=randomLink2[i],OPTION="up")
+            main.Mininet1.link(END1=link3End1,END2=randomLink3[i],OPTION="up")
+        time.sleep(link_sleep)
+
+        topology_output = main.ONOScli2.topology()
+        linkUp = main.ONOSbench.check_status(topology_output,numSwitches,str(numLinks))
+        utilities.assert_equals(expect=main.TRUE,actual=linkUp,
+                onpass="Link up discovered properly",
+                onfail="Link up was not discovered in "+ str(link_sleep) + " seconds")
+
+        main.step("Verify Ping across all hosts")
+        pingResultLinkUp = main.FALSE
+        time1 = time.time()
+        pingResultLinkUp = main.Mininet1.pingall()
+        time2 = time.time()
+        timeDiff = round((time2-time1),2)
+        main.log.report("Time taken for Ping All: "+str(timeDiff)+" seconds")
+        utilities.assert_equals(expect=main.TRUE, actual=pingResultLinkUp,
+                onpass="PING ALL PASS",
+                onfail="PING ALL FAIL")
+
+        caseResult8 = linkUp and pingResultLinkUp
+        utilities.assert_equals(expect=main.TRUE, actual=caseResult8,
+                onpass="Link Up Test PASS",
+                onfail="Link Up Test FAIL")
+
     def CASE9(self):
         '''
         Install 114 point intents and verify Ping all works