Fix Codestyle in Functionality tests

Change-Id: Iecb38eee560da85e02212e42cdf0f5f6b4634172
diff --git a/TestON/tests/FUNC/FUNCflow/FUNCflow.py b/TestON/tests/FUNC/FUNCflow/FUNCflow.py
index 80bd618..54c81a5 100644
--- a/TestON/tests/FUNC/FUNCflow/FUNCflow.py
+++ b/TestON/tests/FUNC/FUNCflow/FUNCflow.py
@@ -69,9 +69,9 @@
                                          direction="to" )
 
         utilities.assert_equals( expect=main.TRUE,
-                                actual=copyResult,
-                                onpass="Successfully copy " + "test variables ",
-                                onfail="Failed to copy test variables" )
+                                 actual=copyResult,
+                                 onpass="Successfully copy " + "test variables ",
+                                 onfail="Failed to copy test variables" )
 
 
         if main.CLIs:
@@ -157,7 +157,7 @@
         onosUninstallResult = main.TRUE
         for ip in main.ONOSip:
             onosUninstallResult = onosUninstallResult and \
-                    main.ONOSbench.onosUninstall( nodeIp = ip )
+                    main.ONOSbench.onosUninstall( nodeIp=ip )
         stepResult = onosUninstallResult
         utilities.assert_equals( expect=main.TRUE,
                                  actual=stepResult,
@@ -168,7 +168,7 @@
         onosInstallResult = main.TRUE
         for i in range( main.numCtrls ):
             onosInstallResult = onosInstallResult and \
-                    main.ONOSbench.onosInstall( node = main.ONOSip[ i ] )
+                    main.ONOSbench.onosInstall( node=main.ONOSip[ i ] )
         stepResult = onosInstallResult
         utilities.assert_equals( expect=main.TRUE,
                                  actual=stepResult,
diff --git a/TestON/tests/FUNC/FUNCintent/FUNCintent.py b/TestON/tests/FUNC/FUNCintent/FUNCintent.py
index 5ee3f70..989fd56 100644
--- a/TestON/tests/FUNC/FUNCintent/FUNCintent.py
+++ b/TestON/tests/FUNC/FUNCintent/FUNCintent.py
@@ -301,7 +301,7 @@
                     try:
                         deviceData = json.loads( devices[ controller ] )
                         portData = json.loads( ports[ controller ] )
-                    except (TypeError,ValueError):
+                    except( TypeError, ValueError ):
                         main.log.error( "Could not load json: {0} or {1}".format( str( devices[ controller ] ), str( ports[ controller ] ) ) )
                         currentDevicesResult = main.FALSE
                     else:
@@ -316,8 +316,8 @@
                 if links[ controller ] and "Error" not in links[ controller ]:
                     try:
                         linkData = json.loads( links[ controller ] )
-                    except (TypeError,ValueError):
-                        main.log.error("Could not load json:" + str( links[ controller ] ) )
+                    except( TypeError, ValueError ):
+                        main.log.error( "Could not load json:" + str( links[ controller ] ) )
                         currentLinksResult = main.FALSE
                     else:
                         currentLinksResult = main.Mininet1.compareLinks(
@@ -331,8 +331,8 @@
                 if hosts[ controller ] and "Error" not in hosts[ controller ]:
                     try:
                         hostData = json.loads( hosts[ controller ] )
-                    except (TypeError,ValueError):
-                        main.log.error("Could not load json:" + str( hosts[ controller ] ) )
+                    except( TypeError, ValueError ):
+                        main.log.error( "Could not load json:" + str( hosts[ controller ] ) )
                         currentHostsResult = main.FALSE
                     else:
                         currentHostsResult = main.Mininet1.compareHosts(
@@ -583,6 +583,7 @@
         """
         if main.initialized == main.FALSE:
             main.log.error( "Test components did not start correctly, skipping further tests" )
+            main.stop()
             main.skipCase()
         main.case( "Balance mastership of switches" )
         main.step( "Balancing mastership of switches" )
@@ -648,7 +649,7 @@
                                  onfail="Failed to stop mininet and scapy" )
 
         main.step( "Stopping Mininet Topology" )
-        mininetResult = main.Mininet1.stopNet( )
+        mininetResult = main.Mininet1.stopNet()
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=mininetResult,
@@ -733,8 +734,8 @@
         try:
             assert main.numSwitch
         except AssertionError:
-            main.log.error( "Place the total number of switch topology in \
-                             main.numSwitch" )
+            main.log.error( "Place the total number of switch topology in " +\
+                             main.numSwitch )
             main.initialized = main.FALSE
             main.skipCase()
 
@@ -750,7 +751,7 @@
                                 "each step such as IPV4, Dual stack, VLAN " +\
                                 "etc;\nThe test will use OF " + main.OFProtocol +\
                                 " OVS running in Mininet and compile intents" +\
-                               " using " + main.flowCompiler
+                                " using " + main.flowCompiler
 
         main.step( "IPV4: Add host intents between h1 and h9" )
         main.assertReturnString = "Assertion Result for IPV4 host intent with mac addresses\n"
@@ -762,7 +763,7 @@
                                               name='IPV4',
                                               onosNode='0',
                                               host1=host1,
-                                              host2=host2)
+                                              host2=host2 )
         if installResult:
             testResult = main.intentFunction.testHostIntent( main,
                                               name='IPV4',
@@ -772,14 +773,14 @@
                                               host2=host2,
                                               sw1='s5',
                                               sw2='s2',
-                                              expectedLink = 18)
+                                              expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
                                  onpass=main.assertReturnString,
-                                 onfail=main.assertReturnString)
+                                 onfail=main.assertReturnString )
 
         main.step( "DUALSTACK1: Add host intents between h3 and h11" )
         main.assertReturnString = "Assertion Result for dualstack IPV4 with MAC addresses\n"
@@ -791,7 +792,7 @@
                                               name='DUALSTACK',
                                               onosNode='0',
                                               host1=host1,
-                                              host2=host2)
+                                              host2=host2 )
 
         if installResult:
             testResult = main.intentFunction.testHostIntent( main,
@@ -802,12 +803,12 @@
                                               host2=host2,
                                               sw1='s5',
                                               sw2='s2',
-                                              expectedLink = 18)
+                                              expectedLink=18 )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
                                  onpass=main.assertReturnString,
-                                 onfail=main.assertReturnString)
+                                 onfail=main.assertReturnString )
 
         main.step( "DUALSTACK2: Add host intents between h1 and h11" )
         main.assertReturnString = "Assertion Result for dualstack2 host intent\n"
@@ -819,7 +820,7 @@
                                               name='DUALSTACK2',
                                               onosNode='0',
                                               host1=host1,
-                                              host2=host2)
+                                              host2=host2 )
 
         if installResult:
             testResult = main.intentFunction.testHostIntent( main,
@@ -830,14 +831,14 @@
                                               host2=host2,
                                               sw1='s5',
                                               sw2='s2',
-                                              expectedLink = 18)
+                                              expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
                                  onpass=main.assertReturnString,
-                                 onfail=main.assertReturnString)
+                                 onfail=main.assertReturnString )
 
         main.step( "1HOP: Add host intents between h1 and h3" )
         main.assertReturnString = "Assertion Result for 1HOP for IPV4 same switch\n"
@@ -849,7 +850,7 @@
                                               name='1HOP',
                                               onosNode='0',
                                               host1=host1,
-                                              host2=host2)
+                                              host2=host2 )
 
         if installResult:
             testResult = main.intentFunction.testHostIntent( main,
@@ -860,14 +861,14 @@
                                               host2=host2,
                                               sw1='s5',
                                               sw2='s2',
-                                              expectedLink = 18)
+                                              expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
                                  onpass=main.assertReturnString,
-                                 onfail=main.assertReturnString)
+                                 onfail=main.assertReturnString )
 
         main.step( "VLAN1: Add vlan host intents between h4 and h12" )
         main.assertReturnString = "Assertion Result vlan IPV4\n"
@@ -879,7 +880,7 @@
                                               name='VLAN1',
                                               onosNode='0',
                                               host1=host1,
-                                              host2=host2)
+                                              host2=host2 )
 
         if installResult:
             testResult = main.intentFunction.testHostIntent( main,
@@ -890,14 +891,14 @@
                                               host2=host2,
                                               sw1='s5',
                                               sw2='s2',
-                                              expectedLink = 18)
+                                              expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
                                  onpass=main.assertReturnString,
-                                 onfail=main.assertReturnString)
+                                 onfail=main.assertReturnString )
 
         main.step( "VLAN2: Add vlan host intents between h4 and h13" )
         main.assertReturnString = "Assertion Result vlan IPV4\n"
@@ -909,7 +910,7 @@
                                               name='VLAN2',
                                               onosNode='0',
                                               host1=host1,
-                                              host2=host2)
+                                              host2=host2 )
 
         if installResult:
             testResult = main.intentFunction.testHostIntent( main,
@@ -920,14 +921,14 @@
                                               host2=host2,
                                               sw1='s5',
                                               sw2='s2',
-                                              expectedLink = 18)
+                                              expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
                                  onpass=main.assertReturnString,
-                                 onfail=main.assertReturnString)
+                                 onfail=main.assertReturnString )
 
         main.step( "Encapsulation: Add host intents between h1 and h9" )
         main.assertReturnString = "Assertion Result for VLAN Encapsulated host intent\n"
@@ -950,16 +951,16 @@
                                               host2=host2,
                                               sw1='s5',
                                               sw2='s2',
-                                              expectedLink = 18)
+                                              expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
                                  onpass=main.assertReturnString,
-                                 onfail=main.assertReturnString)
+                                 onfail=main.assertReturnString )
 
-        main.step( "Confirm that ONOS leadership is unchanged")
+        main.step( "Confirm that ONOS leadership is unchanged" )
         intentLeadersNew = main.CLIs[ 0 ].leaderCandidates()
         main.intentFunction.checkLeaderChange( intentLeadersOld,
                                                 intentLeadersNew )
@@ -967,7 +968,7 @@
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
                                  onpass="ONOS Leaders Unchanged",
-                                 onfail="ONOS Leader Mismatch")
+                                 onfail="ONOS Leader Mismatch" )
 
         main.intentFunction.report( main )
 
@@ -1014,8 +1015,8 @@
         try:
             assert main.numSwitch
         except AssertionError:
-            main.log.error( "Place the total number of switch topology in \
-                             main.numSwitch" )
+            main.log.error( "Place the total number of switch topology in " +\
+                             main.numSwitch )
             main.initialized = main.FALSE
             main.skipCase()
 
@@ -1057,7 +1058,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1093,7 +1094,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1127,7 +1128,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1172,7 +1173,7 @@
                                          sw1="s5",
                                          sw2="s2",
                                          expectedLink=18,
-                                         useTCP=True)
+                                         useTCP=True )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1238,7 +1239,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1261,7 +1262,7 @@
                                        main,
                                        name="VLAN",
                                        senders=senders,
-                                       recipients=recipients)
+                                       recipients=recipients )
 
         if installResult:
             testResult = main.intentFunction.testPointIntent(
@@ -1272,7 +1273,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1294,7 +1295,7 @@
                                        name="VLAN2",
                                        senders=senders,
                                        recipients=recipients,
-                                       setVlan=200)
+                                       setVlan=200 )
 
         if installResult:
             testResult = main.intentFunction.testPointIntent(
@@ -1305,7 +1306,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1338,7 +1339,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1373,7 +1374,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1422,8 +1423,8 @@
         try:
             assert main.numSwitch
         except AssertionError:
-            main.log.error( "Place the total number of switch topology in \
-                             main.numSwitch" )
+            main.log.error( "Place the total number of switch topology in "+ \
+                             main.numSwitch )
             main.initialized = main.FALSE
             main.skipCase()
 
@@ -1458,7 +1459,7 @@
                                          senders=senders,
                                          recipients=recipients,
                                          sw1="s5",
-                                         sw2="s2")
+                                         sw2="s2" )
 
         if installResult:
             testResult = main.intentFunction.testPointIntent(
@@ -1471,7 +1472,7 @@
                                          badRecipients=badRecipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1500,7 +1501,7 @@
                                          recipients=recipients,
                                          ethType="IPV4",
                                          sw1="s5",
-                                         sw2="s2")
+                                         sw2="s2" )
 
         if installResult:
             testResult = main.intentFunction.testPointIntent(
@@ -1513,7 +1514,7 @@
                                          badRecipients=badRecipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1542,7 +1543,7 @@
                                          recipients=recipients,
                                          ethType="IPV4",
                                          sw1="s5",
-                                         sw2="s2")
+                                         sw2="s2" )
 
         if installResult:
             testResult = main.intentFunction.testPointIntent(
@@ -1555,7 +1556,7 @@
                                          badRecipients=badRecipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1583,7 +1584,7 @@
                                          senders=senders,
                                          recipients=recipients,
                                          sw1="s5",
-                                         sw2="s2")
+                                         sw2="s2" )
 
         if installResult:
             testResult = main.intentFunction.testPointIntent(
@@ -1596,7 +1597,7 @@
                                          badRecipients=badRecipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1625,7 +1626,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         setVlan=100)
+                                         setVlan=100 )
 
         if installResult:
             testResult = main.intentFunction.testPointIntent(
@@ -1638,7 +1639,7 @@
                                          badRecipients=badRecipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1680,7 +1681,7 @@
                                          badRecipients=badRecipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1729,8 +1730,8 @@
         try:
             assert main.numSwitch
         except AssertionError:
-            main.log.error( "Place the total number of switch topology in \
-                             main.numSwitch" )
+            main.log.error( "Place the total number of switch topology in "+\
+                             main.numSwitch )
             main.initialized = main.FALSE
             main.skipCase()
 
@@ -1807,7 +1808,7 @@
                                          recipients=recipients,
                                          ethType="IPV4",
                                          sw1="s5",
-                                         sw2="s2")
+                                         sw2="s2" )
 
         if installResult:
             testResult = main.intentFunction.testPointIntent(
@@ -1820,7 +1821,7 @@
                                          badRecipients=badRecipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1849,7 +1850,7 @@
                                          recipients=recipients,
                                          ethType="IPV4",
                                          sw1="s5",
-                                         sw2="s2")
+                                         sw2="s2" )
 
         if installResult:
             testResult = main.intentFunction.testPointIntent(
@@ -1862,7 +1863,7 @@
                                          badRecipients=badRecipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1890,7 +1891,7 @@
                                          senders=senders,
                                          recipients=recipients,
                                          sw1="s5",
-                                         sw2="s2")
+                                         sw2="s2" )
 
         if installResult:
             testResult = main.intentFunction.testPointIntent(
@@ -1903,7 +1904,7 @@
                                          badRecipients=badRecipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -1933,7 +1934,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         setVlan=100)
+                                         setVlan=100 )
 
         if installResult:
             testResult = main.intentFunction.testPointIntent(
@@ -1946,7 +1947,7 @@
                                          badRecipients=badRecipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
         else:
             main.CLIs[ 0 ].removeAllIntents( purge=True )
 
@@ -2023,15 +2024,15 @@
         try:
             assert main.numSwitch
         except AssertionError:
-            main.log.error( "Place the total number of switch topology in \
-                             main.numSwitch" )
+            main.log.error( "Place the total number of switch topology in "+\
+                             main.numSwitch )
             main.initialized = main.FALSE
             main.skipCase()
         main.case( "Test host mobility with host intents " )
         main.step( "Testing host mobility by moving h1 from s5 to s6" )
         h1PreMove = main.hostsData[ "h1" ][ "location" ][ 0:19 ]
 
-        main.log.info( "Moving h1 from s5 to s6")
+        main.log.info( "Moving h1 from s5 to s6" )
         main.Mininet1.moveHost( "h1","s5","s6" )
 
         # Send discovery ping from moved host
@@ -2112,8 +2113,8 @@
         try:
             assert main.numSwitch
         except AssertionError:
-            main.log.error( "Place the total number of switch topology in \
-                             main.numSwitch" )
+            main.log.error( "Place the total number of switch topology in "+\
+                             main.numSwitch )
             main.initialized = main.FALSE
             main.skipCase()
         main.case( "Test Multi to Single End Point Failure" )
@@ -2238,7 +2239,7 @@
                                          senders=senders,
                                          recipients=recipients,
                                          sw1="s5",
-                                         sw2="s2")
+                                         sw2="s2" )
 
         if installResult:
             testResult = main.intentFunction.testEndPointFail(
@@ -2288,7 +2289,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         partial=True)
+                                         partial=True )
 
         if installResult:
             testResult = main.intentFunction.testEndPointFail(
diff --git a/TestON/tests/FUNC/FUNCintent/dependencies/FuncIntentFunction.py b/TestON/tests/FUNC/FUNCintent/dependencies/FuncIntentFunction.py
index 89695a2..0e563be 100755
--- a/TestON/tests/FUNC/FUNCintent/dependencies/FuncIntentFunction.py
+++ b/TestON/tests/FUNC/FUNCintent/dependencies/FuncIntentFunction.py
@@ -83,7 +83,7 @@
                                                         vlanId=vlanId,
                                                         setVlan=setVlan,
                                                         encap=encap )
-    except (KeyError, TypeError):
+    except( KeyError, TypeError ):
         errorMsg = "There was a problem loading the hosts data."
         if intentId:
             errorMsg += "  There was a problem installing host to host intent."
@@ -113,7 +113,7 @@
                     onosNode=0,
                     sw1="s5",
                     sw2="s2",
-                    expectedLink=0):
+                    expectedLink=0 ):
     """
     Test a Host Intent
 
@@ -184,7 +184,7 @@
         vlanId = host1.get( "vlan" )
 
         testResult = main.TRUE
-    except (KeyError, TypeError):
+    except( KeyError, TypeError ):
         main.log.error( "There was a problem loading the hosts data." )
         return main.FALSE
 
@@ -400,7 +400,7 @@
                                             vlanId=vlanId,
                                             setVlan=setVlan,
                                             encap=encap )
-    except (KeyError, TypeError):
+    except( KeyError, TypeError ):
         errorMsg = "There was a problem loading the hosts data."
         if intentId:
             errorMsg += "  There was a problem installing Point to Point intent."
@@ -597,7 +597,7 @@
     checkFlowsState( main )
 
     # Run iperf to both host
-    iperfTemp = main.Mininet1.iperftcp( host1,host2,10 )
+    iperfTemp = main.Mininet1.iperftcp( host1, host2 ,10 )
     iperfResult = iperfResult and iperfTemp
     if iperfTemp:
         main.assertReturnString += 'Initial Iperf Passed\n'
@@ -627,7 +627,7 @@
             main.assertReturnString += 'Link Down Topology State Failed\n'
 
         # Run iperf to both host
-        iperfTemp = main.Mininet1.iperftcp( host1,host2,10 )
+        iperfTemp = main.Mininet1.iperftcp( host1, host2, 10 )
         iperfResult = iperfResult and iperfTemp
         if iperfTemp:
             main.assertReturnString += 'Link Down Iperf Passed\n'
@@ -671,7 +671,7 @@
             main.assertReturnString += 'Link Up Topology State Failed\n'
 
         # Run iperf to both host
-        iperfTemp = main.Mininet1.iperftcp( host1,host2,10 )
+        iperfTemp = main.Mininet1.iperftcp( host1, host2, 10 )
         iperfResult = iperfResult and iperfTemp
         if iperfTemp:
             main.assertReturnString += 'Link Up Iperf Passed\n'
@@ -810,7 +810,7 @@
                                             setVlan=setVlan,
                                             partial=partial,
                                             encap=encap )
-    except (KeyError, TypeError):
+    except( KeyError, TypeError ):
         errorMsg = "There was a problem loading the hosts data."
         if intentId:
             errorMsg += "  There was a problem installing Singlepoint to Multipoint intent."
@@ -936,7 +936,7 @@
                                             setVlan=setVlan,
                                             partial=partial,
                                             encap=encap )
-    except (KeyError, TypeError):
+    except( KeyError, TypeError ):
         errorMsg = "There was a problem loading the hosts data."
         if intentId:
             errorMsg += "  There was a problem installing Multipoint to Singlepoint intent."
@@ -974,7 +974,7 @@
                      sw1="s5",
                      sw2="s2",
                      expectedLink=0,
-                     useTCP=False):
+                     useTCP=False ):
     """
     Test a Point Intent
 
@@ -1053,7 +1053,7 @@
                 main.log.warn( "Device not given for recipient {0}. Loading from main.hostData".format( recipient.get( "name" ) ) )
                 recipient[ "device" ] = main.hostsData.get( recipient.get( "name" ) ).get( "location" )
         vlanId = senders[ 0 ].get( "vlan" )
-    except (KeyError, TypeError):
+    except( KeyError, TypeError ):
         main.log.error( "There was a problem loading the hosts data." )
         return main.FALSE
 
@@ -1239,7 +1239,7 @@
                 main.log.warn( "Device not given for recipient {0}. Loading from " +\
                                 main.hostData.format( recipient.get( "name" ) ) )
                 recipient[ "device" ] = main.hostsData.get( recipient.get( "name" ) ).get( "location" )
-    except (KeyError, TypeError):
+    except( KeyError, TypeError ):
         main.log.error( "There was a problem loading the hosts data." )
         return main.FALSE
 
@@ -1577,7 +1577,7 @@
             return main.FALSE
 
     if hostFails:
-        main.log.error( "List of failed ONOS Nodes:" + ', '.join(map(str, hostFails )) )
+        main.log.error( "List of failed ONOS Nodes:" + ', '.join( map( str, hostFails ) ) )
         return main.FALSE
     else:
         return main.TRUE
@@ -1591,7 +1591,7 @@
     if not hosts:
         hosts = main.scapyHosts
     for host in hosts:
-        pkt = 'Ether( src="{0}")/ARP( psrc="{1}")'.format( host.hostMac ,host.hostIp )
+        pkt = 'Ether( src="{0}")/ARP( psrc="{1}")'.format( host.hostMac, host.hostIp )
         # Send from the VLAN interface if there is one so ONOS discovers the VLAN correctly
         iface = None
         for interface in host.getIfList():
@@ -1628,7 +1628,7 @@
         main.log.error( "ValueError while populating hostsData" )
         return main.FALSE
     except KeyError:
-        main.log.error( "KeyError while populating hostsData")
+        main.log.error( "KeyError while populating hostsData" )
         return main.FALSE
     except IndexError:
         main.log.error( "IndexError while populating hostsData" )
@@ -1696,7 +1696,7 @@
     checkFlowsResult = main.CLIs[ 0 ].checkFlowsState( isPENDING=False )
     return checkFlowsResult
 
-def link( main, sw1, sw2, option):
+def link( main, sw1, sw2, option ):
 
     # link down
     main.log.info( itemName + ": Bring link " + option + "between " +
@@ -1861,7 +1861,7 @@
     try:
         leaders1 = json.loads( leaders1 )
         leaders2 = json.loads( leaders2 )
-    except ( AttributeError, TypeError):
+    except( AttributeError, TypeError ):
         main.log.exception( self.name + ": Object not as expected" )
         return main.FALSE
     except Exception:
diff --git a/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py b/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
index 26dabed..b99d449 100644
--- a/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
+++ b/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
@@ -65,8 +65,8 @@
             main.numLinks = int( main.params[ 'MININET' ][ 'links' ] )
             main.cellData = {} # for creating cell file
             main.hostsData = {}
+            main.RESTs = []
             main.CLIs = []
-            main.CLIs2 = []
             main.ONOSip = []
             main.scapyHostNames = main.params[ 'SCAPY' ][ 'HOSTNAMES' ].split( ',' )
             main.scapyHosts = []  # List of scapy hosts for iterating
@@ -79,14 +79,14 @@
             # Assigning ONOS cli handles to a list
             try:
                 for i in range( 1,  main.maxNodes + 1 ):
-                    main.CLIs.append( getattr( main, 'ONOSrest' + str( i ) ) )
-                    main.CLIs2.append( getattr( main, 'ONOScli' + str( i ) ) )
+                    main.RESTs.append( getattr( main, 'ONOSrest' + str( i ) ) )
+                    main.CLIs.append( getattr( main, 'ONOScli' + str( i ) ) )
             except AttributeError:
                 main.log.warn( "A " + str( main.maxNodes ) + " node cluster " +
                                "was defined in env variables, but only " +
-                               str( len( main.CLIs ) ) +
+                               str( len( main.RESTs ) ) +
                                " nodes were defined in the .topo file. " +
-                               "Using " + str( len( main.CLIs ) ) +
+                               "Using " + str( len( main.RESTs ) ) +
                                " nodes for the test." )
 
             # -- INIT SECTION, ONLY RUNS ONCE -- #
@@ -110,13 +110,13 @@
                                               main.topology,
                                               main.Mininet1.home + "custom/",
                                               direction="to" )
-            if main.CLIs and main.CLIs2:
+            if main.RESTs and main.CLIs:
                 stepResult = main.TRUE
             else:
                 main.log.error( "Did not properly created list of ONOS CLI handle" )
                 stepResult = main.FALSE
         except Exception as e:
-            main.log.exception(e)
+            main.log.exception( e )
             main.cleanup()
             main.exit()
 
@@ -263,7 +263,7 @@
         cliResult = main.TRUE
         for i in range( main.numCtrls ):
             cliResult = cliResult and \
-                        main.CLIs2[ i ].startOnosCli( main.ONOSip[ i ] )
+                        main.CLIs[ i ].startOnosCli( main.ONOSip[ i ] )
         stepResult = cliResult
         utilities.assert_equals( expect=main.TRUE,
                                  actual=stepResult,
@@ -475,7 +475,7 @@
             Report errors/warnings/exceptions
         '''
         main.log.info( "Error report: \n" )
-        main.ONOSbench.logReport( globalONOSip[0],
+        main.ONOSbench.logReport( globalONOSip[ 0 ],
                 [ "INFO", "FOLLOWER", "WARN", "flow", "ERROR" , "Except" ],
                 "s" )
         #main.ONOSbench.logReport( globalONOSip[1], [ "INFO" ], "d" )
@@ -702,7 +702,7 @@
         main.step( "Balancing mastership of switches" )
 
         balanceResult = main.FALSE
-        balanceResult = utilities.retry( f=main.CLIs2[ 0 ].balanceMasters, retValue=main.FALSE, args=[] )
+        balanceResult = utilities.retry( f=main.CLIs[ 0 ].balanceMasters, retValue=main.FALSE, args=[] )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=stepResult,
@@ -725,7 +725,7 @@
 
         cmd = "org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator"
 
-        stepResult = main.CLIs2[ 0 ].setCfg( component=cmd,
+        stepResult = main.CLIs[ 0 ].setCfg( component=cmd,
                                             propName="useFlowObjectives", value="true" )
 
         utilities.assert_equals( expect=main.TRUE,
@@ -787,7 +787,7 @@
         scpResult = main.TRUE
         copyResult = main.TRUE
         for i in range( main.numCtrls ):
-            main.node = main.CLIs2[ i ]
+            main.node = main.CLIs[ i ]
             ip = main.ONOSip[ i ]
             main.node.ip_address = ip
             scpResult = scpResult and main.ONOSbench.scp( main.node ,
@@ -834,9 +834,9 @@
         # if you want to use the wrapper function
         assert main, "There is no main"
         try:
-            assert main.CLIs
+            assert main.RESTs
         except AssertionError:
-            main.log.error( "There is no main.CLIs, skipping test cases" )
+            main.log.error( "There is no main.RESTs, skipping test cases" )
             main.initialized = main.FALSE
             main.skipCase()
         try:
@@ -848,13 +848,13 @@
         try:
             assert main.numSwitch
         except AssertionError:
-            main.log.error( "Place the total number of switch topology in \
-                             main.numSwitch" )
+            main.log.error( "Place the total number of switch topology in "+\
+                             main.numSwitch )
             main.initialized = main.FALSE
             main.skipCase()
 
         # Save leader candidates
-        intentLeadersOld = main.CLIs2[ 0 ].leaderCandidates()
+        intentLeadersOld = main.CLIs[ 0 ].leaderCandidates()
 
         main.case( "Host Intents Test - " + str( main.numCtrls ) +
                    " NODE(S) - OF " + main.OFProtocol + " - Using " + main.flowCompiler )
@@ -886,7 +886,7 @@
                                               host2=host2,
                                               sw1='s5',
                                               sw2='s2',
-                                              expectedLink = 18 )
+                                              expectedLink=18 )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -896,7 +896,7 @@
         main.step( "DUALSTACK1: Add host intents between h3 and h11" )
         main.assertReturnString = "Assertion Result for dualstack IPV4 with MAC addresses\n"
         host1 = { "name":"h3", "id":"00:00:00:00:00:03/-1" }
-        host2 = { "name":"h11","id":"00:00:00:00:00:0B/-1"}
+        host2 = { "name":"h11","id":"00:00:00:00:00:0B/-1" }
         testResult = main.FALSE
         installResult = main.intentFunction.installHostIntent( main,
                                               name='DUALSTACK1',
@@ -913,12 +913,12 @@
                                               host2=host2,
                                               sw1='s5',
                                               sw2='s2',
-                                              expectedLink = 18 )
+                                              expectedLink=18 )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
                                  onpass=main.assertReturnString,
-                                 onfail=main.assertReturnString)
+                                 onfail=main.assertReturnString )
 
         main.step( "DUALSTACK2: Add host intents between h1 and h11" )
         main.assertReturnString = "Assertion Result for dualstack2 host intent\n"
@@ -940,7 +940,7 @@
                                               host2=host2,
                                               sw1='s5',
                                               sw2='s2',
-                                              expectedLink = 18 )
+                                              expectedLink=18 )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -967,7 +967,7 @@
                                               host2=host2,
                                               sw1='s5',
                                               sw2='s2',
-                                              expectedLink = 18 )
+                                              expectedLink=18 )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -994,7 +994,7 @@
                                               host2=host2,
                                               sw1='s5',
                                               sw2='s2',
-                                              expectedLink = 18 )
+                                              expectedLink=18 )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1022,7 +1022,7 @@
         #                                       host2=host2,
         #                                       sw1='s5',
         #                                       sw2='s2',
-        #                                       expectedLink = 18 )
+        #                                       expectedLink=18 )
 
         # utilities.assert_equals( expect=main.TRUE,
         #                          actual=testResult,
@@ -1032,8 +1032,8 @@
         # Change the following to use the REST API when leader checking is
         # supported by it
 
-        main.step( "Confirm that ONOS leadership is unchanged")
-        intentLeadersNew = main.CLIs2[ 0 ].leaderCandidates()
+        main.step( "Confirm that ONOS leadership is unchanged" )
+        intentLeadersNew = main.CLIs[ 0 ].leaderCandidates()
         main.intentFunction.checkLeaderChange( intentLeadersOld,
                                                 intentLeadersNew )
 
@@ -1073,9 +1073,9 @@
         # if you want to use the wrapper function
         assert main, "There is no main"
         try:
-            assert main.CLIs
+            assert main.RESTs
         except AssertionError:
-            main.log.error( "There is no main.CLIs, skipping test cases" )
+            main.log.error( "There is no main.RESTs, skipping test cases" )
             main.initialized = main.FALSE
             main.skipCase()
         try:
@@ -1087,8 +1087,8 @@
         try:
             assert main.numSwitch
         except AssertionError:
-            main.log.error( "Place the total number of switch topology in \
-                             main.numSwitch" )
+            main.log.error( "Place the total number of switch topology in "+\
+                             main.numSwitch )
             main.initialized = main.FALSE
             main.skipCase()
 
@@ -1128,7 +1128,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1159,7 +1159,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1189,7 +1189,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1293,7 +1293,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1323,7 +1323,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1356,7 +1356,7 @@
                                          recipients=recipients,
                                          sw1="s5",
                                          sw2="s2",
-                                         expectedLink=18)
+                                         expectedLink=18 )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1657,9 +1657,9 @@
         # if you want to use the wrapper function
         assert main, "There is no main"
         try:
-            assert main.CLIs
+            assert main.RESTs
         except AssertionError:
-            main.log.error( "There is no main.CLIs, skipping test cases" )
+            main.log.error( "There is no main.RESTs, skipping test cases" )
             main.initialized = main.FALSE
             main.skipCase()
         try:
@@ -1671,16 +1671,16 @@
         try:
             assert main.numSwitch
         except AssertionError:
-            main.log.error( "Place the total number of switch topology in \
-                             main.numSwitch" )
+            main.log.error( "Place the total number of switch topology in " +\
+                             main.numSwitch )
             main.initialized = main.FALSE
             main.skipCase()
         main.case( "Test host mobility with host intents " )
         main.step( "Testing host mobility by moving h1 from s5 to s6" )
         h1PreMove = main.hostsData[ "h1" ][ "location" ][ 0:19 ]
 
-        main.log.info( "Moving h1 from s5 to s6")
-        main.Mininet1.moveHost( "h1","s5","s6" )
+        main.log.info( "Moving h1 from s5 to s6" )
+        main.Mininet1.moveHost( "h1", "s5", "s6" )
 
         # Send discovery ping from moved host
         # Moving the host brings down the default interfaces and creates a new one.
@@ -1712,7 +1712,7 @@
                                               name='IPV4 Mobility IPV4',
                                               onosNode='0',
                                               host1=host1,
-                                              host2=host2)
+                                              host2=host2 )
         if installResult:
             testResult = main.intentFunction.testHostIntent( main,
                                                   name='Host Mobility IPV4',
diff --git a/TestON/tests/FUNC/FUNCintentRest/dependencies/FuncIntentFunction.py b/TestON/tests/FUNC/FUNCintentRest/dependencies/FuncIntentFunction.py
index 92d100f..1d4499c 100755
--- a/TestON/tests/FUNC/FUNCintentRest/dependencies/FuncIntentFunction.py
+++ b/TestON/tests/FUNC/FUNCintentRest/dependencies/FuncIntentFunction.py
@@ -23,7 +23,7 @@
                        ipAddresses="",
                        tcp="",
                        sw1="",
-                       sw2=""):
+                       sw2="" ):
     """
     Installs a Host Intent
 
