[ONOS-7475] Refactoring SR tests

Change-Id: I10e51fcb8b416167e6a338e9030933162640af89
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py
index fa496dd..d1a8ee3 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py
@@ -25,20 +25,18 @@
 
     def __init__( self ):
         self.default = ''
-
-    @staticmethod
-    def runTest( main, test_idx, topology, onosNodes, description, vlan = [] ):
-        topo = dict()
+        self.topo = dict()
         # (number of spine switch, number of leaf switch, dual-homed, description, minFlowCount - leaf)
-        topo[ '0x1' ] = ( 0, 1, False, 'single ToR', 28 )
-        topo[ '0x2' ] = ( 0, 2, True, 'dual-homed ToR', 37 )
-        topo[ '2x2' ] = ( 2, 2, False, '2x2 leaf-spine topology', 37 )
+        self.topo[ '0x1' ] = ( 0, 1, False, 'single ToR', 28 )
+        self.topo[ '0x2' ] = ( 0, 2, True, 'dual-homed ToR', 37 )
+        self.topo[ '2x2' ] = ( 2, 2, False, '2x2 leaf-spine topology', 37 )
         # TODO: Implement 2x3 topology
         # topo[ '2x3' ] = ( 2, 3, True, '2x3 leaf-spine topology with dual ToR and single ToR', 28 )
-        topo[ '2x4' ] = ( 2, 4, True, '2x4 dual-homed leaf-spine topology', 53 )
-        switchNames = {}
-        switchNames[ '2x2' ] = [ "leaf1", "leaf2", "spine101", "spine102" ]
+        self.topo[ '2x4' ] = ( 2, 4, True, '2x4 dual-homed leaf-spine topology', 53 )
+        self.switchNames = {}
+        self.switchNames[ '2x2' ] = [ "leaf1", "leaf2", "spine101", "spine102" ]
 
+    def runTest( self, main, test_idx, topology, onosNodes, description, vlan = [] ):
         skipPackage = False
         init = False
         if not hasattr( main, 'apps' ):
@@ -49,16 +47,17 @@
             skipPackage = True
 
         main.case( '%s, with %s and %d ONOS instance%s' %
-                   ( description, topo[ topology ][ 3 ], onosNodes, 's' if onosNodes > 1 else '' ) )
+                   ( description, self.topo[ topology ][ 3 ], onosNodes, 's' if onosNodes > 1 else '' ) )
 
         main.cfgName = 'CASE%01d%01d' % ( test_idx / 10, ( ( test_idx - 1 ) % 10 ) % 4 + 1 )
-        main.configPath = main.path + "/dependencies/"
         main.Cluster.setRunningNode( onosNodes )
         run.installOnos( main, skipPackage=skipPackage, cliSleep=5 )
+        run.loadJson( main )
+        run.loadChart( main )
         if hasattr( main, 'Mininet1' ):
             # Run the test with Mininet
-            mininet_args = ' --spine=%d --leaf=%d' % ( topo[ topology ][ 0 ], topo[ topology ][ 1 ] )
-            if topo[ topology ][ 2 ]:
+            mininet_args = ' --spine=%d --leaf=%d' % ( self.topo[ topology ][ 0 ], self.topo[ topology ][ 1 ] )
+            if self.topo[ topology ][ 2 ]:
                 mininet_args += ' --dual-homed'
             if len( vlan ) > 0 :
                 mininet_args += ' --vlan=%s' % ( ','.join( ['%d' % vlanId for vlanId in vlan ] ) )
@@ -66,12 +65,12 @@
             run.startMininet( main, 'trellis_fabric.py', args=mininet_args )
         else:
             # Run the test with physical devices
-            run.connectToPhysicalNetwork( main, switchNames[ topology ] )
+            run.connectToPhysicalNetwork( main, self.switchNames[ topology ] )
 
