[ONOS-7502] Verify connectivity to remote hosts in SRRouting
Change-Id: Ie5bd6d7b0eb946adf4612f635aff4027a4b35300
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index daa7b0a..6fd807d 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -525,7 +525,62 @@
self.handle.expect( "mininet>", timeout=wait + 1 )
response = self.handle.before
if re.search( ',\s0\%\spacket\sloss', response ):
- pingResponse += str( " h" + str( temp[ 1: ] ) )
+ pingResponse += " " + str( temp )
+ break
+ else:
+ failedPings += 1
+ time.sleep(1)
+ if failedPings > acceptableFailed:
+ # One of the host to host pair is unreachable
+ pingResponse += " X"
+ isReachable = main.FALSE
+ failedPingsTotal += 1
+ pingResponse += "\n"
+ main.log.info( pingResponse + "Failed pings: " + str( failedPingsTotal ) )
+ return isReachable
+
+ except pexpect.TIMEOUT:
+ main.log.exception( self.name + ": TIMEOUT exception" )
+ return main.FALSE
+ except pexpect.EOF:
+ main.log.error( self.name + ": EOF exception found" )
+ main.log.error( self.name + ": " + self.handle.before )
+ main.cleanAndExit()
+ except Exception:
+ main.log.exception( self.name + ": Uncaught exception!" )
+ main.cleanAndExit()
+
+ def pingallHostsUnidirectional( self, srcList, dstList, ipv6=False, wait=1, acceptableFailed=0 ):
+ """
+ Verify ping from each host in srcList to each host in dstList
+
+ acceptableFailed: max number of acceptable failed pings
+
+ Returns main.TRUE if all src hosts can reach all dst hosts
+ Returns main.FALSE if one or more of src hosts cannot reach one or more of dst hosts
+ """
+ try:
+ main.log.info( "Verifying ping from each src host to each dst host" )
+ isReachable = main.TRUE
+ wait = int( wait )
+ cmd = " ping" + ("6" if ipv6 else "") + " -c 1 -i 1 -W " + str( wait ) + " "
+ pingResponse = "Ping output:\n"
+ failedPingsTotal = 0
+ for host in srcList:
+ pingResponse += str( str( host ) + " -> " )
+ for temp in dstList:
+ failedPings = 0
+ if ipv6:
+ pingCmd = str( host ) + cmd + str( self.getIPAddress( temp, proto='IPv6' ) )
+ else:
+ pingCmd = str( host ) + cmd + str( temp )
+ while failedPings <= acceptableFailed:
+ main.log.debug( "Pinging from " + str( host ) + " to " + str( temp ) )
+ self.handle.sendline( pingCmd )
+ self.handle.expect( "mininet>", timeout=wait + 1 )
+ response = self.handle.before
+ if re.search( ',\s0\%\spacket\sloss', response ):
+ pingResponse += " " + str( temp )
break
else:
failedPings += 1
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params
index 0e4de46..7a7dbf5 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.params
@@ -1,5 +1,5 @@
<PARAMS>
- <testcases>1,2,3</testcases>
+ <testcases>1,2,3,4,5,6</testcases>
<GRAPH>
<nodeCluster>VM</nodeCluster>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
index d239219..921c6e2 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/SRRouting.py
@@ -53,3 +53,54 @@
ipv6=1,
countFlowsGroups=False,
description="Ping between all ipv4 and ipv6 hosts in the topology")
+
+ def CASE4( self, main ):
+ """
+ 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=4,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=1,
+ ipv6=0,
+ description="Ping between all ipv4 hosts in the topology and check connectivity to external hosts",
+ checkExternalHost=True )
+
+ def CASE5( self, main ):
+ """
+ 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=5,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=0,
+ ipv6=1,
+ description="Ping between all ipv6 hosts in the topology and check connectivity to external hosts",
+ checkExternalHost=True )
+
+ def CASE6( self, main ):
+ """
+ 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=6,
+ onosNodes=3,
+ dhcp=1,
+ routers=1,
+ ipv4=1,
+ ipv6=1,
+ description="Ping between all ipv4 and ipv6 hosts in the topology and check connectivity to external hosts",
+ checkExternalHost=True )
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
index d2cd2b5..52fb795 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
@@ -30,7 +30,7 @@
self.default = ''
@staticmethod
- def runTest( main, test_idx, onosNodes, dhcp, routers, ipv4, ipv6, description, countFlowsGroups=False):
+ def runTest( main, test_idx, onosNodes, dhcp, routers, ipv4, ipv6, description, countFlowsGroups=False, checkExternalHost=False ):
skipPackage = False
init = False
@@ -46,6 +46,8 @@
main.cfgName = 'COMCAST_CONFIG_ipv4=%d_ipv6=%d_dhcp=%d_routers=%d' % \
( ipv4, ipv6, dhcp, routers )
+ if checkExternalHost:
+ main.cfgName += '_external=1'
main.resultFileName = 'CASE%02d' % test_idx
main.Cluster.setRunningNode( onosNodes )
@@ -76,7 +78,7 @@
time.sleep( 60 )
# ping hosts
- # run.pingAll( main, 'CASE%02d' % test_idx, acceptableFailed=5, basedOnIp=True )
+ run.pingAll( main, 'CASE%02d' % test_idx, acceptableFailed=5, basedOnIp=True )
# check flows / groups numbers
if (countFlowsGroups):
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1.chart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1.chart
index e77d1c5..4ba753f 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1.chart
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1.chart
@@ -1,4 +1,4 @@
{
- "ipv6": {"expect": "True",
- "hosts":["h1v6", "h2v6" ,"h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6"]}
+ "ipv6": { "expect": "True",
+ "hosts": ["h1v6", "h2v6" ,"h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6"] }
}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_external=1.chart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_external=1.chart
new file mode 100644
index 0000000..1df8fa5
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_external=1.chart
@@ -0,0 +1,7 @@
+{
+ "ipv6": { "expect": "True",
+ "hosts": ["h1v6", "h2v6" ,"h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6"] },
+ "ipv6-remote": { "expect": "Unidirectional",
+ "src": ["h1v6", "h2v6" ,"h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6"],
+ "dst": ["rh1v6", "rh11v6", "rh2v6", "rh22v6"] }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1.chart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1.chart
index 8fc87ff..64b2628 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1.chart
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1.chart
@@ -1,4 +1,4 @@
{
- "ipv4": {"expect": "True",
- "hosts":["h1v4", "h2v4" ,"h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4"]}
+ "ipv4": { "expect": "True",
+ "hosts": ["h1v4", "h2v4" ,"h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4"] }
}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_external=1.chart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_external=1.chart
new file mode 100644
index 0000000..cd36386
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_external=1.chart
@@ -0,0 +1,7 @@
+{
+ "ipv4": { "expect": "True",
+ "hosts": ["h1v4", "h2v4" ,"h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4"] },
+ "ipv4-remote": { "expect": "Unidirectional",
+ "src": ["h1v4", "h2v4" ,"h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4"],
+ "dst": ["rh1v4", "rh2v4"] }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1.chart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1.chart
index cdd437d..a33f56f 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1.chart
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1.chart
@@ -1,6 +1,6 @@
{
- "ipv6": {"expect": "True",
- "hosts": ["h1v6", "h2v6" ,"h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6"]},
- "ipv4": {"expect": "True",
- "hosts": ["h1v4", "h2v4" ,"h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4"]}
+ "ipv4": { "expect": "True",
+ "hosts": ["h1v4", "h2v4" ,"h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4"] },
+ "ipv6": { "expect": "True",
+ "hosts": ["h1v6", "h2v6" ,"h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6"] }
}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_external=1.chart b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_external=1.chart
new file mode 100644
index 0000000..4af85a4
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/chart/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_external=1.chart
@@ -0,0 +1,12 @@
+{
+ "ipv4": { "expect": "True",
+ "hosts": ["h1v4", "h2v4" ,"h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4"] },
+ "ipv4-remote": { "expect": "Unidirectional",
+ "src": ["h1v4", "h2v4" ,"h3v4", "h4v4", "h5v4", "h6v4", "h7v4", "h8v4", "h9v4", "h10v4", "h11v4"],
+ "dst": ["rh1v4", "rh2v4"] },
+ "ipv6": { "expect": "True",
+ "hosts": ["h1v6", "h2v6" ,"h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6"] },
+ "ipv6-remote": { "expect": "Unidirectional",
+ "src": ["h1v6", "h2v6" ,"h3v6", "h4v6", "h5v6", "h6v6", "h7v6", "h8v6", "h9v6", "h10v6", "h11v6"],
+ "dst": ["rh1v6", "rh11v6", "rh2v6", "rh22v6"] }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/count/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_external=1.count b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/count/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_external=1.count
new file mode 100644
index 0000000..3d66d2e
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/count/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_external=1.count
@@ -0,0 +1,9 @@
+{
+ "of:0000000000000001": { "flows" : 67, "groups" : 56},
+ "of:0000000000000002": { "flows" : 95, "groups" : 85},
+ "of:0000000000000003": { "flows" : 101, "groups" : 88},
+ "of:0000000000000004": { "flows" : 112, "groups" : 81},
+ "of:0000000000000005": { "flows" : 119, "groups" : 83},
+ "of:0000000000000101": { "flows" : 82, "groups" : 29},
+ "of:0000000000000102": { "flows" : 82, "groups" : 29}
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/count/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_external=1.count b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/count/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_external=1.count
new file mode 100644
index 0000000..58715b1
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/count/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_external=1.count
@@ -0,0 +1,9 @@
+{
+ "of:0000000000000001": { "flows" : 64, "groups" : 52},
+ "of:0000000000000002": { "flows" : 91, "groups" : 77},
+ "of:0000000000000003": { "flows" : 97, "groups" : 80},
+ "of:0000000000000004": { "flows" : 108, "groups" : 77},
+ "of:0000000000000005": { "flows" : 115, "groups" : 79},
+ "of:0000000000000101": { "flows" : 74, "groups" : 29},
+ "of:0000000000000102": { "flows" : 74, "groups" : 29}
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/count/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_external=1.count b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/count/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_external=1.count
new file mode 100644
index 0000000..9b3932e
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/count/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_external=1.count
@@ -0,0 +1,9 @@
+{
+ "of:0000000000000001": { "flows" : 96, "groups" : 88},
+ "of:0000000000000002": { "flows" : 131, "groups" : 127},
+ "of:0000000000000003": { "flows" : 141, "groups" : 131},
+ "of:0000000000000004": { "flows" : 145, "groups" : 131},
+ "of:0000000000000005": { "flows" : 154, "groups" : 134},
+ "of:0000000000000101": { "flows" : 85, "groups" : 29},
+ "of:0000000000000102": { "flows" : 85, "groups" : 29}
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_external=1.json b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_external=1.json
new file mode 100644
index 0000000..293829e
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=0_ipv6=1_dhcp=1_routers=1_external=1.json
@@ -0,0 +1,366 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1000::3ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1001::3ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1002::3ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1003::3ff/120" ],
+ "vlan-untagged": 15
+ }
+ ]
+ },
+ "of:0000000000000002/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1004::3ff/120" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000003/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1005::3ff/120" ],
+ "vlan-tagged": [20]
+ }
+ ]
+ },
+ "of:0000000000000003/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1006::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000003/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1003::3ff/120" ],
+ "vlan-untagged": 15
+ }
+ ]
+ },
+ "of:0000000000000003/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1004::3ff/120" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000004/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1007::3ff/120" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000004/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1008::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000004/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1009::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1010::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1008::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1009::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000004/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "10.0.7.254/24", "2000::1ff/120", "2000::7ff/120" ],
+ "vlan-tagged": [110, 170]
+
+ }
+ ]
+ },
+ "of:0000000000000004/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "2000::1ff/120"],
+ "vlan-untagged": 110
+
+ }
+ ]
+ },
+ "of:0000000000000004/11" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.7.254/24", "2000::7ff/120" ],
+ "vlan-untagged": 170
+
+ }
+ ]
+ },
+ "of:0000000000000005/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.5.254/24", "10.0.6.254/24", "2000::5ff/120", "2000::6ff/120" ],
+ "vlan-tagged": [150, 160]
+ }
+ ]
+ },
+ "of:0000000000000005/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.5.254/24", "2000::5ff/120"],
+ "vlan-untagged": 150
+ }
+ ]
+ },
+ "of:0000000000000005/11" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.6.254/24", "2000::6ff/120" ],
+ "vlan-untagged": 160
+ }
+ ]
+ },
+ "of:0000000000000005/12" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 15
+ }
+ ]
+ }
+ },
+ "hosts" : {
+ "00:bb:00:00:00:04/30" : {
+ "basic": {
+ "locations": ["of:0000000000000003/7","of:0000000000000002/8"],
+ "ips": ["1004::3fe"]
+ }
+ },
+ "00:bb:00:00:00:05/20" : {
+ "basic": {
+ "locations": ["of:0000000000000003/8"],
+ "ips": ["1005::3fe"]
+ }
+ },
+ "00:bb:00:00:01:05/40" : {
+ "basic": {
+ "locations": ["of:0000000000000003/9"],
+ "ips": ["1006::3fe"]
+ }
+ },
+ "00:bb:00:00:00:06/30" : {
+ "basic": {
+ "locations": ["of:0000000000000004/6"],
+ "ips": ["1007::3fe"]
+ }
+ },
+ "00:bb:00:00:00:07/40" : {
+ "basic": {
+ "locations": ["of:0000000000000005/6", "of:0000000000000004/7"],
+ "ips": ["1008::3fe"]
+ }
+ },
+ "00:bb:00:00:00:08/40" : {
+ "basic": {
+ "locations": ["of:0000000000000004/8","of:0000000000000005/7"],
+ "ips": ["1009::3fe"]
+ }
+ },
+ "00:bb:00:00:00:0A/40" : {
+ "basic": {
+ "locations": ["of:0000000000000005/8"],
+ "ips": ["1010::3fe"]
+ }
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "name" : "s001",
+ "ipv4NodeSid" : 1,
+ "ipv6NodeSid" : 101,
+ "ipv6Loopback" : "2000::c0a8:0001",
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-105
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "name" : "s002",
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "ipv6NodeSid" : 102,
+ "ipv6Loopback" : "2000::c0a8:0002",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000003",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-95
+ }
+ },
+ "of:0000000000000003" : {
+ "segmentrouting" : {
+ "name" : "s003",
+ "ipv4NodeSid" : 3,
+ "ipv4Loopback" : "192.168.0.3",
+ "ipv6NodeSid" : 103,
+ "ipv6Loopback" : "2000::c0a8:0003",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000002",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-90
+ }
+ },
+ "of:0000000000000004" : {
+ "segmentrouting" : {
+ "name" : "s004",
+ "ipv4NodeSid" : 4,
+ "ipv4Loopback" : "192.168.0.4",
+ "ipv6NodeSid" : 104,
+ "ipv6Loopback" : "2000::c0a8:0004",
+ "routerMac" : "00:00:00:00:00:04",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000005",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-85
+ }
+ },
+ "of:0000000000000005" : {
+ "segmentrouting" : {
+ "name" : "s005",
+ "ipv4NodeSid" : 5,
+ "ipv4Loopback" : "192.168.0.5",
+ "ipv6NodeSid" : 105,
+ "ipv6Loopback" : "2000::c0a8:0005",
+ "routerMac" : "00:00:00:00:00:04",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000004",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-80
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "name" : "s101",
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "ipv6NodeSid" : 201,
+ "ipv6Loopback" : "2000::c0a8:0101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":42,
+ "longitude":-100
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "name" : "s102",
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "ipv6NodeSid" : 202,
+ "ipv6Loopback" : "2000::c0a8:0202",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":42,
+ "longitude":-95
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000005/12",
+ "serverIps": ["2000::3fd"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_external=1.json b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_external=1.json
new file mode 100644
index 0000000..59284ba
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=0_dhcp=1_routers=1_external=1.json
@@ -0,0 +1,308 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.1.0.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.1.10.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.0.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.30.254/24" ],
+ "vlan-untagged": 15
+ }
+ ]
+ },
+ "of:0000000000000002/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.20.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000003/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.10.254/24" ],
+ "vlan-tagged": [20]
+ }
+ ]
+ },
+ "of:0000000000000003/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.40.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000003/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.30.254/24" ],
+ "vlan-untagged": 15
+ }
+ ]
+ },
+ "of:0000000000000003/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.20.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000004/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.0.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000004/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.10.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000004/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.30.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.20.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.10.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.30.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000004/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "10.0.7.254/24", "2000::1ff/120", "2000::7ff/120" ],
+ "vlan-tagged": [110, 170]
+
+ }
+ ]
+ },
+ "of:0000000000000004/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "2000::1ff/120"],
+ "vlan-untagged": 110
+
+ }
+ ]
+ },
+ "of:0000000000000004/11" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.7.254/24", "2000::7ff/120" ],
+ "vlan-untagged": 170
+
+ }
+ ]
+ },
+ "of:0000000000000005/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.5.254/24", "10.0.6.254/24", "2000::5ff/120", "2000::6ff/120" ],
+ "vlan-tagged": [150, 160]
+ }
+ ]
+ },
+ "of:0000000000000005/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.5.254/24", "2000::5ff/120"],
+ "vlan-untagged": 150
+ }
+ ]
+ },
+ "of:0000000000000005/11" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.6.254/24", "2000::6ff/120" ],
+ "vlan-untagged": 160
+ }
+ ]
+ },
+ "of:0000000000000005/12" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 15
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "name" : "s001",
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-105
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "name" : "s002",
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000003",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-95
+ }
+ },
+ "of:0000000000000003" : {
+ "segmentrouting" : {
+ "name" : "s003",
+ "ipv4NodeSid" : 3,
+ "ipv4Loopback" : "192.168.0.3",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000002",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-90
+ }
+ },
+ "of:0000000000000004" : {
+ "segmentrouting" : {
+ "name" : "s004",
+ "ipv4NodeSid" : 4,
+ "ipv4Loopback" : "192.168.0.4",
+ "routerMac" : "00:00:00:00:00:04",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000005",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-85
+ }
+ },
+ "of:0000000000000005" : {
+ "segmentrouting" : {
+ "name" : "s005",
+ "ipv4NodeSid" : 5,
+ "ipv4Loopback" : "192.168.0.5",
+ "routerMac" : "00:00:00:00:00:04",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000004",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-80
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "name" : "s101",
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":42,
+ "longitude":-100
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "name" : "s102",
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":42,
+ "longitude":-95
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000005/12",
+ "serverIps": ["10.0.3.253"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_external=1.json b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_external=1.json
new file mode 100644
index 0000000..7294d8b
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/json/COMCAST_CONFIG_ipv4=1_ipv6=1_dhcp=1_routers=1_external=1.json
@@ -0,0 +1,486 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1000::3ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1001::3ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000001/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.1.0.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000001/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.1.10.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1002::3ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1003::3ff/120" ],
+ "vlan-untagged": 15
+ }
+ ]
+ },
+ "of:0000000000000002/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1004::3ff/120" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000002/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.0.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.30.254/24" ],
+ "vlan-untagged": 16
+ }
+ ]
+ },
+ "of:0000000000000002/11" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.20.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000003/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1003::3ff/120" ],
+ "vlan-untagged": 15
+ }
+ ]
+ },
+ "of:0000000000000003/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1004::3ff/120" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000003/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1005::3ff/120" ],
+ "vlan-tagged": [20]
+ }
+ ]
+ },
+ "of:0000000000000003/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1006::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000003/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.30.254/24" ],
+ "vlan-untagged": 15
+ }
+ ]
+ },
+ "of:0000000000000003/11" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.20.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000003/12" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.10.254/24" ],
+ "vlan-tagged": [20]
+ }
+ ]
+ },
+ "of:0000000000000003/13" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.2.40.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000004/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1007::3ff/120" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000004/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1008::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000004/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1009::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000004/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.0.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000004/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.10.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000004/11" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.30.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000004/12" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "10.0.7.254/24", "2000::1ff/120", "2000::7ff/120" ],
+ "vlan-tagged": [110, 170]
+
+ }
+ ]
+ },
+ "of:0000000000000004/13" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "2000::1ff/120"],
+ "vlan-untagged": 110
+
+ }
+ ]
+ },
+ "of:0000000000000004/14" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.7.254/24", "2000::7ff/120" ],
+ "vlan-untagged": 170
+
+ }
+ ]
+ },
+ "of:0000000000000005/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1008::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1009::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "1010::3ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/9" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.10.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/10" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.30.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/11" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.3.20.254/24" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000005/12" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.5.254/24", "10.0.6.254/24", "2000::5ff/120", "2000::6ff/120" ],
+ "vlan-tagged": [150, 160]
+ }
+ ]
+ },
+ "of:0000000000000005/13" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.5.254/24", "2000::5ff/120"],
+ "vlan-untagged": 150
+ }
+ ]
+ },
+ "of:0000000000000005/14" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.6.254/24", "2000::6ff/120" ],
+ "vlan-untagged": 160
+ }
+ ]
+ },
+ "of:0000000000000005/15" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24", "2000::3ff/120" ],
+ "vlan-untagged": 15
+ }
+ ]
+ }
+ },
+ "hosts" : {
+ "00:bb:00:00:00:04/30" : {
+ "basic": {
+ "locations": ["of:0000000000000003/7","of:0000000000000002/8"],
+ "ips": ["1004::3fe"]
+ }
+ },
+ "00:bb:00:00:00:05/20" : {
+ "basic": {
+ "locations": ["of:0000000000000003/8"],
+ "ips": ["1005::3fe"]
+ }
+ },
+ "00:bb:00:00:01:05/40" : {
+ "basic": {
+ "locations": ["of:0000000000000003/9"],
+ "ips": ["1006::3fe"]
+ }
+ },
+ "00:bb:00:00:00:06/30" : {
+ "basic": {
+ "locations": ["of:0000000000000004/6"],
+ "ips": ["1007::3fe"]
+ }
+ },
+ "00:bb:00:00:00:07/40" : {
+ "basic": {
+ "locations": ["of:0000000000000005/6", "of:0000000000000004/7"],
+ "ips": ["1008::3fe"]
+ }
+ },
+ "00:bb:00:00:00:08/40" : {
+ "basic": {
+ "locations": ["of:0000000000000004/8","of:0000000000000005/7"],
+ "ips": ["1009::3fe"]
+ }
+ },
+ "00:bb:00:00:00:0A/40" : {
+ "basic": {
+ "locations": ["of:0000000000000005/8"],
+ "ips": ["1010::3fe"]
+ }
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "name" : "s001",
+ "ipv4NodeSid" : 1,
+ "ipv6NodeSid" : 101,
+ "ipv6Loopback" : "2000::c0a8:0001",
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-105
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "name" : "s002",
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "ipv6NodeSid" : 102,
+ "ipv6Loopback" : "2000::c0a8:0002",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000003",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-95
+ }
+ },
+ "of:0000000000000003" : {
+ "segmentrouting" : {
+ "name" : "s003",
+ "ipv4NodeSid" : 3,
+ "ipv4Loopback" : "192.168.0.3",
+ "ipv6NodeSid" : 103,
+ "ipv6Loopback" : "2000::c0a8:0003",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000002",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-90
+ }
+ },
+ "of:0000000000000004" : {
+ "segmentrouting" : {
+ "name" : "s004",
+ "ipv4NodeSid" : 4,
+ "ipv4Loopback" : "192.168.0.4",
+ "ipv6NodeSid" : 104,
+ "ipv6Loopback" : "2000::c0a8:0004",
+ "routerMac" : "00:00:00:00:00:04",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000005",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-85
+ }
+ },
+ "of:0000000000000005" : {
+ "segmentrouting" : {
+ "name" : "s005",
+ "ipv4NodeSid" : 5,
+ "ipv4Loopback" : "192.168.0.5",
+ "ipv6NodeSid" : 105,
+ "ipv6Loopback" : "2000::c0a8:0005",
+ "routerMac" : "00:00:00:00:00:04",
+ "isEdgeRouter" : true,
+ "pairLocalPort" : 5,
+ "pairDeviceId": "of:0000000000000004",
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":34,
+ "longitude":-80
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "name" : "s101",
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "ipv6NodeSid" : 201,
+ "ipv6Loopback" : "2000::c0a8:0101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":42,
+ "longitude":-100
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "name" : "s102",
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "ipv6NodeSid" : 202,
+ "ipv6Loopback" : "2000::c0a8:0202",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs",
+ "latitude":42,
+ "longitude":-95
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000005/15",
+ "serverIps": ["10.0.3.253", "2000::3fd"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index dd93fe4..aa9d1a4 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -355,38 +355,63 @@
@staticmethod
def pingAll( main, tag="", dumpflows=True, acceptableFailed=0, basedOnIp=False ):
'''
- acceptableFailed: max number of acceptable failed pings. Only works for ping6
+ Verify connectivity between hosts according to the ping chart
+ acceptableFailed: max number of acceptable failed pings.
basedOnIp: if True, run ping or ping6 based on suffix of host names
'''
- main.log.report( "Check full connectivity" )
- print main.pingChart
+ main.log.report( "Check host connectivity" )
+ main.log.debug( "Ping chart: %s" % main.pingChart )
if tag == "":
tag = 'CASE%d' % main.CurrentTestCaseNumber
for entry in main.pingChart.itervalues():
- print entry
- hosts, expect = entry[ 'hosts' ], entry[ 'expect' ]
- try:
- expect = main.TRUE if str(expect).lower() == 'true' else main.FALSE
- except:
- expect = main.FALSE
- main.step( "Connectivity for %s %s" % ( str( hosts ), tag ) )
-
- if basedOnIp:
- if ("v4" in hosts[0]):
+ main.log.debug( "Entry in ping chart: %s" % entry )
+ expect = entry[ 'expect' ]
+ if expect == "Unidirectional":
+ # Verify ping from each src host to each dst host
+ src = entry[ 'src' ]
+ dst = entry[ 'dst' ]
+ expect = main.TRUE
+ main.step( "Verify unidirectional connectivity from %s to %s with tag %s" % ( str( src ), str( dst ), tag ) )
+ if basedOnIp:
+ if ("v4" in src[0]):
+ pa = main.Network.pingallHostsUnidirectional( src, dst, acceptableFailed=acceptableFailed )
+ utilities.assert_equals( expect=expect, actual=pa,
+ onpass="IPv4 connectivity successfully tested",
+ onfail="IPv4 connectivity failed" )
+ if ("v6" in src[0]):
+ pa = main.Network.pingallHostsUnidirectional( src, dst, ipv6=True, acceptableFailed=acceptableFailed )
+ utilities.assert_equals( expect=expect, actual=pa,
+ onpass="IPv6 connectivity successfully tested",
+ onfail="IPv6 connectivity failed" )
+ else:
+ pa = main.Network.pingallHostsUnidirectional( src, dst, acceptableFailed=acceptableFailed )
+ utilities.assert_equals( expect=expect, actual=pa,
+ onpass="IP connectivity successfully tested",
+ onfail="IP connectivity failed" )
+ else:
+ # Verify ping between each host pair
+ hosts = entry[ 'hosts' ]
+ try:
+ expect = main.TRUE if str(expect).lower() == 'true' else main.FALSE
+ except:
+ expect = main.FALSE
+ main.step( "Verify full connectivity for %s with tag %s" % ( str( hosts ), tag ) )
+ if basedOnIp:
+ if ("v4" in hosts[0]):
+ pa = main.Network.pingallHosts( hosts )
+ utilities.assert_equals( expect=expect, actual=pa,
+ onpass="IPv4 connectivity successfully tested",
+ onfail="IPv4 connectivity failed" )
+ if ("v6" in hosts[0]):
+ pa = main.Network.pingIpv6Hosts( hosts, acceptableFailed=acceptableFailed )
+ utilities.assert_equals( expect=expect, actual=pa,
+ onpass="IPv6 connectivity successfully tested",
+ onfail="IPv6 connectivity failed" )
+ else:
pa = main.Network.pingallHosts( hosts )
utilities.assert_equals( expect=expect, actual=pa,
- onpass="IPv4 connectivity successfully tested",
- onfail="IPv4 connectivity failed" )
- if ("v6" in hosts[0]):
- pa = main.Network.pingIpv6Hosts( hosts, acceptableFailed=acceptableFailed )
- utilities.assert_equals( expect=expect, actual=pa,
- onpass="IPv6 connectivity successfully tested",
- onfail="IPv6 connectivity failed" )
- else:
- pa = main.Network.pingallHosts( hosts )
- utilities.assert_equals( expect=expect, actual=pa,
- onpass="IP connectivity successfully tested",
- onfail="IP connectivity failed" )
+ onpass="IP connectivity successfully tested",
+ onfail="IP connectivity failed" )
if dumpflows:
main.ONOSbench.dumpONOSCmd( main.Cluster.active( 0 ).ipAddress,