diff --git a/TestON/bin/cleanup.sh b/TestON/bin/cleanup.sh
index f931eca..3f82161 100755
--- a/TestON/bin/cleanup.sh
+++ b/TestON/bin/cleanup.sh
@@ -29,5 +29,6 @@
         echo "Restoring iptables rules on ${i}"
         ssh sdn@$i "sudo iptables -F"
         ssh sdn@$i "sudo iptables-restore < /etc/iptables/rules.v4"
+        exit 0
     done
 fi
diff --git a/TestON/bin/test-summary b/TestON/bin/test-summary
index 7832f60..624fddd 100755
--- a/TestON/bin/test-summary
+++ b/TestON/bin/test-summary
@@ -3,12 +3,12 @@
 set -e -o pipefail
 
 if [ "$#" -lt 1 ]; then
-    ls -t ~/OnosSystemTest/TestON/logs/*/*y.txt | head -1 | xargs cat | grep -E "^|FAIL"
+    ls -t ~/OnosSystemTest/TestON/logs/*/*Summary.txt | head -1 | xargs cat | grep -E "^|FAIL"
     exit 1
 fi
 if [ "$1" = "-f" ]; then
     # NOTE: This is blocking
-    ls -t ~/OnosSystemTest/TestON/logs/*/*y.txt | head -1 | xargs tail -n+1 -f
+    ls -t ~/OnosSystemTest/TestON/logs/*/*Summary.txt | head -1 | xargs tail -n+1 -f
 else
     printf "usage: $(basename $0) [options]\n\n"
     printf "Simple command to print the latest test summary file.\n"
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index 6b4efdd..54e7d0f 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -1302,6 +1302,9 @@
             if re.search( "Unknown command", response ):
                 main.log.warn( response )
                 return main.FALSE
+            if re.search( "Permission denied", response ):
+                main.log.warn( response )
+                return main.FALSE
         except pexpect.TIMEOUT:
             main.log.error( self.name + ": pexpect.TIMEOUT found" )
             main.cleanup()
@@ -1903,6 +1906,24 @@
         else:
             main.log.error( "Connection failed to the Mininet host" )
 
+    def checkFlows( self, sw, dumpFormat=None ):
+        if dumpFormat:
+            command = "sh ovs-ofctl -F " + \
+                dumpFormat + " dump-flows " + str( sw )
+        else:
+            command = "sh ovs-ofctl dump-flows " + str( sw )
+        try:
+            response = self.execute(
+                cmd=command,
+                prompt="mininet>",
+                timeout=10 )
+            return response
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":     " + self.handle.before )
+            main.cleanup()
+            main.exit()
+
     def flowTableComp( self, flowTable1, flowTable2 ):
         # This function compares the selctors and treatments of each flow
         try:
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index fad5ce5..ba2b37c 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -1744,6 +1744,48 @@
             main.cleanup()
             main.exit()
 
+    def removeAllIntents( self, purge=False, sync=False, app='org.onosproject.cli' ):
+        """
+        Description:
+            Remove all the intents
+        Optional args:-
+            -s or --sync: Waits for the removal before returning
+            -p or --purge: Purge the intent from the store after removal
+        Returns:
+            Returns main.TRUE if all intents are removed, otherwise returns
+            main.FALSE; Returns None for exception
+        """
+        try:
+            cmdStr = "remove-intent"
+            if purge:
+                cmdStr += " -p"
+            if sync:
+                cmdStr += " -s"
+
+            cmdStr += " " + app
+            handle = self.sendline( cmdStr )
+            assert "Command not found:" not in handle, handle
+            if re.search( "Error", handle ):
+                main.log.error( "Error in removing intent" )
+                return main.FALSE
+            else:
+                return main.TRUE
+        except AssertionError:
+            main.log.exception( "" )
+            return None
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            main.cleanup()
+            main.exit()
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
     def purgeWithdrawnIntents( self ):
         """
         Purges all WITHDRAWN Intents
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index b55f98a..d8edf32 100644
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -936,6 +936,8 @@
             i = self.handle.expect( [ "Network\sis\sunreachable",
                                       "onos\sstart/running,\sprocess",
                                       "ONOS\sis\salready\sinstalled",
+                                      "already\sup-to-date",
+                                      "\$",
                                       pexpect.TIMEOUT ], timeout=60 )
             if i == 0:
                 main.log.warn( "Network is unreachable" )
@@ -953,6 +955,13 @@
                 self.handle.expect( "\$" )
                 return main.TRUE
             elif i == 3:
+                main.log.info( "ONOS is already installed on " + node )
+                self.handle.expect( "\$" )
+                return main.TRUE
+            elif i == 4:
+                main.log.info( "ONOS was installed on " + node )
+                return main.TRUE
+            elif i == 5:
                 main.log.info(
                     "Installation of ONOS on " +
                     node +
diff --git a/TestON/tests/FUNCintent/FUNCintent.params b/TestON/tests/FUNCintent/FUNCintent.params
index d19a45d..26ee48d 100644
--- a/TestON/tests/FUNCintent/FUNCintent.params
+++ b/TestON/tests/FUNCintent/FUNCintent.params
@@ -9,8 +9,9 @@
     # 12 - Assign switch to controller
     # 13 - Create Scapy Components
     # 14 - Discover hosts with Mininet Pingall
-    $ 15 - Discover hosts with Scapy arping ( only discovers scapy hosts )
-    # 16 - Stop Mininet
+    # 15 - Discover hosts with Scapy arping ( only discovers scapy hosts )
+    # 16 - Balance ownership of switches
+    # 17 - Stop Mininet
     # 1000 - Test host intents
     # 2000 - Test point intents
     # 3000 - Test single to multi point intents
@@ -18,7 +19,7 @@
     # 5000 - Test host mobility
     # 6000 - Test Multi Point intent End Point Failure
 
-    <testcases>1,[2,10,12,13,15,1000,2000,3000,4000,5000,6000,16]*2,[2,11,12,13,15,1000,2000,3000,4000,5000,6000,16]*2</testcases>
+    <testcases>1,[2,10,12,13,15,16,1000,2000,3000,4000,5000,6000,17]*2,[2,11,12,13,15,16,1000,2000,3000,4000,5000,6000,17]*2</testcases>
 
     <SCALE>
         <size>1,3,1,3</size>
@@ -66,4 +67,4 @@
         <dstPort>5001</dstPort>
     </SDNIP>
 
-</PARAMS>
+</PARAMS>
\ No newline at end of file
diff --git a/TestON/tests/FUNCintent/FUNCintent.py b/TestON/tests/FUNCintent/FUNCintent.py
index e1660f1..ba4e8dd 100644
--- a/TestON/tests/FUNCintent/FUNCintent.py
+++ b/TestON/tests/FUNCintent/FUNCintent.py
@@ -140,8 +140,6 @@
         main.caseExplanation = "Set up ONOS with " + str( main.numCtrls ) +\
                                 " node(s) ONOS cluster"
 
-
-
         #kill off all onos processes
         main.log.info( "Safety check, killing all ONOS processes" +
                        " before initiating environment setup" )
@@ -157,6 +155,7 @@
                                  actual=stepResult,
                                  onpass="Successfully uninstalled ONOS package",
                                  onfail="Failed to uninstall ONOS package" )
+        time.sleep( main.startUpSleep )
 
         for i in range( main.maxNodes ):
             main.ONOSbench.onosDie( main.ONOSip[ i ] )
@@ -540,6 +539,21 @@
 
     def CASE16( self, main ):
         """
+            Balance Masters
+        """
+        main.case( "Balance mastership of switches" )
+        main.step( "Balancing mastership of switches" )
+
+        balanceResult = main.FALSE
+        balanceResult = utilities.retry( f=main.CLIs[ 0 ].balanceMasters, retValue=main.FALSE, args=[] )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully balanced mastership of switches",
+                                 onfail="Failed to balance mastership of switches" )
+
+    def CASE17( self, main ):
+        """
             Stop mininet and remove scapy host
         """
         main.log.report( "Stop Mininet and Scapy" )
@@ -625,6 +639,7 @@
         host1 = { "name":"h1","id":"00:00:00:00:00:01/-1" }
         host2 = { "name":"h9","id":"00:00:00:00:00:09/-1" }
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installHostIntent( main,
                                               name='IPV4',
                                               onosNode='0',
@@ -640,6 +655,8 @@
                                               sw1='s5',
                                               sw2='s2',
                                               expectedLink = 18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -651,6 +668,7 @@
         host1 = { "name":"h3","id":"00:00:00:00:00:03/-1" }
         host2 = { "name":"h11","id":"00:00:00:00:00:0B/-1 "}
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installHostIntent( main,
                                               name='DUALSTACK',
                                               onosNode='0',
@@ -678,6 +696,7 @@
         host1 = { "name":"h1" }
         host2 = { "name":"h11" }
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installHostIntent( main,
                                               name='DUALSTACK2',
                                               onosNode='0',
@@ -694,6 +713,8 @@
                                               sw1='s5',
                                               sw2='s2',
                                               expectedLink = 18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -705,6 +726,7 @@
         host1 = { "name":"h1" }
         host2 = { "name":"h3" }
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installHostIntent( main,
                                               name='1HOP',
                                               onosNode='0',
@@ -721,6 +743,8 @@
                                               sw1='s5',
                                               sw2='s2',
                                               expectedLink = 18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -732,6 +756,7 @@
         host1 = { "name":"h4","id":"00:00:00:00:00:04/100" }
         host2 = { "name":"h12","id":"00:00:00:00:00:0C/100 "}
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installHostIntent( main,
                                               name='VLAN1',
                                               onosNode='0',
@@ -748,6 +773,8 @@
                                               sw1='s5',
                                               sw2='s2',
                                               expectedLink = 18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -759,6 +786,7 @@
         host1 = { "name":"h13" }
         host2 = { "name":"h20" }
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installHostIntent( main,
                                               name='VLAN2',
                                               onosNode='0',
@@ -775,6 +803,8 @@
                                               sw1='s5',
                                               sw2='s2',
                                               expectedLink = 18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -844,6 +874,8 @@
         recipients = [
             { "name":"h9","device":"of:0000000000000006/1" }
         ]
+        testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installPointIntent(
                                        main,
                                        name="NOOPTION",
@@ -860,6 +892,8 @@
                                          sw1="s5",
                                          sw2="s2",
                                          expectedLink=18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -875,6 +909,8 @@
         recipients = [
             { "name":"h9","device":"of:0000000000000006/1","mac":"00:00:00:00:00:09" }
         ]
+        testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installPointIntent(
                                        main,
                                        name="IPV4",
@@ -892,6 +928,8 @@
                                          sw1="s5",
                                          sw2="s2",
                                          expectedLink=18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -905,6 +943,8 @@
         recipients = [
             { "name":"h9","device":"of:0000000000000006/1" }
         ]
+        testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installPointIntent(
                                        main,
                                        name="IPV4_2",
@@ -922,6 +962,8 @@
                                          sw1="s5",
                                          sw2="s2",
                                          expectedLink=18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -942,7 +984,8 @@
         # Uneccessary, not including this in the selectors
         tcpSrc = main.params[ 'SDNIP' ][ 'srcPort' ]
         tcpDst = main.params[ 'SDNIP' ][ 'dstPort' ]
-
+        testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installPointIntent(
                                        main,
                                        name="SDNIP-ICMP",
@@ -963,6 +1006,8 @@
                                          sw1="s5",
                                          sw2="s2",
                                          expectedLink=18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1008,6 +1053,8 @@
         recipients = [
             { "name":"h11","device":"of:0000000000000006/3","mac":"00:00:00:00:00:0B" }
         ]
+        testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installPointIntent(
                                        main,
                                        name="DUALSTACK1",
@@ -1025,6 +1072,8 @@
                                          sw1="s5",
                                          sw2="s2",
                                          expectedLink=18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1039,6 +1088,8 @@
         recipients = [
             { "name":"h21","device":"of:0000000000000007/5","mac":"00:00:00:00:00:15" }
         ]
+        testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installPointIntent(
                                        main,
                                        name="DUALSTACK1",
@@ -1070,6 +1121,8 @@
         recipients = [
             { "name":"h3","device":"of:0000000000000005/3","mac":"00:00:00:00:00:03" }
         ]
+        testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installPointIntent(
                                        main,
                                        name="1HOP IPV4",
@@ -1087,6 +1140,8 @@
                                          sw1="s5",
                                          sw2="s2",
                                          expectedLink=18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1143,6 +1198,7 @@
         badSenders=[ { "name":"h9" } ]  # Senders that are not in the intent
         badRecipients=[ { "name":"h17" } ]  # Recipients that are not in the intent
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installSingleToMultiIntent(
                                          main,
                                          name="NOOPTION",
@@ -1163,6 +1219,8 @@
                                          sw1="s5",
                                          sw2="s2",
                                          expectedLink=18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1181,6 +1239,7 @@
         badSenders=[ { "name":"h9" } ]  # Senders that are not in the intent
         badRecipients=[ { "name":"h17" } ]  # Recipients that are not in the intent
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installSingleToMultiIntent(
                                          main,
                                          name="IPV4",
@@ -1202,6 +1261,8 @@
                                          sw1="s5",
                                          sw2="s2",
                                          expectedLink=18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1220,6 +1281,7 @@
         badSenders=[ { "name":"h9" } ]  # Senders that are not in the intent
         badRecipients=[ { "name":"h17" } ]  # Recipients that are not in the intent
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installSingleToMultiIntent(
                                          main,
                                          name="IPV4_2",
@@ -1241,6 +1303,8 @@
                                          sw1="s5",
                                          sw2="s2",
                                          expectedLink=18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1259,6 +1323,7 @@
         badSenders=[ { "name":"h13" } ]  # Senders that are not in the intent
         badRecipients=[ { "name":"h21" } ]  # Recipients that are not in the intent
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installSingleToMultiIntent(
                                          main,
                                          name="IPV4",
@@ -1280,6 +1345,8 @@
                                          sw1="s5",
                                          sw2="s2",
                                          expectedLink=18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1336,6 +1403,7 @@
         badSenders=[ { "name":"h17" } ]  # Senders that are not in the intent
         badRecipients=[ { "name":"h9" } ]  # Recipients that are not in the intent
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installMultiToSingleIntent(
                                          main,
                                          name="NOOPTION",
@@ -1356,6 +1424,8 @@
                                          sw1="s5",
                                          sw2="s2",
                                          expectedLink=18 )
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1374,6 +1444,7 @@
         badSenders=[ { "name":"h17" } ]  # Senders that are not in the intent
         badRecipients=[ { "name":"h9" } ]  # Recipients that are not in the intent
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installMultiToSingleIntent(
                                          main,
                                          name="IPV4",
@@ -1395,6 +1466,8 @@
                                          sw1="s5",
                                          sw2="s2",
                                          expectedLink=18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1413,6 +1486,7 @@
         badSenders=[ { "name":"h17" } ]  # Senders that are not in the intent
         badRecipients=[ { "name":"h9" } ]  # Recipients that are not in the intent
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installMultiToSingleIntent(
                                          main,
                                          name="IPV4_2",
@@ -1434,6 +1508,8 @@
                                          sw1="s5",
                                          sw2="s2",
                                          expectedLink=18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1452,6 +1528,7 @@
         badSenders=[ { "name":"h12" } ]  # Senders that are not in the intent
         badRecipients=[ { "name":"h20" } ]  # Recipients that are not in the intent
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installMultiToSingleIntent(
                                          main,
                                          name="VLAN",
@@ -1473,6 +1550,8 @@
                                          sw1="s5",
                                          sw2="s2",
                                          expectedLink=18)
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1523,7 +1602,8 @@
         main.assertReturnString = "Assert result for IPV4 host intent between h1, moved, and h9\n"
         host1 = { "name":"h1","id":"00:00:00:00:00:01/-1" }
         host2 = { "name":"h9","id":"00:00:00:00:00:09/-1" }
-
+        testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installHostIntent( main,
                                               name='IPV4 Mobility IPV4',
                                               onosNode='0',
@@ -1539,6 +1619,8 @@
                                                   sw1="s6",
                                                   sw2="s2",
                                                   expectedLink=18 )
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1573,6 +1655,7 @@
         ]
         isolatedRecipients = []
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installMultiToSingleIntent(
                                          main,
                                          name="NOOPTION",
@@ -1597,6 +1680,8 @@
                                          sw5="s3",
                                          expectedLink1=16,
                                          expectedLink2=14 )
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1618,6 +1703,7 @@
         ]
         isolatedRecipients = []
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installMultiToSingleIntent(
                                          main,
                                          name="IPV4",
@@ -1643,6 +1729,9 @@
                                          sw5="s3",
                                          expectedLink1=16,
                                          expectedLink2=14 )
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
+
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
                                  onpass=main.assertReturnString,
@@ -1663,6 +1752,7 @@
         ]
         isolatedRecipients = []
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installMultiToSingleIntent(
                                          main,
                                          name="IPV4_2",
@@ -1688,6 +1778,8 @@
                                          sw5="s3",
                                          expectedLink1=16,
                                          expectedLink2=14 )
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1709,6 +1801,7 @@
         ]
         isolatedRecipients = []
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installMultiToSingleIntent(
                                          main,
                                          name="VLAN",
@@ -1734,6 +1827,8 @@
                                          sw5="s3",
                                          expectedLink1=16,
                                          expectedLink2=14 )
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1755,6 +1850,7 @@
             { "name":"h24" }
         ]
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installSingleToMultiIntent(
                                          main,
                                          name="NOOPTION",
@@ -1779,6 +1875,8 @@
                                          sw5="s3",
                                          expectedLink1=16,
                                          expectedLink2=14 )
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1800,6 +1898,7 @@
             { "name":"h24" }
         ]
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installSingleToMultiIntent(
                                          main,
                                          name="IPV4",
@@ -1825,6 +1924,8 @@
                                          sw5="s3",
                                          expectedLink1=16,
                                          expectedLink2=14 )
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1846,6 +1947,7 @@
             { "name":"h24" }
         ]
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installSingleToMultiIntent(
                                          main,
                                          name="IPV4_2",
@@ -1871,6 +1973,8 @@
                                          sw5="s3",
                                          expectedLink1=16,
                                          expectedLink2=14 )
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
@@ -1892,6 +1996,7 @@
             { "name":"h20" }
         ]
         testResult = main.FALSE
+        installResult = main.FALSE
         installResult = main.intentFunction.installSingleToMultiIntent(
                                          main,
                                          name="IPV4",
@@ -1917,6 +2022,8 @@
                                          sw5="s3",
                                          expectedLink1=16,
                                          expectedLink2=14 )
+        else:
+            main.CLIs[ 0 ].removeAllIntents( purge=True )
 
         utilities.assert_equals( expect=main.TRUE,
                                  actual=testResult,
diff --git a/TestON/tests/FUNCintentRest/FUNCintentRest.params b/TestON/tests/FUNCintentRest/FUNCintentRest.params
index 94339b4..07a5cff 100644
--- a/TestON/tests/FUNCintentRest/FUNCintentRest.params
+++ b/TestON/tests/FUNCintentRest/FUNCintentRest.params
@@ -10,14 +10,15 @@
     # 13 - Create Scapy Components
     # 14 - Discover all hosts and Create a dictionary of hosts information
     # 15 - Discover hosts with scapy arping ( only discovers scapy hosts )
-    # 16 - Stop Mininet
+    # 16 - Balance ownership of switches
+    # 17 - Stop Mininet
     # 1000 - Test host intents
     # 2000 - Test point intents
     # 3000 - Test single to multi point intents
     # 4000 - Test multi to single point intents
     # 5000 - Test host mobility
 
-    <testcases>1,[2,10,12,13,15,1000,2000,5000,16]*2,[2,11,12,13,15,1000,2000,5000,16]*2</testcases>
+    <testcases>1,[2,10,12,13,15,16,1000,2000,5000,17]*2,[2,11,12,13,15,16,1000,2000,5000,17]*2</testcases>
 
     <SCALE>
         <size>1,3,1,3</size>
diff --git a/TestON/tests/FUNCintentRest/FUNCintentRest.py b/TestON/tests/FUNCintentRest/FUNCintentRest.py
index ede3459..1a32bc1 100644
--- a/TestON/tests/FUNCintentRest/FUNCintentRest.py
+++ b/TestON/tests/FUNCintentRest/FUNCintentRest.py
@@ -167,6 +167,7 @@
                        " before initiating environment setup" )
 
         time.sleep( main.startUpSleep )
+
         main.step( "Uninstalling ONOS package" )
         onosUninstallResult = main.TRUE
         for ip in main.ONOSip:
@@ -178,6 +179,8 @@
                                  onpass="Successfully uninstalled ONOS package",
                                  onfail="Failed to uninstall ONOS package" )
 
+        time.sleep( main.startUpSleep )
+
         for i in range( main.maxNodes ):
             main.ONOSbench.onosDie( main.ONOSip[ i ] )
 
@@ -653,6 +656,21 @@
 
     def CASE16( self, main ):
         """
