Added functionality for dropping links in routing tests.

Change-Id: I0c4fd3b41323fd849e47b52bfb00db7488a32492
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
index dddc584..f808d4e 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
@@ -18,6 +18,7 @@
                                ipv4=1,
                                ipv6=0,
                                countFlowsGroups=False,
+                               linkFailure=False,
                                description="Ping between all ipv4 hosts in the topology" )
 
     def CASE2( self, main ):
@@ -35,6 +36,7 @@
                                ipv4=0,
                                ipv6=1,
                                countFlowsGroups=False,
+                               linkFailure=False,
                                description="Ping between all ipv6 hosts in the topology" )
 
     def CASE3( self, main ):
@@ -52,6 +54,7 @@
                                ipv4=1,
                                ipv6=1,
                                countFlowsGroups=False,
+                               linkFailure=False,
                                description="Ping between all ipv4 and ipv6 hosts in the topology" )
 
     def CASE4( self, main ):
@@ -70,6 +73,7 @@
                                ipv6=0,
                                description="Ping between all ipv4 hosts in the topology and check connectivity to external hosts",
                                checkExternalHost=True,
+                               linkFailure=False,
                                countFlowsGroups=False )
 
     def CASE5( self, main ):
@@ -88,6 +92,7 @@
                                ipv6=1,
                                description="Ping between all ipv6 hosts in the topology and check connectivity to external hosts",
                                checkExternalHost=True,
+                               linkFailure=False,
                                countFlowsGroups=False )
 
     def CASE6( self, main ):
@@ -106,6 +111,7 @@
                                ipv6=1,
                                description="Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external hosts",
                                checkExternalHost=True,
+                               linkFailure=False,
                                countFlowsGroups=False )
 
     def CASE7( self, main ):
@@ -127,6 +133,7 @@
                                description="Ping between from ipv4 hosts to external host configured with route-add command.",
                                checkExternalHost=False,
                                countFlowsGroups=False,
+                               linkFailure=False,
                                staticRouteConfigure=True )
 
     def CASE8( self, main ):
@@ -148,6 +155,7 @@
                                description="Ping between from ipv6 hosts to external host configured with route-add command.",
                                checkExternalHost=False,
                                countFlowsGroups=False,
+                               linkFailure=False,
                                staticRouteConfigure=True )
 
     def CASE9( self, main ):
@@ -169,8 +177,198 @@
                                description="Ping between from ipv4 and ipv6 hosts to external hosts configured with route-add command.",
                                checkExternalHost=False,
                                countFlowsGroups=False,
+                               linkFailure=False,
                                staticRouteConfigure=True )
 
