[ONOS-7039] [ONOS-7044] Fix PEP8 Warnings in TestON

Change-Id: Ied79ff9caff5487a6df50466307f757468d7ca3a
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
index d058a85..499df34 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
@@ -1,5 +1,5 @@
 """
-Copyright 2015 Open Networking Foundation (ONF)
+Copyright 2015 Open Networking Foundation ( ONF )
 
 Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
 the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +8,7 @@
     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
@@ -18,8 +18,9 @@
     You should have received a copy of the GNU General Public License
     along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 """
-
 # Testing the functionality of SDN-IP with single ONOS instance
+
+
 class USECASE_SdnipFunctionCluster:
 
     def __init__( self ):
@@ -50,7 +51,7 @@
 
         # connect all switches to controllers
         swResult = main.TRUE
-        for i in range ( 1, int( main.params['config']['switchNum'] ) + 1 ):
+        for i in range( 1, int( main.params[ 'config' ][ 'switchNum' ] ) + 1 ):
             sw = "sw%s" % ( i )
             swResult = swResult and \
                        main.Mininet.assignSwController( sw, main.Cluster.getIps() )
@@ -61,7 +62,6 @@
         if not swResult:
             main.cleanAndExit()
 
-
     def CASE101( self, main ):
         """
            Package ONOS and install it
@@ -98,7 +98,7 @@
     def CASE200( self, main ):
         main.case( "Activate sdn-ip application" )
         main.log.info( "waiting link discovery......" )
-        time.sleep( int( main.params['timers']['TopoDiscovery'] ) )
+        time.sleep( int( main.params[ 'timers' ][ 'TopoDiscovery' ] ) )
 
         main.step( "Get links in the network" )
         summaryResult = main.Cluster.active( 0 ).CLI.summary()
@@ -106,7 +106,7 @@
         main.log.info( "Expected 100 links, actual number is: {}".format( linkNum ) )
         if linkNum < 100:
             main.log.error( "Link number is wrong! Retrying..." )
-            time.sleep( int( main.params['timers']['TopoDiscovery'] ) )
+            time.sleep( int( main.params[ 'timers' ][ 'TopoDiscovery' ] ) )
             summaryResult = main.Cluster.active( 0 ).CLI.summary()
             linkNum = json.loads( summaryResult )[ "links" ]
         main.log.info( "Expected 100 links, actual number is: {}".format( linkNum ) )
@@ -128,10 +128,10 @@
             main.cleanAndExit()
 
     def CASE102( self, main ):
-        '''
+        """
         This test case is to load the methods from other Python files, and create
         tunnels from mininet host to onos nodes.
-        '''
+        """
         import time
         main.case( "Load methods from other Python file and create tunnels" )
         # load the methods from other file
@@ -141,7 +141,7 @@
                                           wrapperFile1 +
                                           ".py" )
         # Create tunnels
-        for i in range ( main.Cluster.numCtrls ):
+        for i in range( main.Cluster.numCtrls ):
             main.Functions.setupTunnel( main,
                                         '1.1.1.' + str( ( i + 1 ) * 2 ),
                                         2000,
@@ -156,16 +156,15 @@
         time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
 
     def CASE1( self, main ):
-        '''
+        """
         ping test from 3 bgp peers to BGP speaker
-        '''
-
+        """
         main.case( "Ping between BGP peers and speakers" )
         main.Functions.pingSpeakerToPeer( main, speakers=[ "spk1" ],
                                           peers=[ "p64514", "p64515", "p64516" ],
                                           expectAllSuccess=True )
 
-        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk2" ],
                                           peers=[ p64514, p64515, p64516 ],
                                           expectAllSuccess=True )
 
@@ -178,15 +177,15 @@
                                           expectAllSuccess=True )
 
     def CASE2( self, main ):
-        '''
+        """
         point-to-point intents test for each BGP peer and BGP speaker pair
-        '''
+        """
         main.sdnBase.pToPIntentTest( 12 )
 
     def CASE3( self, main ):
-        '''
+        """
         routes and intents check to all BGP peers
-        '''
+        """
         import time
         main.case( "Check routes and M2S intents to all BGP peers" )
 
@@ -202,44 +201,43 @@
 
         main.sdnBase.routeAndIntentCheck( allRoutesExpected, 7 )
 
-
     def CASE4( self, main ):
-        '''
+        """
         Ping test in data plane for each route
-        '''
+        """
         main.case( "Ping test for each route, all hosts behind BGP peers" )
         main.Functions.pingHostToHost( main,
-                        hosts=["h64514", "h64515", "h64516"],
-                        expectAllSuccess=True )
-        main.Functions.pingHostToHost(main,
-                                      hosts=["h64517", "h64518"],
-                                      expectAllSuccess=True)
+                                       hosts=[ "h64514", "h64515", "h64516" ],
+                                       expectAllSuccess=True )
+        main.Functions.pingHostToHost( main,
+                                       hosts=[ "h64517", "h64518" ],
+                                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
                                        hosts=[ "h64519", "h64520" ],
                                        expectAllSuccess=True )
 
     def CASE5( self, main ):
-        '''
+        """
         Cut links to peers one by one, check routes/intents
-        '''
+        """
         main.sdnBase.linkUpDownCheck( "p64514", "p64515", "p64516",
                                       6, 6, 5, 5, 4, 4,
                                       "spk1", [ "h64514", "h64515", "h64516" ],
                                       "down" )
 
     def CASE6( self, main ):
-        '''
+        """
         Recover links to peers one by one, check routes/intents
-        '''
+        """
         main.sdnBase.linkUpDownCheck( "p64514", "p64515", "p64516",
                                       5, 5, 6, 6, 7, 7,
                                       "spk1", [ "h64514", "h64515", "h64516" ],
                                       "up" )
 
     def CASE7( self, main ):
-        '''
+        """
         Shut down a edge switch, check P-2-P and M-2-S intents, ping test
-        '''
+        """
         import time
         main.case( "Stop edge sw32,check P-2-P and M-2-S intents, ping test" )
         main.step( "Stop sw32" )
@@ -252,7 +250,7 @@
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 6 )
             main.Functions.checkM2SintentNum( main, 6 )
-            main.Functions.checkP2PintentNum( main, 48 ) #14 * 2
+            main.Functions.checkP2PintentNum( main, 48 )  # 14 * 2
         else:
             main.log.error( "Stopping switch failed!" )
             main.cleanAndExit()
@@ -268,7 +266,7 @@
                                  onpass="Ping test result is correct",
                                  onfail="Ping test result is wrong" )
 