+            Balance Masters
+        """
+        main.case( "Balance mastership of switches" )
+        main.step( "Balancing mastership of switches" )
+
+        balanceResult = main.FALSE
+        balanceResult = utilities.retry( f=main.CLIs2[ 0 ].balanceMasters, retValue=main.FALSE, args=[] )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully balanced mastership of switches",
+                                 onfail="Failed to balance mastership of switches" )
+
+    def CASE17( self, main ):
+        """
             Stop mininet and remove scapy hosts
         """
         main.log.report( "Stop Mininet and Scapy" )
diff --git a/TestON/tests/SCPFintentEventTp/SCPFintentEventTp.params b/TestON/tests/SCPFintentEventTp/SCPFintentEventTp.params
index a2561e9..ad4ec26 100644
--- a/TestON/tests/SCPFintentEventTp/SCPFintentEventTp.params
+++ b/TestON/tests/SCPFintentEventTp/SCPFintentEventTp.params
@@ -59,6 +59,7 @@
         <cyclePeriod>1000</cyclePeriod>
         <neighbors>0,a</neighbors>           #a == all nodes (-1)
         <flowRuleBUEnabled>true</flowRuleBUEnabled>
+        <skipReleaseResourcesOnWithdrawal>true</skipReleaseResourcesOnWithdrawal>
     </TEST>
 
     <METRICS>
diff --git a/TestON/tests/SCPFintentEventTp/SCPFintentEventTp.py b/TestON/tests/SCPFintentEventTp/SCPFintentEventTp.py
index e017a48..385d9e6 100644
--- a/TestON/tests/SCPFintentEventTp/SCPFintentEventTp.py
+++ b/TestON/tests/SCPFintentEventTp/SCPFintentEventTp.py
@@ -40,6 +40,7 @@
         cellName = main.params[ 'ENV' ][ 'cellName' ]
         numSwitches = (main.params[ 'TEST' ][ 'numSwitches' ]).split(",")
         flowRuleBU = main.params[ 'TEST' ][ 'flowRuleBUEnabled' ]
+        skipRelRsrc = main.params[ 'TEST'][ 'skipReleaseResourcesOnWithdrawal']
         homeDir = os.path.expanduser('~')
 
         main.exceptions = [0]*11
@@ -157,7 +158,7 @@
         time.sleep(20)
 
         main.ONOSbench.onosCfgSet( ONOSIp[0], "org.onosproject.store.flow.impl.NewDistributedFlowRuleStore", "backupEnabled " + str(flowRuleBU))
-
+        main.ONOSbench.onosCfgSet( ONOSIp[0], "org.onosproject.net.intent.impl.IntentManager", "skipReleaseResourcesOnWithdrawal " + skipRelRsrc)
         devices = int(clusterCount)*10
 
         main.log.step("Setting up null provider")
diff --git a/TestON/tests/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py b/TestON/tests/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py
index 5a7d0d0..03d6c56 100644
--- a/TestON/tests/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py
+++ b/TestON/tests/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py
@@ -390,8 +390,8 @@
         offfset = 0
         # keeps track of how many intents have been installed
         currIntents = 0
-        # keeps track of how many flows have been installed
-        currFlows = main.defaultFlows
+        # keeps track of how many flows have been installed, set to 0 at start
+        currFlows = 0
         # limit for the number of intents that can be installed
         limit = main.maxIntents / main.batchSize
         # total intents installed
@@ -431,16 +431,17 @@
                 stepResult = stepResult and t.result
             offfset = offfset + main.batchSize
 
-            totalIntents = main.batchSize + totalIntents
+            totalIntents = main.batchSize * main.numCtrls + totalIntents
             if totalIntents >= main.minIntents and totalIntents % main.checkInterval == 0:
                 # if reach to minimum number and check interval, verify Intetns and flows
                 time.sleep( main.verifySleep * main.numCtrls )
 
                 main.log.info("Verify Intents states")
+                # k is a control variable for verify retry attempts
                 k = 1
                 intentVerify = main.FALSE
 
-                while k <= 3:
+                while k <= main.verifyAttempts:
                     # while loop for check intents by using REST api
                     time.sleep(5)
                     temp = 0
@@ -450,8 +451,6 @@
                         if f.get("state") == "INSTALLED":
                             temp = temp + 1
 
-                    totalIntents=len(intentsState)
-
                     main.log.info("Total Intents: {} INSTALLED: {}".format(totalIntents, temp))
                     if totalIntents == temp:
                         intentVerify = main.TRUE
@@ -463,14 +462,18 @@
                     # If some intents are not installed, finished this test case
                     main.log.warn( "Some intens did not install" )
                     # We don't want to check flows if intents not installed, because onos will drop flows
+                    if currFlows == 0:
+                    # If currFlows equal 0, which means we failed to install intents at first, or we didn't get
+                    # the correct number, so we need get flows here.
+                        flowsState = json.loads( main.ONOSrest1.flows() )
                     break
 
                 main.log.info("Verify Flows states")
                 k = 1
                 flowsVerify = main.TRUE
 
-                while k <= 3:
-                    #while loop for check flows by using REST api
+                while k <= main.verifyAttempts:
+                    # while loop for check flows by using REST api
                     time.sleep(3)
                     temp = 0
                     flowsStateCount = []
diff --git a/TestON/tests/USECASE_SdnipFunction/Dependency/Functions.py b/TestON/tests/USECASE_SdnipFunction/Dependency/Functions.py
index ddd8c1e..428cbce 100644
--- a/TestON/tests/USECASE_SdnipFunction/Dependency/Functions.py
+++ b/TestON/tests/USECASE_SdnipFunction/Dependency/Functions.py
@@ -1,11 +1,16 @@
 
 def checkRouteNum( main, routeNumExpected ):
+    import time
     main.step( "Check routes installed" )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Route number expected:" )
     main.log.info( routeNumExpected )
     main.log.info( "Route number from ONOS CLI:" )
 
     routeNumActual = main.ONOScli.ipv4RouteNumber()
+    if routeNumActual != routeNumExpected:
+        time.sleep( wait )
+        routeNumActual = main.ONOScli.ipv4RouteNumber()
     main.log.info( routeNumActual )
     utilities.assertEquals( \
         expect = routeNumExpected, actual = routeNumActual,
@@ -13,13 +18,20 @@
         onfail = "Route number is wrong!" )
 
 def checkM2SintentNum( main, intentNumExpected ):
+    import time
     main.step( "Check M2S intents installed" )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Intent number expected:" )
     main.log.info( intentNumExpected )
     main.log.info( "Intent number from ONOS CLI:" )
     jsonResult = main.ONOScli.intents( jsonFormat = True, summary = True,
                                        TYPE = "multiPointToSinglePoint" )
     intentNumActual = jsonResult['installed']
+    if intentNumActual != intentNumExpected:
+        time.sleep( wait )
+        jsonResult = main.ONOScli.intents( jsonFormat = True, summary = True,
+                                           TYPE = "multiPointToSinglePoint" )
+        intentNumActual = jsonResult['installed']
     main.log.info( intentNumActual )
     utilities.assertEquals( \
         expect = intentNumExpected, actual = intentNumActual,
@@ -27,13 +39,21 @@
         onfail = "M2S intent number is wrong!" )
 
 def checkP2PintentNum( main, intentNumExpected ):
+    import time
     main.step( "Check P2P intents installed" )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Intent number expected:" )
     main.log.info( intentNumExpected )
     main.log.info( "Intent number from ONOS CLI:" )
     jsonResult = main.ONOScli.intents( jsonFormat = True, summary = True,
                                        TYPE = "pointToPoint" )
     intentNumActual = jsonResult['installed']
+
+    if intentNumActual != intentNumExpected:
+        time.sleep( wait )
+        jsonResult = main.ONOScli.intents( jsonFormat = True, summary = True,
+                                           TYPE = "pointToPoint" )
+        intentNumActual = jsonResult['installed']
     main.log.info( intentNumActual )
     utilities.assertEquals( \
         expect = intentNumExpected, actual = intentNumActual,
@@ -41,11 +61,16 @@
         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'] )
     main.log.info( "Flow number expected:" )
     main.log.info( flowNumExpected )
     main.log.info( "Flow number actual:" )
     flowNumActual = main.Mininet.getSwitchFlowCount( switch )
+    if flowNumActual != flowNumExpected :
+        time.sleep( wait )
+        flowNumActual = main.Mininet.getSwitchFlowCount( switch )
     main.log.info( flowNumActual )
     utilities.assertEquals( \
         expect = flowNumExpected, actual = flowNumActual,
@@ -109,7 +134,8 @@
         * expectAllSuccess - boolean indicating if you expect all results
         succeed if True, otherwise expect all results fail if False
     """
-    main.step( "Check ping between each host pair" )
+    main.step( "Check ping between each host pair, expect all to succede=" +
+               str( expectAllSuccess ) )
     if len( hosts ) == 0:
         main.log.error( "Parameter hosts can not be empty." )
         main.cleanup()
diff --git a/TestON/tests/USECASE_SdnipFunction/USECASE_SdnipFunction.params b/TestON/tests/USECASE_SdnipFunction/USECASE_SdnipFunction.params
index a7a8f72..404aa10 100644
--- a/TestON/tests/USECASE_SdnipFunction/USECASE_SdnipFunction.params
+++ b/TestON/tests/USECASE_SdnipFunction/USECASE_SdnipFunction.params
@@ -1,10 +1,11 @@
 <PARAMS>
 
-    <testcases>100, 101, 102, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10</testcases>
+    <testcases>101, 100, 200, 102, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10</testcases>
 
     #Environment variables
     <ENV>
-        <cellName>sdnip_single_instance</cellName>
+        <cellName>sdnip_single</cellName>
+        <appString>drivers,openflow,proxyarp</appString>
     </ENV>
 
     <CTRL>
@@ -13,16 +14,6 @@
         <port1>6653</port1>
     </CTRL>
 
-    <GIT>
-        <branch1>master</branch1>
-        <branch2>onos-1.3</branch2>
-    </GIT>
-
-    <JSON>
-        <prefix>prefix</prefix>
-        <nextHop>nextHop</nextHop>
-    </JSON>
-
     <DEPENDENCY>
         <path>/USECASE_SdnipFunction/Dependency/</path>
         <topology>USECASE_SdnipI2MN.py</topology>
diff --git a/TestON/tests/USECASE_SdnipFunction/USECASE_SdnipFunction.py b/TestON/tests/USECASE_SdnipFunction/USECASE_SdnipFunction.py
index ee0b120..8e601a3 100644
--- a/TestON/tests/USECASE_SdnipFunction/USECASE_SdnipFunction.py
+++ b/TestON/tests/USECASE_SdnipFunction/USECASE_SdnipFunction.py
@@ -5,7 +5,6 @@
         self.default = ''
         global branchName
 
-    # This case is to setup Mininet testbed
     def CASE100( self, main ):
         """
             Start mininet
@@ -19,11 +18,11 @@
 
         main.step( "Starting Mininet Topology" )
         topology = main.dependencyPath + main.topology
-        topoResult = main.Mininet.startNet( topoFile = topology )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = topoResult,
-                                 onpass = "Successfully loaded topology",
-                                 onfail = "Failed to load topology" )
+        topoResult = main.Mininet.startNet( topoFile=topology )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=topoResult,
+                                 onpass="Successfully loaded topology",
+                                 onfail="Failed to load topology" )
         # Exit if topology did not load properly
         if not topoResult:
             main.cleanup()
@@ -37,11 +36,10 @@
         for i in range ( 1, int( main.params['config']['switchNum'] ) + 1 ):
             sw = "sw%s" % ( i )
             swResult = swResult and main.Mininet.assignSwController( sw, ONOS1Ip )
-            # swResult = swResult and main.Mininet.assignSwController( sw, ONOS1Ip, port = "6633" )
-        utilities.assert_equals( expect = main.TRUE,
-                             actual = swResult,
-                             onpass = "Successfully connect all switches to ONOS",
-                             onfail = "Failed to connect all switches to ONOS" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=swResult,
+                                 onpass="Successfully connect all switches to ONOS",
+                                 onfail="Failed to connect all switches to ONOS" )
         if not swResult:
             main.cleanup()
             main.exit()
@@ -53,16 +51,14 @@
 
         tunnelResult = main.TRUE
         tunnelResult = main.Mininet.node( "root", command )
-        utilities.assert_equals( expect = True,
-                             actual = ( "PasswordAuthentication" in tunnelResult ),
-                             onpass = "Created tunnel succeeded",
-                             onfail = "Create tunnel failed" )
+        utilities.assert_equals( expect=True,
+                                 actual=( "PasswordAuthentication" in tunnelResult ),
+                                 onpass="Created tunnel succeeded",
+                                 onfail="Create tunnel failed" )
         if ("PasswordAuthentication" not in tunnelResult) :
             main.cleanup()
             main.exit()
 
-
-    # This case is to setup ONOS
     def CASE101( self, main ):
         """
            Package ONOS and install it
@@ -75,123 +71,141 @@
         """
         import json
         import time
+        import os
         from operator import eq
 
-        main.case( "Setting up test environment" )
+        main.case( "Setting up ONOS environment" )
 
         cellName = main.params[ 'ENV' ][ 'cellName' ]
+        global ONOS1Ip
+        ONOS1Ip = os.getenv( main.params[ 'CTRL' ][ 'ip1' ] )
+        ipList = [ ONOS1Ip ]
+
+        main.step( "Create cell file" )
+        cellAppString = main.params[ 'ENV' ][ 'appString' ]
+        main.ONOSbench.createCellFile( main.ONOSbench.ip_address, cellName,
+                                       main.Mininet.ip_address,
+                                       cellAppString, ipList )
 
         main.step( "Applying cell variable to environment" )
         cellResult = main.ONOSbench.setCell( cellName )
-        utilities.assert_equals( expect = main.TRUE,
-                             actual = cellResult,
-                             onpass = "Set cell succeeded",
-                             onfail = "Set cell failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=cellResult,
+                                 onpass="Set cell succeeded",
+                                 onfail="Set cell failed" )
 
         verifyResult = main.ONOSbench.verifyCell()
-        utilities.assert_equals( expect = main.TRUE,
-                             actual = verifyResult,
-                             onpass = "Verify cell succeeded",
-                             onfail = "Verify cell failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=verifyResult,
+                                 onpass="Verify cell succeeded",
+                                 onfail="Verify cell failed" )
 
         branchName = main.ONOSbench.getBranchName()
         main.log.report( "ONOS is on branch: " + branchName )
 
         main.log.step( "Uninstalling ONOS" )
         uninstallResult = main.ONOSbench.onosUninstall( ONOS1Ip )
-        utilities.assert_equals( expect = main.TRUE,
-                                actual = uninstallResult,
-                                onpass = "Uninstall ONOS succeeded",
-                                onfail = "Uninstall ONOS failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=uninstallResult,
+                                 onpass="Uninstall ONOS succeeded",
+                                 onfail="Uninstall ONOS failed" )
         '''
         main.step( "Git pull" )
         gitPullResult = main.ONOSbench.gitPull()
         main.log.info( "gitPullResult" )
         main.log.info( gitPullResult )
         gitPullResult2 = ( gitPullResult == main.TRUE ) or ( gitPullResult == 3 )
-        utilities.assert_equals( expect = True,
-                                 actual = gitPullResult2,
-                                 onpass = "Git pull ONOS succeeded",
-                                 onfail = "Git pull ONOS failed" )
+        utilities.assert_equals( expect=True,
+                                 actual=gitPullResult2,
+                                 onpass="Git pull ONOS succeeded",
+                                 onfail="Git pull ONOS failed" )
 
         main.step( "Using mvn clean install" )
         if gitPullResult == main.TRUE:
-            mciResult = main.ONOSbench.cleanInstall( mciTimeout = 1000 )
-            utilities.assert_equals( expect = main.TRUE,
-                                     actual = mciResult,
-                                     onpass = "Maven clean install ONOS succeeded",
-                                     onfail = "Maven clean install ONOS failed" )
+            mciResult = main.ONOSbench.cleanInstall( mciTimeout=1000 )
+            utilities.assert_equals( expect=main.TRUE,
+                                     actual=mciResult,
+                                     onpass="Maven clean install ONOS succeeded",
+                                     onfail="Maven clean install ONOS failed" )
         else:
              main.log.warn( "Did not pull new code so skipping mvn " +
                             "clean install" )
              mciResult = main.TRUE
         '''
 
-        main.ONOSbench.getVersion( report = True )
+        main.ONOSbench.getVersion( report=True )
 
         main.step( "Creating ONOS package" )
-        packageResult = main.ONOSbench.onosPackage( opTimeout = 500 )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = packageResult,
-                                 onpass = "Package ONOS succeeded",
-                                 onfail = "Package ONOS failed" )
+        packageResult = main.ONOSbench.onosPackage( opTimeout=500 )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=packageResult,
+                                 onpass="Package ONOS succeeded",
+                                 onfail="Package ONOS failed" )
 
         main.step( "Installing ONOS package" )
-        onos1InstallResult = main.ONOSbench.onosInstall( options = "-f",
-                                                         node = ONOS1Ip )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = onos1InstallResult,
-                                 onpass = "Install ONOS succeeded",
-                                 onfail = "Install ONOS failed" )
+        onos1InstallResult = main.ONOSbench.onosInstall( options="-f",
+                                                         node=ONOS1Ip )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=onos1InstallResult,
+                                 onpass="Install ONOS succeeded",
+                                 onfail="Install ONOS failed" )
 
         main.step( "Checking if ONOS is up yet" )
-        onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout = 420 )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = onos1UpResult,
-                                 onpass = "ONOS is up",
-                                 onfail = "ONOS is NOT up" )
+        onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout=420 )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=onos1UpResult,
+                                 onpass="ONOS is up",
+                                 onfail="ONOS is NOT up" )
 
         main.step( "Checking if ONOS CLI is ready" )
         cliResult = main.ONOScli.startOnosCli( ONOS1Ip,
-                commandlineTimeout = 100, onosStartTimeout = 600 )
-        utilities.assert_equals( expect = main.TRUE,
-                         actual = cliResult,
-                         onpass = "ONOS CLI is ready",
-                         onfail = "ONOS CLI is NOT ready" )
+                commandlineTimeout=100, onosStartTimeout=600 )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=cliResult,
+                                 onpass="ONOS CLI is ready",
+                                 onfail="ONOS CLI is not ready" )
 
-        caseResult = ( cellResult and verifyResult and
-                       packageResult and
-                       onos1InstallResult and onos1UpResult and cliResult )
+        for i in range( 10 ):
+            ready = True
+            output = main.ONOScli.summary()
+            if not output:
+                ready = False
+            if ready:
+                break
+            time.sleep( 30 )
+        utilities.assert_equals( expect=True, actual=ready,
+                                 onpass="ONOS summary command succeded",
+                                 onfail="ONOS summary command failed" )
 
-        utilities.assert_equals( expect = main.TRUE, actual = caseResult,
-                                 onpass = "ONOS startup successful",
-                                 onfail = "ONOS startup NOT successful" )
-
-        if caseResult == main.FALSE:
-            main.log.info( "ONOS startup failed!" )
+        if not ready:
+            main.log.error( "ONOS startup failed!" )
             main.cleanup()
             main.exit()
 
+    def CASE200( self, main ):
+        main.case( "Activate sdn-ip application" )
+        main.log.info( "waiting link discovery......" )
+        time.sleep( int( main.params['timers']['TopoDiscovery'] ) )
+
         main.log.info( "Get links in the network" )
-        time.sleep( int ( main.params['timers']['TopoDiscovery'] ) )
         summaryResult = main.ONOScli.summary()
         linkNum = json.loads( summaryResult )[ "links" ]
+        listResult = main.ONOScli.links( jsonFormat=False )
+        main.log.info( listResult )
         if linkNum < 100:
-            main.log.info( "Link number is wrong!" )
-            listResult = main.ONOScli.links( jsonFormat = False )
+            main.log.error( "Link number is wrong!" )
+            time.sleep( int( main.params['timers']['TopoDiscovery'] ) )
+            listResult = main.ONOScli.links( jsonFormat=False )
             main.log.info( listResult )
             main.cleanup()
             main.exit()
 
-        listResult = main.ONOScli.links( jsonFormat = False )
-        main.log.info( listResult )
-
         main.step( "Activate sdn-ip application" )
         activeSDNIPresult = main.ONOScli.activateApp( "org.onosproject.sdnip" )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = activeSDNIPresult,
-                                 onpass = "Activate SDN-IP succeeded",
-                                 onfail = "Activate SDN-IP failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=activeSDNIPresult,
+                                 onpass="Activate SDN-IP succeeded",
+                                 onfail="Activate SDN-IP failed" )
         if not activeSDNIPresult:
             main.log.info( "Activate SDN-IP failed!" )
             main.cleanup()
@@ -226,39 +240,45 @@
         '''
 
         main.case( "Ping tests between BGP peers and speakers" )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["peer64514", "peer64515", "peer64516"],
+                       expectAllSuccess=True )
 
 
     def CASE2( self, main ):
         '''
         point-to-point intents test for each BGP peer and BGP speaker pair
         '''
+        import time
         main.case( "Check point-to-point intents" )
         main.log.info( "There are %s BGP peers in total "
                        % main.params[ 'config' ][ 'peerNum' ] )
         main.step( "Check P2P intents number from ONOS CLI" )
 
-        getIntentsResult = main.ONOScli.intents( jsonFormat = True )
+        getIntentsResult = main.ONOScli.intents( jsonFormat=True )
         bgpIntentsActualNum = \
             main.QuaggaCliSpeaker1.extractActualBgpIntentNum( getIntentsResult )
         bgpIntentsExpectedNum = int( main.params[ 'config' ][ 'peerNum' ] ) * 6
+        if bgpIntentsActualNum != bgpIntentsExpectedNum:
+            time.sleep( int( main.params['timers']['RouteDelivery'] ) )
+            bgpIntentsActualNum = \
+                main.QuaggaCliSpeaker1.extractActualBgpIntentNum( getIntentsResult )
         main.log.info( "bgpIntentsExpected num is:" )
         main.log.info( bgpIntentsExpectedNum )
         main.log.info( "bgpIntentsActual num is:" )
         main.log.info( bgpIntentsActualNum )
         utilities.assertEquals( \
-            expect = True,
-            actual = eq( bgpIntentsExpectedNum, bgpIntentsActualNum ),
-            onpass = "PointToPointIntent Intent Num is correct!",
-            onfail = "PointToPointIntent Intent Num is wrong!" )
+            expect=True,
+            actual=eq( bgpIntentsExpectedNum, bgpIntentsActualNum ),
+            onpass="PointToPointIntent Intent Num is correct!",
+            onfail="PointToPointIntent Intent Num is wrong!" )
 
 
     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" )
 
         allRoutesExpected = []
@@ -266,11 +286,16 @@
         allRoutesExpected.append( "5.0.0.0/24" + "/" + "10.0.5.1" )
         allRoutesExpected.append( "6.0.0.0/24" + "/" + "10.0.6.1" )
 
-        getRoutesResult = main.ONOScli.routes( jsonFormat = True )
+        getRoutesResult = main.ONOScli.routes( jsonFormat=True )
         allRoutesActual = \
             main.QuaggaCliSpeaker1.extractActualRoutesMaster( getRoutesResult )
         allRoutesStrExpected = str( sorted( allRoutesExpected ) )
         allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" )
+        if allRoutesStrActual != allRoutesStrExpected:
+            time.sleep( int( main.params['timers']['RouteDelivery'] ) )
+            allRoutesActual = \
+                main.QuaggaCliSpeaker1.extractActualRoutesMaster( getRoutesResult )
+            allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" )
 
         main.step( "Check routes installed" )
         main.log.info( "Routes expected:" )
@@ -278,32 +303,40 @@
         main.log.info( "Routes get from ONOS CLI:" )
         main.log.info( allRoutesStrActual )
         utilities.assertEquals( \
-            expect = allRoutesStrExpected, actual = allRoutesStrActual,
-            onpass = "Routes are correct!",
-            onfail = "Routes are wrong!" )
+            expect=allRoutesStrExpected, actual=allRoutesStrActual,
+            onpass="Routes are correct!",
+            onfail="Routes are wrong!" )
 
         main.step( "Check M2S intents installed" )
-        getIntentsResult = main.ONOScli.intents( jsonFormat = True )
+        getIntentsResult = main.ONOScli.intents( jsonFormat=True )
         routeIntentsActualNum = \
             main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult )
         routeIntentsExpectedNum = 3
+        if routeIntentsActualNum != routeIntentsExpectedNum:
+            time.sleep( int( main.params['timers']['RouteDelivery'] ) )
+            routeIntentsActualNum = \
+                main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult )
 
         main.log.info( "MultiPointToSinglePoint Intent Num expected is:" )
         main.log.info( routeIntentsExpectedNum )
         main.log.info( "MultiPointToSinglePoint Intent NUM Actual is:" )
         main.log.info( routeIntentsActualNum )
         utilities.assertEquals( \
-            expect = True,
-            actual = eq( routeIntentsExpectedNum, routeIntentsActualNum ),
-            onpass = "MultiPointToSinglePoint Intent Num is correct!",
-            onfail = "MultiPointToSinglePoint Intent Num is wrong!" )
+            expect=routeIntentsExpectedNum,
+            actual=routeIntentsActualNum,
+            onpass="MultiPointToSinglePoint Intent Num is correct!",
+            onfail="MultiPointToSinglePoint Intent Num is wrong!" )
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
 
     def CASE4( self, main ):
@@ -312,8 +345,8 @@
         '''
         main.case( "Ping test for each route, all hosts behind BGP peers" )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE5( self, main ):
@@ -323,68 +356,72 @@
         import time
         main.case( "Bring down links and check routes/intents" )
         main.step( "Bring down the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1 = "sw32", END2 = "peer64514",
-                                         OPTION = "down" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult1,
-                                onpass = "Bring down link succeeded!",
-                                onfail = "Bring down link failed!" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="peer64514",
+                                         OPTION="down" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult1,
+                                onpass="Bring down link succeeded!",
+                                onfail="Bring down link failed!" )
 
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 2 )
             main.Functions.checkM2SintentNum( main, 2 )
         else:
-            main.log.info( "Bring down link failed!" )
+            main.log.error( "Bring down link failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Bring down the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1 = "sw8", END2 = "peer64515",
-                                         OPTION = "down" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult2,
-                                onpass = "Bring down link succeeded!",
-                                onfail = "Bring down link failed!" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="peer64515",
+                                         OPTION="down" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult2,
+                                onpass="Bring down link succeeded!",
+                                onfail="Bring down link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 1 )
             main.Functions.checkM2SintentNum( main, 1 )
         else:
-            main.log.info( "Bring down link failed!" )
+            main.log.error( "Bring down link failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Bring down the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1 = "sw28", END2 = "peer64516",
-                                         OPTION = "down" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult3,
-                                onpass = "Bring down link succeeded!",
-                                onfail = "Bring down link failed!" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="peer64516",
+                                         OPTION="down" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult3,
+                                onpass="Bring down link succeeded!",
+                                onfail="Bring down link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 0 )
             main.Functions.checkM2SintentNum( main, 0 )
         else:
-            main.log.info( "Bring down link failed!" )
+            main.log.error( "Bring down link failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess = False )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["peer64514", "peer64515", "peer64516"],
+                       expectAllSuccess=False )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = False )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=False )
 
 
     def CASE6( self, main ):
@@ -394,67 +431,71 @@
         import time
         main.case( "Bring up links and check routes/intents" )
         main.step( "Bring up the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1 = "sw32", END2 = "peer64514",
-                                         OPTION = "up" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult1,
-                                onpass = "Bring up link succeeded!",
-                                onfail = "Bring up link failed!" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="peer64514",
+                                         OPTION="up" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult1,
+                                onpass="Bring up link succeeded!",
+                                onfail="Bring up link failed!" )
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 1 )
             main.Functions.checkM2SintentNum( main, 1 )
         else:
-            main.log.info( "Bring up link failed!" )
+            main.log.error( "Bring up link failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Bring up the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1 = "sw8", END2 = "peer64515",
-                                         OPTION = "up" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult2,
-                                onpass = "Bring up link succeeded!",
-                                onfail = "Bring up link failed!" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="peer64515",
+                                         OPTION="up" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult2,
+                                onpass="Bring up link succeeded!",
+                                onfail="Bring up link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 2 )
             main.Functions.checkM2SintentNum( main, 2 )
         else:
-            main.log.info( "Bring up link failed!" )
+            main.log.error( "Bring up link failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Bring up the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1 = "sw28", END2 = "peer64516",
-                                         OPTION = "up" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult3,
-                                onpass = "Bring up link succeeded!",
-                                onfail = "Bring up link failed!" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="peer64516",
+                                         OPTION="up" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult3,
+                                onpass="Bring up link succeeded!",
+                                onfail="Bring up link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 3 )
             main.Functions.checkM2SintentNum( main, 3 )
         else:
-            main.log.info( "Bring up link failed!" )
+            main.log.error( "Bring up link failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["peer64514", "peer64515", "peer64516"],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE7( self, main ):
@@ -464,10 +505,10 @@
         import time
         main.case( "Stop edge sw32,check P-2-P and M-2-S intents, ping test" )
         main.step( "Stop sw32" )
-        result = main.Mininet.switch( SW = "sw32", OPTION = "stop" )
-        utilities.assertEquals( expect = main.TRUE, actual = result,
-                                onpass = "Stopping switch succeeded!",
-                                onfail = "Stopping switch failed!" )
+        result = main.Mininet.switch( SW="sw32", OPTION="stop" )
+        utilities.assertEquals( expect=main.TRUE, actual=result,
+                                onpass="Stopping switch succeeded!",
+                                onfail="Stopping switch failed!" )
 
         if result == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -475,46 +516,50 @@
             main.Functions.checkM2SintentNum( main, 2 )
             main.Functions.checkP2PintentNum( main, 12 )
         else:
-            main.log.info( "Stopping switch failed!" )
+            main.log.error( "Stopping switch failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Check ping between hosts behind BGP peers" )
-        result1 = main.Mininet.pingHost( src = "host64514", target = "host64515" )
-        result2 = main.Mininet.pingHost( src = "host64515", target = "host64516" )
-        result3 = main.Mininet.pingHost( src = "host64514", target = "host64516" )
+        result1 = main.Mininet.pingHost( src="host64514", target="host64515" )
+        result2 = main.Mininet.pingHost( src="host64515", target="host64516" )
+        result3 = main.Mininet.pingHost( src="host64514", target="host64516" )
 
         pingResult1 = ( result1 == main.FALSE ) and ( result2 == main.TRUE ) \
                                                 and ( result3 == main.FALSE )
-        utilities.assert_equals( expect = True, actual = pingResult1,
-                                 onpass = "Ping test result is correct",
-                                 onfail = "Ping test result is wrong" )
+        utilities.assert_equals( expect=True, actual=pingResult1,
+                                 onpass="Ping test result is correct",
+                                 onfail="Ping test result is wrong" )
 
         if pingResult1 == False:
             main.cleanup()
             main.exit()
 
         main.step( "Check ping between BGP peers and speakers" )
-        result4 = main.Mininet.pingHost( src = "speaker1", target = "peer64514" )
-        result5 = main.Mininet.pingHost( src = "speaker1", target = "peer64515" )
-        result6 = main.Mininet.pingHost( src = "speaker1", target = "peer64516" )
+        result4 = main.Mininet.pingHost( src="speaker1", target="peer64514" )
+        result5 = main.Mininet.pingHost( src="speaker1", target="peer64515" )
+        result6 = main.Mininet.pingHost( src="speaker1", target="peer64516" )
 
         pingResult2 = ( result4 == main.FALSE ) and ( result5 == main.TRUE ) \
                                                 and ( result6 == main.TRUE )
-        utilities.assert_equals( expect = True, actual = pingResult2,
-                                 onpass = "Speaker1 ping peers successful",
-                                 onfail = "Speaker1 ping peers NOT successful" )
+        utilities.assert_equals( expect=True, actual=pingResult2,
+                                 onpass="Speaker1 ping peers successful",
+                                 onfail="Speaker1 ping peers NOT successful" )
 
         if pingResult2 == False:
             main.cleanup()
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
 
     def CASE8( self, main ):
@@ -525,19 +570,19 @@
         import time
         main.case( "Start the edge sw32, check P-2-P and M-2-S intents, ping test" )
         main.step( "Start sw32" )
-        result1 = main.Mininet.switch( SW = "sw32", OPTION = "start" )
+        result1 = main.Mininet.switch( SW="sw32", OPTION="start" )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = result1,
-            onpass = "Starting switch succeeded!",
-            onfail = "Starting switch failed!" )
+            expect=main.TRUE,
+            actual=result1,
+            onpass="Starting switch succeeded!",
+            onfail="Starting switch failed!" )
 
         result2 = main.Mininet.assignSwController( "sw32", ONOS1Ip )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = result2,
-            onpass = "Connect switch to ONOS succeeded!",
-            onfail = "Connect switch to ONOS failed!" )
+            expect=main.TRUE,
+            actual=result2,
+            onpass="Connect switch to ONOS succeeded!",
+            onfail="Connect switch to ONOS failed!" )
 
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -545,24 +590,28 @@
             main.Functions.checkM2SintentNum( main, 3 )
             main.Functions.checkP2PintentNum( main, 18 )
         else:
-            main.log.info( "Starting switch failed!" )
+            main.log.error( "Starting switch failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["peer64514", "peer64515", "peer64516"],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE9( self, main ):
@@ -577,15 +626,15 @@
         main.Functions.checkFlowNum( main, "sw11", 13 )
         main.Functions.checkFlowNum( main, "sw1", 3 )
         main.Functions.checkFlowNum( main, "sw7", 3 )
-        main.log.info( main.Mininet.checkFlows( "sw11" ) )
-        main.log.info( main.Mininet.checkFlows( "sw1" ) )
-        main.log.info( main.Mininet.checkFlows( "sw7" ) )
+        main.log.debug( main.Mininet.checkFlows( "sw11" ) )
+        main.log.debug( main.Mininet.checkFlows( "sw1" ) )
+        main.log.debug( main.Mininet.checkFlows( "sw7" ) )
 
         main.step( "Stop sw11" )
-        result = main.Mininet.switch( SW = "sw11", OPTION = "stop" )
-        utilities.assertEquals( expect = main.TRUE, actual = result,
-                                onpass = "Stopping switch succeeded!",
-                                onfail = "Stopping switch failed!" )
+        result = main.Mininet.switch( SW="sw11", OPTION="stop" )
+        utilities.assertEquals( expect=main.TRUE, actual=result,
+                                onpass="Stopping switch succeeded!",
+                                onfail="Stopping switch failed!" )
         if result:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -593,23 +642,27 @@
             main.Functions.checkM2SintentNum( main, 3 )
             main.Functions.checkP2PintentNum( main, 18 )
         else:
-            main.log.info( "Stopping switch failed!" )
+            main.log.error( "Stopping switch failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["peer64514", "peer64515", "peer64516"],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE10( self, main ):
@@ -623,18 +676,18 @@
         main.log.info( "Check the flow status before starting sw11" )
         main.Functions.checkFlowNum( main, "sw1", 11 )
         main.Functions.checkFlowNum( main, "sw7", 5 )
-        main.log.info( main.Mininet.checkFlows( "sw1" ) )
-        main.log.info( main.Mininet.checkFlows( "sw7" ) )
+        main.log.debug( main.Mininet.checkFlows( "sw1" ) )
+        main.log.debug( main.Mininet.checkFlows( "sw7" ) )
 
         main.step( "Start sw11" )
-        result1 = main.Mininet.switch( SW = "sw11", OPTION = "start" )
-        utilities.assertEquals( expect = main.TRUE, actual = result1,
-                                onpass = "Starting switch succeeded!",
-                                onfail = "Starting switch failed!" )
+        result1 = main.Mininet.switch( SW="sw11", OPTION="start" )
+        utilities.assertEquals( expect=main.TRUE, actual=result1,
+                                onpass="Starting switch succeeded!",
+                                onfail="Starting switch failed!" )
         result2 = main.Mininet.assignSwController( "sw11", ONOS1Ip )
-        utilities.assertEquals( expect = main.TRUE, actual = result2,
-                                onpass = "Connect switch to ONOS succeeded!",
-                                onfail = "Connect switch to ONOS failed!" )
+        utilities.assertEquals( expect=main.TRUE, actual=result2,
+                                onpass="Connect switch to ONOS succeeded!",
+                                onfail="Connect switch to ONOS failed!" )
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 3 )
@@ -645,20 +698,24 @@
             main.log.debug( main.Mininet.checkFlows( "sw1" ) )
             main.log.debug( main.Mininet.checkFlows( "sw7" ) )
         else:
-            main.log.info( "Starting switch failed!" )
+            main.log.error( "Starting switch failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["peer64514", "peer64515", "peer64516"],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
diff --git a/TestON/tests/USECASE_SdnipFunctionCluster/Dependency/Functions.py b/TestON/tests/USECASE_SdnipFunctionCluster/Dependency/Functions.py
index 8d4007a..5f78896 100644
--- a/TestON/tests/USECASE_SdnipFunctionCluster/Dependency/Functions.py
+++ b/TestON/tests/USECASE_SdnipFunctionCluster/Dependency/Functions.py
@@ -1,14 +1,20 @@
 
-def checkRouteNum( main, routeNumExpected, ONOScli = "ONOScli1" ):
+def checkRouteNum( main, routeNumExpected, ONOScli="ONOScli1" ):
+    import time
     main.step( "Check routes installed" )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Route number expected:" )
     main.log.info( routeNumExpected )
     main.log.info( "Route number from ONOS CLI:" )
 
     if ONOScli == "ONOScli1":
-        routeNumActual = main.ONOScli1.ipv4RouteNumber()
+        cli = main.ONOScli1
     else:
-        routeNumActual = main.ONOScli2.ipv4RouteNumber()
+        cli = main.ONOScli2
+    routeNumActual = cli.ipv4RouteNumber()
+    if routeNumActual != routeNumExpected:
+        time.sleep( wait )
+        routeNumActual = cli.ipv4RouteNumber()
 
     main.log.info( routeNumActual )
     utilities.assertEquals( \
@@ -17,17 +23,24 @@
         onfail = "Route number is wrong!" )
 
 def checkM2SintentNum( main, intentNumExpected, ONOScli = "ONOScli1" ):
+    import time
     main.step( "Check M2S intents installed" )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Intent number expected:" )
     main.log.info( intentNumExpected )
     main.log.info( "Intent number from ONOS CLI:" )
     if ONOScli == "ONOScli1":
-        jsonResult = main.ONOScli1.intents( jsonFormat = True, summary = True,
-                                            TYPE = "multiPointToSinglePoint" )
+        cli = main.ONOScli1
     else:
-        jsonResult = main.ONOScli2.intents( jsonFormat = True, summary = True,
-                                            TYPE = "multiPointToSinglePoint" )
+        cli = main.ONOScli2
+    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']
     main.log.info( intentNumActual )
     utilities.assertEquals( \
         expect = intentNumExpected, actual = intentNumActual,
@@ -35,17 +48,25 @@
         onfail = "M2S intent number is wrong!" )
 
 def checkP2PintentNum( main, intentNumExpected, ONOScli = "ONOScli1" ):
+    import time
     main.step( "Check P2P intents installed" )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Intent number expected:" )
     main.log.info( intentNumExpected )
     main.log.info( "Intent number from ONOS CLI:" )
     if ONOScli == "ONOScli1":
-        jsonResult = main.ONOScli1.intents( jsonFormat = True, summary = True,
-                                            TYPE = "pointToPoint" )
+        cli = main.ONOScli1
     else:
-        jsonResult = main.ONOScli2.intents( jsonFormat = True, summary = True,
-                                            TYPE = "pointToPoint" )
+        cli = main.ONOScli2
+    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']
     main.log.info( intentNumActual )
     utilities.assertEquals( \
         expect = intentNumExpected, actual = intentNumActual,
@@ -53,11 +74,16 @@
         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'] )
     main.log.info( "Flow number expected:" )
     main.log.info( flowNumExpected )
     main.log.info( "Flow number actual:" )
     flowNumActual = main.Mininet.getSwitchFlowCount( switch )
+    if flowNumActual != flowNumExpected :
+        time.sleep( wait )
+        flowNumActual = main.Mininet.getSwitchFlowCount( switch )
     main.log.info( flowNumActual )
     utilities.assertEquals( \
         expect = flowNumExpected, actual = flowNumActual,
@@ -121,7 +147,8 @@
         * expectAllSuccess - boolean indicating if you expect all results
         succeed if True, otherwise expect all results fail if False
     """