+    def CASE101( self, main ):
+        """
+        Kill and recover links
+        Ping between all ipv4 hosts in the topology.
+        """
+
+        from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+        SRRoutingTest.runTest( main,
+                               test_idx=101,
+                               onosNodes=3,
+                               dhcp=1,
+                               routers=1,
+                               ipv4=1,
+                               ipv6=0,
+                               countFlowsGroups=False,
+                               linkFailure=True,
+                               description="Test link failures with IPv4 hosts",
+                               switchFailure=False )
+
+    def CASE102( self, main ):
+        """
+        Kill and recover links
+        Ping between all ipv6 hosts in the topology.
+        """
+
+        from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+        SRRoutingTest.runTest( main,
+                               test_idx=102,
+                               onosNodes=3,
+                               dhcp=1,
+                               routers=1,
+                               ipv4=0,
+                               ipv6=1,
+                               countFlowsGroups=False,
+                               linkFailure=True,
+                               description="Test link failures with IPv6 hosts",
+                               switchFailure=False )
+
+    def CASE103( self, main ):
+        """
+        Kill and recover links
+        Ping between all ipv4 and ipv6 hosts in the topology.
+        """
+
+        from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+        SRRoutingTest.runTest( main,
+                               test_idx=103,
+                               onosNodes=3,
+                               dhcp=1,
+                               routers=1,
+                               ipv4=1,
+                               ipv6=1,
+                               countFlowsGroups=False,
+                               linkFailure=True,
+                               description="Test link failures with IPv4 and IPv6 hosts",
+                               switchFailure=False )
+
+    def CASE104( self, main ):
+        """
+        Kill and recover links
+        Ping between all ipv4 hosts in the topology and check connectivity to external ipv4 hosts
+        """
+
+        from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+        SRRoutingTest.runTest( main,
+                               test_idx=104,
+                               onosNodes=3,
+                               dhcp=1,
+                               routers=1,
+                               ipv4=1,
+                               ipv6=0,
+                               description="Test link failures with IPv4 hosts (including external hosts)",
+                               checkExternalHost=True,
+                               linkFailure=True,
+                               switchFailure=False )
+
+    def CASE105( self, main ):
+        """
+        Kill and recover links
+        Ping between all ipv6 hosts in the topology and check connectivity to external ipv6 hosts
+        """
+
+        from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+        SRRoutingTest.runTest( main,
+                               test_idx=105,
+                               onosNodes=3,
+                               dhcp=1,
+                               routers=1,
+                               ipv4=0,
+                               ipv6=1,
+                               description="Test link failures with IPv6 hosts (including external hosts)",
+                               checkExternalHost=True,
+                               linkFailure=True,
+                               switchFailure=False )
+
+    def CASE106( self, main ):
+        """
+        Kill and recover links
+        Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external ipv4 and ipv6 hosts
+        """
+
+        from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+        SRRoutingTest.runTest( main,
+                               test_idx=106,
+                               onosNodes=3,
+                               dhcp=1,
+                               routers=1,
+                               ipv4=1,
+                               ipv6=1,
+                               description="Test link failures with IPv4 and IPv6 hosts (including external hosts)",
+                               checkExternalHost=True,
+                               linkFailure=True,
+                               switchFailure=False )
+
+    def CASE107( self, main ):
+        """
+        Kill and recover links
+        Ping between ipv4 hosts and an external host that is not configured in
+        external router config, but reachable through the use of route-add command.
+        """
+
+        from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+        SRRoutingTest.runTest( main,
+                               test_idx=107,
+                               onosNodes=3,
+                               dhcp=1,
+                               routers=1,
+                               ipv4=1,
+                               ipv6=0,
+                               description="Test link failures with IPv4 hosts (including external host configured with route-add command)",
+                               checkExternalHost=False,
+                               countFlowsGroups=False,
+                               linkFailure=True,
+                               staticRouteConfigure=True,
+                               switchFailure=False )
+
+    def CASE108( self, main ):
+        """
+        Kill and recover links
+        Ping between ipv6 hosts and an external host that is not configured in
+        external router config, but reachable through the use of route-add command.
+        """
+
+        from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+        SRRoutingTest.runTest( main,
+                               test_idx=108,
+                               onosNodes=3,
+                               dhcp=1,
+                               routers=1,
+                               ipv4=0,
+                               ipv6=1,
+                               description="Test link failures with IPv6 hosts (including external host configured with route-add command)",
+                               checkExternalHost=False,
+                               countFlowsGroups=False,
+                               linkFailure=True,
+                               staticRouteConfigure=True,
+                               switchFailure=False )
+
+    def CASE109( self, main ):
+        """
+        Kill and recover links
+        Ping between ipv4 and pv6 hosts and external hosts that is not configured in
+        external router config, but reachable through the use of route-add command.
+        """
+
+        from tests.USECASE.SegmentRouting.SRRouting.dependencies.SRRoutingTest import SRRoutingTest
+
+        SRRoutingTest.runTest( main,
+                               test_idx=109,
+                               onosNodes=3,
+                               dhcp=1,
+                               routers=1,
+                               ipv4=1,
+                               ipv6=1,
+                               description="Test link failures with IPv4 and IPv6 hosts (including external host configured with route-add command)",
+                               checkExternalHost=False,
+                               countFlowsGroups=False,
+                               linkFailure=True,
+                               staticRouteConfigure=True,
+                               switchFailure=False )
+
     def CASE201( self, main ):
         """
         Kill and recover spine switches
@@ -187,6 +385,7 @@
                                ipv4=1,
                                ipv6=0,
                                countFlowsGroups=False,
+                               linkFailure=False,
                                description="Test switch failures with IPv4 hosts",
                                switchFailure=True )
 
@@ -206,6 +405,7 @@
                                ipv4=0,
                                ipv6=1,
                                countFlowsGroups=False,
+                               linkFailure=False,
                                description="Test switch failures with IPv6 hosts",
                                switchFailure=True )
 
@@ -225,6 +425,7 @@
                                ipv4=1,
                                ipv6=1,
                                countFlowsGroups=False,
+                               linkFailure=False,
                                description="Test switch failures with IPv4 and IPv6 hosts",
                                switchFailure=True )
 
@@ -245,6 +446,7 @@
                                ipv6=0,
                                description="Test switch failures with IPv4 hosts (including external hosts)",
                                checkExternalHost=True,
+                               linkFailure=False,
                                switchFailure=True )
 
     def CASE205( self, main ):
@@ -264,6 +466,7 @@
                                ipv6=1,
                                description="Test switch failures with IPv6 hosts (including external hosts)",
                                checkExternalHost=True,
+                               linkFailure=False,
                                switchFailure=True )
 
     def CASE206( self, main ):
@@ -283,6 +486,7 @@
                                ipv6=1,
                                description="Test switch failures with IPv4 and IPv6 hosts (including external hosts)",
                                checkExternalHost=True,
+                               linkFailure=False,
                                switchFailure=True )
 
     def CASE207( self, main ):
@@ -304,6 +508,7 @@
                                description="Test switch failures with IPv4 hosts (including external host configured with route-add command)",
                                checkExternalHost=False,
                                countFlowsGroups=False,
+                               linkFailure=False,
                                staticRouteConfigure=True,
                                switchFailure=True )
 
@@ -326,6 +531,7 @@
                                description="Test switch failures with IPv6 hosts (including external host configured with route-add command)",
                                checkExternalHost=False,
                                countFlowsGroups=False,
+                               linkFailure=False,
                                staticRouteConfigure=True,
                                switchFailure=True )
 
@@ -348,5 +554,8 @@
                                description="Test switch failures with IPv4 and IPv6 hosts (including external host configured with route-add command)",
                                checkExternalHost=False,
                                countFlowsGroups=False,
+                               linkFailure=False,
                                staticRouteConfigure=True,
                                switchFailure=True )
+
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
index eb747b0..4b58d10 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
@@ -32,7 +32,7 @@
     @staticmethod
     def runTest( main, test_idx, onosNodes, dhcp, routers, ipv4, ipv6,
                  description, countFlowsGroups=False, checkExternalHost=False,
-                 staticRouteConfigure=False, switchFailure=False ):
+                 staticRouteConfigure=False, switchFailure=False, linkFailure=False ):
 
         skipPackage = False
         init = False
@@ -75,6 +75,8 @@
             run.loadCount( main )
         if switchFailure:
             run.loadSwitchFailureChart( main )
+        if linkFailure:
+            run.loadLinkFailureChart( main )
 
         # wait some time
         time.sleep( 5 )
@@ -113,6 +115,22 @@
                 if countFlowsGroups:
                     run.checkFlowsGroupsFromFile(main)
 
+        # Test link failures
+        if linkFailure:
+            for link_batch_name, info in main.linkFailureChart.items():
+
+                linksToRemove = info['links'].values()
+                linksBefore = info['links_before']
+                linksAfter = info['links_after']
+
+                run.killLinkBatch( main, linksToRemove, linksAfter )
+                run.pingAll( main, 'CASE%02d' % test_idx, acceptableFailed=5, basedOnIp=True )
+
+                run.restoreLinkBatch( main, linksToRemove, linksBefore )
+                run.pingAll( main, 'CASE%02d' % test_idx, acceptableFailed=5, basedOnIp=True )
+                if countFlowsGroups:
+                    run.checkFlowsGroupsFromFile(main)
+
         if hasattr( main, 'Mininet1' ):
             run.cleanup( main )
         else:
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+    "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+		      		   "link2" : ["leaf2", "spine101"],
+	              		   "link3" : ["leaf3", "spine101"],
+		      		   "link4" : ["leaf4", "spine101"],
+		      	           "link5" : ["leaf5", "spine101"] },
+			"links_before" : 40,
+			"links_after" : 22 },
+    "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+		      		   "link2" : ["leaf2", "spine102"],
+	              		   "link3" : ["leaf3", "spine102"],
+		      		   "link4" : ["leaf4", "spine102"],
+		      	           "link5" : ["leaf5", "spine102"] },
+			"links_before" : 40,
+			"links_after" : 22 }
+	
+	
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_external=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_external=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_external=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+    "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+		      		   "link2" : ["leaf2", "spine101"],
+	              		   "link3" : ["leaf3", "spine101"],
+		      		   "link4" : ["leaf4", "spine101"],
+		      	           "link5" : ["leaf5", "spine101"] },
+			"links_before" : 40,
+			"links_after" : 22 },
+    "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+		      		   "link2" : ["leaf2", "spine102"],
+	              		   "link3" : ["leaf3", "spine102"],
+		      		   "link4" : ["leaf4", "spine102"],
+		      	           "link5" : ["leaf5", "spine102"] },
+			"links_before" : 40,
+			"links_after" : 22 }
+	
+	
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_static=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_static=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_static=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+    "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+		      		   "link2" : ["leaf2", "spine101"],
+	              		   "link3" : ["leaf3", "spine101"],
+		      		   "link4" : ["leaf4", "spine101"],
+		      	           "link5" : ["leaf5", "spine101"] },
+			"links_before" : 40,
+			"links_after" : 22 },
+    "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+		      		   "link2" : ["leaf2", "spine102"],
+	              		   "link3" : ["leaf3", "spine102"],
+		      		   "link4" : ["leaf4", "spine102"],
+		      	           "link5" : ["leaf5", "spine102"] },
+			"links_before" : 40,
+			"links_after" : 22 }
+	
+	
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+    "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+		      		   "link2" : ["leaf2", "spine101"],
+	              		   "link3" : ["leaf3", "spine101"],
+		      		   "link4" : ["leaf4", "spine101"],
+		      	           "link5" : ["leaf5", "spine101"] },
+			"links_before" : 40,
+			"links_after" : 22 },
+    "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+		      		   "link2" : ["leaf2", "spine102"],
+	              		   "link3" : ["leaf3", "spine102"],
+		      		   "link4" : ["leaf4", "spine102"],
+		      	           "link5" : ["leaf5", "spine102"] },
+			"links_before" : 40,
+			"links_after" : 22 }
+	
+	
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_external=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_external=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_external=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+    "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+		      		   "link2" : ["leaf2", "spine101"],
+	              		   "link3" : ["leaf3", "spine101"],
+		      		   "link4" : ["leaf4", "spine101"],
+		      	           "link5" : ["leaf5", "spine101"] },
+			"links_before" : 40,
+			"links_after" : 22 },
+    "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+		      		   "link2" : ["leaf2", "spine102"],
+	              		   "link3" : ["leaf3", "spine102"],
+		      		   "link4" : ["leaf4", "spine102"],
+		      	           "link5" : ["leaf5", "spine102"] },
+			"links_before" : 40,
+			"links_after" : 22 }
+	
+	
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_static=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_static=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_static=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+    "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+		      		   "link2" : ["leaf2", "spine101"],
+	              		   "link3" : ["leaf3", "spine101"],
+		      		   "link4" : ["leaf4", "spine101"],
+		      	           "link5" : ["leaf5", "spine101"] },
+			"links_before" : 40,
+			"links_after" : 22 },
+    "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+		      		   "link2" : ["leaf2", "spine102"],
+	              		   "link3" : ["leaf3", "spine102"],
+		      		   "link4" : ["leaf4", "spine102"],
+		      	           "link5" : ["leaf5", "spine102"] },
+			"links_before" : 40,
+			"links_after" : 22 }
+	
+	
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+    "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+		      		   "link2" : ["leaf2", "spine101"],
+	              		   "link3" : ["leaf3", "spine101"],
+		      		   "link4" : ["leaf4", "spine101"],
+		      	           "link5" : ["leaf5", "spine101"] },
+			"links_before" : 40,
+			"links_after" : 22 },
+    "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+		      		   "link2" : ["leaf2", "spine102"],
+	              		   "link3" : ["leaf3", "spine102"],
+		      		   "link4" : ["leaf4", "spine102"],
+		      	           "link5" : ["leaf5", "spine102"] },
+			"links_before" : 40,
+			"links_after" : 22 }
+	
+	
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_external=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_external=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_external=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+    "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+		      		   "link2" : ["leaf2", "spine101"],
+	              		   "link3" : ["leaf3", "spine101"],
+		      		   "link4" : ["leaf4", "spine101"],
+		      	           "link5" : ["leaf5", "spine101"] },
+			"links_before" : 40,
+			"links_after" : 22 },
+    "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+		      		   "link2" : ["leaf2", "spine102"],
+	              		   "link3" : ["leaf3", "spine102"],
+		      		   "link4" : ["leaf4", "spine102"],
+		      	           "link5" : ["leaf5", "spine102"] },
+			"links_before" : 40,
+			"links_after" : 22 }
+	
+	
+}
+
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_static=1.linkFailureChart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_static=1.linkFailureChart
new file mode 100644
index 0000000..9d971dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/linkFailure/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_static=1.linkFailureChart
@@ -0,0 +1,19 @@
+{
+    "link_batch_1" : { "links" : { "link1" : ["leaf1", "spine101"],
+		      		   "link2" : ["leaf2", "spine101"],
+	              		   "link3" : ["leaf3", "spine101"],
+		      		   "link4" : ["leaf4", "spine101"],
+		      	           "link5" : ["leaf5", "spine101"] },
+			"links_before" : 40,
+			"links_after" : 22 },
+    "link_batch_2" : { "links" : { "link1" : ["leaf1", "spine102"],
+		      		   "link2" : ["leaf2", "spine102"],
+	              		   "link3" : ["leaf3", "spine102"],
+		      		   "link4" : ["leaf4", "spine102"],
+		      	           "link5" : ["leaf5", "spine102"] },
+			"links_before" : 40,
+			"links_after" : 22 }
+	
+	
+}
+