-        if pingResult1 == False:
+        if not pingResult1:
             main.cleanAndExit()
 
         main.step( "Check ping between BGP peers and spk1" )
@@ -282,7 +280,7 @@
                                  onpass="Speaker1 ping peers successful",
                                  onfail="Speaker1 ping peers NOT successful" )
 
-        if pingResult2 == False:
+        if not pingResult2:
             main.cleanAndExit()
 
         main.step( "Check ping between BGP peers and spk2" )
@@ -297,13 +295,13 @@
                                  onpass="Speaker2 ping peers successful",
                                  onfail="Speaker2 ping peers NOT successful" )
 
-        if pingResult3 == False:
+        if not pingResult3:
             main.cleanAndExit()
 
         main.step( "Check whether all flow status are ADDED" )
         flowCheck = utilities.retry( main.Cluster.active( 0 ).CLI.checkFlowsState,
                                      main.FALSE,
-                                     kwargs={'isPENDING':False},
+                                     kwargs={ 'isPENDING': False },
                                      attempts=10 )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=flowCheck,
@@ -311,10 +309,10 @@
                                  onfail="Flow status is wrong!" )
 
     def CASE8( self, main ):
-        '''
-        Bring up the edge switch (sw32) which was shut down in CASE7,
+        """
+        Bring up the edge switch ( sw32 ) which was shut down in CASE7,
         check P-2-P and M-2-S intents, ping test
-        '''
+        """
         import time
         main.case( "Start the edge sw32, check P-2-P and M-2-S intents, ping test" )
         main.step( "Start sw32" )
@@ -334,7 +332,7 @@
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 7 )
             main.Functions.checkM2SintentNum( main, 7 )
-            main.Functions.checkP2PintentNum( main, 30 * 2 ) # 18*2
+            main.Functions.checkP2PintentNum( main, 30 * 2 )  # 18*2
         else:
             main.log.error( "Starting switch failed!" )
             main.cleanAndExit()
@@ -342,7 +340,7 @@
         main.step( "Check whether all flow status are ADDED" )
         flowCheck = utilities.retry( main.Cluster.active( 0 ).CLI.checkFlowsState,
                                      main.FALSE,
-                                     kwargs={'isPENDING':False},
+                                     kwargs={ 'isPENDING': False },
                                      attempts=10 )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=flowCheck,
@@ -351,7 +349,7 @@
 
         # Ping test
         main.Functions.pingSpeakerToPeer( main, speakers=[ "spk1" ],
-                                          peers=["p64514", "p64515", "p64516"],
+                                          peers=[ "p64514", "p64515", "p64516" ],
                                           expectAllSuccess=True )
 
         main.Functions.pingSpeakerToPeer( main, speakers=[ "spk2" ],
@@ -363,10 +361,10 @@
                                        expectAllSuccess=True )
 
     def CASE9( self, main ):
-        '''
+        """
         Bring down a switch in best path, check:
         route number, P2P intent number, M2S intent number, ping test
-        '''
+        """
         main.case( "Stop sw11 located in best path, \
         check route number, P2P intent number, M2S intent number, ping test" )
 
@@ -388,7 +386,7 @@
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 7 )
             main.Functions.checkM2SintentNum( main, 7 )
-            main.Functions.checkP2PintentNum( main, 30 * 2 ) #18 * 2
+            main.Functions.checkP2PintentNum( main, 30 * 2 )  # 18 * 2
         else:
             main.log.error( "Stopping switch failed!" )
             main.cleanAndExit()
@@ -396,29 +394,28 @@
         main.step( "Check whether all flow status are ADDED" )
         flowCheck = utilities.retry( main.Cluster.active( 0 ).CLI.checkFlowsState,
                                      main.FALSE,
-                                     kwargs={'isPENDING':False},
+                                     kwargs={ 'isPENDING': False },
                                      attempts=10 )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=flowCheck,
                                  onpass="Flow status is correct!",
                                  onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
-                       peers=["p64514", "p64515", "p64516"],
-                       expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
-                       peers=[p64514, p64515, p64516],
-                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk1" ],
+                                          peers=[ "p64514", "p64515", "p64516" ],
+                                          expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk2" ],
+                                          peers=[ p64514, p64515, p64516 ],
+                                          expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["h64514", "h64515", "h64516"],
-                        expectAllSuccess=True )
-
+                                       hosts=[ "h64514", "h64515", "h64516" ],
+                                       expectAllSuccess=True )
 
     def CASE10( self, main ):
-        '''
+        """
         Bring up the switch which was stopped in CASE9, check:
         route number, P2P intent number, M2S intent number, ping test
-        '''
+        """
         main.case( "Start sw11 which was stopped in CASE9, \
         check route number, P2P intent number, M2S intent number, ping test" )
 
@@ -453,25 +450,24 @@
         main.step( "Check whether all flow status are ADDED" )
         flowCheck = utilities.retry( main.Cluster.active( 0 ).CLI.checkFlowsState,
                                      main.FALSE,
-                                     kwargs={'isPENDING':False},
+                                     kwargs={ 'isPENDING': False },
                                      attempts=10 )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=flowCheck,
                                  onpass="Flow status is correct!",
                                  onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
-                       peers=["p64514", "p64515", "p64516"],
-                       expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
-                       peers=[p64514, p64515, p64516],
-                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk1" ],
+                                          peers=[ "p64514", "p64515", "p64516" ],
+                                          expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk2" ],
+                                          peers=[ p64514, p64515, p64516 ],
+                                          expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["h64514", "h64515", "h64516"],
-                        expectAllSuccess=True )
+                                       hosts=[ "h64514", "h64515", "h64516" ],
+                                       expectAllSuccess=True )
 
-
-    def CASE11(self, main):
+    def CASE11( self, main ):
         import time
         main.case( "Kill spk1, check:\
         route number, P2P intent number, M2S intent number, ping test" )
@@ -482,22 +478,22 @@
         main.step( "Check whether all flow status are ADDED" )
         flowCheck = utilities.retry( main.Cluster.active( 0 ).CLI.checkFlowsState,
                                      main.FALSE,
-                                     kwargs={'isPENDING':False},
+                                     kwargs={ 'isPENDING': False },
                                      attempts=10 )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=flowCheck,
                                  onpass="Flow status is correct!",
                                  onfail="Flow status is wrong!" )
 
-        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
-                       peers=["p64514", "p64515", "p64516"],
-                       expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
-                       peers=[p64514, p64515, p64516],
-                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk1" ],
+                                          peers=[ "p64514", "p64515", "p64516" ],
+                                          expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk2" ],
+                                          peers=[ p64514, p64515, p64516 ],
+                                          expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["h64514", "h64515", "h64516"],
-                        expectAllSuccess=True )
+                                       hosts=[ "h64514", "h64515", "h64516" ],
+                                       expectAllSuccess=True )
 
         main.step( "Kill spk1" )
         command1 = "ps -e | grep bgp -c"
@@ -519,7 +515,7 @@
                                  actual=( "4" in result3 ),
                                  onpass="Kill spk1 succeeded",
                                  onfail="Kill spk1 failed" )
-        if ( "4" not in result3 ) :
+        if ( "4" not in result3 ):
             main.log.info( result3 )
             main.cleanAndExit()
 
@@ -531,25 +527,24 @@
         main.step( "Check whether all flow status are ADDED" )
         flowCheck = utilities.retry( main.Cluster.active( 0 ).CLI.checkFlowsState,
                                      main.FALSE,
-                                     kwargs={'isPENDING':False},
+                                     kwargs={ 'isPENDING': False },
                                      attempts=10 )
         utilities.assert_equals( expect=main.TRUE,
                                  actual=flowCheck,
                                  onpass="Flow status is correct!",
                                  onfail="Flow status is wrong!" )
 
-        '''
-        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
-                       peers=["p64514", "p64515", "p64516"],
+        """
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk1" ],
+                       peers=[ "p64514", "p64515", "p64516" ],
                        expectAllSuccess=False )
-        '''
-        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
-                       peers=[p64514, p64515, p64516],
-                       expectAllSuccess=True )
+        """
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk2" ],
+                                          peers=[ p64514, p64515, p64516 ],
+                                          expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["h64514", "h64515", "h64516"],
-                        expectAllSuccess=True )
-
+                                       hosts=[ "h64514", "h64515", "h64516" ],
+                                       expectAllSuccess=True )
 
     def CASE12( self, main ):
         import time
@@ -561,8 +556,8 @@
         jsonResult = json.loads( result )
         leaderIP = ""
         for entry in jsonResult:
-            if entry["topic"] == "org.onosproject.sdnip":
-                leaderIP = entry["leader"]
+            if entry[ "topic" ] == "org.onosproject.sdnip":
+                leaderIP = entry[ "leader" ]
                 main.log.info( "leaderIP is: " )
                 main.log.info( leaderIP )
 
@@ -587,7 +582,7 @@
             main.step( "Check whether all flow status are ADDED" )
             flowCheck = utilities.retry( main.Cluster.active( 0 ).CLI.checkFlowsState,
                                          main.FALSE,
-                                         kwargs={'isPENDING':False},
+                                         kwargs={ 'isPENDING': False },
                                          attempts=10 )
             utilities.assert_equals( expect=main.TRUE,
                                      actual=flowCheck,
@@ -601,19 +596,19 @@
             main.step( "Check whether all flow status are ADDED" )
             flowCheck = utilities.retry( main.Cluster.active( 0 ).CLI.checkFlowsState,
                                          main.FALSE,
-                                         kwargs={'isPENDING':False},
+                                         kwargs={ 'isPENDING': False },
                                          attempts=10 )
             utilities.assert_equals( expect=main.TRUE,
                                      actual=flowCheck,
                                      onpass="Flow status is correct!",
                                      onfail="Flow status is wrong!" )
 
-        main.Functions.pingSpeakerToPeer( main, speakers=["spk1"],
-                       peers=["p64514", "p64515", "p64516"],
-                       expectAllSuccess=True )
-        main.Functions.pingSpeakerToPeer( main, speakers=["spk2"],
-                       peers=[p64514, p64515, p64516],
-                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk1" ],
+                                          peers=[ "p64514", "p64515", "p64516" ],
+                                          expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=[ "spk2" ],
+                                          peers=[ p64514, p64515, p64516 ],
+                                          expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts=["h64514", "h64515", "h64516"],
-                        expectAllSuccess=True )
+                                       hosts=[ "h64514", "h64515", "h64516" ],
+                                       expectAllSuccess=True )
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/Functions.py b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/Functions.py
index 36f1eb4..8edc284 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/Functions.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/Functions.py
@@ -1,5 +1,5 @@
 """
-Copyright 2015 Open Networking Foundation (ONF)
+Copyright 2015 Open Networking Foundation ( ONF )
 
 Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
 the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +8,7 @@
     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