-        run.checkFlows( main, minFlowCount=topo[ topology ][ 4 ] * topo[ topology ][ 1 ], sleep=5 )
-        leaf_dpid = [ "of:%016d" % ( ls + 1 ) for ls in range( topo[ topology ][ 1 ] ) ]
+        run.checkFlows( main, minFlowCount=self.topo[ topology ][ 4 ] * self.topo[ topology ][ 1 ], sleep=5 )
+        leaf_dpid = [ "of:%016d" % ( ls + 1 ) for ls in range( self.topo[ topology ][ 1 ] ) ]
         for dpid in leaf_dpid:
-            run.checkFlowsByDpid( main, dpid, topo[ topology ][ 4 ], sleep=5 )
+            run.checkFlowsByDpid( main, dpid, self.topo[ topology ][ 4 ], sleep=5 )
         run.pingAll( main )
 
         if hasattr( main, 'Mininet1' ):
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE01.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE01.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE01.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE01.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE02.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE02.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE02.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE02.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE03.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE03.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE03.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE03.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE04.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE04.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE04.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE04.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE11.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE11.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE11.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE11.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE12.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE12.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE12.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE12.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE13.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE13.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE13.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE13.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE14.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE14.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE14.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE14.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE21.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE21.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE21.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE21.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE22.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE22.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE22.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE22.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE23.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE23.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE23.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE23.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE24.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE24.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE24.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE24.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE31.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE31.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE31.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE31.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE32.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE32.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE32.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE32.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE33.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE33.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE33.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE33.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE34.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE34.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE34.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE34.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE41.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE41.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE41.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE41.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE42.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE42.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE42.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE42.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE43.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE43.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE43.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE43.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE44.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE44.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE44.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE44.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE51.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE51.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE51.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE51.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE52.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE52.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE52.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE52.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE53.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE53.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE53.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE53.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE54.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE54.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE54.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE54.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE61.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE61.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE61.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE61.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE62.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE62.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE62.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE62.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE63.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE63.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE63.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE63.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE64.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE64.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE64.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE64.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE71.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE71.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE71.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE71.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE72.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE72.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE72.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE72.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE73.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE73.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE73.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE73.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE74.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE74.chart
similarity index 100%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE74.chart
rename to TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE74.chart
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/bgpdbgp1.conf b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/bgpdbgp1.conf
new file mode 100644
index 0000000..8870fb4
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/bgpdbgp1.conf
@@ -0,0 +1,81 @@
+log file /var/log/quagga/bgpdbgp1.log
+hostname bgp1
+password quagga
+!
+! Different next hop for IPv4
+!
+ip prefix-list 1 seq 10 permit 10.0.2.0/24
+ip prefix-list 1 seq 20 permit 10.1.2.0/24
+ip prefix-list 1 seq 30 permit 10.0.3.0/24
+ip prefix-list 1 seq 40 permit 10.0.4.0/24
+!
+route-map NEXTHOP41 permit 10
+match ip address prefix-list 1
+set ip next-hop 10.0.1.254
+!
+!
+route-map NEXTHOP47 permit 10
+match ip address prefix-list 1
+set ip next-hop 10.0.7.254
+!
+! Different next hop for IPv6
+!
+ipv6 prefix-list 2 seq 10 permit 2000::200/120
+ipv6 prefix-list 2 seq 20 permit 2000::300/120
+!
+route-map NEXTHOP61 permit 10
+match ipv6 address prefix-list 2
+set ipv6 next-hop global 2000::1ff
+set ipv6 next-hop local 2000::1ff
+!
+!
+route-map NEXTHOP67 permit 10
+match ipv6 address prefix-list 2
+set ipv6 next-hop global 2000::7ff
+set ipv6 next-hop local 2000::7ff
+!
+! Basic router config
+!
+router bgp 65003
+bgp router-id 172.16.0.3
+timers bgp 3 9
+!
+! IPv4
+!
+neighbor 10.0.1.1 remote-as 65001
+neighbor 10.0.1.1 ebgp-multihop
+neighbor 10.0.1.1 timers connect 5
+neighbor 10.0.1.1 advertisement-interval 5
+neighbor 10.0.1.1 route-map NEXTHOP41 out
+!
+neighbor 2000::101 remote-as 65001
+neighbor 2000::101 timers connect 5
+neighbor 2000::101 advertisement-interval 1
+no neighbor 2000::101 activate
+!
+neighbor 10.0.7.1 remote-as 65002
+neighbor 10.0.7.1 ebgp-multihop
+neighbor 10.0.7.1 timers connect 5
+neighbor 10.0.7.1 advertisement-interval 5
+neighbor 10.0.7.1 route-map NEXTHOP47 out
+!
+neighbor 2000::701 remote-as 65002
+neighbor 2000::701 timers connect 5
+neighbor 2000::701 advertisement-interval 1
+no neighbor 2000::701 activate
+!
+network 10.0.2.0/24
+network 10.1.2.0/24
+network 10.0.3.0/24
+network 10.0.4.0/24
+!
+! IPv6
+!
+address-family ipv6
+network 2000::200/120
+network 2000::300/120
+neighbor 2000::101 activate
+neighbor 2000::101 route-map NEXTHOP61 out
+neighbor 2000::701 activate
+neighbor 2000::701 route-map NEXTHOP67 out
+exit-address-family
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/bgpdbgp2.conf b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/bgpdbgp2.conf
new file mode 100644
index 0000000..e554de4
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/bgpdbgp2.conf
@@ -0,0 +1,81 @@
+log file /var/log/quagga/bgpdbgp2.log
+hostname bgp2
+password quagga
+!
+! Different next hop for IPv4
+!
+ip prefix-list 1 seq 10 permit 10.0.2.0/24
+ip prefix-list 1 seq 20 permit 10.1.2.0/24
+ip prefix-list 1 seq 30 permit 10.0.3.0/24
+ip prefix-list 1 seq 40 permit 10.0.4.0/24
+!
+route-map NEXTHOP45 permit 10
+match ip address prefix-list 1
+set ip next-hop 10.0.5.254
+!
+!
+route-map NEXTHOP46 permit 10
+match ip address prefix-list 1
+set ip next-hop 10.0.6.254
+!
+! Different next hop for IPv6
+!
+ipv6 prefix-list 2 seq 10 permit 2000::200/120
+ipv6 prefix-list 2 seq 20 permit 2000::300/120
+!
+route-map NEXTHOP65 permit 10
+match ipv6 address prefix-list 2
+set ipv6 next-hop global 2000::5ff
+set ipv6 next-hop local 2000::5ff
+!
+!
+route-map NEXTHOP66 permit 10
+match ipv6 address prefix-list 2
+set ipv6 next-hop global 2000::6ff
+set ipv6 next-hop local 2000::6ff
+!
+! Basic router config
+!
+router bgp 65003
+bgp router-id 172.16.0.4
+timers bgp 3 9
+!
+! IPv4
+!
+neighbor 10.0.5.1 remote-as 65001
+neighbor 10.0.5.1 ebgp-multihop
+neighbor 10.0.5.1 timers connect 5
+neighbor 10.0.5.1 advertisement-interval 5
+neighbor 10.0.5.1 route-map NEXTHOP45 out
+!
+neighbor 2000::501 remote-as 65001
+neighbor 2000::501 timers connect 5
+neighbor 2000::501 advertisement-interval 1
+no neighbor 2000::501 activate
+!
+neighbor 10.0.6.1 remote-as 65002
+neighbor 10.0.6.1 ebgp-multihop
+neighbor 10.0.6.1 timers connect 5
+neighbor 10.0.6.1 advertisement-interval 5
+neighbor 10.0.6.1 route-map NEXTHOP46 out
+!
+neighbor 2000::601 remote-as 65002
+neighbor 2000::601 timers connect 5
+neighbor 2000::601 advertisement-interval 1
+no neighbor 2000::601 activate
+!
+network 10.0.2.0/24
+network 10.1.2.0/24
+network 10.0.3.0/24
+network 10.0.4.0/24
+!
+! IPv6
+!
+address-family ipv6
+network 2000::200/120
+network 2000::300/120
+neighbor 2000::501 activate
+neighbor 2000::501 route-map NEXTHOP65 out
+neighbor 2000::601 activate
+neighbor 2000::601 route-map NEXTHOP66 out
+exit-address-family
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/bgpdr1.conf b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/bgpdr1.conf
new file mode 100644
index 0000000..9e526b8
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/bgpdr1.conf
@@ -0,0 +1,42 @@
+log file /var/log/quagga/bgpdr1.log
+hostname r1
+password quagga
+!
+! Basic router config
+!
+router bgp 65001
+bgp router-id 10.0.1.1
+timers bgp 3 9
+!
+! IPv4
+!
+neighbor 10.0.1.2 remote-as 65003
+neighbor 10.0.1.2 ebgp-multihop
+neighbor 10.0.1.2 timers connect 5
+neighbor 10.0.1.2 advertisement-interval 5
+!
+neighbor 2000::102 remote-as 65003
+neighbor 2000::102 timers connect 5
+neighbor 2000::102 advertisement-interval 1
+no neighbor 2000::102 activate
+!
+neighbor 10.0.5.2 remote-as 65003
+neighbor 10.0.5.2 ebgp-multihop
+neighbor 10.0.5.2 timers connect 5
+neighbor 10.0.5.2 advertisement-interval 5
+!
+neighbor 2000::502 remote-as 65003
+neighbor 2000::502 timers connect 5
+neighbor 2000::502 advertisement-interval 1
+no neighbor 2000::502 activate
+!
+network 10.0.99.0/24
+!
+! IPv6
+!
+address-family ipv6
+network 2000::7700/120
+network 2000::9900/120
+neighbor 2000::102 activate
+neighbor 2000::502 activate
+exit-address-family
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/bgpdr2.conf b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/bgpdr2.conf
new file mode 100644
index 0000000..49553e2
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/bgpdr2.conf
@@ -0,0 +1,42 @@
+log file /var/log/quagga/bgpdr2.log
+hostname r2
+password quagga
+!
+! Basic router config
+!
+router bgp 65002
+bgp router-id 10.0.6.1
+timers bgp 3 9
+!
+! IPv4
+!
+neighbor 10.0.6.2 remote-as 65003
+neighbor 10.0.6.2 ebgp-multihop
+neighbor 10.0.6.2 timers connect 5
+neighbor 10.0.6.2 advertisement-interval 5
+!
+neighbor 2000::602 remote-as 65003
+neighbor 2000::602 timers connect 5
+neighbor 2000::602 advertisement-interval 1
+no neighbor 2000::602 activate
+!
+neighbor 10.0.7.2 remote-as 65003
+neighbor 10.0.7.2 ebgp-multihop
+neighbor 10.0.7.2 timers connect 5
+neighbor 10.0.7.2 advertisement-interval 5
+!
+neighbor 2000::702 remote-as 65003
+neighbor 2000::702 timers connect 5
+neighbor 2000::702 advertisement-interval 1
+no neighbor 2000::702 activate
+!
+network 10.0.99.0/24
+!
+! IPv6
+!
+address-family ipv6
+network 2000::8800/120
+network 2000::9900/120
+neighbor 2000::602 activate
+neighbor 2000::702 activate
+exit-address-family
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/dhcpd.conf b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/dhcpd.conf
new file mode 100644
index 0000000..aa559d2
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/dhcpd.conf
@@ -0,0 +1,55 @@
+ddns-update-style none;
+
+default-lease-time 600;
+max-lease-time 7200;
+
+option domain-name-servers 8.8.8.8, 8.8.4.4;
+option domain-name "trellis.local";
+
+subnet 10.0.2.0 netmask 255.255.255.0 {
+  range 10.0.2.100 10.0.2.240;
+  option routers 10.0.2.254;
+}
+
+subnet 10.1.2.0 netmask 255.255.255.0 {
+  range 10.1.2.100 10.1.2.240;
+  option routers 10.1.2.254;
+}
+
+subnet 10.0.3.0 netmask 255.255.255.0 {
+  range 10.0.3.100 10.0.3.240;
+  option routers 10.0.3.254;
+}
+
+subnet 10.0.4.0 netmask 255.255.255.0 {
+  range 10.0.4.100 10.0.4.240;
+  option routers 10.0.4.254;
+}
+
+subnet 10.0.99.3 netmask 255.255.255.255 {
+}
+
+host h1 {
+  hardware ethernet 00:aa:00:00:00:01;
+  fixed-address 10.0.2.1;
+}
+
+host h2 {
+  hardware ethernet 00:aa:00:00:00:02;
+  fixed-address 10.0.2.2;
+}
+
+host h3 {
+  hardware ethernet 00:aa:00:00:00:03;
+  fixed-address 10.0.3.1;
+}
+
+host h4 {
+  hardware ethernet 00:aa:00:00:00:04;
+  fixed-address 10.0.3.2;
+}
+
+host dh1 {
+  hardware ethernet 00:cc:00:00:00:01;
+  fixed-address 10.1.2.1;
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/dhcpd6.conf b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/dhcpd6.conf
new file mode 100644
index 0000000..526de85
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/dhcpd6.conf
@@ -0,0 +1,37 @@
+default-lease-time 600;
+max-lease-time 7200;
+
+option dhcp6.next-hop code 242 = ip6-address;
+
+subnet6 2000::200/120 {
+  range6 2000::260 2000::2fe;
+  option dhcp6.next-hop 2000::02ff;
+}
+
+subnet6 2000::300/120 {
+  range6 2000::360 2000::3fe;
+  option dhcp6.next-hop 2000::03ff;
+}
+
+subnet6 2000::9903/128 {
+}
+
+host h1v6 {
+  hardware ethernet 00:bb:00:00:00:01;
+  fixed-address6 2000::201;
+}
+
+host h2v6 {
+  hardware ethernet 00:bb:00:00:00:02;
+  fixed-address6 2000::202;
+}
+
+host h3v6 {
+  hardware ethernet 00:bb:00:00:00:03;
+  fixed-address6 2000::301;
+}
+
+host h4v6 {
+  hardware ethernet 00:bb:00:00:00:04;
+  fixed-address6 2000::302;
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/zebradbgp1.conf b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/zebradbgp1.conf
new file mode 100644
index 0000000..51991a4
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/zebradbgp1.conf
@@ -0,0 +1,9 @@
+log file /var/log/quagga/zebradbgp1.log
+hostname zebra-bgp1
+password quagga
+!
+! Default route via virtual management switch
+!
+ip route 0.0.0.0/0 172.16.0.1
+!
+fpm connection ip 192.168.56.11 port 2620
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/zebradbgp2.conf b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/zebradbgp2.conf
new file mode 100644
index 0000000..dce218d
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/conf/zebradbgp2.conf
@@ -0,0 +1,9 @@
+log file /var/log/quagga/zebradbgp2.log
+hostname zebra-bgp2
+password quagga
+!
+! Default route via virtual management switch
+!
+ip route 0.0.0.0/0 172.16.0.1
+!
+fpm connection ip 192.168.56.11 port 2620
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/extra.json b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/extra.json
new file mode 100644
index 0000000..e3544bf
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/extra.json
@@ -0,0 +1,16 @@
+{
+    "hosts" : {
+        "00:00:00:00:00:09/-1" : {
+            "basic": {
+                "ips": ["10.0.1.9"],
+                "locations": ["of:0000000000000001/3"]
+            }
+        },
+        "00:00:00:00:09:01/-1" : {
+            "basic": {
+                "ips": ["10.0.9.1"],
+                "locations": ["of:0000000000000001/4"]
+            }
+        }
+    }
+}