-    main.step( "Check ping between each host pair" )
+    main.step( "Check ping between each host pair, expect all to succede=" +
+               str( expectAllSuccess ) )
     if len( hosts ) == 0:
         main.log.error( "Parameter hosts can not be empty." )
         main.cleanup()
diff --git a/TestON/tests/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.params b/TestON/tests/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.params
index c746f55..aef817d 100644
--- a/TestON/tests/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.params
+++ b/TestON/tests/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.params
@@ -3,7 +3,8 @@
     <testcases>101, 100, 200, 102, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12</testcases>
     #Environment variables
     <ENV>
-        <cellName>sdnip_multiple_instance_BM</cellName>
+        <cellName>SDNIP</cellName>
+        <appString>drivers,openflow,proxyarp</appString>
     </ENV>
 
     <CTRL>
@@ -14,16 +15,6 @@
         <port1>6653</port1>
     </CTRL>
 
-    <GIT>
-        <branch1>master</branch1>
-        <branch2>onos-1.3</branch2>
-    </GIT>
-
-    <JSON>
-        <prefix>prefix</prefix>
-        <nextHop>nextHop</nextHop>
-    </JSON>
-
     <DEPENDENCY>
         <path>/USECASE_SdnipFunctionCluster/Dependency/</path>
         <topology>USECASE_SdnipI2MN_Cluster.py</topology>
diff --git a/TestON/tests/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py b/TestON/tests/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
index 7d97c10..42b4bc8 100644
--- a/TestON/tests/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
+++ b/TestON/tests/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
@@ -17,11 +17,11 @@
 
         main.step( "Starting Mininet Topology" )
         topology = main.dependencyPath + main.topology
-        topoResult = main.Mininet.startNet( topoFile = topology )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = topoResult,
-                                 onpass = "Successfully loaded topology",
-                                 onfail = "Failed to load topology" )
+        topoResult = main.Mininet.startNet( topoFile=topology )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=topoResult,
+                                 onpass="Successfully loaded topology",
+                                 onfail="Failed to load topology" )
         # Exit if topology did not load properly
         if not topoResult:
             main.cleanup()
@@ -35,10 +35,10 @@
             swResult = swResult and main.Mininet.assignSwController( sw,
                                                  [ONOS1Ip, ONOS2Ip, ONOS3Ip] )
 
-        utilities.assert_equals( expect = main.TRUE,
-                             actual = swResult,
-                             onpass = "Successfully connect all switches to ONOS",
-                             onfail = "Failed to connect all switches to ONOS" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=swResult,
+                                 onpass="Successfully connect all switches to ONOS",
+                                 onfail="Failed to connect all switches to ONOS" )
         if not swResult:
             main.cleanup()
             main.exit()
@@ -68,6 +68,7 @@
         ONOS1Ip = os.getenv( main.params[ 'CTRL' ][ 'ip1' ] )
         ONOS2Ip = os.getenv( main.params[ 'CTRL' ][ 'ip2' ] )
         ONOS3Ip = os.getenv( main.params[ 'CTRL' ][ 'ip3' ] )
+        ipList = [ ONOS1Ip, ONOS2Ip, ONOS3Ip ]
 
         global peer64514
         global peer64515
@@ -76,18 +77,24 @@
         peer64515 = main.params['config']['peer64515']
         peer64516 = main.params['config']['peer64516']
 
+        main.step( "Create cell file" )
+        cellAppString = main.params[ 'ENV' ][ 'appString' ]
+        main.ONOSbench.createCellFile( main.ONOSbench.ip_address, cellName,
+                                       main.Mininet.ip_address,
+                                       cellAppString, ipList )
+
         main.step( "Applying cell variable to environment" )
         cellResult = main.ONOSbench.setCell( cellName )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = cellResult,
-                                 onpass = "Set cell succeeded",
-                                 onfail = "Set cell failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=cellResult,
+                                 onpass="Set cell succeeded",
+                                 onfail="Set cell failed" )
 
         verifyResult = main.ONOSbench.verifyCell()
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = verifyResult,
-                                 onpass = "Verify cell succeeded",
-                                 onfail = "Verify cell failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=verifyResult,
+                                 onpass="Verify cell succeeded",
+                                 onfail="Verify cell failed" )
 
         branchName = main.ONOSbench.getBranchName()
         main.log.report( "ONOS is on branch: " + branchName )
@@ -96,92 +103,105 @@
         uninstallResult = main.ONOSbench.onosUninstall( ONOS1Ip ) \
                           and main.ONOSbench.onosUninstall( ONOS2Ip ) \
                           and main.ONOSbench.onosUninstall( ONOS3Ip )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = uninstallResult,
-                                 onpass = "Uninstall ONOS from nodes succeeded",
-                                 onfail = "Uninstall ONOS form nodes failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=uninstallResult,
+                                 onpass="Uninstall ONOS from nodes succeeded",
+                                 onfail="Uninstall ONOS form nodes failed" )
 
-        main.ONOSbench.getVersion( report = True )
+        main.ONOSbench.getVersion( report=True )
 
         main.step( "Creating ONOS package" )
-        packageResult = main.ONOSbench.onosPackage( opTimeout = 500 )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = packageResult,
-                                 onpass = "Package ONOS succeeded",
-                                 onfail = "Package ONOS failed" )
+        packageResult = main.ONOSbench.onosPackage( opTimeout=500 )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=packageResult,
+                                 onpass="Package ONOS succeeded",
+                                 onfail="Package ONOS failed" )
 
         main.step( "Installing ONOS package" )
-        onos1InstallResult = main.ONOSbench.onosInstall( options = "-f",
-                                                         node = ONOS1Ip )
-        onos2InstallResult = main.ONOSbench.onosInstall( options = "-f",
-                                                         node = ONOS2Ip )
-        onos3InstallResult = main.ONOSbench.onosInstall( options = "-f",
-                                                         node = ONOS3Ip )
+        onos1InstallResult = main.ONOSbench.onosInstall( options="-f",
+                                                         node=ONOS1Ip )
+        onos2InstallResult = main.ONOSbench.onosInstall( options="-f",
+                                                         node=ONOS2Ip )
+        onos3InstallResult = main.ONOSbench.onosInstall( options="-f",
+                                                         node=ONOS3Ip )
         onosInstallResult = onos1InstallResult and onos2InstallResult \
                             and onos3InstallResult
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = onosInstallResult,
-                                 onpass = "Install ONOS to nodes succeeded",
-                                 onfail = "Install ONOS to nodes failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=onosInstallResult,
+                                 onpass="Install ONOS to nodes succeeded",
+                                 onfail="Install ONOS to nodes failed" )
 
         main.step( "Checking if ONOS is up yet" )
-        onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout = 420 )
-        onos2UpResult = main.ONOSbench.isup( ONOS2Ip, timeout = 420 )
-        onos3UpResult = main.ONOSbench.isup( ONOS3Ip, timeout = 420 )
+        onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout=420 )
+        onos2UpResult = main.ONOSbench.isup( ONOS2Ip, timeout=420 )
+        onos3UpResult = main.ONOSbench.isup( ONOS3Ip, timeout=420 )
         onosUpResult = onos1UpResult and onos2UpResult and onos3UpResult
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = onos1UpResult and onosUpResult,
-                                 onpass = "ONOS nodes are up",
-                                 onfail = "ONOS nodes are NOT up" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=onosUpResult,
+                                 onpass="ONOS nodes are up",
+                                 onfail="ONOS nodes are NOT up" )
 
         main.step( "Checking if ONOS CLI is ready" )
+        main.CLIs = []
         cliResult1 = main.ONOScli1.startOnosCli( ONOS1Ip,
-                commandlineTimeout = 100, onosStartTimeout = 600 )
+                commandlineTimeout=100, onosStartTimeout=600 )
+        main.CLIs.append( main.ONOScli1 )
         cliResult2 = main.ONOScli2.startOnosCli( ONOS2Ip,
-                commandlineTimeout = 100, onosStartTimeout = 600 )
-        cliResult = cliResult1 and cliResult2
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = cliResult,
-                                 onpass = "ONOS CLI (on node1) is ready",
-                                 onfail = "ONOS CLI (on node1) ready" )
+                commandlineTimeout=100, onosStartTimeout=600 )
+        main.CLIs.append( main.ONOScli2 )
+        cliResult3 = main.ONOScli3.startOnosCli( ONOS3Ip,
+                commandlineTimeout=100, onosStartTimeout=600 )
+        main.CLIs.append( main.ONOScli3 )
+        cliResult = cliResult1 and cliResult2 and cliResult3
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=cliResult,
+                                 onpass="ONOS CLIs are ready",
+                                 onfail="ONOS CLIs are not ready" )
 
-        caseResult = ( cellResult and verifyResult and
-                       packageResult and
-                       onosInstallResult and onosUpResult and cliResult )
+        for i in range( 10 ):
+            ready = True
+            for cli in main.CLIs:
+                output = cli.summary()
+                if not output:
+                    ready = False
+            if ready:
+                break
+            time.sleep( 30 )
+        utilities.assert_equals( expect=True, actual=ready,
+                                 onpass="ONOS summary command succeded",
+                                 onfail="ONOS summary command failed" )
 
-        utilities.assert_equals( expect = main.TRUE, actual = caseResult,
-                                 onpass = "ONOS startup successful",
-                                 onfail = "ONOS startup NOT successful" )
-
-        if caseResult == main.FALSE:
+        if not ready:
             main.log.error( "ONOS startup failed!" )
             main.cleanup()
             main.exit()
 
-
     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.log.info( "Get links in the network" )
         summaryResult = main.ONOScli1.summary()
         linkNum = json.loads( summaryResult )[ "links" ]
-        listResult = main.ONOScli1.links( jsonFormat = False )
+        listResult = main.ONOScli1.links( jsonFormat=False )
         main.log.info( listResult )
-
         if linkNum < 100:
             main.log.error( "Link number is wrong!" )
+            time.sleep( int( main.params['timers']['TopoDiscovery'] ) )
+            listResult = main.ONOScli1.links( jsonFormat=False )
+            main.log.info( listResult )
             main.cleanup()
             main.exit()
 
         main.step( "Activate sdn-ip application" )
         activeSDNIPresult = main.ONOScli1.activateApp( "org.onosproject.sdnip" )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = activeSDNIPresult,
-                                 onpass = "Activate SDN-IP succeeded",
-                                 onfail = "Activate SDN-IP failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=activeSDNIPresult,
+                                 onpass="Activate SDN-IP succeeded",
+                                 onfail="Activate SDN-IP failed" )
         if not activeSDNIPresult:
+            main.log.info( "Activate SDN-IP failed!" )
             main.cleanup()
             main.exit()
 
@@ -211,18 +231,6 @@
         main.log.info( "Wait Quagga to finish delivery all routes to each \
         other and to sdn-ip, plus finish installing all intents..." )
         time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-        # TODO
-        # time.sleep( int( main.params[ 'timers' ][ 'PathAvailable' ] ) )
-
-        '''
-        # TODO: use for together with wrapperFile1
-        wrapperFile2 = main.params[ 'DEPENDENCY' ][ 'wrapper2' ]
-        main.USECASE_SdnipI2MN_Cluster = imp.load_source( wrapperFile2,
-                                                         main.dependencyPath +
-                                                         wrapperFile2 +
-                                                         ".py" )
-        '''
-
 
     def CASE1( self, main ):
         '''
@@ -230,42 +238,47 @@
         '''
 
         main.case( "Ping tests between BGP peers and speakers" )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [peer64514, peer64515, peer64516],
-                       expectAllSuccess = True )
-
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["peer64514", "peer64515", "peer64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[peer64514, peer64515, peer64516],
+                       expectAllSuccess=True )
 
     def CASE2( self, main ):
         '''
         point-to-point intents test for each BGP peer and BGP speaker pair
         '''
+        import time
         main.case( "Check point-to-point intents" )
         main.log.info( "There are %s BGP peers in total "
                        % main.params[ 'config' ][ 'peerNum' ] )
         main.step( "Check P2P intents number from ONOS CLI" )
 
-        getIntentsResult = main.ONOScli1.intents( jsonFormat = True )
+        getIntentsResult = main.ONOScli1.intents( jsonFormat=True )
         bgpIntentsActualNum = \
             main.QuaggaCliSpeaker1.extractActualBgpIntentNum( getIntentsResult )
         bgpIntentsExpectedNum = int( main.params[ 'config' ][ 'peerNum' ] ) * 6 * 2
+        if bgpIntentsActualNum != bgpIntentsExpectedNum:
+            time.sleep( int( main.params['timers']['RouteDelivery'] ) )
+            bgpIntentsActualNum = \
+                main.QuaggaCliSpeaker1.extractActualBgpIntentNum( getIntentsResult )
         main.log.info( "bgpIntentsExpected num is:" )
         main.log.info( bgpIntentsExpectedNum )
         main.log.info( "bgpIntentsActual num is:" )
         main.log.info( bgpIntentsActualNum )
         utilities.assertEquals( \
-            expect = True,
-            actual = eq( bgpIntentsExpectedNum, bgpIntentsActualNum ),
-            onpass = "PointToPointIntent Intent Num is correct!",
-            onfail = "PointToPointIntent Intent Num is wrong!" )
+            expect=True,
+            actual=eq( bgpIntentsExpectedNum, bgpIntentsActualNum ),
+            onpass="PointToPointIntent Intent Num is correct!",
+            onfail="PointToPointIntent Intent Num is wrong!" )
 
 
     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" )
 
         allRoutesExpected = []
@@ -273,11 +286,16 @@
         allRoutesExpected.append( "5.0.0.0/24" + "/" + "10.0.5.1" )
         allRoutesExpected.append( "6.0.0.0/24" + "/" + "10.0.6.1" )
 
-        getRoutesResult = main.ONOScli1.routes( jsonFormat = True )
+        getRoutesResult = main.ONOScli1.routes( jsonFormat=True )
         allRoutesActual = \
             main.QuaggaCliSpeaker1.extractActualRoutesMaster( getRoutesResult )
         allRoutesStrExpected = str( sorted( allRoutesExpected ) )
         allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" )
+        if allRoutesStrActual != allRoutesStrExpected:
+            time.sleep( int( main.params['timers']['RouteDelivery'] ) )
+            allRoutesActual = \
+                main.QuaggaCliSpeaker1.extractActualRoutesMaster( getRoutesResult )
+            allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" )
 
         main.step( "Check routes installed" )
         main.log.info( "Routes expected:" )
@@ -285,32 +303,40 @@
         main.log.info( "Routes get from ONOS CLI:" )
         main.log.info( allRoutesStrActual )
         utilities.assertEquals( \
-            expect = allRoutesStrExpected, actual = allRoutesStrActual,
-            onpass = "Routes are correct!",
-            onfail = "Routes are wrong!" )
+            expect=allRoutesStrExpected, actual=allRoutesStrActual,
+            onpass="Routes are correct!",
+            onfail="Routes are wrong!" )
 
         main.step( "Check M2S intents installed" )
-        getIntentsResult = main.ONOScli1.intents( jsonFormat = True )
+        getIntentsResult = main.ONOScli1.intents( jsonFormat=True )
         routeIntentsActualNum = \
             main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult )
         routeIntentsExpectedNum = 3
+        if routeIntentsActualNum != routeIntentsExpectedNum:
+            time.sleep( int( main.params['timers']['RouteDelivery'] ) )
+            routeIntentsActualNum = \
+                main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult )
 
         main.log.info( "MultiPointToSinglePoint Intent Num expected is:" )
         main.log.info( routeIntentsExpectedNum )
         main.log.info( "MultiPointToSinglePoint Intent NUM Actual is:" )
         main.log.info( routeIntentsActualNum )
         utilities.assertEquals( \
-            expect = True,
-            actual = eq( routeIntentsExpectedNum, routeIntentsActualNum ),
-            onpass = "MultiPointToSinglePoint Intent Num is correct!",
-            onfail = "MultiPointToSinglePoint Intent Num is wrong!" )
+            expect=routeIntentsExpectedNum,
+            actual=routeIntentsActualNum,
+            onpass="MultiPointToSinglePoint Intent Num is correct!",
+            onfail="MultiPointToSinglePoint Intent Num is wrong!" )
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
 
     def CASE4( self, main ):
@@ -319,8 +345,8 @@
         '''
         main.case( "Ping test for each route, all hosts behind BGP peers" )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE5( self, main ):
@@ -330,12 +356,12 @@
         import time
         main.case( "Bring down links and check routes/intents" )
         main.step( "Bring down the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1 = "sw32", END2 = "peer64514",
-                                         OPTION = "down" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult1,
-                                onpass = "Bring down link succeeded!",
-                                onfail = "Bring down link failed!" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="peer64514",
+                                         OPTION="down" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult1,
+                                onpass="Bring down link succeeded!",
+                                onfail="Bring down link failed!" )
 
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -347,12 +373,12 @@
             main.exit()
 
         main.step( "Bring down the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1 = "sw8", END2 = "peer64515",
-                                         OPTION = "down" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult2,
-                                onpass = "Bring down link succeeded!",
-                                onfail = "Bring down link failed!" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="peer64515",
+                                         OPTION="down" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult2,
+                                onpass="Bring down link succeeded!",
+                                onfail="Bring down link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 1 )
@@ -363,12 +389,12 @@
             main.exit()
 
         main.step( "Bring down the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1 = "sw28", END2 = "peer64516",
-                                         OPTION = "down" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult3,
-                                onpass = "Bring down link succeeded!",
-                                onfail = "Bring down link failed!" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="peer64516",
+                                         OPTION="down" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult3,
+                                onpass="Bring down link succeeded!",
+                                onfail="Bring down link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 0 )
@@ -379,19 +405,23 @@
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess = False )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["peer64514", "peer64515", "peer64516"],
+                       expectAllSuccess=False )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = False )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=False )
 
 
     def CASE6( self, main ):
@@ -401,12 +431,12 @@
         import time
         main.case( "Bring up links and check routes/intents" )
         main.step( "Bring up the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1 = "sw32", END2 = "peer64514",
-                                         OPTION = "up" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult1,
-                                onpass = "Bring up link succeeded!",
-                                onfail = "Bring up link failed!" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="peer64514",
+                                         OPTION="up" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult1,
+                                onpass="Bring up link succeeded!",
+                                onfail="Bring up link failed!" )
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 1 )
@@ -417,12 +447,12 @@
             main.exit()
 
         main.step( "Bring up the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1 = "sw8", END2 = "peer64515",
-                                         OPTION = "up" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult2,
-                                onpass = "Bring up link succeeded!",
-                                onfail = "Bring up link failed!" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="peer64515",
+                                         OPTION="up" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult2,
+                                onpass="Bring up link succeeded!",
+                                onfail="Bring up link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 2 )
@@ -433,12 +463,12 @@
             main.exit()
 
         main.step( "Bring up the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1 = "sw28", END2 = "peer64516",
-                                         OPTION = "up" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult3,
-                                onpass = "Bring up link succeeded!",
-                                onfail = "Bring up link failed!" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="peer64516",
+                                         OPTION="up" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult3,
+                                onpass="Bring up link succeeded!",
+                                onfail="Bring up link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 3 )
@@ -449,19 +479,23 @@
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["peer64514", "peer64515", "peer64516"],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE7( self, main ):
@@ -471,10 +505,10 @@
         import time
         main.case( "Stop edge sw32,check P-2-P and M-2-S intents, ping test" )
         main.step( "Stop sw32" )
-        result = main.Mininet.switch( SW = "sw32", OPTION = "stop" )
-        utilities.assertEquals( expect = main.TRUE, actual = result,
-                                onpass = "Stopping switch succeeded!",
-                                onfail = "Stopping switch failed!" )
+        result = main.Mininet.switch( SW="sw32", OPTION="stop" )
+        utilities.assertEquals( expect=main.TRUE, actual=result,
+                                onpass="Stopping switch succeeded!",
+                                onfail="Stopping switch failed!" )
 
         if result == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -487,30 +521,30 @@
             main.exit()
 
         main.step( "Check ping between hosts behind BGP peers" )
-        result1 = main.Mininet.pingHost( src = "host64514", target = "host64515" )
-        result2 = main.Mininet.pingHost( src = "host64515", target = "host64516" )
-        result3 = main.Mininet.pingHost( src = "host64514", target = "host64516" )
+        result1 = main.Mininet.pingHost( src="host64514", target="host64515" )
+        result2 = main.Mininet.pingHost( src="host64515", target="host64516" )
+        result3 = main.Mininet.pingHost( src="host64514", target="host64516" )
 
         pingResult1 = ( result1 == main.FALSE ) and ( result2 == main.TRUE ) \
                       and ( result3 == main.FALSE )
-        utilities.assert_equals( expect = True, actual = pingResult1,
-                                 onpass = "Ping test result is correct",
-                                 onfail = "Ping test result is wrong" )
+        utilities.assert_equals( expect=True, actual=pingResult1,
+                                 onpass="Ping test result is correct",
+                                 onfail="Ping test result is wrong" )
 
         if pingResult1 == False:
             main.cleanup()
             main.exit()
 
         main.step( "Check ping between BGP peers and speaker1" )
-        result4 = main.Mininet.pingHost( src = "speaker1", target = "peer64514" )
-        result5 = main.Mininet.pingHost( src = "speaker1", target = "peer64515" )
-        result6 = main.Mininet.pingHost( src = "speaker1", target = "peer64516" )
+        result4 = main.Mininet.pingHost( src="speaker1", target="peer64514" )
+        result5 = main.Mininet.pingHost( src="speaker1", target="peer64515" )
+        result6 = main.Mininet.pingHost( src="speaker1", target="peer64516" )
 
         pingResult2 = ( result4 == main.FALSE ) and ( result5 == main.TRUE ) \
                       and ( result6 == main.TRUE )
-        utilities.assert_equals( expect = True, actual = pingResult2,
-                                 onpass = "Speaker1 ping peers successful",
-                                 onfail = "Speaker1 ping peers NOT successful" )
+        utilities.assert_equals( expect=True, actual=pingResult2,
+                                 onpass="Speaker1 ping peers successful",
+                                 onfail="Speaker1 ping peers NOT successful" )
 
         if pingResult2 == False:
             main.cleanup()
@@ -518,26 +552,30 @@
 
         main.step( "Check ping between BGP peers and speaker2" )
         # TODO
-        result7 = main.Mininet.pingHost( src = "speaker2", target = peer64514 )
-        result8 = main.Mininet.pingHost( src = "speaker2", target = peer64515 )
-        result9 = main.Mininet.pingHost( src = "speaker2", target = peer64516 )
+        result7 = main.Mininet.pingHost( src="speaker2", target=peer64514 )
+        result8 = main.Mininet.pingHost( src="speaker2", target=peer64515 )
+        result9 = main.Mininet.pingHost( src="speaker2", target=peer64516 )
 
         pingResult3 = ( result7 == main.FALSE ) and ( result8 == main.TRUE ) \
                                                 and ( result9 == main.TRUE )
-        utilities.assert_equals( expect = True, actual = pingResult2,
-                                 onpass = "Speaker2 ping peers successful",
-                                 onfail = "Speaker2 ping peers NOT successful" )
+        utilities.assert_equals( expect=True, actual=pingResult2,
+                                 onpass="Speaker2 ping peers successful",
+                                 onfail="Speaker2 ping peers NOT successful" )
 
         if pingResult3 == False:
             main.cleanup()
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
 
     def CASE8( self, main ):
@@ -548,19 +586,19 @@
         import time
         main.case( "Start the edge sw32, check P-2-P and M-2-S intents, ping test" )
         main.step( "Start sw32" )
-        result1 = main.Mininet.switch( SW = "sw32", OPTION = "start" )
+        result1 = main.Mininet.switch( SW="sw32", OPTION="start" )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = result1,
-            onpass = "Starting switch succeeded!",
-            onfail = "Starting switch failed!" )
+            expect=main.TRUE,
+            actual=result1,
+            onpass="Starting switch succeeded!",
+            onfail="Starting switch failed!" )
 
         result2 = main.Mininet.assignSwController( "sw32", ONOS1Ip )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = result2,
-            onpass = "Connect switch to ONOS succeeded!",
-            onfail = "Connect switch to ONOS failed!" )
+            expect=main.TRUE,
+            actual=result2,
+            onpass="Connect switch to ONOS succeeded!",
+            onfail="Connect switch to ONOS failed!" )
 
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -573,22 +611,26 @@
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [peer64514, peer64515, peer64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["peer64514", "peer64515", "peer64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[peer64514, peer64515, peer64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE9( self, main ):
@@ -608,10 +650,10 @@
         main.log.info( main.Mininet.checkFlows( "sw7" ) )
 
         main.step( "Stop sw11" )
-        result = main.Mininet.switch( SW = "sw11", OPTION = "stop" )
-        utilities.assertEquals( expect = main.TRUE, actual = result,
-                                onpass = "Stopping switch succeeded!",
-                                onfail = "Stopping switch failed!" )
+        result = main.Mininet.switch( SW="sw11", OPTION="stop" )
+        utilities.assertEquals( expect=main.TRUE, actual=result,
+                                onpass="Stopping switch succeeded!",
+                                onfail="Stopping switch failed!" )
         if result:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -624,21 +666,25 @@
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [peer64514, peer64515, peer64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["peer64514", "peer64515", "peer64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[peer64514, peer64515, peer64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE10( self, main ):
@@ -656,14 +702,14 @@
         main.log.info( main.Mininet.checkFlows( "sw7" ) )
 
         main.step( "Start sw11" )
-        result1 = main.Mininet.switch( SW = "sw11", OPTION = "start" )
-        utilities.assertEquals( expect = main.TRUE, actual = result1,
-                                onpass = "Starting switch succeeded!",
-                                onfail = "Starting switch failed!" )
+        result1 = main.Mininet.switch( SW="sw11", OPTION="start" )
+        utilities.assertEquals( expect=main.TRUE, actual=result1,
+                                onpass="Starting switch succeeded!",
+                                onfail="Starting switch failed!" )
         result2 = main.Mininet.assignSwController( "sw11", ONOS1Ip )
-        utilities.assertEquals( expect = main.TRUE, actual = result2,
-                                onpass = "Connect switch to ONOS succeeded!",
-                                onfail = "Connect switch to ONOS failed!" )
+        utilities.assertEquals( expect=main.TRUE, actual=result2,
+                                onpass="Connect switch to ONOS succeeded!",
+                                onfail="Connect switch to ONOS failed!" )
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 3 )
@@ -679,21 +725,25 @@
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [peer64514, peer64515, peer64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["peer64514", "peer64515", "peer64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[peer64514, peer64515, peer64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE11(self, main):
@@ -705,21 +755,25 @@
         main.Functions.checkM2SintentNum( main, 3 )
         main.Functions.checkP2PintentNum( main, 18 * 2 )
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [peer64514, peer64515, peer64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["peer64514", "peer64515", "peer64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[peer64514, peer64515, peer64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
         main.step( "Kill speaker1" )
         command1 = "ps -e | grep bgp -c"
@@ -737,10 +791,10 @@
 
         result3 = main.Mininet.node( "root", command1 )
 
-        utilities.assert_equals( expect = True,
-                                 actual = ( "4" in result3 ),
-                                 onpass = "Kill speaker1 succeeded",
-                                 onfail = "Kill speaker1 failed" )
+        utilities.assert_equals( expect=True,
+                                 actual=( "4" in result3 ),
+                                 onpass="Kill speaker1 succeeded",
+                                 onfail="Kill speaker1 failed" )
         if ( "4" not in result3 ) :
             main.log.info( result3 )
             main.cleanup()
@@ -752,23 +806,27 @@
         main.Functions.checkP2PintentNum( main, 18 * 2 )
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         '''
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess = False )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["peer64514", "peer64515", "peer64516"],
+                       expectAllSuccess=False )
         '''
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [peer64514, peer64515, peer64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[peer64514, peer64515, peer64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE12( self, main ):
@@ -794,44 +852,52 @@
         else:
             uninstallResult = main.ONOSbench.onosStop( ONOS3Ip )
 
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = uninstallResult,
-                                 onpass = "Uninstall ONOS leader succeeded",
-                                 onfail = "Uninstall ONOS leader failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=uninstallResult,
+                                 onpass="Uninstall ONOS leader succeeded",
+                                 onfail="Uninstall ONOS leader failed" )
         if uninstallResult != main.TRUE:
             main.cleanup()
             main.exit()
         time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
 
         if leaderIP == ONOS1Ip:
-            main.Functions.checkRouteNum( main, 3, ONOScli = "ONOScli2" )
-            main.Functions.checkM2SintentNum( main, 3, ONOScli = "ONOScli2" )
-            main.Functions.checkP2PintentNum( main, 18 * 2, ONOScli = "ONOScli2" )
+            main.Functions.checkRouteNum( main, 3, ONOScli="ONOScli2" )
+            main.Functions.checkM2SintentNum( main, 3, ONOScli="ONOScli2" )
+            main.Functions.checkP2PintentNum( main, 18 * 2, ONOScli="ONOScli2" )
 
             main.step( "Check whether all flow status are ADDED" )
+            flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                         main.FALSE,
+                                         kwargs={'isPENDING':False},
+                                         attempts=10 )
             utilities.assertEquals( \
-                expect = main.TRUE,
-                actual = main.ONOScli2.checkFlowsState( isPENDING_ADD = False ),
-                onpass = "Flow status is correct!",
-                onfail = "Flow status is wrong!" )
+                expect=main.TRUE,
+                actual=flowCheck,
+                onpass="Flow status is correct!",
+                onfail="Flow status is wrong!" )
         else:
             main.Functions.checkRouteNum( main, 3 )
             main.Functions.checkM2SintentNum( main, 3 )
             main.Functions.checkP2PintentNum( main, 18 * 2 )
 
             main.step( "Check whether all flow status are ADDED" )
+            flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                         main.FALSE,
+                                         kwargs={'isPENDING':False},
+                                         attempts=10 )
             utilities.assertEquals( \
-                expect = main.TRUE,
-                actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-                onpass = "Flow status is correct!",
-                onfail = "Flow status is wrong!" )
+                expect=main.TRUE,
+                actual=flowCheck,
+                onpass="Flow status is correct!",
+                onfail="Flow status is wrong!" )
 
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["peer64514", "peer64515", "peer64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [peer64514, peer64515, peer64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["peer64514", "peer64515", "peer64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[peer64514, peer64515, peer64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
diff --git a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/Functions.py b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/Functions.py
index 97a432a..a3c7540 100644
--- a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/Functions.py
+++ b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/Dependency/Functions.py
@@ -1,14 +1,20 @@
 
-def checkRouteNum( main, routeNumExpected, ONOScli = "ONOScli1" ):
+def checkRouteNum( main, routeNumExpected, ONOScli="ONOScli1" ):
+    import time
     main.step( "Check routes installed" )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Route number expected:" )
     main.log.info( routeNumExpected )
     main.log.info( "Route number from ONOS CLI:" )
 
     if ONOScli == "ONOScli1":
-        routeNumActual = main.ONOScli1.ipv4RouteNumber()
+        cli = main.ONOScli1
     else:
-        routeNumActual = main.ONOScli2.ipv4RouteNumber()
+        cli = main.ONOScli2
+    routeNumActual = cli.ipv4RouteNumber()
+    if routeNumActual != routeNumExpected:
+        time.sleep( wait )
+        routeNumActual = cli.ipv4RouteNumber()
 
     main.log.info( routeNumActual )
     utilities.assertEquals( \
@@ -17,17 +23,24 @@
         onfail = "Route number is wrong!" )
 
 def checkM2SintentNum( main, intentNumExpected, ONOScli = "ONOScli1" ):
+    import time
     main.step( "Check M2S intents installed" )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Intent number expected:" )
     main.log.info( intentNumExpected )
     main.log.info( "Intent number from ONOS CLI:" )
     if ONOScli == "ONOScli1":
-        jsonResult = main.ONOScli1.intents( jsonFormat = True, summary = True,
-                                            TYPE = "multiPointToSinglePoint" )
+        cli = main.ONOScli1
     else:
-        jsonResult = main.ONOScli2.intents( jsonFormat = True, summary = True,
-                                            TYPE = "multiPointToSinglePoint" )
+        cli = main.ONOScli2
+    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']
     main.log.info( intentNumActual )
     utilities.assertEquals( \
         expect = intentNumExpected, actual = intentNumActual,
@@ -35,17 +48,25 @@
         onfail = "M2S intent number is wrong!" )
 
 def checkP2PintentNum( main, intentNumExpected, ONOScli = "ONOScli1" ):
+    import time
     main.step( "Check P2P intents installed" )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Intent number expected:" )
     main.log.info( intentNumExpected )
     main.log.info( "Intent number from ONOS CLI:" )
     if ONOScli == "ONOScli1":
-        jsonResult = main.ONOScli1.intents( jsonFormat = True, summary = True,
-                                            TYPE = "pointToPoint" )
+        cli = main.ONOScli1
     else:
-        jsonResult = main.ONOScli2.intents( jsonFormat = True, summary = True,
-                                            TYPE = "pointToPoint" )
+        cli = main.ONOScli2
+    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']
     main.log.info( intentNumActual )
     utilities.assertEquals( \
         expect = intentNumExpected, actual = intentNumActual,
@@ -53,11 +74,16 @@
         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'] )
     main.log.info( "Flow number expected:" )
     main.log.info( flowNumExpected )
     main.log.info( "Flow number actual:" )
     flowNumActual = main.Mininet.getSwitchFlowCount( switch )
+    if flowNumActual != flowNumExpected :
+        time.sleep( wait )
+        flowNumActual = main.Mininet.getSwitchFlowCount( switch )
     main.log.info( flowNumActual )
     utilities.assertEquals( \
         expect = flowNumExpected, actual = flowNumActual,
@@ -121,7 +147,8 @@
         * expectAllSuccess - boolean indicating if you expect all results
         succeed if True, otherwise expect all results fail if False
     """
-    main.step( "Check ping between each host pair" )
+    main.step( "Check ping between each host pair, expect all to succede=" +
+               str( expectAllSuccess ) )
     if len( hosts ) == 0:
         main.log.error( "Parameter hosts can not be empty." )
         main.cleanup()
diff --git a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.params b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.params
index 8124dfe..a36059e 100644
--- a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.params
+++ b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.params
@@ -2,10 +2,11 @@
 
     <testcases>101, 100, 200, 102, 1, 2, 3, 4, 7, 8, 9, 10, 11, 12</testcases>
     # case6 needs a new driver, will enable it after this new driver
-    #<testcases>101, 100, 200, 102, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12</testcases>
+    #101, 100, 200, 102, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
     #Environment variables
     <ENV>
-        <cellName>sdnip_multiple_instance_VM</cellName>
+        <cellName>SDNIP</cellName>
+        <appString>drivers,openflow,proxyarp</appString>
     </ENV>
 
     <CTRL>
@@ -19,16 +20,6 @@
         <port1>6653</port1>
     </CTRL>
 
-    <GIT>
-        <branch1>master</branch1>
-        <branch2>onos-1.3</branch2>
-    </GIT>
-
-    <JSON>
-        <prefix>prefix</prefix>
-        <nextHop>nextHop</nextHop>
-    </JSON>
-
     <DEPENDENCY>
         <path>/USECASE_SdnipFunctionCluster_fsfw/Dependency/</path>
         <topology>USECASE_SdnipI2MN_Cluster.py</topology>
diff --git a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py
index 782110c..98c28bb 100644
--- a/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py
+++ b/TestON/tests/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py
@@ -5,12 +5,10 @@
         self.default = ''
         global branchName
 
-    # This case is to setup Mininet testbed
     def CASE100( self, main ):
         """
             Start mininet
         """
-        import os
         import imp
         main.log.case( "Setup the Mininet testbed" )
         main.dependencyPath = main.testDir + \
@@ -19,11 +17,11 @@
 
         main.step( "Starting Mininet Topology" )
         topology = main.dependencyPath + main.topology
-        topoResult = main.Mininet.startNet( topoFile = topology )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = topoResult,
-                                 onpass = "Successfully loaded topology",
-                                 onfail = "Failed to load topology" )
+        topoResult = main.Mininet.startNet( topoFile=topology )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=topoResult,
+                                 onpass="Successfully loaded topology",
+                                 onfail="Failed to load topology" )
         # Exit if topology did not load properly
         if not topoResult:
             main.cleanup()
@@ -34,12 +32,12 @@
         for i in range ( 1, int( main.params['config']['switchNum'] ) + 1 ):
             sw = "sw%s" % ( i )
             swResult = swResult and main.Mininet.assignSwController( sw, fsfwIp,
-                                                                     port = fsfwPort )
+                                                                     port=fsfwPort )
 
-        utilities.assert_equals( expect = main.TRUE,
-                             actual = swResult,
-                             onpass = "Successfully connect all switches to FSFW",
-                             onfail = "Failed to connect all switches to FSFW" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=swResult,
+                                 onpass="Successfully connect all switches to FSFW",
+                                 onfail="Failed to connect all switches to FSFW" )
         if not swResult:
             main.cleanup()
             main.exit()
@@ -69,6 +67,7 @@
         ONOS1Ip = os.getenv( main.params[ 'CTRL' ][ 'ip1' ] )
         ONOS2Ip = os.getenv( main.params[ 'CTRL' ][ 'ip2' ] )
         ONOS3Ip = os.getenv( main.params[ 'CTRL' ][ 'ip3' ] )
+        ipList = [ ONOS1Ip, ONOS2Ip, ONOS3Ip ]
 
         global pr64514
         global pr64515
@@ -82,18 +81,24 @@
         fsfwIp = main.params[ 'CTRL' ][ 'fsfwIp' ]
         fsfwPort = main.params[ 'CTRL' ][ 'fsfwPort' ]
 
+        main.step( "Create cell file" )
+        cellAppString = main.params[ 'ENV' ][ 'appString' ]
+        main.ONOSbench.createCellFile( main.ONOSbench.ip_address, cellName,
+                                       main.Mininet.ip_address,
+                                       cellAppString, ipList )
+
         main.step( "Applying cell variable to environment" )
         cellResult = main.ONOSbench.setCell( cellName )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = cellResult,
-                                 onpass = "Set cell succeeded",
-                                 onfail = "Set cell failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=cellResult,
+                                 onpass="Set cell succeeded",
+                                 onfail="Set cell failed" )
 
         verifyResult = main.ONOSbench.verifyCell()
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = verifyResult,
-                                 onpass = "Verify cell succeeded",
-                                 onfail = "Verify cell failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=verifyResult,
+                                 onpass="Verify cell succeeded",
+                                 onfail="Verify cell failed" )
 
         branchName = main.ONOSbench.getBranchName()
         main.log.report( "ONOS is on branch: " + branchName )
@@ -102,92 +107,105 @@
         uninstallResult = main.ONOSbench.onosUninstall( ONOS1Ip ) \
                           and main.ONOSbench.onosUninstall( ONOS2Ip ) \
                           and main.ONOSbench.onosUninstall( ONOS3Ip )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = uninstallResult,
-                                 onpass = "Uninstall ONOS from nodes succeeded",
-                                 onfail = "Uninstall ONOS form nodes failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=uninstallResult,
+                                 onpass="Uninstall ONOS from nodes succeeded",
+                                 onfail="Uninstall ONOS form nodes failed" )
 
-        main.ONOSbench.getVersion( report = True )
+        main.ONOSbench.getVersion( report=True )
 
         main.step( "Creating ONOS package" )
-        packageResult = main.ONOSbench.onosPackage( opTimeout = 500 )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = packageResult,
-                                 onpass = "Package ONOS succeeded",
-                                 onfail = "Package ONOS failed" )
+        packageResult = main.ONOSbench.onosPackage( opTimeout=500 )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=packageResult,
+                                 onpass="Package ONOS succeeded",
+                                 onfail="Package ONOS failed" )
 
         main.step( "Installing ONOS package" )
-        onos1InstallResult = main.ONOSbench.onosInstall( options = "-f",
-                                                         node = ONOS1Ip )
-        onos2InstallResult = main.ONOSbench.onosInstall( options = "-f",
-                                                         node = ONOS2Ip )
-        onos3InstallResult = main.ONOSbench.onosInstall( options = "-f",
-                                                         node = ONOS3Ip )
+        onos1InstallResult = main.ONOSbench.onosInstall( options="-f",
+                                                         node=ONOS1Ip )
+        onos2InstallResult = main.ONOSbench.onosInstall( options="-f",
+                                                         node=ONOS2Ip )
+        onos3InstallResult = main.ONOSbench.onosInstall( options="-f",
+                                                         node=ONOS3Ip )
         onosInstallResult = onos1InstallResult and onos2InstallResult \
                             and onos3InstallResult
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = onosInstallResult,
-                                 onpass = "Install ONOS to nodes succeeded",
-                                 onfail = "Install ONOS to nodes failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=onosInstallResult,
+                                 onpass="Install ONOS to nodes succeeded",
+                                 onfail="Install ONOS to nodes failed" )
 
         main.step( "Checking if ONOS is up yet" )
-        onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout = 420 )
-        onos2UpResult = main.ONOSbench.isup( ONOS2Ip, timeout = 420 )
-        onos3UpResult = main.ONOSbench.isup( ONOS3Ip, timeout = 420 )
+        onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout=420 )
+        onos2UpResult = main.ONOSbench.isup( ONOS2Ip, timeout=420 )
+        onos3UpResult = main.ONOSbench.isup( ONOS3Ip, timeout=420 )
         onosUpResult = onos1UpResult and onos2UpResult and onos3UpResult
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = onos1UpResult and onosUpResult,
-                                 onpass = "ONOS nodes are up",
-                                 onfail = "ONOS nodes are NOT up" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=onosUpResult,
+                                 onpass="ONOS nodes are up",
+                                 onfail="ONOS nodes are NOT up" )
 
         main.step( "Checking if ONOS CLI is ready" )
+        main.CLIs = []
         cliResult1 = main.ONOScli1.startOnosCli( ONOS1Ip,
-                commandlineTimeout = 100, onosStartTimeout = 600 )
+                commandlineTimeout=100, onosStartTimeout=600 )
+        main.CLIs.append( main.ONOScli1 )
         cliResult2 = main.ONOScli2.startOnosCli( ONOS2Ip,
-                commandlineTimeout = 100, onosStartTimeout = 600 )
-        cliResult = cliResult1 and cliResult2
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = cliResult,
-                                 onpass = "ONOS CLI (on node1) is ready",
-                                 onfail = "ONOS CLI (on node1) ready" )
+                commandlineTimeout=100, onosStartTimeout=600 )
+        main.CLIs.append( main.ONOScli2 )
+        cliResult3 = main.ONOScli3.startOnosCli( ONOS3Ip,
+                commandlineTimeout=100, onosStartTimeout=600 )
+        main.CLIs.append( main.ONOScli3 )
+        cliResult = cliResult1 and cliResult2 and cliResult3
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=cliResult,
+                                 onpass="ONOS CLIs are ready",
+                                 onfail="ONOS CLIs are not ready" )
 
-        caseResult = ( cellResult and verifyResult and
-                       packageResult and
-                       onosInstallResult and onosUpResult and cliResult )
+        for i in range( 10 ):
+            ready = True
+            for cli in main.CLIs:
+                output = cli.summary()
+                if not output:
+                    ready = False
+            if ready:
+                break
+            time.sleep( 30 )
+        utilities.assert_equals( expect=True, actual=ready,
+                                 onpass="ONOS summary command succeded",
+                                 onfail="ONOS summary command failed" )
 
-        utilities.assert_equals( expect = main.TRUE, actual = caseResult,
-                                 onpass = "ONOS startup successful",
-                                 onfail = "ONOS startup NOT successful" )
-
-        if caseResult == main.FALSE:
+        if not ready:
             main.log.error( "ONOS startup failed!" )
             main.cleanup()
             main.exit()
 
-
     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.log.info( "Get links in the network" )
         summaryResult = main.ONOScli1.summary()
         linkNum = json.loads( summaryResult )[ "links" ]
-        listResult = main.ONOScli1.links( jsonFormat = False )
+        listResult = main.ONOScli1.links( jsonFormat=False )
         main.log.info( listResult )
-
         if linkNum < 100:
             main.log.error( "Link number is wrong!" )
+            time.sleep( int( main.params['timers']['TopoDiscovery'] ) )
+            listResult = main.ONOScli1.links( jsonFormat=False )
+            main.log.info( listResult )
             main.cleanup()
             main.exit()
 
         main.step( "Activate sdn-ip application" )
         activeSDNIPresult = main.ONOScli1.activateApp( "org.onosproject.sdnip" )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = activeSDNIPresult,
-                                 onpass = "Activate SDN-IP succeeded",
-                                 onfail = "Activate SDN-IP failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=activeSDNIPresult,
+                                 onpass="Activate SDN-IP succeeded",
+                                 onfail="Activate SDN-IP failed" )
         if not activeSDNIPresult:
+            main.log.info( "Activate SDN-IP failed!" )
             main.cleanup()
             main.exit()
 
@@ -217,18 +235,6 @@
         main.log.info( "Wait Quagga to finish delivery all routes to each \
         other and to sdn-ip, plus finish installing all intents..." )
         time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
-        # TODO
-        # time.sleep( int( main.params[ 'timers' ][ 'PathAvailable' ] ) )
-
-        '''
-        # TODO: use for together with wrapperFile1
-        wrapperFile2 = main.params[ 'DEPENDENCY' ][ 'wrapper2' ]
-        main.USECASE_SdnipI2MN_Cluster = imp.load_source( wrapperFile2,
-                                                         main.dependencyPath +
-                                                         wrapperFile2 +
-                                                         ".py" )
-        '''
-
 
     def CASE1( self, main ):
         '''
@@ -236,42 +242,47 @@
         '''
 
         main.case( "Ping tests between BGP peers and speakers" )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [pr64514, pr64515, pr64516],
-                       expectAllSuccess = True )
-
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[pr64514, pr64515, pr64516],
+                       expectAllSuccess=True )
 
     def CASE2( self, main ):
         '''
         point-to-point intents test for each BGP peer and BGP speaker pair
         '''
+        import time
         main.case( "Check point-to-point intents" )
         main.log.info( "There are %s BGP peers in total "
                        % main.params[ 'config' ][ 'peerNum' ] )
         main.step( "Check P2P intents number from ONOS CLI" )
 
-        getIntentsResult = main.ONOScli1.intents( jsonFormat = True )
+        getIntentsResult = main.ONOScli1.intents( jsonFormat=True )
         bgpIntentsActualNum = \
             main.QuaggaCliSpeaker1.extractActualBgpIntentNum( getIntentsResult )
         bgpIntentsExpectedNum = int( main.params[ 'config' ][ 'peerNum' ] ) * 6 * 2
+        if bgpIntentsActualNum != bgpIntentsExpectedNum:
+            time.sleep( int( main.params['timers']['RouteDelivery'] ) )
+            bgpIntentsActualNum = \
+                main.QuaggaCliSpeaker1.extractActualBgpIntentNum( getIntentsResult )
         main.log.info( "bgpIntentsExpected num is:" )
         main.log.info( bgpIntentsExpectedNum )
         main.log.info( "bgpIntentsActual num is:" )
         main.log.info( bgpIntentsActualNum )
         utilities.assertEquals( \
-            expect = True,
-            actual = eq( bgpIntentsExpectedNum, bgpIntentsActualNum ),
-            onpass = "PointToPointIntent Intent Num is correct!",
-            onfail = "PointToPointIntent Intent Num is wrong!" )
+            expect=True,
+            actual=eq( bgpIntentsExpectedNum, bgpIntentsActualNum ),
+            onpass="PointToPointIntent Intent Num is correct!",
+            onfail="PointToPointIntent Intent Num is wrong!" )
 
 
     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" )
 
         allRoutesExpected = []
@@ -279,11 +290,16 @@
         allRoutesExpected.append( "5.0.0.0/24" + "/" + "10.0.5.1" )
         allRoutesExpected.append( "6.0.0.0/24" + "/" + "10.0.6.1" )
 
-        getRoutesResult = main.ONOScli1.routes( jsonFormat = True )
+        getRoutesResult = main.ONOScli1.routes( jsonFormat=True )
         allRoutesActual = \
             main.QuaggaCliSpeaker1.extractActualRoutesMaster( getRoutesResult )
         allRoutesStrExpected = str( sorted( allRoutesExpected ) )
         allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" )
+        if allRoutesStrActual != allRoutesStrExpected:
+            time.sleep( int( main.params['timers']['RouteDelivery'] ) )
+            allRoutesActual = \
+                main.QuaggaCliSpeaker1.extractActualRoutesMaster( getRoutesResult )
+            allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" )
 
         main.step( "Check routes installed" )
         main.log.info( "Routes expected:" )
@@ -291,32 +307,40 @@
         main.log.info( "Routes get from ONOS CLI:" )
         main.log.info( allRoutesStrActual )
         utilities.assertEquals( \
-            expect = allRoutesStrExpected, actual = allRoutesStrActual,
-            onpass = "Routes are correct!",
-            onfail = "Routes are wrong!" )
+            expect=allRoutesStrExpected, actual=allRoutesStrActual,
+            onpass="Routes are correct!",
+            onfail="Routes are wrong!" )
 
         main.step( "Check M2S intents installed" )
-        getIntentsResult = main.ONOScli1.intents( jsonFormat = True )
+        getIntentsResult = main.ONOScli1.intents( jsonFormat=True )
         routeIntentsActualNum = \
             main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult )
         routeIntentsExpectedNum = 3
+        if routeIntentsActualNum != routeIntentsExpectedNum:
+            time.sleep( int( main.params['timers']['RouteDelivery'] ) )
+            routeIntentsActualNum = \
+                main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult )
 
         main.log.info( "MultiPointToSinglePoint Intent Num expected is:" )
         main.log.info( routeIntentsExpectedNum )
         main.log.info( "MultiPointToSinglePoint Intent NUM Actual is:" )
         main.log.info( routeIntentsActualNum )
         utilities.assertEquals( \
-            expect = True,
-            actual = eq( routeIntentsExpectedNum, routeIntentsActualNum ),
-            onpass = "MultiPointToSinglePoint Intent Num is correct!",
-            onfail = "MultiPointToSinglePoint Intent Num is wrong!" )
+            expect=routeIntentsExpectedNum,
+            actual=routeIntentsActualNum,
+            onpass="MultiPointToSinglePoint Intent Num is correct!",
+            onfail="MultiPointToSinglePoint Intent Num is wrong!" )
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
 
     def CASE4( self, main ):
@@ -325,8 +349,8 @@
         '''
         main.case( "Ping test for each route, all hosts behind BGP peers" )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE5( self, main ):
@@ -336,16 +360,16 @@
         import time
         main.case( "Bring down links and check routes/intents" )
         main.step( "Bring down the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1 = "sw32", END2 = "pr64514",
-                                         OPTION = "down" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="pr64514",
+                                         OPTION="down" )
         # When bring down a link, Mininet will bring down both the interfaces
         # at the two sides of the link. Here we do not want to bring down the
         # host side interface, since I noticed when bring up in CASE6, some of
         # the configuration information will lost.
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult1,
-                                onpass = "Bring down link succeeded!",
-                                onfail = "Bring down link failed!" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult1,
+                                onpass="Bring down link succeeded!",
+                                onfail="Bring down link failed!" )
 
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -357,12 +381,12 @@
             main.exit()
 
         main.step( "Bring down the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1 = "sw8", END2 = "pr64515",
-                                         OPTION = "down" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult2,
-                                onpass = "Bring down link succeeded!",
-                                onfail = "Bring down link failed!" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="pr64515",
+                                         OPTION="down" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult2,
+                                onpass="Bring down link succeeded!",
+                                onfail="Bring down link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 1 )
@@ -373,12 +397,12 @@
             main.exit()
 
         main.step( "Bring down the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1 = "sw28", END2 = "pr64516",
-                                         OPTION = "down" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult3,
-                                onpass = "Bring down link succeeded!",
-                                onfail = "Bring down link failed!" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="pr64516",
+                                         OPTION="down" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult3,
+                                onpass="Bring down link succeeded!",
+                                onfail="Bring down link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 0 )
@@ -389,19 +413,23 @@
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = False )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=False )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = False )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=False )
 
 
     def CASE6( self, main ):
@@ -411,12 +439,12 @@
         import time
         main.case( "Bring up links and check routes/intents" )
         main.step( "Bring up the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1 = "sw32", END2 = "pr64514",
-                                         OPTION = "up" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult1,
-                                onpass = "Bring up link succeeded!",
-                                onfail = "Bring up link failed!" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="pr64514",
+                                         OPTION="up" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult1,
+                                onpass="Bring up link succeeded!",
+                                onfail="Bring up link failed!" )
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 1 )
@@ -427,12 +455,12 @@
             main.exit()
 
         main.step( "Bring up the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1 = "sw8", END2 = "pr64515",
-                                         OPTION = "up" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult2,
-                                onpass = "Bring up link succeeded!",
-                                onfail = "Bring up link failed!" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="pr64515",
+                                         OPTION="up" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult2,
+                                onpass="Bring up link succeeded!",
+                                onfail="Bring up link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 2 )
@@ -443,12 +471,12 @@
             main.exit()
 
         main.step( "Bring up the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1 = "sw28", END2 = "pr64516",
-                                         OPTION = "up" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult3,
-                                onpass = "Bring up link succeeded!",
-                                onfail = "Bring up link failed!" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="pr64516",
+                                         OPTION="up" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult3,
+                                onpass="Bring up link succeeded!",
+                                onfail="Bring up link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 3 )
@@ -459,19 +487,23 @@
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE7( self, main ):
@@ -481,10 +513,10 @@
         import time
         main.case( "Stop edge sw32,check P-2-P and M-2-S intents, ping test" )
         main.step( "Stop sw32" )
-        result = main.Mininet.switch( SW = "sw32", OPTION = "stop" )
-        utilities.assertEquals( expect = main.TRUE, actual = result,
-                                onpass = "Stopping switch succeeded!",
-                                onfail = "Stopping switch failed!" )
+        result = main.Mininet.switch( SW="sw32", OPTION="stop" )
+        utilities.assertEquals( expect=main.TRUE, actual=result,
+                                onpass="Stopping switch succeeded!",
+                                onfail="Stopping switch failed!" )
 
         if result == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -497,30 +529,30 @@
             main.exit()
 
         main.step( "Check ping between hosts behind BGP peers" )
-        result1 = main.Mininet.pingHost( src = "host64514", target = "host64515" )
-        result2 = main.Mininet.pingHost( src = "host64515", target = "host64516" )
-        result3 = main.Mininet.pingHost( src = "host64514", target = "host64516" )
+        result1 = main.Mininet.pingHost( src="host64514", target="host64515" )
+        result2 = main.Mininet.pingHost( src="host64515", target="host64516" )
+        result3 = main.Mininet.pingHost( src="host64514", target="host64516" )
 
         pingResult1 = ( result1 == main.FALSE ) and ( result2 == main.TRUE ) \
                       and ( result3 == main.FALSE )
-        utilities.assert_equals( expect = True, actual = pingResult1,
-                                 onpass = "Ping test result is correct",
-                                 onfail = "Ping test result is wrong" )
+        utilities.assert_equals( expect=True, actual=pingResult1,
+                                 onpass="Ping test result is correct",
+                                 onfail="Ping test result is wrong" )
 
         if pingResult1 == False:
             main.cleanup()
             main.exit()
 
         main.step( "Check ping between BGP peers and speaker1" )
-        result4 = main.Mininet.pingHost( src = "speaker1", target = "pr64514" )
-        result5 = main.Mininet.pingHost( src = "speaker1", target = "pr64515" )
-        result6 = main.Mininet.pingHost( src = "speaker1", target = "pr64516" )
+        result4 = main.Mininet.pingHost( src="speaker1", target="pr64514" )
+        result5 = main.Mininet.pingHost( src="speaker1", target="pr64515" )
+        result6 = main.Mininet.pingHost( src="speaker1", target="pr64516" )
 
         pingResult2 = ( result4 == main.FALSE ) and ( result5 == main.TRUE ) \
                       and ( result6 == main.TRUE )
-        utilities.assert_equals( expect = True, actual = pingResult2,
-                                 onpass = "Speaker1 ping peers successful",
-                                 onfail = "Speaker1 ping peers NOT successful" )
+        utilities.assert_equals( expect=True, actual=pingResult2,
+                                 onpass="Speaker1 ping peers successful",
+                                 onfail="Speaker1 ping peers NOT successful" )
 
         if pingResult2 == False:
             main.cleanup()
@@ -528,26 +560,30 @@
 
         main.step( "Check ping between BGP peers and speaker2" )
         # TODO
-        result7 = main.Mininet.pingHost( src = "speaker2", target = pr64514 )
-        result8 = main.Mininet.pingHost( src = "speaker2", target = pr64515 )
-        result9 = main.Mininet.pingHost( src = "speaker2", target = pr64516 )
+        result7 = main.Mininet.pingHost( src="speaker2", target=pr64514 )
+        result8 = main.Mininet.pingHost( src="speaker2", target=pr64515 )
+        result9 = main.Mininet.pingHost( src="speaker2", target=pr64516 )
 
         pingResult3 = ( result7 == main.FALSE ) and ( result8 == main.TRUE ) \
                                                 and ( result9 == main.TRUE )
-        utilities.assert_equals( expect = True, actual = pingResult2,
-                                 onpass = "Speaker2 ping peers successful",
-                                 onfail = "Speaker2 ping peers NOT successful" )
+        utilities.assert_equals( expect=True, actual=pingResult2,
+                                 onpass="Speaker2 ping peers successful",
+                                 onfail="Speaker2 ping peers NOT successful" )
 
         if pingResult3 == False:
             main.cleanup()
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
 
     def CASE8( self, main ):
@@ -558,20 +594,20 @@
         import time
         main.case( "Start the edge sw32, check P-2-P and M-2-S intents, ping test" )
         main.step( "Start sw32" )
-        result1 = main.Mininet.switch( SW = "sw32", OPTION = "start" )
+        result1 = main.Mininet.switch( SW="sw32", OPTION="start" )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = result1,
-            onpass = "Starting switch succeeded!",
-            onfail = "Starting switch failed!" )
+            expect=main.TRUE,
+            actual=result1,
+            onpass="Starting switch succeeded!",
+            onfail="Starting switch failed!" )
 
         result2 = main.Mininet.assignSwController( "sw32", fsfwIp,
-                                                   port = fsfwPort )
+                                                   port=fsfwPort )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = result2,
-            onpass = "Connect switch to FSFW succeeded!",
-            onfail = "Connect switch to FSFW failed!" )
+            expect=main.TRUE,
+            actual=result2,
+            onpass="Connect switch to FSFW succeeded!",
+            onfail="Connect switch to FSFW failed!" )
 
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -584,22 +620,26 @@
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [pr64514, pr64515, pr64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[pr64514, pr64515, pr64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE9( self, main ):
@@ -619,10 +659,10 @@
         main.log.info( main.Mininet.checkFlows( "sw7" ) )
 
         main.step( "Stop sw11" )
-        result = main.Mininet.switch( SW = "sw11", OPTION = "stop" )
-        utilities.assertEquals( expect = main.TRUE, actual = result,
-                                onpass = "Stopping switch succeeded!",
-                                onfail = "Stopping switch failed!" )
+        result = main.Mininet.switch( SW="sw11", OPTION="stop" )
+        utilities.assertEquals( expect=main.TRUE, actual=result,
+                                onpass="Stopping switch succeeded!",
+                                onfail="Stopping switch failed!" )
         if result:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -635,21 +675,25 @@
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [pr64514, pr64515, pr64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[pr64514, pr64515, pr64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE10( self, main ):
@@ -667,15 +711,15 @@
         main.log.info( main.Mininet.checkFlows( "sw7" ) )
 
         main.step( "Start sw11" )
-        result1 = main.Mininet.switch( SW = "sw11", OPTION = "start" )
-        utilities.assertEquals( expect = main.TRUE, actual = result1,
-                                onpass = "Starting switch succeeded!",
-                                onfail = "Starting switch failed!" )
+        result1 = main.Mininet.switch( SW="sw11", OPTION="start" )
+        utilities.assertEquals( expect=main.TRUE, actual=result1,
+                                onpass="Starting switch succeeded!",
+                                onfail="Starting switch failed!" )
         result2 = main.Mininet.assignSwController( "sw11", fsfwIp,
-                                                   port = fsfwPort )
-        utilities.assertEquals( expect = main.TRUE, actual = result2,
-                                onpass = "Connect switch to FSFW succeeded!",
-                                onfail = "Connect switch to FSFW failed!" )
+                                                   port=fsfwPort )
+        utilities.assertEquals( expect=main.TRUE, actual=result2,
+                                onpass="Connect switch to FSFW succeeded!",
+                                onfail="Connect switch to FSFW failed!" )
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 3 )
@@ -691,21 +735,25 @@
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [pr64514, pr64515, pr64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[pr64514, pr64515, pr64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE11(self, main):
@@ -717,21 +765,25 @@
         main.Functions.checkM2SintentNum( main, 3 )
         main.Functions.checkP2PintentNum( main, 18 * 2 )
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [pr64514, pr64515, pr64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[pr64514, pr64515, pr64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
         main.step( "Kill speaker1" )
         command1 = "ps -e | grep bgp -c"
@@ -749,10 +801,10 @@
 
         result3 = main.Mininet.node( "root", command1 )
 
-        utilities.assert_equals( expect = True,
-                                 actual = ( "4" in result3 ),
-                                 onpass = "Kill speaker1 succeeded",
-                                 onfail = "Kill speaker1 failed" )
+        utilities.assert_equals( expect=True,
+                                 actual=( "4" in result3 ),
+                                 onpass="Kill speaker1 succeeded",
+                                 onfail="Kill speaker1 failed" )
         if ( "4" not in result3 ) :
             main.log.info( result3 )
             main.cleanup()
@@ -764,23 +816,27 @@
         main.Functions.checkP2PintentNum( main, 18 * 2 )
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         '''
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = False )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=False )
         '''
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [pr64514, pr64515, pr64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[pr64514, pr64515, pr64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE12( self, main ):
@@ -806,44 +862,52 @@
         else:
             uninstallResult = main.ONOSbench.onosStop( ONOS3Ip )
 
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = uninstallResult,
-                                 onpass = "Uninstall ONOS leader succeeded",
-                                 onfail = "Uninstall ONOS leader failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=uninstallResult,
+                                 onpass="Uninstall ONOS leader succeeded",
+                                 onfail="Uninstall ONOS leader failed" )
         if uninstallResult != main.TRUE:
             main.cleanup()
             main.exit()
         time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
 
         if leaderIP == ONOS1Ip:
-            main.Functions.checkRouteNum( main, 3, ONOScli = "ONOScli2" )
-            main.Functions.checkM2SintentNum( main, 3, ONOScli = "ONOScli2" )
-            main.Functions.checkP2PintentNum( main, 18 * 2, ONOScli = "ONOScli2" )
+            main.Functions.checkRouteNum( main, 3, ONOScli="ONOScli2" )
+            main.Functions.checkM2SintentNum( main, 3, ONOScli="ONOScli2" )
+            main.Functions.checkP2PintentNum( main, 18 * 2, ONOScli="ONOScli2" )
 
             main.step( "Check whether all flow status are ADDED" )
+            flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                         main.FALSE,
+                                         kwargs={'isPENDING':False},
+                                         attempts=10 )
             utilities.assertEquals( \
-                expect = main.TRUE,
-                actual = main.ONOScli2.checkFlowsState( isPENDING_ADD = False ),
-                onpass = "Flow status is correct!",
-                onfail = "Flow status is wrong!" )
+                expect=main.TRUE,
+                actual=flowCheck,
+                onpass="Flow status is correct!",
+                onfail="Flow status is wrong!" )
         else:
             main.Functions.checkRouteNum( main, 3 )
             main.Functions.checkM2SintentNum( main, 3 )
             main.Functions.checkP2PintentNum( main, 18 * 2 )
 
             main.step( "Check whether all flow status are ADDED" )
+            flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                         main.FALSE,
+                                         kwargs={'isPENDING':False},
+                                         attempts=10 )
             utilities.assertEquals( \
-                expect = main.TRUE,
-                actual = main.ONOScli1.checkFlowsState( isPENDING_ADD = False ),
-                onpass = "Flow status is correct!",
-                onfail = "Flow status is wrong!" )
+                expect=main.TRUE,
+                actual=flowCheck,
+                onpass="Flow status is correct!",
+                onfail="Flow status is wrong!" )
 
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker2"],
-                       peers = [pr64514, pr64515, pr64516],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker2"],
+                       peers=[pr64514, pr64515, pr64516],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
diff --git a/TestON/tests/USECASE_SdnipFunction_fsfw/Dependency/Functions.py b/TestON/tests/USECASE_SdnipFunction_fsfw/Dependency/Functions.py
index d79bc76..dd0b29f 100644
--- a/TestON/tests/USECASE_SdnipFunction_fsfw/Dependency/Functions.py
+++ b/TestON/tests/USECASE_SdnipFunction_fsfw/Dependency/Functions.py
@@ -1,11 +1,16 @@
 
 def checkRouteNum( main, routeNumExpected ):
+    import time
     main.step( "Check routes installed" )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Route number expected:" )
     main.log.info( routeNumExpected )
     main.log.info( "Route number from ONOS CLI:" )
 
     routeNumActual = main.ONOScli.ipv4RouteNumber()
+    if routeNumActual != routeNumExpected:
+        time.sleep( wait )
+        routeNumActual = main.ONOScli.ipv4RouteNumber()
     main.log.info( routeNumActual )
     utilities.assertEquals( \
         expect = routeNumExpected, actual = routeNumActual,
@@ -13,13 +18,20 @@
         onfail = "Route number is wrong!" )
 
 def checkM2SintentNum( main, intentNumExpected ):
+    import time
     main.step( "Check M2S intents installed" )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Intent number expected:" )
     main.log.info( intentNumExpected )
     main.log.info( "Intent number from ONOS CLI:" )
     jsonResult = main.ONOScli.intents( jsonFormat = True, summary = True,
                                        TYPE = "multiPointToSinglePoint" )
     intentNumActual = jsonResult['installed']
+    if intentNumActual != intentNumExpected:
+        time.sleep( wait )
+        jsonResult = main.ONOScli.intents( jsonFormat = True, summary = True,
+                                           TYPE = "multiPointToSinglePoint" )
+        intentNumActual = jsonResult['installed']
     main.log.info( intentNumActual )
     utilities.assertEquals( \
         expect = intentNumExpected, actual = intentNumActual,
@@ -27,13 +39,21 @@
         onfail = "M2S intent number is wrong!" )
 
 def checkP2PintentNum( main, intentNumExpected ):
+    import time
     main.step( "Check P2P intents installed" )
+    wait = int( main.params['timers']['PathAvailable'] )
     main.log.info( "Intent number expected:" )
     main.log.info( intentNumExpected )
     main.log.info( "Intent number from ONOS CLI:" )
     jsonResult = main.ONOScli.intents( jsonFormat = True, summary = True,
                                        TYPE = "pointToPoint" )
     intentNumActual = jsonResult['installed']
+
+    if intentNumActual != intentNumExpected:
+        time.sleep( wait )
+        jsonResult = main.ONOScli.intents( jsonFormat = True, summary = True,
+                                           TYPE = "pointToPoint" )
+        intentNumActual = jsonResult['installed']
     main.log.info( intentNumActual )
     utilities.assertEquals( \
         expect = intentNumExpected, actual = intentNumActual,
@@ -41,11 +61,16 @@
         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'] )
     main.log.info( "Flow number expected:" )
     main.log.info( flowNumExpected )
     main.log.info( "Flow number actual:" )
     flowNumActual = main.Mininet.getSwitchFlowCount( switch )
+    if flowNumActual != flowNumExpected :
+        time.sleep( wait )
+        flowNumActual = main.Mininet.getSwitchFlowCount( switch )
     main.log.info( flowNumActual )
     utilities.assertEquals( \
         expect = flowNumExpected, actual = flowNumActual,
@@ -109,7 +134,8 @@
         * expectAllSuccess - boolean indicating if you expect all results
         succeed if True, otherwise expect all results fail if False
     """
-    main.step( "Check ping between each host pair" )
+    main.step( "Check ping between each host pair, expect all to succede=" +
+               str( expectAllSuccess ) )
     if len( hosts ) == 0:
         main.log.error( "Parameter hosts can not be empty." )
         main.cleanup()
diff --git a/TestON/tests/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.params b/TestON/tests/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.params
index 8f0dc3f..98d6bad 100644
--- a/TestON/tests/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.params
+++ b/TestON/tests/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.params
@@ -1,11 +1,12 @@
 <PARAMS>
 
     <testcases>100, 101, 102, 1, 2, 3, 4, 7, 8, 9, 10</testcases>
-    #<testcases>100, 101, 102, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10</testcases>
+    #100, 101, 102, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
     # case6 needs a new driver, will enable it after this new driver
     #Environment variables
     <ENV>
-        <cellName>sdnip_single_instance</cellName>
+        <cellName>SDNIP</cellName>
+        <appString>drivers,openflow,proxyarp</appString>
     </ENV>
 
     <CTRL>
@@ -17,16 +18,6 @@
         <port1>6653</port1>
     </CTRL>
 
-    <GIT>
-        <branch1>master</branch1>
-        <branch2>onos-1.3</branch2>
-    </GIT>
-
-    <JSON>
-        <prefix>prefix</prefix>
-        <nextHop>nextHop</nextHop>
-    </JSON>
-
     <DEPENDENCY>
         <path>/USECASE_SdnipFunction_fsfw/Dependency/</path>
         <topology>USECASE_SdnipI2MN.py</topology>
diff --git a/TestON/tests/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py b/TestON/tests/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py
index 9a2144e..938b6e0 100644
--- a/TestON/tests/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py
+++ b/TestON/tests/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py
@@ -5,7 +5,6 @@
         self.default = ''
         global branchName
 
-    # This case is to setup Mininet testbed
     def CASE100( self, main ):
         """
             Start mininet
@@ -19,11 +18,11 @@
 
         main.step( "Starting Mininet Topology" )
         topology = main.dependencyPath + main.topology
-        topoResult = main.Mininet.startNet( topoFile = topology )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = topoResult,
-                                 onpass = "Successfully loaded topology",
-                                 onfail = "Failed to load topology" )
+        topoResult = main.Mininet.startNet( topoFile=topology )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=topoResult,
+                                 onpass="Successfully loaded topology",
+                                 onfail="Failed to load topology" )
         # Exit if topology did not load properly
         if not topoResult:
             main.cleanup()
@@ -44,32 +43,31 @@
         for i in range ( 1, int( main.params['config']['switchNum'] ) + 1 ):
             sw = "sw%s" % ( i )
             swResult = swResult and main.Mininet.assignSwController( sw, fsfwIp,
-                                                                     port = fsfwPort )
-        utilities.assert_equals( expect = main.TRUE,
-                             actual = swResult,
-                             onpass = "Successfully connect all switches to ONOS",
-                             onfail = "Failed to connect all switches to ONOS" )
+                                                                     port=fsfwPort )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=swResult,
+                                 onpass="Successfully connect all switches to ONOS",
+                                 onfail="Failed to connect all switches to ONOS" )
         if not swResult:
             main.cleanup()
             main.exit()
 
         main.step( "Set up tunnel from Mininet node to onos node" )
         forwarding1 = '%s:2000:%s:2000' % ( '1.1.1.2', ONOS1Ip )
-        command = 'ssh -nNT -o "PasswordAuthentication no" \
-        -o "StrictHostKeyChecking no" -l sdn -L %s %s & ' % ( forwarding1, ONOS1Ip )
+        command = 'ssh -nNT -o "PasswordAuthentication no"'
+        command += ' -o "StrictHostKeyChecking no" -l sdn'
+        command += ' -L %s %s & ' % ( forwarding1, ONOS1Ip )
 
         tunnelResult = main.TRUE
         tunnelResult = main.Mininet.node( "root", command )
-        utilities.assert_equals( expect = True,
-                             actual = ( "PasswordAuthentication" in tunnelResult ),
-                             onpass = "Created tunnel succeeded",
-                             onfail = "Create tunnel failed" )
+        utilities.assert_equals( expect=True,
+                                 actual=( "PasswordAuthentication" in tunnelResult ),
+                                 onpass="Created tunnel succeeded",
+                                 onfail="Create tunnel failed" )
         if ("PasswordAuthentication" not in tunnelResult) :
             main.cleanup()
             main.exit()
 
-
-    # This case is to setup ONOS
     def CASE101( self, main ):
         """
            Package ONOS and install it
@@ -82,100 +80,92 @@
         """
         import json
         import time
+        import os
         from operator import eq
 
         main.case( "Setting up test environment" )
 
         cellName = main.params[ 'ENV' ][ 'cellName' ]
+        global ONOS1Ip
+        ONOS1Ip = os.getenv( main.params[ 'CTRL' ][ 'ip1' ] )
+        ipList = [ ONOS1Ip ]
+
+        main.step( "Create cell file" )
+        cellAppString = main.params[ 'ENV' ][ 'appString' ]
+        main.ONOSbench.createCellFile( main.ONOSbench.ip_address, cellName,
+                                       main.Mininet.ip_address,
+                                       cellAppString, ipList )
 
         main.step( "Applying cell variable to environment" )
         cellResult = main.ONOSbench.setCell( cellName )
-        utilities.assert_equals( expect = main.TRUE,
-                             actual = cellResult,
-                             onpass = "Set cell succeeded",
-                             onfail = "Set cell failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=cellResult,
+                                 onpass="Set cell succeeded",
+                                 onfail="Set cell failed" )
 
         verifyResult = main.ONOSbench.verifyCell()
-        utilities.assert_equals( expect = main.TRUE,
-                             actual = verifyResult,
-                             onpass = "Verify cell succeeded",
-                             onfail = "Verify cell failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=verifyResult,
+                                 onpass="Verify cell succeeded",
+                                 onfail="Verify cell failed" )
 
         branchName = main.ONOSbench.getBranchName()
         main.log.report( "ONOS is on branch: " + branchName )
 
         main.log.step( "Uninstalling ONOS" )
         uninstallResult = main.ONOSbench.onosUninstall( ONOS1Ip )
-        utilities.assert_equals( expect = main.TRUE,
-                                actual = uninstallResult,
-                                onpass = "Uninstall ONOS succeeded",
-                                onfail = "Uninstall ONOS failed" )
-        '''
-        main.step( "Git pull" )
-        gitPullResult = main.ONOSbench.gitPull()
-        main.log.info( "gitPullResult" )
-        main.log.info( gitPullResult )
-        gitPullResult2 = ( gitPullResult == main.TRUE ) or ( gitPullResult == 3 )
-        utilities.assert_equals( expect = True,
-                                 actual = gitPullResult2,
-                                 onpass = "Git pull ONOS succeeded",
-                                 onfail = "Git pull ONOS failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=uninstallResult,
+                                 onpass="Uninstall ONOS succeeded",
+                                 onfail="Uninstall ONOS failed" )
 
-        main.step( "Using mvn clean install" )
-        if gitPullResult == main.TRUE:
-            mciResult = main.ONOSbench.cleanInstall( mciTimeout = 1000 )
-            utilities.assert_equals( expect = main.TRUE,
-                                     actual = mciResult,
-                                     onpass = "Maven clean install ONOS succeeded",
-                                     onfail = "Maven clean install ONOS failed" )
-        else:
-             main.log.warn( "Did not pull new code so skipping mvn " +
-                            "clean install" )
-             mciResult = main.TRUE
-        '''
-
-        main.ONOSbench.getVersion( report = True )
+        main.ONOSbench.getVersion( report=True )
 
         main.step( "Creating ONOS package" )
-        packageResult = main.ONOSbench.onosPackage( opTimeout = 500 )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = packageResult,
-                                 onpass = "Package ONOS succeeded",
-                                 onfail = "Package ONOS failed" )
+        packageResult = main.ONOSbench.onosPackage( opTimeout=500 )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=packageResult,
+                                 onpass="Package ONOS succeeded",
+                                 onfail="Package ONOS failed" )
 
         main.step( "Installing ONOS package" )
-        onos1InstallResult = main.ONOSbench.onosInstall( options = "-f",
-                                                         node = ONOS1Ip )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = onos1InstallResult,
-                                 onpass = "Install ONOS succeeded",
-                                 onfail = "Install ONOS failed" )
+        onos1InstallResult = main.ONOSbench.onosInstall( options="-f",
+                                                         node=ONOS1Ip )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=onos1InstallResult,
+                                 onpass="Install ONOS succeeded",
+                                 onfail="Install ONOS failed" )
 
         main.step( "Checking if ONOS is up yet" )
-        onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout = 420 )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = onos1UpResult,
-                                 onpass = "ONOS is up",
-                                 onfail = "ONOS is NOT up" )
+        onos1UpResult = main.ONOSbench.isup( ONOS1Ip, timeout=420 )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=onos1UpResult,
+                                 onpass="ONOS is up",
+                                 onfail="ONOS is NOT up" )
 
         main.step( "Checking if ONOS CLI is ready" )
         cliResult = main.ONOScli.startOnosCli( ONOS1Ip,
-                commandlineTimeout = 100, onosStartTimeout = 600 )
-        utilities.assert_equals( expect = main.TRUE,
-                         actual = cliResult,
-                         onpass = "ONOS CLI is ready",
-                         onfail = "ONOS CLI is NOT ready" )
+                                               commandlineTimeout=100,
+                                               onosStartTimeout=600 )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=cliResult,
+                                 onpass="ONOS CLI is ready",
+                                 onfail="ONOS CLI is not ready" )
 
-        caseResult = ( cellResult and verifyResult and
-                       packageResult and
-                       onos1InstallResult and onos1UpResult and cliResult )
+        for i in range( 10 ):
+            ready = True
+            output = main.ONOScli.summary()
+            if not output:
+                ready = False
+            if ready:
+                break
+            time.sleep( 30 )
+        utilities.assert_equals( expect=True, actual=ready,
+                                 onpass="ONOS summary command succeded",
+                                 onfail="ONOS summary command failed" )
 
-        utilities.assert_equals( expect = main.TRUE, actual = caseResult,
-                                 onpass = "ONOS startup successful",
-                                 onfail = "ONOS startup NOT successful" )
-
-        if caseResult == main.FALSE:
-            main.log.info( "ONOS startup failed!" )
+        if not ready:
+            main.log.error( "ONOS startup failed!" )
             main.cleanup()
             main.exit()
 
@@ -183,33 +173,33 @@
         time.sleep( int ( main.params['timers']['TopoDiscovery'] ) )
         summaryResult = main.ONOScli.summary()
         linkNum = json.loads( summaryResult )[ "links" ]
+        listResult = main.ONOScli.links( jsonFormat=False )
+        main.log.info( listResult )
         if linkNum < 100:
-            main.log.info( "Link number is wrong!" )
-            listResult = main.ONOScli.links( jsonFormat = False )
+            main.log.error( "Link number is wrong!" )
+            time.sleep( int( main.params['timers']['TopoDiscovery'] ) )
+            listResult = main.ONOScli.links( jsonFormat=False )
             main.log.info( listResult )
             main.cleanup()
             main.exit()
 
-        listResult = main.ONOScli.links( jsonFormat = False )
-        main.log.info( listResult )
-
         main.step( "Activate sdn-ip application" )
         activeSDNIPresult = main.ONOScli.activateApp( "org.onosproject.sdnip" )
-        utilities.assert_equals( expect = main.TRUE,
-                                 actual = activeSDNIPresult,
-                                 onpass = "Activate SDN-IP succeeded",
-                                 onfail = "Activate SDN-IP failed" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=activeSDNIPresult,
+                                 onpass="Activate SDN-IP succeeded",
+                                 onfail="Activate SDN-IP failed" )
         if not activeSDNIPresult:
             main.log.info( "Activate SDN-IP failed!" )
             main.cleanup()
             main.exit()
 
 
-        main.log.info( "Wait SDN-IP to finish installing connectivity intents \
-        and the BGP paths in data plane are ready..." )
+        main.log.info( "Wait for SDN-IP to finish installing connectivity intents " +
+                       "and for the BGP paths in the data plane to be ready..." )
         time.sleep( int( main.params[ 'timers' ][ 'SdnIpSetup' ] ) )
-        main.log.info( "Wait Quagga to finish delivery all routes to each \
-        other and to sdn-ip, plus finish installing all intents..." )
+        main.log.info( "Wait for Quagga to finish delivery of all routes to each " +
+                       "other and sdn-ip, plus finish installing all intents..." )
         time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
         time.sleep( int( main.params[ 'timers' ][ 'PathAvailable' ] ) )
 
@@ -233,39 +223,45 @@
         '''
 
         main.case( "Ping tests between BGP peers and speakers" )
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
 
 
     def CASE2( self, main ):
         '''
         point-to-point intents test for each BGP peer and BGP speaker pair
         '''
+        import time
         main.case( "Check point-to-point intents" )
         main.log.info( "There are %s BGP peers in total "
                        % main.params[ 'config' ][ 'peerNum' ] )
         main.step( "Check P2P intents number from ONOS CLI" )
 
-        getIntentsResult = main.ONOScli.intents( jsonFormat = True )
+        getIntentsResult = main.ONOScli.intents( jsonFormat=True )
         bgpIntentsActualNum = \
             main.QuaggaCliSpeaker1.extractActualBgpIntentNum( getIntentsResult )
         bgpIntentsExpectedNum = int( main.params[ 'config' ][ 'peerNum' ] ) * 6
+        if bgpIntentsActualNum != bgpIntentsExpectedNum:
+            time.sleep( int( main.params['timers']['RouteDelivery'] ) )
+            bgpIntentsActualNum = \
+                main.QuaggaCliSpeaker1.extractActualBgpIntentNum( getIntentsResult )
         main.log.info( "bgpIntentsExpected num is:" )
         main.log.info( bgpIntentsExpectedNum )
         main.log.info( "bgpIntentsActual num is:" )
         main.log.info( bgpIntentsActualNum )
         utilities.assertEquals( \
-            expect = True,
-            actual = eq( bgpIntentsExpectedNum, bgpIntentsActualNum ),
-            onpass = "PointToPointIntent Intent Num is correct!",
-            onfail = "PointToPointIntent Intent Num is wrong!" )
+            expect=True,
+            actual=eq( bgpIntentsExpectedNum, bgpIntentsActualNum ),
+            onpass="PointToPointIntent Intent Num is correct!",
+            onfail="PointToPointIntent Intent Num is wrong!" )
 
 
     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" )
 
         allRoutesExpected = []
@@ -273,11 +269,16 @@
         allRoutesExpected.append( "5.0.0.0/24" + "/" + "10.0.5.1" )
         allRoutesExpected.append( "6.0.0.0/24" + "/" + "10.0.6.1" )
 
-        getRoutesResult = main.ONOScli.routes( jsonFormat = True )
+        getRoutesResult = main.ONOScli.routes( jsonFormat=True )
         allRoutesActual = \
             main.QuaggaCliSpeaker1.extractActualRoutesMaster( getRoutesResult )
         allRoutesStrExpected = str( sorted( allRoutesExpected ) )
         allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" )
+        if allRoutesStrActual != allRoutesStrExpected:
+            time.sleep( int( main.params['timers']['RouteDelivery'] ) )
+            allRoutesActual = \
+                main.QuaggaCliSpeaker1.extractActualRoutesMaster( getRoutesResult )
+            allRoutesStrActual = str( allRoutesActual ).replace( 'u', "" )
 
         main.step( "Check routes installed" )
         main.log.info( "Routes expected:" )
@@ -285,32 +286,40 @@
         main.log.info( "Routes get from ONOS CLI:" )
         main.log.info( allRoutesStrActual )
         utilities.assertEquals( \
-            expect = allRoutesStrExpected, actual = allRoutesStrActual,
-            onpass = "Routes are correct!",
-            onfail = "Routes are wrong!" )
+            expect=allRoutesStrExpected, actual=allRoutesStrActual,
+            onpass="Routes are correct!",
+            onfail="Routes are wrong!" )
 
         main.step( "Check M2S intents installed" )
-        getIntentsResult = main.ONOScli.intents( jsonFormat = True )
+        getIntentsResult = main.ONOScli.intents( jsonFormat=True )
         routeIntentsActualNum = \
             main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult )
         routeIntentsExpectedNum = 3
+        if routeIntentsActualNum != routeIntentsExpectedNum:
+            time.sleep( int( main.params['timers']['RouteDelivery'] ) )
+            routeIntentsActualNum = \
+                main.QuaggaCliSpeaker1.extractActualRouteIntentNum( getIntentsResult )
 
         main.log.info( "MultiPointToSinglePoint Intent Num expected is:" )
         main.log.info( routeIntentsExpectedNum )
         main.log.info( "MultiPointToSinglePoint Intent NUM Actual is:" )
         main.log.info( routeIntentsActualNum )
         utilities.assertEquals( \
-            expect = True,
-            actual = eq( routeIntentsExpectedNum, routeIntentsActualNum ),
-            onpass = "MultiPointToSinglePoint Intent Num is correct!",
-            onfail = "MultiPointToSinglePoint Intent Num is wrong!" )
+            expect=routeIntentsExpectedNum,
+            actual=routeIntentsActualNum,
+            onpass="MultiPointToSinglePoint Intent Num is correct!",
+            onfail="MultiPointToSinglePoint Intent Num is wrong!" )
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
 
     def CASE4( self, main ):
@@ -319,8 +328,8 @@
         '''
         main.case( "Ping test for each route, all hosts behind BGP peers" )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE5( self, main ):
@@ -330,68 +339,72 @@
         import time
         main.case( "Bring down links and check routes/intents" )
         main.step( "Bring down the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1 = "sw32", END2 = "pr64514",
-                                         OPTION = "down" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult1,
-                                onpass = "Bring down link succeeded!",
-                                onfail = "Bring down link failed!" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="pr64514",
+                                         OPTION="down" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult1,
+                                onpass="Bring down link succeeded!",
+                                onfail="Bring down link failed!" )
 
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 2 )
             main.Functions.checkM2SintentNum( main, 2 )
         else:
-            main.log.info( "Bring down link failed!" )
+            main.log.error( "Bring down link failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Bring down the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1 = "sw8", END2 = "pr64515",
-                                         OPTION = "down" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult2,
-                                onpass = "Bring down link succeeded!",
-                                onfail = "Bring down link failed!" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="pr64515",
+                                         OPTION="down" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult2,
+                                onpass="Bring down link succeeded!",
+                                onfail="Bring down link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 1 )
             main.Functions.checkM2SintentNum( main, 1 )
         else:
-            main.log.info( "Bring down link failed!" )
+            main.log.error( "Bring down link failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Bring down the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1 = "sw28", END2 = "pr64516",
-                                         OPTION = "down" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult3,
-                                onpass = "Bring down link succeeded!",
-                                onfail = "Bring down link failed!" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="pr64516",
+                                         OPTION="down" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult3,
+                                onpass="Bring down link succeeded!",
+                                onfail="Bring down link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 0 )
             main.Functions.checkM2SintentNum( main, 0 )
         else:
-            main.log.info( "Bring down link failed!" )
+            main.log.error( "Bring down link failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = False )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=False )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = False )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=False )
 
 
     def CASE6( self, main ):
@@ -401,67 +414,71 @@
         import time
         main.case( "Bring up links and check routes/intents" )
         main.step( "Bring up the link between sw32 and peer64514" )
-        linkResult1 = main.Mininet.link( END1 = "sw32", END2 = "pr64514",
-                                         OPTION = "up" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult1,
-                                onpass = "Bring up link succeeded!",
-                                onfail = "Bring up link failed!" )
+        linkResult1 = main.Mininet.link( END1="sw32", END2="pr64514",
+                                         OPTION="up" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult1,
+                                onpass="Bring up link succeeded!",
+                                onfail="Bring up link failed!" )
         if linkResult1 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 1 )
             main.Functions.checkM2SintentNum( main, 1 )
         else:
-            main.log.info( "Bring up link failed!" )
+            main.log.error( "Bring up link failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Bring up the link between sw8 and peer64515" )
-        linkResult2 = main.Mininet.link( END1 = "sw8", END2 = "pr64515",
-                                         OPTION = "up" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult2,
-                                onpass = "Bring up link succeeded!",
-                                onfail = "Bring up link failed!" )
+        linkResult2 = main.Mininet.link( END1="sw8", END2="pr64515",
+                                         OPTION="up" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult2,
+                                onpass="Bring up link succeeded!",
+                                onfail="Bring up link failed!" )
         if linkResult2 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 2 )
             main.Functions.checkM2SintentNum( main, 2 )
         else:
-            main.log.info( "Bring up link failed!" )
+            main.log.error( "Bring up link failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Bring up the link between sw28 and peer64516" )
-        linkResult3 = main.Mininet.link( END1 = "sw28", END2 = "pr64516",
-                                         OPTION = "up" )
-        utilities.assertEquals( expect = main.TRUE,
-                                actual = linkResult3,
-                                onpass = "Bring up link succeeded!",
-                                onfail = "Bring up link failed!" )
+        linkResult3 = main.Mininet.link( END1="sw28", END2="pr64516",
+                                         OPTION="up" )
+        utilities.assertEquals( expect=main.TRUE,
+                                actual=linkResult3,
+                                onpass="Bring up link succeeded!",
+                                onfail="Bring up link failed!" )
         if linkResult3 == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 3 )
             main.Functions.checkM2SintentNum( main, 3 )
         else:
-            main.log.info( "Bring up link failed!" )
+            main.log.error( "Bring up link failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE7( self, main ):
@@ -471,10 +488,10 @@
         import time
         main.case( "Stop edge sw32,check P-2-P and M-2-S intents, ping test" )
         main.step( "Stop sw32" )
-        result = main.Mininet.switch( SW = "sw32", OPTION = "stop" )
-        utilities.assertEquals( expect = main.TRUE, actual = result,
-                                onpass = "Stopping switch succeeded!",
-                                onfail = "Stopping switch failed!" )
+        result = main.Mininet.switch( SW="sw32", OPTION="stop" )
+        utilities.assertEquals( expect=main.TRUE, actual=result,
+                                onpass="Stopping switch succeeded!",
+                                onfail="Stopping switch failed!" )
 
         if result == main.TRUE:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -482,46 +499,50 @@
             main.Functions.checkM2SintentNum( main, 2 )
             main.Functions.checkP2PintentNum( main, 12 )
         else:
-            main.log.info( "Stopping switch failed!" )
+            main.log.error( "Stopping switch failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Check ping between hosts behind BGP peers" )
-        result1 = main.Mininet.pingHost( src = "host64514", target = "host64515" )
-        result2 = main.Mininet.pingHost( src = "host64515", target = "host64516" )
-        result3 = main.Mininet.pingHost( src = "host64514", target = "host64516" )
+        result1 = main.Mininet.pingHost( src="host64514", target="host64515" )
+        result2 = main.Mininet.pingHost( src="host64515", target="host64516" )
+        result3 = main.Mininet.pingHost( src="host64514", target="host64516" )
 
         pingResult1 = ( result1 == main.FALSE ) and ( result2 == main.TRUE ) \
                                                 and ( result3 == main.FALSE )
-        utilities.assert_equals( expect = True, actual = pingResult1,
-                                 onpass = "Ping test result is correct",
-                                 onfail = "Ping test result is wrong" )
+        utilities.assert_equals( expect=True, actual=pingResult1,
+                                 onpass="Ping test result is correct",
+                                 onfail="Ping test result is wrong" )
 
         if pingResult1 == False:
             main.cleanup()
             main.exit()
 
         main.step( "Check ping between BGP peers and speakers" )
-        result4 = main.Mininet.pingHost( src = "speaker1", target = "pr64514" )
-        result5 = main.Mininet.pingHost( src = "speaker1", target = "pr64515" )
-        result6 = main.Mininet.pingHost( src = "speaker1", target = "pr64516" )
+        result4 = main.Mininet.pingHost( src="speaker1", target="pr64514" )
+        result5 = main.Mininet.pingHost( src="speaker1", target="pr64515" )
+        result6 = main.Mininet.pingHost( src="speaker1", target="pr64516" )
 
         pingResult2 = ( result4 == main.FALSE ) and ( result5 == main.TRUE ) \
                                                 and ( result6 == main.TRUE )
-        utilities.assert_equals( expect = True, actual = pingResult2,
-                                 onpass = "Speaker1 ping peers successful",
-                                 onfail = "Speaker1 ping peers NOT successful" )
+        utilities.assert_equals( expect=True, actual=pingResult2,
+                                 onpass="Speaker1 ping peers successful",
+                                 onfail="Speaker1 ping peers NOT successful" )
 
         if pingResult2 == False:
             main.cleanup()
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
 
     def CASE8( self, main ):
@@ -532,20 +553,20 @@
         import time
         main.case( "Start the edge sw32, check P-2-P and M-2-S intents, ping test" )
         main.step( "Start sw32" )
-        result1 = main.Mininet.switch( SW = "sw32", OPTION = "start" )
+        result1 = main.Mininet.switch( SW="sw32", OPTION="start" )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = result1,
-            onpass = "Starting switch succeeded!",
-            onfail = "Starting switch failed!" )
+            expect=main.TRUE,
+            actual=result1,
+            onpass="Starting switch succeeded!",
+            onfail="Starting switch failed!" )
 
         result2 = main.Mininet.assignSwController( "sw32", fsfwIp,
-                                                   port = fsfwPort )
+                                                   port=fsfwPort )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = result2,
-            onpass = "Connect switch to FSFW succeeded!",
-            onfail = "Connect switch to FSFW failed!" )
+            expect=main.TRUE,
+            actual=result2,
+            onpass="Connect switch to FSFW succeeded!",
+            onfail="Connect switch to FSFW failed!" )
 
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -553,24 +574,28 @@
             main.Functions.checkM2SintentNum( main, 3 )
             main.Functions.checkP2PintentNum( main, 18 )
         else:
-            main.log.info( "Starting switch failed!" )
+            main.log.error( "Starting switch failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
 
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE9( self, main ):
@@ -585,15 +610,15 @@
         main.Functions.checkFlowNum( main, "sw11", 13 )
         main.Functions.checkFlowNum( main, "sw1", 3 )
         main.Functions.checkFlowNum( main, "sw7", 3 )
-        main.log.info( main.Mininet.checkFlows( "sw11" ) )
-        main.log.info( main.Mininet.checkFlows( "sw1" ) )
-        main.log.info( main.Mininet.checkFlows( "sw7" ) )
+        main.log.debug( main.Mininet.checkFlows( "sw11" ) )
+        main.log.debug( main.Mininet.checkFlows( "sw1" ) )
+        main.log.debug( main.Mininet.checkFlows( "sw7" ) )
 
         main.step( "Stop sw11" )
-        result = main.Mininet.switch( SW = "sw11", OPTION = "stop" )
-        utilities.assertEquals( expect = main.TRUE, actual = result,
-                                onpass = "Stopping switch succeeded!",
-                                onfail = "Stopping switch failed!" )
+        result = main.Mininet.switch( SW="sw11", OPTION="stop" )
+        utilities.assertEquals( expect=main.TRUE, actual=result,
+                                onpass="Stopping switch succeeded!",
+                                onfail="Stopping switch failed!" )
         if result:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
@@ -601,23 +626,27 @@
             main.Functions.checkM2SintentNum( main, 3 )
             main.Functions.checkP2PintentNum( main, 18 )
         else:
-            main.log.info( "Stopping switch failed!" )
+            main.log.error( "Stopping switch failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
 
 
     def CASE10( self, main ):
@@ -631,19 +660,19 @@
         main.log.info( "Check the flow status before starting sw11" )
         main.Functions.checkFlowNum( main, "sw1", 11 )
         main.Functions.checkFlowNum( main, "sw7", 5 )
-        main.log.info( main.Mininet.checkFlows( "sw1" ) )
-        main.log.info( main.Mininet.checkFlows( "sw7" ) )
+        main.log.debug( main.Mininet.checkFlows( "sw1" ) )
+        main.log.debug( main.Mininet.checkFlows( "sw7" ) )
 
         main.step( "Start sw11" )
-        result1 = main.Mininet.switch( SW = "sw11", OPTION = "start" )
-        utilities.assertEquals( expect = main.TRUE, actual = result1,
-                                onpass = "Starting switch succeeded!",
-                                onfail = "Starting switch failed!" )
+        result1 = main.Mininet.switch( SW="sw11", OPTION="start" )
+        utilities.assertEquals( expect=main.TRUE, actual=result1,
+                                onpass="Starting switch succeeded!",
+                                onfail="Starting switch failed!" )
         result2 = main.Mininet.assignSwController( "sw11", fsfwIp,
-                                                   port = fsfwPort )
-        utilities.assertEquals( expect = main.TRUE, actual = result2,
-                                onpass = "Connect switch to FSFW succeeded!",
-                                onfail = "Connect switch to FSFW failed!" )
+                                                   port=fsfwPort )
+        utilities.assertEquals( expect=main.TRUE, actual=result2,
+                                onpass="Connect switch to FSFW succeeded!",
+                                onfail="Connect switch to FSFW failed!" )
         if result1 and result2:
             time.sleep( int( main.params[ 'timers' ][ 'RouteDelivery' ] ) )
             main.Functions.checkRouteNum( main, 3 )
@@ -654,20 +683,24 @@
             main.log.debug( main.Mininet.checkFlows( "sw1" ) )
             main.log.debug( main.Mininet.checkFlows( "sw7" ) )
         else:
-            main.log.info( "Starting switch failed!" )
+            main.log.error( "Starting switch failed!" )
             main.cleanup()
             main.exit()
 
         main.step( "Check whether all flow status are ADDED" )
+        flowCheck = utilities.retry( main.ONOScli1.checkFlowsState,
+                                     main.FALSE,
+                                     kwargs={'isPENDING':False},
+                                     attempts=10 )
         utilities.assertEquals( \
-            expect = main.TRUE,
-            actual = main.ONOScli.checkFlowsState( isPENDING_ADD = False ),
-            onpass = "Flow status is correct!",
-            onfail = "Flow status is wrong!" )
+            expect=main.TRUE,
+            actual=flowCheck,
+            onpass="Flow status is correct!",
+            onfail="Flow status is wrong!" )
         # Ping test
-        main.Functions.pingSpeakerToPeer( main, speakers = ["speaker1"],
-                       peers = ["pr64514", "pr64515", "pr64516"],
-                       expectAllSuccess = True )
+        main.Functions.pingSpeakerToPeer( main, speakers=["speaker1"],
+                       peers=["pr64514", "pr64515", "pr64516"],
+                       expectAllSuccess=True )
         main.Functions.pingHostToHost( main,
-                        hosts = ["host64514", "host64515", "host64516"],
-                        expectAllSuccess = True )
+                        hosts=["host64514", "host64515", "host64516"],
+                        expectAllSuccess=True )