@@ -18,11 +18,10 @@
     You should have received a copy of the GNU General Public License
     along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 """
-
 def checkRouteNum( main, routeNumExpected, node=1 ):
     import time
     main.step( "Check routes installed" )
-    wait = int( main.params['timers']['PathAvailable'] )
+    wait = int( main.params[ 'timers' ][ 'PathAvailable' ] )
     main.log.info( "Route number expected:" )
     main.log.info( routeNumExpected )
     main.log.info( "Route number from ONOS CLI:" )
@@ -34,77 +33,80 @@
         routeNumActual = cli.ipv4RouteNumber()
 
     main.log.info( routeNumActual )
-    utilities.assertEquals( \
-        expect = routeNumExpected, actual = routeNumActual,
-        onpass = "Route number is correct!",
-        onfail = "Route number is wrong!" )
+    utilities.assertEquals(
+        expect=routeNumExpected, actual=routeNumActual,
+        onpass="Route number is correct!",
+        onfail="Route number is wrong!" )
+
 
 def checkM2SintentNum( main, intentNumExpected, node=1 ):
     import time
     main.step( "Check M2S intents installed" )
-    wait = int( main.params['timers']['PathAvailable'] )
+    wait = int( main.params[ 'timers' ][ 'PathAvailable' ] )
     main.log.info( "Intent number expected:" )
     main.log.info( intentNumExpected )
     main.log.info( "Intent number from ONOS CLI:" )
     cli = main.Cluster.active( node - 1 ).CLI
-    jsonResult = cli.intents( jsonFormat = True, summary = True,
-                              TYPE = "multiPointToSinglePoint" )
-    intentNumActual = jsonResult['installed']
+    jsonResult = cli.intents( jsonFormat=True, summary=True,
+                              TYPE="multiPointToSinglePoint" )
+    intentNumActual = jsonResult[ 'installed' ]
     if intentNumActual != intentNumExpected:
         time.sleep( wait )
-        jsonResult = cli.intents( jsonFormat = True, summary = True,
-                                  TYPE = "multiPointToSinglePoint" )
-        intentNumActual = jsonResult['installed']
+        jsonResult = cli.intents( jsonFormat=True, summary=True,
+                                  TYPE="multiPointToSinglePoint" )
+        intentNumActual = jsonResult[ 'installed' ]
     main.log.info( intentNumActual )
-    utilities.assertEquals( \
-        expect = intentNumExpected, actual = intentNumActual,
-        onpass = "M2S intent number is correct!",
-        onfail = "M2S intent number is wrong!" )
+    utilities.assertEquals(
+        expect=intentNumExpected, actual=intentNumActual,
+        onpass="M2S intent number is correct!",
+        onfail="M2S intent number is wrong!" )
+
 
 def checkP2PintentNum( main, intentNumExpected, node=1 ):
     import time
     main.step( "Check P2P intents installed" )
-    wait = int( main.params['timers']['PathAvailable'] )
+    wait = int( main.params[ 'timers' ][ 'PathAvailable' ] )
     main.log.info( "Intent number expected:" )
     main.log.info( intentNumExpected )
     main.log.info( "Intent number from ONOS CLI:" )
     cli = main.Cluster.active( node - 1 ).CLI
-    jsonResult = cli.intents( jsonFormat = True, summary = True,
-                              TYPE = "pointToPoint" )
-    intentNumActual = jsonResult['installed']
+    jsonResult = cli.intents( jsonFormat=True, summary=True,
+                              TYPE="pointToPoint" )
+    intentNumActual = jsonResult[ 'installed' ]
 
     if intentNumActual != intentNumExpected:
         time.sleep( wait )
-        jsonResult = cli.intents( jsonFormat = True, summary = True,
-                                  TYPE = "pointToPoint" )
-        intentNumActual = jsonResult['installed']
+        jsonResult = cli.intents( jsonFormat=True, summary=True,
+                                  TYPE="pointToPoint" )
+        intentNumActual = jsonResult[ 'installed' ]
     main.log.info( intentNumActual )
-    utilities.assertEquals( \
-        expect = intentNumExpected, actual = intentNumActual,
-        onpass = "P2P intent number is correct!",
-        onfail = "P2P intent number is wrong!" )
+    utilities.assertEquals(
+        expect=intentNumExpected, actual=intentNumActual,
+        onpass="P2P intent number is correct!",
+        onfail="P2P intent number is wrong!" )
+
 
 def checkFlowNum( main, switch, flowNumExpected ):
     import time
     main.step( "Check flow entry number in " + switch )
-    wait = int( main.params['timers']['PathAvailable'] )
+    wait = int( main.params[ 'timers' ][ 'PathAvailable' ] )
     main.log.info( "Flow number expected:" )
     main.log.info( flowNumExpected )
     main.log.info( "Flow number actual:" )
     flowNumActual = main.Mininet.getSwitchFlowCount( switch )
-    if flowNumActual != flowNumExpected :
+    if flowNumActual != flowNumExpected:
         time.sleep( wait )
         flowNumActual = main.Mininet.getSwitchFlowCount( switch )
     main.log.info( flowNumActual )
-    utilities.assertEquals( \
-        expect = flowNumExpected, actual = flowNumActual,
-        onpass = "Flow number in " + switch + " is correct!",
-        onfail = "Flow number in " + switch + " is wrong!" )
+    utilities.assertEquals(
+        expect=flowNumExpected, actual=flowNumActual,
+        onpass="Flow number in " + switch + " is correct!",
+        onfail="Flow number in " + switch + " is wrong!" )
 
 
-def pingSpeakerToPeer( main, speakers = ["spk1"],
-                       peers = ["p64514", "p64515", "p64516"],
-                       expectAllSuccess = True ):
+def pingSpeakerToPeer( main, speakers=[ "spk1" ],
+                       peers=[ "p64514", "p64515", "p64516" ],
+                       expectAllSuccess=True ):
     """
     Carry out ping test between each BGP speaker and peer pair
     Optional argument:
@@ -129,25 +131,25 @@
     if expectAllSuccess:
         for speaker in speakers:
             for peer in peers:
-                tmpResult = main.Mininet.pingHost( src = speaker,
-                                                   target = peer )
+                tmpResult = main.Mininet.pingHost( src=speaker,
+                                                   target=peer )
                 result = result and ( tmpResult == main.TRUE )
     else:
         for speaker in speakers:
             for peer in peers:
-                tmpResult = main.Mininet.pingHost( src = speaker,
-                                                   target = peer )
+                tmpResult = main.Mininet.pingHost( src=speaker,
+                                                   target=peer )
 
-    utilities.assert_equals( expect = True, actual = result,
-                             onpass = "Ping test results are expected",
-                             onfail = "Ping test results are Not expected" )
+    utilities.assert_equals( expect=True, actual=result,
+                             onpass="Ping test results are expected",
+                             onfail="Ping test results are Not expected" )
 
-    if result == False:
+    if not result:
         main.cleanAndExit()
 
 
-def pingHostToHost( main, hosts = ["h64514", "h64515", "h64516"],
-                expectAllSuccess = True ):
+def pingHostToHost( main, hosts=[ "h64514", "h64515", "h64516" ],
+                    expectAllSuccess=True ):
     """
     Carry out ping test between each BGP host pair
     Optional argument:
@@ -166,45 +168,41 @@
         for srcHost in hosts:
             for targetHost in hosts:
                 if srcHost != targetHost:
-                    tmpResult = main.Mininet.pingHost( src = srcHost,
-                                                       target = targetHost )
+                    tmpResult = main.Mininet.pingHost( src=srcHost,
+                                                       target=targetHost )
                     result = result and ( tmpResult == main.TRUE )
     else:
         for srcHost in hosts:
             for targetHost in hosts:
                 if srcHost != targetHost:
-                    tmpResult = main.Mininet.pingHost( src = srcHost,
-                                                       target = targetHost )
+                    tmpResult = main.Mininet.pingHost( src=srcHost,
+                                                       target=targetHost )
                     result = result and ( tmpResult == main.FALSE )
 
-    utilities.assert_equals( expect = True, actual = result,
-                             onpass = "Ping test results are expected",
-                             onfail = "Ping test results are Not expected" )
+    utilities.assert_equals( expect=True, actual=result,
+                             onpass="Ping test results are expected",
+                             onfail="Ping test results are Not expected" )
 
-    '''
+    """
     if result == False:
         main.cleanAndExit()
-    '''
-
-
+    """
 def setupTunnel( main, srcIp, srcPort, dstIp, dstPort ):
     """
     Create a tunnel from Mininet host to host outside Mininet
     """
     main.step( "Set up tunnel from Mininet node " +
                str( srcIp ) + ":" + str( srcPort ) + " to ONOS node "
-               + str(dstIp) + ":" + str(dstPort) )
+               + str( dstIp ) + ":" + str( dstPort ) )
     forwarding = '%s:%s:%s:%s' % ( srcIp, srcPort, dstIp, dstPort )
     command = 'ssh -nNT -o "PasswordAuthentication no" \
         -o "StrictHostKeyChecking no" -l sdn -L %s %s & ' % ( forwarding, dstIp )
 
-
     tunnelResult = main.TRUE
     tunnelResult = main.Mininet.node( "root", command )
-    utilities.assert_equals( expect = True,
-                             actual = ( "PasswordAuthentication" in tunnelResult ),
+    utilities.assert_equals( expect=True,
+                             actual=( "PasswordAuthentication" in tunnelResult ),
                              onpass = "Created tunnel succeeded",
                              onfail = "Create tunnel failed" )
-    if ( "PasswordAuthentication" not in tunnelResult ) :
+    if ( "PasswordAuthentication" not in tunnelResult ):
         main.cleanAndExit()
-
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/USECASE_SdnipI2MN_Cluster.py b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/USECASE_SdnipI2MN_Cluster.py
old mode 100755
new mode 100644
index b37a410..9227e18
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/USECASE_SdnipI2MN_Cluster.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/USECASE_SdnipI2MN_Cluster.py
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 
 """
-Copyright 2015 Open Networking Foundation (ONF)
+Copyright 2015 Open Networking Foundation ( ONF )
 
 Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
 the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -10,7 +10,7 @@
     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
@@ -20,18 +20,15 @@
     You should have received a copy of the GNU General Public License
     along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 """
-
 """
 Set up the SDN-IP topology as same as it on Internet2
 """
-
 """
-AS 64513, (SDN AS)
+AS 64513, ( SDN AS )
 AS 64514, reachable by 10.0.4.1, 10.0.14.1
 AS 64515, reachable by 10.0.5.1, 10.0.15.1
 AS 64516, reachable by 10.0.6.1, 10.0.16.1
 """
-
 from mininet.net import Mininet
 from mininet.node import Controller, RemoteController
 from mininet.log import setLogLevel, info
@@ -50,14 +47,17 @@
 QUAGGA_CONFIG_DIR = '~/OnosSystemTest/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/dependencies/'
 numSw = 39
 
-# net = Mininet( controller = RemoteController )
+# net = Mininet( controller=RemoteController )
+
+
 class VLANHost( Host ):
+
     def config( self, vlan=100, intfName=None, **params ):
         r = super( Host, self ).config( **params )
         intf = self.intf( intfName )
         self.cmd( 'ifconfig %s inet 0' % intf )
         self.cmd( 'vconfig add %s %d' % ( intf, vlan ) )
-        self.cmd( 'ifconfig %s.%d inet %s' % ( intf, vlan, params['ip'] ) )
+        self.cmd( 'ifconfig %s.%d inet %s' % ( intf, vlan, params[ 'ip' ] ) )
         newName = '%s.%d' % ( intf, vlan )
         intf.name = newName
         self.nameToIntf[ newName ] = intf
@@ -65,6 +65,7 @@
 
 
 class SDNTopo( Topo ):
+
     "SDN Topology"
 
     def __init__( self, *args, **kwargs ):
@@ -81,100 +82,98 @@
         p64519 = self.addHost( 'p64519', cls=VLANHost, vlan=10 )
         p64520 = self.addHost( 'p64520', cls=VLANHost, vlan=10 )
 
-        '''
-        sw1 = self.addSwitch( 'SEAT', dpid = '00000000000000a1' )
-        sw2 = self.addSwitch( 'PORT', dpid = '00000000000000a2' )
-        sw3 = self.addSwitch( 'SUNN', dpid = '00000000000000a3' )
-        sw4 = self.addSwitch( 'RENO', dpid = '00000000000000a4' )
-        sw5 = self.addSwitch( 'LOSA', dpid = '00000000000000a5' )
-        sw6 = self.addSwitch( 'MISS', dpid = '00000000000000a6' )
-        sw7 = self.addSwitch( 'LASV', dpid = '00000000000000a7' )
-        sw8 = self.addSwitch( 'SALT', dpid = '00000000000000a8' )
-        sw9 = self.addSwitch( 'PHOE', dpid = '00000000000000a9' )
-        sw10 = self.addSwitch( 'TUCS', dpid = '0000000000000a10' )
-        sw11 = self.addSwitch( 'DENV', dpid = '0000000000000a11' )
-        sw12 = self.addSwitch( 'ELPA', dpid = '0000000000000a12' )
-        sw13 = self.addSwitch( 'MINN', dpid = '0000000000000a13' )
-        sw14 = self.addSwitch( 'KANS', dpid = '0000000000000a14' )
-        sw15 = self.addSwitch( 'TULS', dpid = '0000000000000a15' )
-        sw16 = self.addSwitch( 'DALL', dpid = '0000000000000a16' )
-        sw17 = self.addSwitch( 'HOUH', dpid = '0000000000000a17' )
-        sw18 = self.addSwitch( 'COLU', dpid = '0000000000000a18' )
-        sw19 = self.addSwitch( 'JCSN', dpid = '0000000000000a19' )
-        sw20 = self.addSwitch( 'BATO', dpid = '0000000000000a20' )
-        sw21 = self.addSwitch( 'EQCH', dpid = '0000000000000a21' )
-        sw22 = self.addSwitch( 'STAR', dpid = '0000000000000a22' )
-        sw23 = self.addSwitch( 'CHIC', dpid = '0000000000000a23' )
-        sw24 = self.addSwitch( 'INDI', dpid = '0000000000000a24' )
-        sw25 = self.addSwitch( 'CINC', dpid = '0000000000000a25' )
-        sw26 = self.addSwitch( 'LOUI', dpid = '0000000000000a26' )
-        sw27 = self.addSwitch( 'ATLA', dpid = '0000000000000a27' )
-        sw28 = self.addSwitch( 'JACK', dpid = '0000000000000a28' )
-        sw29 = self.addSwitch( 'CLEV', dpid = '0000000000000a29' )
-        sw30 = self.addSwitch( 'PITT', dpid = '0000000000000a30' )
-        sw31 = self.addSwitch( 'ASHB', dpid = '0000000000000a31' )
-        sw32 = self.addSwitch( 'WASH', dpid = '0000000000000a32' )
-        sw33 = self.addSwitch( 'RALE', dpid = '0000000000000a33' )
-        sw34 = self.addSwitch( 'CHAR', dpid = '0000000000000a34' )
-        sw35 = self.addSwitch( 'ALBA', dpid = '0000000000000a35' )
-        sw36 = self.addSwitch( 'BOST', dpid = '0000000000000a36' )
-        sw37 = self.addSwitch( 'HART', dpid = '0000000000000a37' )
-        sw38 = self.addSwitch( 'NEWY', dpid = '0000000000000a38' )
-        sw39 = self.addSwitch( 'PHIL', dpid = '0000000000000a39' )
-        '''
-        sw1 = self.addSwitch( 'sw1', dpid = '00000000000000a1' )
-        sw2 = self.addSwitch( 'sw2', dpid = '00000000000000a2' )
-        sw3 = self.addSwitch( 'sw3', dpid = '00000000000000a3' )
-        sw4 = self.addSwitch( 'sw4', dpid = '00000000000000a4' )
-        sw5 = self.addSwitch( 'sw5', dpid = '00000000000000a5' )
-        sw6 = self.addSwitch( 'sw6', dpid = '00000000000000a6' )
-        sw7 = self.addSwitch( 'sw7', dpid = '00000000000000a7' )
-        sw8 = self.addSwitch( 'sw8', dpid = '00000000000000a8' )
-        sw9 = self.addSwitch( 'sw9', dpid = '00000000000000a9' )
-        sw10 = self.addSwitch( 'sw10', dpid = '0000000000000a10' )
-        sw11 = self.addSwitch( 'sw11', dpid = '0000000000000a11' )
-        sw12 = self.addSwitch( 'sw12', dpid = '0000000000000a12' )
-        sw13 = self.addSwitch( 'sw13', dpid = '0000000000000a13' )
-        sw14 = self.addSwitch( 'sw14', dpid = '0000000000000a14' )
-        sw15 = self.addSwitch( 'sw15', dpid = '0000000000000a15' )
-        sw16 = self.addSwitch( 'sw16', dpid = '0000000000000a16' )
-        sw17 = self.addSwitch( 'sw17', dpid = '0000000000000a17' )
-        sw18 = self.addSwitch( 'sw18', dpid = '0000000000000a18' )
-        sw19 = self.addSwitch( 'sw19', dpid = '0000000000000a19' )
-        sw20 = self.addSwitch( 'sw20', dpid = '0000000000000a20' )
-        sw21 = self.addSwitch( 'sw21', dpid = '0000000000000a21' )
-        sw22 = self.addSwitch( 'sw22', dpid = '0000000000000a22' )
-        sw23 = self.addSwitch( 'sw23', dpid = '0000000000000a23' )
-        sw24 = self.addSwitch( 'sw24', dpid = '0000000000000a24' )
-        sw25 = self.addSwitch( 'sw25', dpid = '0000000000000a25' )
-        sw26 = self.addSwitch( 'sw26', dpid = '0000000000000a26' )
-        sw27 = self.addSwitch( 'sw27', dpid = '0000000000000a27' )
-        sw28 = self.addSwitch( 'sw28', dpid = '0000000000000a28' )
-        sw29 = self.addSwitch( 'sw29', dpid = '0000000000000a29' )
-        sw30 = self.addSwitch( 'sw30', dpid = '0000000000000a30' )
-        sw31 = self.addSwitch( 'sw31', dpid = '0000000000000a31' )
-        sw32 = self.addSwitch( 'sw32', dpid = '0000000000000a32' )
-        sw33 = self.addSwitch( 'sw33', dpid = '0000000000000a33' )
-        sw34 = self.addSwitch( 'sw34', dpid = '0000000000000a34' )
-        sw35 = self.addSwitch( 'sw35', dpid = '0000000000000a35' )
-        sw36 = self.addSwitch( 'sw36', dpid = '0000000000000a36' )
-        sw37 = self.addSwitch( 'sw37', dpid = '0000000000000a37' )
-        sw38 = self.addSwitch( 'sw38', dpid = '0000000000000a38' )
-        sw39 = self.addSwitch( 'sw39', dpid = '0000000000000a39' )
-
+        """
+        sw1 = self.addSwitch( 'SEAT', dpid='00000000000000a1' )
+        sw2 = self.addSwitch( 'PORT', dpid='00000000000000a2' )
+        sw3 = self.addSwitch( 'SUNN', dpid='00000000000000a3' )
+        sw4 = self.addSwitch( 'RENO', dpid='00000000000000a4' )
+        sw5 = self.addSwitch( 'LOSA', dpid='00000000000000a5' )
+        sw6 = self.addSwitch( 'MISS', dpid='00000000000000a6' )
+        sw7 = self.addSwitch( 'LASV', dpid='00000000000000a7' )
+        sw8 = self.addSwitch( 'SALT', dpid='00000000000000a8' )
+        sw9 = self.addSwitch( 'PHOE', dpid='00000000000000a9' )
+        sw10 = self.addSwitch( 'TUCS', dpid='0000000000000a10' )
+        sw11 = self.addSwitch( 'DENV', dpid='0000000000000a11' )
+        sw12 = self.addSwitch( 'ELPA', dpid='0000000000000a12' )
+        sw13 = self.addSwitch( 'MINN', dpid='0000000000000a13' )
+        sw14 = self.addSwitch( 'KANS', dpid='0000000000000a14' )
+        sw15 = self.addSwitch( 'TULS', dpid='0000000000000a15' )
+        sw16 = self.addSwitch( 'DALL', dpid='0000000000000a16' )
+        sw17 = self.addSwitch( 'HOUH', dpid='0000000000000a17' )
+        sw18 = self.addSwitch( 'COLU', dpid='0000000000000a18' )
+        sw19 = self.addSwitch( 'JCSN', dpid='0000000000000a19' )
+        sw20 = self.addSwitch( 'BATO', dpid='0000000000000a20' )
+        sw21 = self.addSwitch( 'EQCH', dpid='0000000000000a21' )
+        sw22 = self.addSwitch( 'STAR', dpid='0000000000000a22' )
+        sw23 = self.addSwitch( 'CHIC', dpid='0000000000000a23' )
+        sw24 = self.addSwitch( 'INDI', dpid='0000000000000a24' )
+        sw25 = self.addSwitch( 'CINC', dpid='0000000000000a25' )
+        sw26 = self.addSwitch( 'LOUI', dpid='0000000000000a26' )
+        sw27 = self.addSwitch( 'ATLA', dpid='0000000000000a27' )
+        sw28 = self.addSwitch( 'JACK', dpid='0000000000000a28' )
+        sw29 = self.addSwitch( 'CLEV', dpid='0000000000000a29' )
+        sw30 = self.addSwitch( 'PITT', dpid='0000000000000a30' )
+        sw31 = self.addSwitch( 'ASHB', dpid='0000000000000a31' )
+        sw32 = self.addSwitch( 'WASH', dpid='0000000000000a32' )
+        sw33 = self.addSwitch( 'RALE', dpid='0000000000000a33' )
+        sw34 = self.addSwitch( 'CHAR', dpid='0000000000000a34' )
+        sw35 = self.addSwitch( 'ALBA', dpid='0000000000000a35' )
+        sw36 = self.addSwitch( 'BOST', dpid='0000000000000a36' )
+        sw37 = self.addSwitch( 'HART', dpid='0000000000000a37' )
+        sw38 = self.addSwitch( 'NEWY', dpid='0000000000000a38' )
+        sw39 = self.addSwitch( 'PHIL', dpid='0000000000000a39' )
+        """
+        sw1 = self.addSwitch( 'sw1', dpid='00000000000000a1' )
+        sw2 = self.addSwitch( 'sw2', dpid='00000000000000a2' )
+        sw3 = self.addSwitch( 'sw3', dpid='00000000000000a3' )
+        sw4 = self.addSwitch( 'sw4', dpid='00000000000000a4' )
+        sw5 = self.addSwitch( 'sw5', dpid='00000000000000a5' )
+        sw6 = self.addSwitch( 'sw6', dpid='00000000000000a6' )
+        sw7 = self.addSwitch( 'sw7', dpid='00000000000000a7' )
+        sw8 = self.addSwitch( 'sw8', dpid='00000000000000a8' )
+        sw9 = self.addSwitch( 'sw9', dpid='00000000000000a9' )
+        sw10 = self.addSwitch( 'sw10', dpid='0000000000000a10' )
+        sw11 = self.addSwitch( 'sw11', dpid='0000000000000a11' )
+        sw12 = self.addSwitch( 'sw12', dpid='0000000000000a12' )
+        sw13 = self.addSwitch( 'sw13', dpid='0000000000000a13' )
+        sw14 = self.addSwitch( 'sw14', dpid='0000000000000a14' )
+        sw15 = self.addSwitch( 'sw15', dpid='0000000000000a15' )
+        sw16 = self.addSwitch( 'sw16', dpid='0000000000000a16' )
+        sw17 = self.addSwitch( 'sw17', dpid='0000000000000a17' )
+        sw18 = self.addSwitch( 'sw18', dpid='0000000000000a18' )
+        sw19 = self.addSwitch( 'sw19', dpid='0000000000000a19' )
+        sw20 = self.addSwitch( 'sw20', dpid='0000000000000a20' )
+        sw21 = self.addSwitch( 'sw21', dpid='0000000000000a21' )
+        sw22 = self.addSwitch( 'sw22', dpid='0000000000000a22' )
+        sw23 = self.addSwitch( 'sw23', dpid='0000000000000a23' )
+        sw24 = self.addSwitch( 'sw24', dpid='0000000000000a24' )
+        sw25 = self.addSwitch( 'sw25', dpid='0000000000000a25' )
+        sw26 = self.addSwitch( 'sw26', dpid='0000000000000a26' )
+        sw27 = self.addSwitch( 'sw27', dpid='0000000000000a27' )
+        sw28 = self.addSwitch( 'sw28', dpid='0000000000000a28' )
+        sw29 = self.addSwitch( 'sw29', dpid='0000000000000a29' )
+        sw30 = self.addSwitch( 'sw30', dpid='0000000000000a30' )
+        sw31 = self.addSwitch( 'sw31', dpid='0000000000000a31' )
+        sw32 = self.addSwitch( 'sw32', dpid='0000000000000a32' )
+        sw33 = self.addSwitch( 'sw33', dpid='0000000000000a33' )
+        sw34 = self.addSwitch( 'sw34', dpid='0000000000000a34' )
+        sw35 = self.addSwitch( 'sw35', dpid='0000000000000a35' )
+        sw36 = self.addSwitch( 'sw36', dpid='0000000000000a36' )
+        sw37 = self.addSwitch( 'sw37', dpid='0000000000000a37' )
+        sw38 = self.addSwitch( 'sw38', dpid='0000000000000a38' )
+        sw39 = self.addSwitch( 'sw39', dpid='0000000000000a39' )
 
         # Add a layer2 switch for control plane connectivity
         # This switch isn't part of the SDN topology
         # We'll use the ovs-controller to turn this into a learning switch
-        swCtl100 = self.addSwitch( 'swCtl100', dpid = '0000000000000100' )
-
+        swCtl100 = self.addSwitch( 'swCtl100', dpid='0000000000000100' )
 
         # BGP speaker hosts
         spk1 = self.addHost( 'spk1' )
         spk2 = self.addHost( 'spk2' )
         spk3 = self.addHost( 'spk3', cls=VLANHost, vlan=10 )
         spk4 = self.addHost( 'spk4', cls=VLANHost, vlan=20 )
-        root = self.addHost( 'root', inNamespace = False , ip = '0' )
+        root = self.addHost( 'root', inNamespace=False, ip='0' )
 
         # hosts behind each AS
         h64514 = self.addHost( 'h64514' )
@@ -298,23 +297,26 @@
     host.cmd( '/usr/sbin/sshd -o "Banner %s"' % banner, '-o "UseDNS no"' )
     info( '***', host.name, 'is running sshd on', intf, 'at', ip, '\n' )
 
-def startsshds ( hosts ):
+
+def startsshds( hosts ):
     for h in hosts:
         startsshd( h )
 
+
 def stopsshd():
     "Stop *all* sshd processes with a custom banner"
     info( '*** Shutting down stale sshd/Banner processes ',
           quietRun( "pkill -9 -f Banner" ), '\n' )
 
+
 def startquagga( host, num, config_file ):
     info( '*** Starting Quagga on %s\n' % host )
     host.cmd( "cd %s" % QUAGGA_CONFIG_DIR )
     zebra_cmd = \
-    '%s/zebra -d -f  ./zebra.conf -z %s/zserv%s.api -i %s/zebra%s.pid'\
+        '%s/zebra -d -f  ./zebra.conf -z %s/zserv%s.api -i %s/zebra%s.pid'\
      % ( QUAGGA_DIR, QUAGGA_RUN_DIR, num, QUAGGA_RUN_DIR, num )
     quagga_cmd = '%s/bgpd -d -f %s -z %s/zserv%s.api -i %s/bgpd%s.pid' \
-    % ( QUAGGA_DIR, config_file, QUAGGA_RUN_DIR, num, QUAGGA_RUN_DIR, num )
+        % ( QUAGGA_DIR, config_file, QUAGGA_RUN_DIR, num, QUAGGA_RUN_DIR, num )
 
     print zebra_cmd
     print quagga_cmd
@@ -322,20 +324,19 @@
     host.cmd( zebra_cmd )
     host.cmd( quagga_cmd )
 
-'''
+"""
 def startQuaggaFromTeston( host, num, config_file ):
     global net
     h = net.get( str( host ) )
     startquagga( h, num, config_file )
-'''
-
+"""
 def startquaggahost5( host, num ):
     info( '*** Starting Quagga on %s\n' % host )
     zebra_cmd = \
-    '%s/zebra -d -f  ./zebra.conf -z %s/zserv%s.api -i %s/zebra%s.pid' \
-    % ( QUAGGA_DIR, QUAGGA_RUN_DIR, num, QUAGGA_RUN_DIR, num )
+        '%s/zebra -d -f  ./zebra.conf -z %s/zserv%s.api -i %s/zebra%s.pid' \
+        % ( QUAGGA_DIR, QUAGGA_RUN_DIR, num, QUAGGA_RUN_DIR, num )
     quagga_cmd = \
-    '%s/bgpd -d -f ./as4quaggas/quagga%s.conf -z %s/zserv%s.api -i %s/bgpd%s.pid'\
+        '%s/bgpd -d -f ./as4quaggas/quagga%s.conf -z %s/zserv%s.api -i %s/bgpd%s.pid'\
      % ( QUAGGA_DIR, num, QUAGGA_RUN_DIR, num, QUAGGA_RUN_DIR, num )
 
     host.cmd( zebra_cmd )
@@ -346,17 +347,17 @@
     quietRun( 'sudo pkill -9 -f bgpd' )
     quietRun( 'sudo pkill -9 -f zebra' )
 
+
 def sdn1net():
     topo = SDNTopo()
     info( '*** Creating network\n' )
 
     # global net
-    net = Mininet( topo = topo, controller = RemoteController )
-
+    net = Mininet( topo=topo, controller=RemoteController )
 
     spk1, spk2, spk3, spk4, p64514, p64515, p64516, p64517, p64518, p64519, p64520 = \
-    net.get( 'spk1', 'spk2', 'spk3', 'spk4',
-             'p64514', 'p64515', 'p64516', 'p64517', 'p64518', 'p64519', 'p64520' )
+        net.get( 'spk1', 'spk2', 'spk3', 'spk4',
+                 'p64514', 'p64515', 'p64516', 'p64517', 'p64518', 'p64519', 'p64520' )
 
     # Adding addresses to speakers' interface connected to sw24
     # for BGP peering
@@ -399,7 +400,7 @@
     # setup configuration on the interface connected to switch
     p64514.cmd( "ifconfig p64514-eth0 10.0.4.1 up" )
     p64514.cmd( "ip addr add 10.0.14.1/24 dev p64514-eth0" )
-    p64514.setMAC( '00:00:00:00:00:14', 'p64514-eth0' ) # do not repeat spk4's MAC addr
+    p64514.setMAC( '00:00:00:00:00:14', 'p64514-eth0' )  # do not repeat spk4's MAC addr
     p64515.cmd( "ifconfig p64515-eth0 10.0.5.1 up" )
     p64515.cmd( "ip addr add 10.0.15.1/24 dev p64515-eth0" )
     p64515.setMAC( '00:00:00:00:00:05', 'p64515-eth0' )
@@ -457,7 +458,7 @@
 
     # Setup hosts in each non-SDN AS
     h64514, h64515, h64516, h64517, h64518, h64519, h64520 = \
-    net.get( 'h64514', 'h64515', 'h64516', 'h64517', 'h64518', 'h64519', 'h64520' )
+        net.get( 'h64514', 'h64515', 'h64516', 'h64517', 'h64518', 'h64519', 'h64520' )
     h64514.cmd( 'ifconfig h64514-eth0 4.0.0.1 up' )
     h64514.cmd( 'ip route add default via 4.0.0.254' )
     h64514.setIP( '192.168.0.44', 24, 'h64514-eth1' )  # for control plane
@@ -478,22 +479,20 @@
     h64520.cmd( 'ifconfig h64520-eth0.10 20.0.0.1 up' )
     h64520.cmd( 'ip route add default via 20.0.0.254' )
 
-
     # set up swCtl100 as a learning
     swCtl100 = net.get( 'swCtl100' )
     swCtl100.cmd( 'ovs-vsctl set-controller swCtl100 none' )
     swCtl100.cmd( 'ovs-vsctl set-fail-mode swCtl100 standalone' )
 
     # connect all switches to controller
-    '''
+    """
     onos1IP = "10.128.4.52"
     onos2IP = "10.128.4.53"
     onos3IP = "10.128.4.54"
     for i in range ( 1, numSw + 1 ):
         swX = net.get( 'sw%s' % ( i ) )
-        swX.cmd( 'ovs-vsctl set-controller sw%s tcp:%s:6653 tcp:%s:6653 tcp:%s:6653' % ( i, onos1IP, onos2IP, onos3IP) )
-    '''
-
+        swX.cmd( 'ovs-vsctl set-controller sw%s tcp:%s:6653 tcp:%s:6653 tcp:%s:6653' % ( i, onos1IP, onos2IP, onos3IP ) )
+    """
     # Start Quagga on border routers
     startquagga( p64514, 64514, 'quagga64514.conf' )
     startquagga( p64515, 64515, 'quagga64515.conf' )
@@ -525,15 +524,13 @@
     spk3.intf( 'spk3-eth1' ).setIP( '1.1.1.5/24' )
     spk4.intf( 'spk4-eth1' ).setIP( '1.1.1.7/24' )
 
-
     stopsshd()
 
     hosts = [ p64514, p64515, p64516, p64517, p64518, p64519, p64520,
-              h64514, h64517, h64519 ];
+              h64514, h64517, h64519 ]
     startsshds( hosts )
 
-
-    '''
+    """
     forwarding1 = '%s:2000:%s:2000' % ( '1.1.1.2', onos1IP )
     root.cmd( 'ssh -nNT -o "PasswordAuthentication no" \
     -o "StrictHostKeyChecking no" -l sdn -L %s %s & ' % ( forwarding1, onos1IP ) )
@@ -545,7 +542,7 @@
     forwarding3 = '%s:2000:%s:2000' % ( '1.1.1.6', onos3IP )
     root.cmd( 'ssh -nNT -o "PasswordAuthentication no" \
     -o "StrictHostKeyChecking no" -l sdn -L %s %s & ' % ( forwarding3, onos3IP ) )
-    '''
+    """
     CLI( net )
 
     stopsshd()