Merge "[ONOS-6890] Fix the IndexError from the FUNCbgpls test"
diff --git a/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py b/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
index 4b0b589..a401bb2 100644
--- a/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
+++ b/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
@@ -254,6 +254,7 @@
         bgplsConfig.Comments()
         time.sleep( 120 )
         response = main.Cluster.active( 0 ).CLI.devices()
+
         responseCheck = main.FALSE
         if response:
             responseCheck = main.TRUE
@@ -336,7 +337,7 @@
         response = main.Cluster.active( 0 ).CLI.links()
         linksResp = json.loads( response )
         check_link = bgplsConfig.checkLinks( linksResp )
-
+        reply_Check_Link = main.FALSE
         if check_link:
             reply_Check_Link = main.TRUE
         utilities.assert_equals( expect=main.TRUE, actual=reply_Check_Link,
@@ -408,6 +409,7 @@
         response = main.Cluster.active( 0 ).CLI.links()
         linksResp = json.loads( response )
         check_link = bgplsConfig.checkLinks( linksResp )
+        reply_Check_Link = main.FALSE
         if not check_link:
             reply_Check_Link = main.TRUE
         utilities.assert_equals( expect=main.TRUE, actual=reply_Check_Link,
diff --git a/TestON/tests/FUNC/FUNCbgpls/dependencies/Nbdata.py b/TestON/tests/FUNC/FUNCbgpls/dependencies/Nbdata.py
index ba6a12f..b1f44e1 100644
--- a/TestON/tests/FUNC/FUNCbgpls/dependencies/Nbdata.py
+++ b/TestON/tests/FUNC/FUNCbgpls/dependencies/Nbdata.py
@@ -125,6 +125,8 @@
                   }
 
         # Comparing the Links
+        if len( linksResp ) != 22:
+            return False
         for x in xrange( 22 ):
             link_src_info = linksResp[ x ][ 'src' ][ 'device' ]
             link_dst_info = linksResp[ x ][ 'dst' ][ 'device' ]