@@ -46,7 +46,7 @@
         host2 - Dictionary for host2
             { "name":"h16", "id":"of:0000000000000006/8" }
     Optional:
-        onosNode - ONOS node to install the intents in main.CLIs[ ]
+        onosNode - ONOS node to install the intents in main.RESTs[ ]
                    0 by default so that it will always use the first
                    ONOS node
         ethType - Ethernet type eg. IPV4, IPV6
@@ -80,14 +80,14 @@
         # Adding host intents
         main.log.info( itemName + ": Adding host intents" )
 
-        intent1 = main.CLIs[ onosNode ].addHostIntent( hostIdOne=host1.get( "id" ),
+        intent1 = main.RESTs[ onosNode ].addHostIntent( hostIdOne=host1.get( "id" ),
                                                        hostIdTwo=host2.get( "id" ),
                                                        vlanId=vlanId )
 
         # Get all intents ID in the system, time delay right after intents are added
         time.sleep( main.addIntentSleep )
-        intentsId = main.CLIs[ 0 ].getIntentsId()
-    except (KeyError, TypeError):
+        intentsId = main.RESTs[ 0 ].getIntentsId()
+    except( KeyError, TypeError ):
         errorMsg = "There was a problem loading the hosts data."
         if intentsId:
             errorMsg += "  There was a problem installing host to host intent."
@@ -116,7 +116,7 @@
                     onosNode=0,
                     sw1="s5",
                     sw2="s2",
-                    expectedLink=0):
+                    expectedLink=0 ):
     """
     Test a Host Intent
 
@@ -150,7 +150,7 @@
         host2 - Dictionary for host2
             { "name":"h16", "id":"of:0000000000000006/8" }
     Optional:
-        onosNode - ONOS node to install the intents in main.CLIs[ ]
+        onosNode - ONOS node to install the intents in main.RESTs[ ]
                    0 by default so that it will always use the first
                    ONOS node
         sw1 - First switch to bring down & up for rerouting purpose
@@ -185,7 +185,7 @@
         senderNames = [ host1.get( "name" ), host2.get( "name" ) ]
         recipientNames = [ host1.get( "name" ), host2.get( "name" ) ]
         vlanId = host1.get( "vlanId" )
-    except ( KeyError, TypeError ):
+    except( KeyError, TypeError ):
         main.log.error( "There was a problem loading the hosts data." )
         return main.FALSE
 
@@ -309,7 +309,7 @@
                         ipSrc="",
                         ipDst="",
                         tcpSrc="",
-                        tcpDst=""):
+                        tcpDst="" ):
     """
     Installs a Single to Single Point Intent
 
