[ONOS-6890] Fix the IndexError from the FUNCbgpls test

Change-Id: I07b4889564235407e3720fd03f588ea03b21db1e
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' ]