@@ -331,7 +331,7 @@
         recipients - List of host dictionaries i.e.
             [ { "name":"h16", "device":"of:0000000000000006/8", "mac":"00:00:00:00:00:10" } ]
     Optional:
-        onosNode - ONOS node to install the intents in main.CLIs[ ]
+        onosNode - ONOS node to install the intents in main.RESTs[ ]
                    0 by default so that it will always use the first
                    ONOS node
         ethType - Ethernet type eg. IPV4, IPV6
@@ -384,7 +384,7 @@
         ipSrc = senders[ 0 ].get( "ip" )
         ipDst = recipients[ 0 ].get( "ip" )
 
-        intent1 = main.CLIs[ onosNode ].addPointIntent(
+        intent1 = main.RESTs[ onosNode ].addPointIntent(
                                             ingressDevice=ingressDevice,
                                             egressDevice=egressDevice,
                                             ingressPort=portIngress,
@@ -402,8 +402,8 @@
                                             vlanId=vlanId )
 
         time.sleep( main.addIntentSleep )
-        intentsId = main.CLIs[ 0 ].getIntentsId()
-    except (KeyError, TypeError):
+        intentsId = main.RESTs[ 0 ].getIntentsId()
+    except( KeyError, TypeError ):
         errorMsg = "There was a problem loading the hosts data."
         if intentsId:
             errorMsg += "  There was a problem installing Point to Point intent."
@@ -476,7 +476,7 @@
         recipients - List of host dictionaries i.e.
             { "name":"h16", "device":"of:0000000000000006/8", "mac":"00:00:00:00:00:10" }
     Optional:
-        onosNode - ONOS node to install the intents in main.CLIs[ ]
+        onosNode - ONOS node to install the intents in main.RESTs[ ]
                    0 by default so that it will always use the first
                    ONOS node
         ethType - Ethernet type eg. IPV4, IPV6
@@ -521,7 +521,7 @@
                 main.log.warn( "Device not given for recipient {0}. Loading from main.hostData".format( recipient.get( "name" ) ) )
                 recipient[ "device" ] = main.hostsData.get( recipient.get( "name" ) ).get( "location" )
         vlanId=senders[ 0 ].get( "vlanId" )
-    except (KeyError, TypeError):
+    except( KeyError, TypeError ):
         main.log.error( "There was a problem loading the hosts data." )
         return main.FALSE
 
@@ -697,7 +697,7 @@
         host1 - Name of first host
         host2 - Name of second host
     Optional:
-        onosNode - ONOS node to install the intents in main.CLIs[ ]
+        onosNode - ONOS node to install the intents in main.RESTs[ ]
                    0 by default so that it will always use the first
                    ONOS node
         deviceId1 - ONOS device id of the first switch, the same as the
@@ -745,7 +745,7 @@
 
     # Adding bidirectional point  intents
     main.log.info( itemName + ": Adding point intents" )
-    intent1 = main.CLIs[ onosNode ].addPointIntent( ingressDevice=deviceId1,
+    intent1 = main.RESTs[ onosNode ].addPointIntent( ingressDevice=deviceId1,
                                                     egressDevice=deviceId2,
                                                     ingressPort=port1,
                                                     egressPort=port2,
@@ -760,7 +760,7 @@
                                                     tcpSrc=tcp1,
                                                     tcpDst="" )
 
-    intent2 = main.CLIs[ onosNode ].addPointIntent( ingressDevice=deviceId2,
+    intent2 = main.RESTs[ onosNode ].addPointIntent( ingressDevice=deviceId2,
                                                     egressDevice=deviceId1,
                                                     ingressPort=port2,
                                                     egressPort=port1,
@@ -775,7 +775,7 @@
                                                     tcpSrc=tcp2,
                                                     tcpDst="" )
 
-    intent3 = main.CLIs[ onosNode ].addPointIntent( ingressDevice=deviceId1,
+    intent3 = main.RESTs[ onosNode ].addPointIntent( ingressDevice=deviceId1,
                                                     egressDevice=deviceId2,
                                                     ingressPort=port1,
                                                     egressPort=port2,
@@ -790,7 +790,7 @@
                                                     tcpSrc="",
                                                     tcpDst=tcp2 )
 
-    intent4 = main.CLIs[ onosNode ].addPointIntent( ingressDevice=deviceId2,
+    intent4 = main.RESTs[ onosNode ].addPointIntent( ingressDevice=deviceId2,
                                                     egressDevice=deviceId1,
                                                     ingressPort=port2,
                                                     egressPort=port1,
@@ -807,7 +807,7 @@
 
     # Get all intents ID in the system, time delay right after intents are added
     time.sleep( main.addIntentSleep )
-    intentsId = main.CLIs[ 0 ].getIntentsId()
+    intentsId = main.RESTs[ 0 ].getIntentsId()
     # Check intents state
     time.sleep( main.checkIntentSleep )
     intentResult = checkIntentState( main, intentsId )
@@ -934,7 +934,7 @@
             name - Type of point intent to add eg. IPV4 | VLAN | Dualstack
             hostNames - List of host names
         Optional:
-            onosNode - ONOS node to install the intents in main.CLIs[ ]
+            onosNode - ONOS node to install the intents in main.RESTs[ ]
                        0 by default so that it will always use the first
                        ONOS node
             devices - List of device ids in the same order as the hosts
@@ -1040,7 +1040,7 @@
                 srcMac = ""
 
         intentsId.append(
-                        main.CLIs[ onosNode ].addSinglepointToMultipointIntent(
+                        main.RESTs[ onosNode ].addSinglepointToMultipointIntent(
                                             ingressDevice=ingressDevice,
                                             egressDeviceList=egressDeviceList,
                                             portIngress=portIngress,
@@ -1176,7 +1176,7 @@
             name - Type of point intent to add eg. IPV4 | VLAN | Dualstack
             hostNames - List of host names
         Optional:
-            onosNode - ONOS node to install the intents in main.CLIs[ ]
+            onosNode - ONOS node to install the intents in main.RESTs[ ]
                        0 by default so that it will always use the first
                        ONOS node
             devices - List of device ids in the same order as the hosts
@@ -1281,7 +1281,7 @@
                 dstMac = ""
 
         intentsId.append(
-                        main.CLIs[ onosNode ].addMultipointToSinglepointIntent(
+                        main.RESTs[ onosNode ].addMultipointToSinglepointIntent(
                                             ingressDeviceList=ingressDeviceList,
                                             egressDevice=egressDevice,
                                             portIngressList=portIngressList,
@@ -1388,7 +1388,7 @@
     appCheck = main.TRUE
     getDataResult = main.TRUE
     main.log.info( "Activating reactive forwarding app " )
-    activateResult = main.CLIs[ 0 ].activateApp( "org.onosproject.fwd" )
+    activateResult = main.RESTs[ 0 ].activateApp( "org.onosproject.fwd" )
     if not activateResult:
         main.log.error( "Something went wrong installing fwd app" )
     time.sleep( main.fwdSleep )
@@ -1398,7 +1398,7 @@
         for i in xrange( len( hostList ) ):
             main.Mininet1.pingallHosts( hostList[ i ] )
 
-    hostsJson = json.loads( main.CLIs[ 0 ].hosts() )
+    hostsJson = json.loads( main.RESTs[ 0 ].hosts() )
     hosts = main.Mininet1.getHosts().keys()
     # TODO: Make better use of new getHosts function
     for host in hosts:
@@ -1415,7 +1415,7 @@
                 main.hostsData[ host ][ 'ipAddresses' ] = hostj[ 'ipAddresses' ]
 
     main.log.info( "Deactivating reactive forwarding app " )
-    deactivateResult = main.CLIs[ 0 ].deactivateApp( "org.onosproject.fwd" )
+    deactivateResult = main.RESTs[ 0 ].deactivateApp( "org.onosproject.fwd" )
     if activateResult and deactivateResult and main.hostsData:
         main.log.info( "Successfully used fwd app to discover hosts " )
         getDataResult = main.TRUE
@@ -1433,7 +1433,7 @@
     main.log.info( itemName + ": Checking ONOS topology " )
 
     for i in range( main.numCtrls ):
-        statusResult = main.CLIs[ i ].checkStatus( main.numSwitch,
+        statusResult = main.RESTs[ i ].checkStatus( main.numSwitch,
                                                    expectedLink )\
                        and statusResult
     if not statusResult:
@@ -1454,7 +1454,7 @@
     main.log.info( itemName + ": Checking intents state" )
     # First check of intents
     for i in range( main.numCtrls ):
-        tempResult = main.CLIs[ i ].checkIntentState( intentsId=intentsId )
+        tempResult = main.RESTs[ i ].checkIntentState( intentsId=intentsId )
         results.append( tempResult )
 
     expectedState = [ 'INSTALLED', 'INSTALLING' ]
@@ -1469,7 +1469,7 @@
         # Second check of intents since some of the intents may be in
         # INSTALLING state, they should be in INSTALLED at this time
         for i in range( main.numCtrls ):
-            tempResult = main.CLIs[ i ].checkIntentState( intentsId=intentsId )
+            tempResult = main.RESTs[ i ].checkIntentState( intentsId=intentsId )
             results.append( tempResult )
         if all( result == main.TRUE for result in results ):
             main.log.info( itemName + ": Intents are installed correctly" )
@@ -1483,7 +1483,7 @@
 def checkFlowsState( main ):
 
     main.log.info( itemName + ": Check flows state" )
-    checkFlowsResult = main.CLIs[ 0 ].checkFlowsState()
+    checkFlowsResult = main.RESTs[ 0 ].checkFlowsState()
     return checkFlowsResult
 
 def link( main, sw1, sw2, option):
@@ -1502,7 +1502,7 @@
     onosSummary = []
     removeIntentResult = main.TRUE
     # Remove intents
-    removeIntentResult = main.CLIs[ 0 ].removeAllIntents( )
+    removeIntentResult = main.RESTs[ 0 ].removeAllIntents( )
 
     if removeIntentResult:
         main.log.info( itemName + ": There are no more intents remaining, " +
@@ -1518,7 +1518,7 @@
     flowsCount = []
     main.log.info( itemName + ": Checking flows count in each ONOS node" )
     for i in range( main.numCtrls ):
-        flowsCount.append( len( json.loads( main.CLIs[ i ].flows() ) ) )
+        flowsCount.append( len( json.loads( main.RESTs[ i ].flows() ) ) )
 
     if flowsCount:
         if all( flows==flowsCount[ 0 ] for flows in flowsCount ):
@@ -1595,7 +1595,7 @@
             return main.FALSE
 
     if hostFails:
-        main.log.error( "List of failed ONOS Nodes:" + ', '.join(map(str, hostFails )) )
+        main.log.error( "List of failed ONOS Nodes:" + ', '.join( map( str, hostFails ) ) )
         return main.FALSE
     else:
         return main.TRUE
@@ -1606,7 +1606,7 @@
     """
     import json
     try:
-        hostsJson = json.loads( main.CLIs[ 0 ].hosts() )
+        hostsJson = json.loads( main.RESTs[ 0 ].hosts() )
         hosts = main.Mininet1.getHosts().keys()
         # TODO: Make better use of new getHosts function
         for host in hosts:
@@ -1650,7 +1650,7 @@
     if not packetFilter:
         packetFilter = 'ether host {}'
     if useTCP:
-        packetFilter += ' ip proto \\tcp tcp port {}'.format(main.params[ 'SDNIP' ][ 'dstPort' ])
+        packetFilter += ' ip proto \\tcp tcp port {}'.format( main.params[ 'SDNIP' ][ 'dstPort' ] )
     if expectFailure:
         timeout = 1
     else:
@@ -1766,7 +1766,7 @@
                                 "flow",
                                 "ERROR",
                                 "Except" ],
-                              "s" )
+                                "s" )
 
     main.log.info( "ERROR report: \n" )
     for i in range( main.numCtrls ):
@@ -1792,7 +1792,7 @@
     """
     import time
     main.log.info( "Getting current flow durations" )
-    flowsJson1 = main.CLIs[ 0 ].flows()
+    flowsJson1 = main.RESTs[ 0 ].flows()
     try:
         flowsJson1 = json.loads( flowsJson1 )
     except ValueError:
@@ -1806,7 +1806,7 @@
     main.log.info( "Sleeping for {} seconds".format( main.flowDurationSleep ) )
     time.sleep( main.flowDurationSleep )
     main.log.info( "Getting new flow durations" )
-    flowsJson2 = main.CLIs[ 0 ].flows()
+    flowsJson2 = main.RESTs[ 0 ].flows()
     try:
         flowsJson2 = json.loads( flowsJson2 )
     except ValueError:
@@ -1817,7 +1817,7 @@
             waitFlowLife.append( flow[ 'life' ] )
     main.log.info( "Determining whether flows where overwritten" )
     if len( flowLife ) == len( waitFlowLife ):
-        for i in range( len( flowLife) ):
+        for i in range( len( flowLife ) ):
             if waitFlowLife[ i ] - flowLife[ i ] < main.flowDurationSleep:
                 return main.FALSE
     else: