[ONOS-7398] Add SegmentRouting DHCPRelay test
Change-Id: I7cb9da8e1cb7a12b26d96f5d1b8cf3c1ba9bedfd
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index d962e92..daa7b0a 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -2871,10 +2871,12 @@
main.log.exception( self.name + ": Uncaught exception!" )
main.cleanAndExit()
- def getHosts( self, verbose=False, updateTimeout=1000 ):
+ def getHosts( self, verbose=False, updateTimeout=1000, hostClass=[ "Host", "DhcpClient", "Dhcp6Client", "DhcpServer", "Dhcp6Server", "DhcpRelay" ] ):
"""
Read hosts from Mininet.
-
+ Optional:
+ hostClass: it is used to match the class of the mininet host. It
+ can be a string or a list of strings.
Returns a dictionary whose keys are the host names and the value is
a dictionary containing information about the host.
"""
@@ -2888,7 +2890,10 @@
# <Host h2: h2-eth0:10.0.0.2,h2-eth1:10.0.1.2 pid=14386>
# FIXME: Fix that
try:
- hostRE = r"Host\s(?P<name>[^:]+)\:((\s(?P<ifname>[^:]+)\:" +\
+ if not isinstance( hostClass, types.ListType ):
+ hostClass = [ str( hostClass ) ]
+ classRE = "(" + "|".join([c for c in hostClass]) + ")"
+ hostRE = r"" + classRE + "\s(?P<name>[^:]+)\:((\s(?P<ifname>[^:]+)\:" +\
"(?P<ip>[^\s]+))|(\s)\spid=(?P<pid>[^>]+))"
# update mn port info
self.update( updateTimeout )
@@ -2896,8 +2901,8 @@
dump = self.dump().split( "\n" )
hosts = {}
for line in dump:
- if "Host" in line :
- result = re.search( hostRE, line )
+ result = re.search( hostRE, line )
+ if result:
name = result.group( 'name' )
interfaces = []
response = self.getInterfaces( name )
@@ -3288,6 +3293,56 @@
main.log.exception( self.name + ": Uncaught exception!" )
main.cleanAndExit()
+ def verifyHostIp( self, hostList=[], prefix="" ):
+ """
+ Description:
+ Verify that all hosts have IP address assigned to them
+ Optional:
+ hostList: If specified, verifications only happen to the hosts
+ in hostList
+ prefix: at least one of the ip address assigned to the host
+ needs to have the specified prefix
+ Returns:
+ main.TRUE if all hosts have specific IP address assigned;
+ main.FALSE otherwise
+ """
+ try:
+ hosts = self.getHosts()
+ if not hostList:
+ hostList = hosts.keys()
+ for hostName in hosts.keys():
+ if hostName not in hostList:
+ continue
+ ipList = []
+ self.handle.sendline( str( hostName ) + " ip a" )
+ self.handle.expect( "mininet>" )
+ ipa = self.handle.before
+ ipv4Pattern = r'inet ((?:[0-9]{1,3}\.){3}[0-9]{1,3})/'
+ ipList += re.findall( ipv4Pattern, ipa )
+ # It's tricky to make regex for IPv6 addresses and this one is simplified
+ ipv6Pattern = r'inet6 ((?:[0-9a-fA-F]{1,4})?(?:[:0-9a-fA-F]{1,4}){1,7}(?:::)?(?:[:0-9a-fA-F]{1,4}){1,7})/'
+ ipList += re.findall( ipv6Pattern, ipa )
+ main.log.debug( self.name + ": IP list on host " + str( hostName ) + ": " + str( ipList ) )
+ if not ipList:
+ main.log.warn( self.name + ": Failed to discover any IP addresses on host " + str( hostName ) )
+ else:
+ if not any( ip.startswith( str( prefix ) ) for ip in ipList ):
+ main.log.warn( self.name + ": None of the IPs on host " + str( hostName ) + " has prefix " + str( prefix ) )
+ else:
+ main.log.debug( self.name + ": Found matching IP on host " + str( hostName ) )
+ hostList.remove( hostName )
+ return main.FALSE if hostList else main.TRUE
+ except KeyError:
+ main.log.exception( self.name + ": host data not as expected: " + hosts )
+ return None
+ 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" )
+ return None
+
def getHostsOld( self ):
"""
Returns a list of all hosts
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index f6b5d62..49fb3ec 100755
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -1151,6 +1151,55 @@
main.log.exception( self.name + ": Uncaught exception!" )
main.cleanAndExit()
+ def verifyHostIp( self, hostList=[], prefix="" ):
+ """
+ Description:
+ Verify that all hosts have IP address assigned to them
+ Optional:
+ hostList: If specified, verifications only happen to the hosts
+ in hostList
+ prefix: at least one of the ip address assigned to the host
+ needs to have the specified prefix
+ Returns:
+ main.TRUE if all hosts have specific IP address assigned;
+ main.FALSE otherwise
+ """
+ import json
+ try:
+ hosts = self.hosts()
+ hosts = json.loads( hosts )
+ if not hostList:
+ hostList = [ host[ "id" ] for host in hosts ]
+ for host in hosts:
+ hostId = host[ "id" ]
+ if hostId not in hostList:
+ continue
+ ipList = host[ "ipAddresses" ]
+ main.log.debug( self.name + ": IP list on host " + str( hostId ) + ": " + str( ipList ) )
+ if not ipList:
+ main.log.warn( self.name + ": Failed to discover any IP addresses on host " + str( hostId ) )
+ else:
+ if not any( ip.startswith( str( prefix ) ) for ip in ipList ):
+ main.log.warn( self.name + ": None of the IPs on host " + str( hostId ) + " has prefix " + str( prefix ) )
+ else:
+ main.log.debug( self.name + ": Found matching IP on host " + str( hostId ) )
+ hostList.remove( hostId )
+ if hostList:
+ main.log.warn( self.name + ": failed to verify IP on following hosts: " + str( hostList) )
+ return main.FALSE
+ else:
+ return main.TRUE
+ except KeyError:
+ main.log.exception( self.name + ": host data not as expected: " + hosts )
+ return None
+ 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" )
+ return None
+
def addHostIntent( self, hostIdOne, hostIdTwo, vlanId="", setVlan="", encap="", bandwidth="" ):
"""
Required:
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/README.md b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/README.md
new file mode 100644
index 0000000..44cec11
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/README.md
@@ -0,0 +1,16 @@
+This test verifies DHCP relay functions:
+ - Clients gets IP or IPv6 address from DHCP server
+ - The host store and router store should includes specific hosts and routes.
+
+It consists of:
+1) Configure and install ONOS cluster
+2) Start Mininet and check host discovery and IP assignment
+
+<h3>Requirements</h3>
+ - Trellis leaf-spine fabric: please visit following URL to set up Trellis leaf-spine fabric
+ https://github.com/opennetworkinglab/routing/tree/master/trellis
+ - ONOS_APPS=drivers,openflow,segmentrouting,fpm,dhcprelay,netcfghostprovider,routeradvertisement
+
+<h3>Topologies</h3>
+- 2x2 single ToR
+- 2x4 dual-homed ToR
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/SRDhcprelay.params b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/SRDhcprelay.params
new file mode 100644
index 0000000..e7bb813
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/SRDhcprelay.params
@@ -0,0 +1,42 @@
+<PARAMS>
+ <testcases>1,2,11,12,21,22,31,41,51,61,71</testcases>
+
+ <GRAPH>
+ <nodeCluster>VM</nodeCluster>
+ <builds>20</builds>
+ </GRAPH>
+
+ <SCALE>
+ <size>3</size>
+ <max>3</max>
+ </SCALE>
+
+ <DEPENDENCY>
+ <topology>trellis_fabric.py</topology>
+ <lib>routinglib.py,trellislib.py</lib>
+ <testConf>dhcpd.conf,dhcpd6.conf,bgpdr1.conf,bgpdr2.conf,bgpdbgp1.conf,zebradbgp1.conf,bgpdbgp2.conf,zebradbgp2.conf</testConf>
+ </DEPENDENCY>
+
+ <ENV>
+ <cellName>productionCell</cellName>
+ <cellApps>drivers,openflow,segmentrouting,fpm,dhcprelay,netcfghostprovider,routeradvertisement</cellApps>
+ </ENV>
+
+ <GIT>
+ <pull>False</pull>
+ <branch>master</branch>
+ </GIT>
+
+ <CTRL>
+ <port>6653</port>
+ </CTRL>
+
+ <timers>
+ <LinkDiscovery>12</LinkDiscovery>
+ <SwitchDiscovery>12</SwitchDiscovery>
+ </timers>
+
+ <SLEEP>
+ <startup>10</startup>
+ </SLEEP>
+</PARAMS>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/SRDhcprelay.py b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/SRDhcprelay.py
new file mode 100644
index 0000000..13ea4dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/SRDhcprelay.py
@@ -0,0 +1,291 @@
+class SRDhcprelay:
+ def __init__( self ):
+ self.default = ''
+
+ def CASE1( self, main ):
+ """
+ DHCP v4 tests
+ Client: 4 clients attached to switch directly
+ Server: 1 server attached to switch directly
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=1,
+ onosNodes=3,
+ description="DHCP v4 tests with 4 clients attached to switch directly and 1 server attached to switch directly" )
+
+ def CASE2( self, main ):
+ """
+ DHCP v4 tests
+ Client: 4 clients attached to switch directly
+ Server: 1 server attached to switch indirectly (via gateway)
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=2,
+ onosNodes=3,
+ description="DHCP v4 tests with 4 clients attached to switch directly and 1 server attached to switch indirectly (via gateway)",
+ remoteServer=True )
+
+ def CASE3( self, main ):
+ """
+ DHCP v4 tests
+ Client: 2 clients attached to switch directly, 2 clients via DHCP relay
+ Server: 1 server attached to switch directly
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=3,
+ onosNodes=3,
+ description="DHCP v4 tests with 2 clients attached to switch directly and 2 clients via DHCP relay and and 1 server attached to switch directly",
+ dhcpRelay=True )
+
+ def CASE4( self, main ):
+ """
+ DHCP v4 tests
+ Client: 2 clients attached to switch directly, 2 clients via DHCP relay
+ Server: 1 server attached to switch indirectly (via gateway)
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=4,
+ onosNodes=3,
+ description="DHCP v4 tests with 4 clients attached to switch directly and 2 clients via DHCP relay and and 1 server attached to switch indirectly (via gateway)",
+ dhcpRelay=True,
+ remoteServer=True )
+
+ def CASE5( self, main ):
+ """
+ DHCP v4 tests
+ Client: 2 clients attached to switch directly, 2 clients via DHCP relay
+ Server: 1 server attached to switch directly for directly connected hosts
+ another server attached to switch directly for indirectly connected hosts
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=5,
+ onosNodes=3,
+ description="DHCP v4 tests with 2 clients attached to switch directly, 2 clients via DHCP relay and, 1 server attached to switch directly for direcly connected hosts and another server attached to switch directly for indirectly connected hosts",
+ dhcpRelay=True,
+ multipleServer=True )
+
+ def CASE6( self, main ):
+ """
+ DHCP v4 tests
+ Client: 2 clients attached to switch directly, 2 clients via DHCP relay
+ Server: 1 server attached to switch directly for directly connected hosts
+ another server attached to switch directly for indirectly connected hosts
+ "DhcpRelayAgentIp" addresses are configured for indirect hosts
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=6,
+ onosNodes=3,
+ description="DHCP v4 tests with 2 clients attached to switch directly, 2 clients via DHCP relay and, 1 server attached to switch directly for direcly connected hosts and another server attached to switch directly for indirectly connected hosts, 'DhcpRelayAgentIp' addresses are configured for indirect hosts",
+ dhcpRelay=True,
+ multipleServer=True )
+
+ def CASE11( self, main ):
+ """
+ DHCP v6 tests
+ Client: 4 clients attached to switch directly
+ Server: 1 server attached to switch directly
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=11,
+ onosNodes=3,
+ description="DHCP v6 tests with 4 clients attached to switch directly and 1 server attached to switch directly",
+ ipv6=True )
+
+ def CASE12( self, main ):
+ """
+ DHCP v6 tests
+ Client: 4 clients attached to switch directly
+ Server: 1 server attached to switch indirectly (via gateway)
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=12,
+ onosNodes=3,
+ description="DHCP v6 tests with 4 clients attached to switch directly and 1 server attached to switch indirectly (via gateway)",
+ remoteServer=True,
+ ipv6=True )
+
+ def CASE13( self, main ):
+ """
+ DHCP v6 tests
+ Client: 2 clients attached to switch directly, 2 clients via DHCP relay
+ Server: 1 server attached to switch directly
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=13,
+ onosNodes=3,
+ description="DHCP v6 tests with 2 clients attached to switch directly and 2 clients via DHCP relay and and 1 server attached to switch directly",
+ dhcpRelay=True,
+ ipv6=True )
+
+ def CASE14( self, main ):
+ """
+ DHCP v6 tests
+ Client: 2 clients attached to switch directly, 2 clients via DHCP relay
+ Server: 1 server attached to switch indirectly (via gateway)
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=14,
+ onosNodes=3,
+ description="DHCP v6 tests with 4 clients attached to switch directly and 2 clients via DHCP relay and and 1 server attached to switch indirectly (via gateway)",
+ dhcpRelay=True,
+ remoteServer=True,
+ ipv6=True )
+
+ def CASE15( self, main ):
+ """
+ DHCP v6 tests
+ Client: 2 clients attached to switch directly, 2 clients via DHCP relay
+ Server: 1 server attached to switch directly for directly connected hosts
+ another server attached to switch directly for indirectly connected hosts
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=15,
+ onosNodes=3,
+ description="DHCP v6 tests with 2 clients attached to switch directly, 2 clients via DHCP relay and, 1 server attached to switch directly for direcly connected hosts and another server attached to switch directly for indirectly connected hosts",
+ dhcpRelay=True,
+ multipleServer=True,
+ ipv6=True )
+
+ def CASE16( self, main ):
+ """
+ DHCP v6 tests
+ Client: 2 clients attached to switch directly, 2 clients via DHCP relay
+ Server: 1 server attached to switch directly for directly connected hosts
+ another server attached to switch directly for indirectly connected hosts
+ "DhcpRelayAgentIp" addresses are configured for indirect hosts
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=16,
+ onosNodes=3,
+ description="DHCP v6 tests with 2 clients attached to switch directly, 2 clients via DHCP relay and, 1 server attached to switch directly for direcly connected hosts and another server attached to switch directly for indirectly connected hosts, 'DhcpRelayAgentIp' addresses are configured for indirect hosts",
+ dhcpRelay=True,
+ multipleServer=True,
+ ipv6=True )
+
+ def CASE21( self, main ):
+ """
+ DHCP v4 tests with tagged hosts
+ Client: 4 clients attached to switch directly
+ Server: 1 server attached to switch directly
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=21,
+ onosNodes=3,
+ description="DHCP v4 tests with tagged hosts: 4 clients attached to switch directly and 1 server attached to switch directly",
+ vlan=[ 20, 20, 30, 30 ] )
+
+ def CASE22( self, main ):
+ """
+ DHCP v4 tests with tagged hosts
+ Client: 4 clients attached to switch directly
+ Server: 1 server attached to switch indirectly (via gateway)
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=22,
+ onosNodes=3,
+ description="DHCP v4 tests with 4 clients attached to switch directly and 1 server attached to switch indirectly (via gateway)",
+ remoteServer=True,
+ vlan=[ 20, 20, 30, 30 ] )
+
+ def CASE31( self, main ):
+ """
+ DHCP v6 tests with tagged hosts
+ Client: 4 clients attached to switch directly
+ Server: 1 server attached to switch directly
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=31,
+ onosNodes=3,
+ description="DHCP v6 tests with tagged hosts: 4 clients attached to switch directly and 1 server attached to switch directly",
+ ipv6=True,
+ vlan=[ 40, 40, 50, 50 ] )
+
+ def CASE41( self, main ):
+ """
+ DHCP v4 tests with dual-homed hosts
+ Client: 4 clients attached to switch directly
+ Server: 1 server attached to switch directly
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=41,
+ onosNodes=3,
+ description="DHCP v4 tests with dual-homed hosts: 4 clients attached to switch directly and 1 server attached to switch directly",
+ dualHomed=True )
+
+ def CASE51( self, main ):
+ """
+ DHCP v6 tests with dual-homed hosts
+ Client: 4 clients attached to switch directly
+ Server: 1 server attached to switch directly
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=51,
+ onosNodes=3,
+ description="DHCP v6 tests with dual-homed hosts: 4 clients attached to switch directly and 1 server attached to switch directly",
+ ipv6=True,
+ dualHomed=True )
+
+ def CASE61( self, main ):
+ """
+ DHCP v4 tests with dual-homed tagged hosts
+ Client: 4 clients attached to switch directly
+ Server: 1 server attached to switch directly
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=61,
+ onosNodes=3,
+ description="DHCP v4 tests with dual-homed tagged hosts: 4 clients attached to switch directly and 1 server attached to switch directly",
+ vlan=[ 20, 20, 30, 30 ],
+ dualHomed=True )
+
+ def CASE71( self, main ):
+ """
+ DHCP v6 tests with dual-homed tagged hosts
+ Client: 4 clients attached to switch directly
+ Server: 1 server attached to switch directly
+ Sets up 3 ONOS instance
+ """
+ from tests.USECASE.SegmentRouting.SRDhcprelay.dependencies.SRDhcprelayTest import SRDhcprelayTest
+ SRDhcprelayTest.runTest( main,
+ testIndex=71,
+ onosNodes=3,
+ description="DHCP v6 tests with dual-homed tagged hosts: 4 clients attached to switch directly and 1 server attached to switch directly",
+ ipv6=True,
+ vlan=[ 40, 40, 50, 50 ],
+ dualHomed=True )
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/SRDhcprelay.topo b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/SRDhcprelay.topo
new file mode 100644
index 0000000..01316b6
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/SRDhcprelay.topo
@@ -0,0 +1,36 @@
+<TOPOLOGY>
+ <COMPONENT>
+ <ONOScell>
+ <host>localhost</host> # ONOS "bench" machine
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>OnosClusterDriver</type>
+ <connect_order>1</connect_order>
+ <COMPONENTS>
+ <cluster_name></cluster_name> # Used as a prefix for cluster components. Defaults to 'ONOS'
+ <diff_clihost></diff_clihost> # if it has different host other than localhost for CLI. True or empty. OC# will be used if True.
+ <karaf_username></karaf_username>
+ <karaf_password></karaf_password>
+ <web_user></web_user>
+ <web_pass></web_pass>
+ <rest_port></rest_port>
+ <prompt></prompt> # TODO: we technically need a few of these, one per component
+ <onos_home></onos_home> # defines where onos home is
+ <nodes>3</nodes> # number of nodes in the cluster
+ </COMPONENTS>
+ </ONOScell>
+
+ <Mininet1>
+ <host>OCN</host>
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>MininetCliDriver</type>
+ <connect_order>2</connect_order>
+ <COMPONENTS>
+ <home>~/mininet/custom/</home>
+ <prompt></prompt>
+ </COMPONENTS>
+ </Mininet1>
+
+ </COMPONENT>
+</TOPOLOGY>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/__init__.py b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/__init__.py
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/SRDhcprelayTest.py b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/SRDhcprelayTest.py
new file mode 100644
index 0000000..1ac4f7a
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/SRDhcprelayTest.py
@@ -0,0 +1,81 @@
+"""
+Copyright 2017 Open Networking Foundation ( ONF )
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
+
+ TestON is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ ( at your option ) any later version.
+
+ TestON is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with TestON. If not, see <http://www.gnu.org/licenses/>.
+"""
+
+from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as run
+
+class SRDhcprelayTest ():
+
+ def __init__( self ):
+ self.default = ''
+
+ @staticmethod
+ def runTest( main, testIndex, onosNodes, description, dhcpRelay=False, remoteServer=False, multipleServer=False, ipv6=False, vlan=[], dualHomed=False ):
+ skipPackage = False
+ init = False
+ if not hasattr( main, 'apps' ):
+ init = True
+ run.initTest( main )
+ # Skip onos packaging if the clusrer size stays the same
+ if not init and onosNodes == main.Cluster.numCtrls:
+ skipPackage = True
+
+ main.case( '%s, with %d ONOS instance%s' %
+ ( description, onosNodes, 's' if onosNodes > 1 else '' ) )
+
+ main.cfgName = 'CASE%02d' % testIndex
+ main.configPath = main.path + "/dependencies/"
+ main.resultFileName = 'CASE%02d' % testIndex
+ main.Cluster.setRunningNode( onosNodes )
+ run.installOnos( main, skipPackage=skipPackage, cliSleep=5 )
+ import json
+ with open( "%s/json/%s.host" % ( main.configPath, main.cfgName ) ) as host:
+ main.expectedHosts = json.load( host )
+ if hasattr( main, 'Mininet1' ):
+ # Run the test with Mininet
+ if dualHomed:
+ mininet_args = ' --spine=2 --leaf=4 --dual-homed'
+ else:
+ mininet_args = ' --spine=2 --leaf=2'
+ mininet_args += ' --dhcp-client'
+ if dhcpRelay:
+ mininet_args += ' --dhcp-relay'
+ if multipleServer:
+ mininet_args += ' --multiple-dhcp-server'
+ if remoteServer:
+ mininet_args += ' --remote-dhcp-server'
+ if ipv6:
+ mininet_args += ' --ipv6'
+ if len( vlan ) > 0 :
+ mininet_args += ' --vlan=%s' % ( ','.join( ['%d' % vlanId for vlanId in vlan ] ) )
+
+ run.startMininet( main, 'trellis_fabric.py', args=mininet_args )
+ else:
+ # Run the test with physical devices
+ # TODO: connect TestON to the physical network
+ pass
+ run.verifyOnosHostIp( main )
+ run.verifyNetworkHostIp( main )
+
+ if hasattr( main, 'Mininet1' ):
+ run.cleanup( main )
+ else:
+ # TODO: disconnect TestON from the physical network
+ pass
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/__init__.py b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/__init__.py
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/conf/bgpdbgp1.conf b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/conf/bgpdbgp1.conf
new file mode 100644
index 0000000..8870fb4
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/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/SRDhcprelay/dependencies/conf/bgpdbgp2.conf b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/conf/bgpdbgp2.conf
new file mode 100644
index 0000000..e554de4
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/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/SRDhcprelay/dependencies/conf/bgpdr1.conf b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/conf/bgpdr1.conf
new file mode 100644
index 0000000..9e526b8
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/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/SRDhcprelay/dependencies/conf/bgpdr2.conf b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/conf/bgpdr2.conf
new file mode 100644
index 0000000..49553e2
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/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/SRDhcprelay/dependencies/conf/dhcpd.conf b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/conf/dhcpd.conf
new file mode 100644
index 0000000..aa559d2
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/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/SRDhcprelay/dependencies/conf/dhcpd6.conf b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/conf/dhcpd6.conf
new file mode 100644
index 0000000..526de85
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/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/SRDhcprelay/dependencies/conf/zebradbgp1.conf b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/conf/zebradbgp1.conf
new file mode 100644
index 0000000..51991a4
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/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/SRDhcprelay/dependencies/conf/zebradbgp2.conf b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/conf/zebradbgp2.conf
new file mode 100644
index 0000000..dce218d
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/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/SRDhcprelay/dependencies/json/CASE01.host b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE01.host
new file mode 100644
index 0000000..9428e54
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE01.host
@@ -0,0 +1,16 @@
+{
+ "onos":
+ {
+ "00:AA:00:00:00:01/None": "10.0.2.1",
+ "00:AA:00:00:00:02/None": "10.0.2.2",
+ "00:AA:00:00:00:03/None": "10.0.3.1",
+ "00:AA:00:00:00:04/None": "10.0.3.2"
+ },
+ "network":
+ {
+ "h1": "10.0.2.1",
+ "h2": "10.0.2.2",
+ "h3": "10.0.3.1",
+ "h4": "10.0.3.2"
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE01.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE01.json
new file mode 100644
index 0000000..87b7b46
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE01.json
@@ -0,0 +1,112 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/5",
+ "serverIps": ["10.0.3.253"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE02.host b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE02.host
new file mode 100644
index 0000000..9428e54
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE02.host
@@ -0,0 +1,16 @@
+{
+ "onos":
+ {
+ "00:AA:00:00:00:01/None": "10.0.2.1",
+ "00:AA:00:00:00:02/None": "10.0.2.2",
+ "00:AA:00:00:00:03/None": "10.0.3.1",
+ "00:AA:00:00:00:04/None": "10.0.3.2"
+ },
+ "network":
+ {
+ "h1": "10.0.2.1",
+ "h2": "10.0.2.2",
+ "h3": "10.0.3.1",
+ "h4": "10.0.3.2"
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE02.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE02.json
new file mode 100644
index 0000000..c9b635a
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE02.json
@@ -0,0 +1,121 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/7",
+ "serverIps": ["10.0.99.3"],
+ "gatewayIps": ["10.0.1.1"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE03.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE03.json
new file mode 100644
index 0000000..87b7b46
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE03.json
@@ -0,0 +1,112 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/5",
+ "serverIps": ["10.0.3.253"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE04.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE04.json
new file mode 100644
index 0000000..c9b635a
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE04.json
@@ -0,0 +1,121 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/7",
+ "serverIps": ["10.0.99.3"],
+ "gatewayIps": ["10.0.1.1"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE05.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE05.json
new file mode 100644
index 0000000..7ba4f8b
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE05.json
@@ -0,0 +1,118 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/5",
+ "serverIps": ["10.0.3.253"]
+ }
+ ],
+ "indirect": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/5",
+ "serverIps": ["10.0.3.252"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE06.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE06.json
new file mode 100644
index 0000000..f9a70e0
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE06.json
@@ -0,0 +1,134 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/5",
+ "serverIps": ["10.0.3.253"],
+ "relayAgentIps": {
+ "of:0000000000000001": {
+ "ipv4": "10.0.2.254"
+ },
+ "of:0000000000000002": {
+ "ipv4": "10.0.3.254"
+ }
+ }
+ }
+ ],
+ "indirect": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/5",
+ "serverIps": ["10.0.3.252"],
+ "relayAgentIps": {
+ "of:0000000000000001": {
+ "ipv4": "10.0.2.254"
+ },
+ "of:0000000000000002": {
+ "ipv4": "10.0.3.254"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE11.host b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE11.host
new file mode 100644
index 0000000..7241b17
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE11.host
@@ -0,0 +1,16 @@
+{
+ "onos":
+ {
+ "00:BB:00:00:00:01/None": "2000::201",
+ "00:BB:00:00:00:02/None": "2000::202",
+ "00:BB:00:00:00:03/None": "2000::301",
+ "00:BB:00:00:00:04/None": "2000::302"
+ },
+ "network":
+ {
+ "h1v6": "2000::201",
+ "h2v6": "2000::202",
+ "h3v6": "2000::301",
+ "h4v6": "2000::302"
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE11.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE11.json
new file mode 100644
index 0000000..baf3268
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE11.json
@@ -0,0 +1,112 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000002/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24", "2000::3ff/120" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "2000::1ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/5",
+ "serverIps": ["10.0.3.253", "2000::3fd"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE12.host b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE12.host
new file mode 100644
index 0000000..d99eef6
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE12.host
@@ -0,0 +1,16 @@
+{
+ "onos":
+ {
+ "00:AA:00:00:00:01/None": "2000::201",
+ "00:AA:00:00:00:02/None": "2000::202",
+ "00:AA:00:00:00:03/None": "2000::301",
+ "00:AA:00:00:00:04/None": "2000::302"
+ },
+ "network":
+ {
+ "h1v6": "2000::201",
+ "h2v6": "2000::202",
+ "h3v6": "2000::301",
+ "h4v6": "2000::302"
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE12.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE12.json
new file mode 100644
index 0000000..028848c
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE12.json
@@ -0,0 +1,121 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000002/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24", "2000::3ff/120" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "2000::1ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "2000::1ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/7",
+ "serverIps": ["10.0.99.3", "2000::99fd"],
+ "gatewayIps": ["10.0.1.1", "2000::101/120"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE13.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE13.json
new file mode 100644
index 0000000..baf3268
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE13.json
@@ -0,0 +1,112 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000002/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24", "2000::3ff/120" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "2000::1ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/5",
+ "serverIps": ["10.0.3.253", "2000::3fd"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE14.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE14.json
new file mode 100644
index 0000000..028848c
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE14.json
@@ -0,0 +1,121 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000002/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24", "2000::3ff/120" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "2000::1ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "2000::1ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/7",
+ "serverIps": ["10.0.99.3", "2000::99fd"],
+ "gatewayIps": ["10.0.1.1", "2000::101/120"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE15.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE15.json
new file mode 100644
index 0000000..caeda8b
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE15.json
@@ -0,0 +1,118 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000002/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24", "2000::3ff/120" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "2000::1ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/5",
+ "serverIps": ["10.0.3.253", "2000::3fd"]
+ }
+ ],
+ "indirect": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/5",
+ "serverIps": ["10.0.3.252", "2000::3fc"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE16.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE16.json
new file mode 100644
index 0000000..5c3f13a
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE16.json
@@ -0,0 +1,138 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000002/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24", "2000::3ff/120" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "2000::1ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/5",
+ "serverIps": ["10.0.3.253", "2000::3fd"],
+ "relayAgentIps": {
+ "of:0000000000000001": {
+ "ipv4": "10.0.2.254",
+ "ipv6": "2000::2ff/120"
+ },
+ "of:0000000000000002": {
+ "ipv4": "10.0.3.254",
+ "ipv6": "2000::3ff/120"
+ }
+ }
+ }
+ ],
+ "indirect": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/5",
+ "serverIps": ["10.0.3.252", "2000::3fc"],
+ "relayAgentIps": {
+ "of:0000000000000001": {
+ "ipv4": "10.0.2.254",
+ "ipv6": "2000::2ff/120"
+ },
+ "of:0000000000000002": {
+ "ipv4": "10.0.3.254",
+ "ipv6": "2000::3ff/120"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE21.host b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE21.host
new file mode 100644
index 0000000..5927f93
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE21.host
@@ -0,0 +1,16 @@
+{
+ "onos":
+ {
+ "00:AA:00:00:00:01/20": "10.0.2.1",
+ "00:AA:00:00:00:02/20": "10.0.2.2",
+ "00:AA:00:00:00:03/30": "10.0.3.1",
+ "00:AA:00:00:00:04/30": "10.0.3.2"
+ },
+ "network":
+ {
+ "h1": "10.0.2.1",
+ "h2": "10.0.2.2",
+ "h3": "10.0.3.1",
+ "h4": "10.0.3.2"
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE21.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE21.json
new file mode 100644
index 0000000..85d0091
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE21.json
@@ -0,0 +1,112 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-tagged": [20]
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-tagged": [20]
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000002/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/5",
+ "serverIps": ["10.0.3.253"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE22.host b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE22.host
new file mode 100644
index 0000000..5927f93
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE22.host
@@ -0,0 +1,16 @@
+{
+ "onos":
+ {
+ "00:AA:00:00:00:01/20": "10.0.2.1",
+ "00:AA:00:00:00:02/20": "10.0.2.2",
+ "00:AA:00:00:00:03/30": "10.0.3.1",
+ "00:AA:00:00:00:04/30": "10.0.3.2"
+ },
+ "network":
+ {
+ "h1": "10.0.2.1",
+ "h2": "10.0.2.2",
+ "h3": "10.0.3.1",
+ "h4": "10.0.3.2"
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE22.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE22.json
new file mode 100644
index 0000000..a39ad31
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE22.json
@@ -0,0 +1,121 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-tagged": [20]
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-tagged": [20]
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000002/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ },
+ "of:0000000000000002/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24" ],
+ "vlan-untagged": 10
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/7",
+ "serverIps": ["10.0.99.3"],
+ "gatewayIps": ["10.0.1.1"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE31.host b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE31.host
new file mode 100644
index 0000000..411e2f4
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE31.host
@@ -0,0 +1,16 @@
+{
+ "onos":
+ {
+ "00:BB:00:00:00:01/40": "2000::201",
+ "00:BB:00:00:00:02/40": "2000::202",
+ "00:BB:00:00:00:03/50": "2000::301",
+ "00:BB:00:00:00:04/50": "2000::302"
+ },
+ "network":
+ {
+ "h1v6": "2000::201",
+ "h2v6": "2000::202",
+ "h3v6": "2000::301",
+ "h4v6": "2000::302"
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE31.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE31.json
new file mode 100644
index 0000000..7e0a83b
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE31.json
@@ -0,0 +1,112 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-tagged": [50]
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-tagged": [50]
+ }
+ ]
+ },
+ "of:0000000000000002/5" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24", "2000::3ff/120" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "2000::1ff/120" ],
+ "vlan-untagged": 10
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000002/5",
+ "serverIps": ["10.0.3.253", "2000::3fd"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE41.host b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE41.host
new file mode 100644
index 0000000..9428e54
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE41.host
@@ -0,0 +1,16 @@
+{
+ "onos":
+ {
+ "00:AA:00:00:00:01/None": "10.0.2.1",
+ "00:AA:00:00:00:02/None": "10.0.2.2",
+ "00:AA:00:00:00:03/None": "10.0.3.1",
+ "00:AA:00:00:00:04/None": "10.0.3.2"
+ },
+ "network":
+ {
+ "h1": "10.0.2.1",
+ "h2": "10.0.2.2",
+ "h3": "10.0.3.1",
+ "h4": "10.0.3.2"
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE41.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE41.json
new file mode 100644
index 0000000..f950f0c
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE41.json
@@ -0,0 +1,168 @@
+{
+ "ports" : {
+ "of:0000000000000001/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000001/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000002/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-untagged": 20
+ }
+ ]
+ },
+ "of:0000000000000003/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000003/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000003/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000004/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000004/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000002",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000001",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000003" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.3",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000004",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000004" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.4",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000003",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000003/8",
+ "serverIps": ["10.0.3.253"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE51.host b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE51.host
new file mode 100644
index 0000000..7241b17
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE51.host
@@ -0,0 +1,16 @@
+{
+ "onos":
+ {
+ "00:BB:00:00:00:01/None": "2000::201",
+ "00:BB:00:00:00:02/None": "2000::202",
+ "00:BB:00:00:00:03/None": "2000::301",
+ "00:BB:00:00:00:04/None": "2000::302"
+ },
+ "network":
+ {
+ "h1v6": "2000::201",
+ "h2v6": "2000::202",
+ "h3v6": "2000::301",
+ "h4v6": "2000::302"
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE51.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE51.json
new file mode 100644
index 0000000..0922c53
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE51.json
@@ -0,0 +1,168 @@
+{
+ "ports" : {
+ "of:0000000000000001/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000001/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000002/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-untagged": 40
+ }
+ ]
+ },
+ "of:0000000000000003/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000003/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000003/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24", "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000004/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000004/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000002",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000001",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000003" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.3",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000004",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000004" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.4",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000003",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000003/8",
+ "serverIps": ["10.0.3.253", "2000::3fd"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE61.host b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE61.host
new file mode 100644
index 0000000..5927f93
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE61.host
@@ -0,0 +1,16 @@
+{
+ "onos":
+ {
+ "00:AA:00:00:00:01/20": "10.0.2.1",
+ "00:AA:00:00:00:02/20": "10.0.2.2",
+ "00:AA:00:00:00:03/30": "10.0.3.1",
+ "00:AA:00:00:00:04/30": "10.0.3.2"
+ },
+ "network":
+ {
+ "h1": "10.0.2.1",
+ "h2": "10.0.2.2",
+ "h3": "10.0.3.1",
+ "h4": "10.0.3.2"
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE61.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE61.json
new file mode 100644
index 0000000..83cb578
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE61.json
@@ -0,0 +1,168 @@
+{
+ "ports" : {
+ "of:0000000000000001/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-tagged": [20]
+ }
+ ]
+ },
+ "of:0000000000000001/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-tagged": [20]
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-tagged": [20]
+ }
+ ]
+ },
+ "of:0000000000000002/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan-tagged": [20]
+ }
+ ]
+ },
+ "of:0000000000000003/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000003/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000003/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-untagged": 30
+ }
+ ]
+ },
+ "of:0000000000000004/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ },
+ "of:0000000000000004/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24" ],
+ "vlan-tagged": [30]
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000002",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000001",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000003" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.3",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000004",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000004" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.4",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000003",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000003/8",
+ "serverIps": ["10.0.3.253"]
+ }
+ ]
+ }
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE71.host b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE71.host
new file mode 100644
index 0000000..411e2f4
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE71.host
@@ -0,0 +1,16 @@
+{
+ "onos":
+ {
+ "00:BB:00:00:00:01/40": "2000::201",
+ "00:BB:00:00:00:02/40": "2000::202",
+ "00:BB:00:00:00:03/50": "2000::301",
+ "00:BB:00:00:00:04/50": "2000::302"
+ },
+ "network":
+ {
+ "h1v6": "2000::201",
+ "h2v6": "2000::202",
+ "h3v6": "2000::301",
+ "h4v6": "2000::302"
+ }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE71.json b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE71.json
new file mode 100644
index 0000000..9737d12
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDhcprelay/dependencies/json/CASE71.json
@@ -0,0 +1,168 @@
+{
+ "ports" : {
+ "of:0000000000000001/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000001/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000002/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000002/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::2ff/120" ],
+ "vlan-tagged": [40]
+ }
+ ]
+ },
+ "of:0000000000000003/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-tagged": [50]
+ }
+ ]
+ },
+ "of:0000000000000003/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-tagged": [50]
+ }
+ ]
+ },
+ "of:0000000000000003/8" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.3.254/24", "2000::3ff/120" ],
+ "vlan-untagged": 50
+ }
+ ]
+ },
+ "of:0000000000000004/6" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-tagged": [50]
+ }
+ ]
+ },
+ "of:0000000000000004/7" : {
+ "interfaces" : [
+ {
+ "ips" : [ "2000::3ff/120" ],
+ "vlan-tagged": [50]
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.1",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000002",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 1,
+ "ipv4Loopback" : "192.168.0.2",
+ "routerMac" : "00:00:00:00:00:01",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000001",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000003" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.3",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000004",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000004" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 2,
+ "ipv4Loopback" : "192.168.0.4",
+ "routerMac" : "00:00:00:00:00:02",
+ "isEdgeRouter" : true,
+ "pairDeviceId" : "of:0000000000000003",
+ "pairLocalPort" : 5,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000101" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 101,
+ "ipv4Loopback" : "192.168.0.101",
+ "routerMac" : "00:00:00:00:01:01",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ },
+ "of:0000000000000102" : {
+ "segmentrouting" : {
+ "ipv4NodeSid" : 102,
+ "ipv4Loopback" : "192.168.0.102",
+ "routerMac" : "00:00:00:00:01:02",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ },
+ "basic" : {
+ "driver" : "ofdpa-ovs"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.dhcprelay" : {
+ "default": [
+ {
+ "dhcpServerConnectPoint": "of:0000000000000003/8",
+ "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 b032efc..dd33993 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -108,10 +108,15 @@
onpass="ONOS summary command succeded",
onfail="ONOS summary command failed" )
- with open( "%s/json/%s.json" % (main.configPath, main.cfgName)) as cfg:
- main.Cluster.active( 0 ).REST.setNetCfg(json.load(cfg))
- with open("%s/json/%s.chart" % (main.configPath, main.cfgName)) as chart:
- main.pingChart = json.load(chart)
+ with open( "%s/json/%s.json" % (
+ main.configPath, main.cfgName ) ) as cfg:
+ main.Cluster.active( 0 ).REST.setNetCfg( json.load( cfg ) )
+ try:
+ with open( "%s/json/%s.chart" % (
+ main.configPath, main.cfgName ) ) as chart:
+ main.pingChart = json.load( chart )
+ except IOError:
+ main.log.warn( "No chart file found." )
if not ready:
main.log.error( "ONOS startup failed!" )
main.cleanAndExit()
@@ -648,3 +653,39 @@
main.Cluster.active( 0 ).REST.removeNetCfg( subjectClass="apps",
subjectKey="org.onosproject.segmentrouting",
configKey="xconnect" )
+
+ @staticmethod
+ def verifyNetworkHostIp( main, attempts=10, sleep=10 ):
+ """
+ Verifies IP address assignment from the hosts
+ """
+ main.step( "Verify IP address assignment from hosts" )
+ ipResult = main.TRUE
+ for hostName, ip in main.expectedHosts[ "network" ].items():
+ ipResult = ipResult and utilities.retry( main.Network.verifyHostIp,
+ main.FALSE,
+ kwargs={ 'hostList': [ hostName ],
+ 'prefix': ip },
+ attempts=attempts,
+ sleep=sleep )
+ utilities.assert_equals( expect=main.TRUE, actual=ipResult,
+ onpass="Verify network host IP succeded",
+ onfail="Verify network host IP failed" )
+
+ @staticmethod
+ def verifyOnosHostIp( main, attempts=10, sleep=10 ):
+ """
+ Verifies host IP address assignment from ONOS
+ """
+ main.step( "Verify host IP address assignment in ONOS" )
+ ipResult = main.TRUE
+ for hostName, ip in main.expectedHosts[ "onos" ].items():
+ ipResult = ipResult and utilities.retry( main.Cluster.active( 0 ).verifyHostIp,
+ main.FALSE,
+ kwargs={ 'hostList': [ hostName ],
+ 'prefix': ip },
+ attempts=attempts,
+ sleep=sleep )
+ utilities.assert_equals( expect=main.TRUE, actual=ipResult,
+ onpass="Verify ONOS host IP succeded",
+ onfail="Verify ONOS host IP failed" )
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/trellis_fabric.py b/TestON/tests/USECASE/SegmentRouting/dependencies/trellis_fabric.py
index b0b26a1..d1058ab 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/trellis_fabric.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/trellis_fabric.py
@@ -4,7 +4,7 @@
from optparse import OptionParser
from ipaddress import ip_network
-from mininet.node import RemoteController, OVSBridge, Host
+from mininet.node import RemoteController, OVSBridge, Host, OVSSwitch
from mininet.link import TCLink
from mininet.log import setLogLevel
from mininet.net import Mininet
@@ -13,7 +13,8 @@
from mininet.cli import CLI
from routinglib import BgpRouter
-from trellislib import TrellisHost
+from trellislib import TrellisHost, DhcpRelay
+from functools import partial
# Parse command line options and dump results
def parseOptions():
@@ -34,6 +35,14 @@
parser.add_option( '--vlan', dest='vlan', type='str', default='',
help='list of vlan id for hosts, separated by comma(,).'
'Empty or id with 0 will be unconfigured.' )
+ parser.add_option( '--dhcp-client', action="store_true", dest='dhcpClient', default=False,
+ help='Set hosts as DhcpClient if True' )
+ parser.add_option( '--dhcp-relay', action="store_true", dest='dhcpRelay', default=False,
+ help='Connect half of the hosts to switch indirectly (via DHCP relay) if True' )
+ parser.add_option( '--multiple-dhcp-server', action="store_true", dest='multipleServer', default=False,
+ help='Use another DHCP server for indirectly connected DHCP clients if True' )
+ parser.add_option( '--remote-dhcp-server', action="store_true", dest='remoteServer', default=False,
+ help='Connect DHCP server indirectly (via gateway) if True' )
( options, args ) = parser.parse_args()
return options, args
@@ -88,7 +97,10 @@
# TODO: Implement IPv6 support
class DualHomedLeafSpineFabric (Topo) :
- def __init__(self, spine = 2, leaf = 4, fanout = 2, vlan_id = [], **opts):
+ def __init__(self, spine = 2, leaf = 2, fanout = 2, vlan_id = [], ipv6 = False,
+ dhcp_client = False, dhcp_relay = False,
+ multiple_server = False, remote_server = False, **opts):
+ # TODO: add support to dhcp_relay, multiple_server and remote_server
Topo.__init__(self, **opts)
spines = dict()
leafs = dict()
@@ -121,39 +133,27 @@
dual_ls = ls / 2
# Add hosts
for f in range(fanout):
- if vlan_id[ dual_ls * fanout + f] != 0:
- host = self.addHost(
- name='h%s' % ( dual_ls * fanout + f + 1),
- cls=TrellisHost,
- ips=['10.0.%d.%d/%d' % ( dual_ls + 2, f + 1, IP4_SUBNET_CLASS)],
- gateway='10.0.%d.254' % ( dual_ls + 2),
- mac='00:aa:00:00:00:%02x' % (dual_ls * fanout + f + 1),
- vlan=vlan_id[ dual_ls*fanout + f ],
- dualHomed=True
- )
+ name = 'h%s%s' % (dual_ls * fanout + f + 1, "v6" if ipv6 else "")
+ if ipv6:
+ ips = ['2000::%d0%d/%d' % (dual_ls+2, f+1, IP6_SUBNET_CLASS)]
+ gateway = '2000::%dff' % (dual_ls+2)
+ mac = '00:bb:00:00:00:%02x' % (dual_ls * fanout + f + 1)
else:
- host = self.addHost(
- name='h%s' % (dual_ls * fanout + f + 1),
- cls=TrellisHost,
- ips=['10.0.%d.%d/%d' % (dual_ls+2, f+1, IP4_SUBNET_CLASS)],
- gateway='10.0.%d.254' % (dual_ls+2),
- mac='00:aa:00:00:00:%02x' % (dual_ls * fanout + f + 1),
- dualHomed=True
- )
+ ips = ['10.0.%d.%d/%d' % (dual_ls+2, f+1, IP4_SUBNET_CLASS)]
+ gateway = '10.0.%d.254' % (dual_ls+2)
+ mac = '00:aa:00:00:00:%02x' % (dual_ls * fanout + f + 1)
+ host = self.addHost( name=name, cls=TrellisHost, ips=ips, gateway=gateway, mac=mac,
+ vlan=vlan_id[ dual_ls*fanout + f ] if vlan_id[dual_ls * fanout + f] != 0 else None,
+ dhcpClient=dhcp_client, ipv6=ipv6, dualHomed=True )
self.addLink(host, leafs[ls], **linkopts)
self.addLink(host, leafs[ls-1], **linkopts)
last_ls = leafs[leaf-2]
last_paired_ls = leafs[leaf-1]
# Create common components
- # DHCP server
- dhcp = self.addHost('dhcp', cls=TrellisHost, mac='00:99:00:00:00:01', ips=['10.0.3.253/24'],
- gateway='10.0.3.254', dhcpServer=True)
-
# Control plane switch (for DHCP servers)
cs1 = self.addSwitch('cs1', cls=OVSBridge)
self.addLink(cs1, last_ls)
- self.addLink(dhcp, cs1)
# Control plane switch (for quagga fpm)
cs0 = self.addSwitch('cs0', cls=OVSBridge)
@@ -169,8 +169,8 @@
'bgp1-eth1': {'ipAddrs': ['172.16.0.2/12']}}
bgp1 = self.addHost('bgp1', cls=BgpRouter,
interfaces=intfs,
- quaggaConfFile='conf/bgpdbgp1.conf',
- zebraConfFile='conf/zebradbgp1.conf')
+ quaggaConfFile='./bgpdbgp1.conf',
+ zebraConfFile='./zebradbgp1.conf')
self.addLink(bgp1, last_ls)
self.addLink(bgp1, cs0)
@@ -180,8 +180,8 @@
'bgp2-eth1': {'ipAddrs': ['172.16.0.4/12']}}
bgp2 = self.addHost('bgp2', cls=BgpRouter,
interfaces=intfs,
- quaggaConfFile='conf/bgpdbgp2.conf',
- zebraConfFile='conf/zebradbgp2.conf')
+ quaggaConfFile='./bgpdbgp2.conf',
+ zebraConfFile='./zebradbgp2.conf')
self.addLink(bgp2, last_paired_ls)
self.addLink(bgp2, cs0)
@@ -191,7 +191,7 @@
'r1-eth2': {'ipAddrs': ['10.0.99.1/16']}}
r1 = self.addHost('r1', cls=BgpRouter,
interfaces=intfs,
- quaggaConfFile='conf/bgpdr1.conf')
+ quaggaConfFile='./bgpdr1.conf')
self.addLink(r1, last_ls)
self.addLink(r1, last_paired_ls)
@@ -205,7 +205,7 @@
'r2-eth2': {'ipAddrs': ['10.0.99.1/16']}}
r2 = self.addHost('r2', cls=BgpRouter,
interfaces=intfs,
- quaggaConfFile='conf/bgpdr2.conf')
+ quaggaConfFile='./bgpdr2.conf')
self.addLink(r2, last_ls)
self.addLink(r2, last_paired_ls)
@@ -213,8 +213,23 @@
rh2 = self.addHost('rh2', cls=TrellisHost, ips=['10.0.99.2/24'], gateway='10.0.99.1')
self.addLink(r2, rh2)
+ # DHCP server
+ if ipv6:
+ dhcp = self.addHost('dhcp', cls=TrellisHost, mac='00:99:00:00:00:01',
+ ips=['2000::3fd/120'], gateway='2000::3ff',
+ dhcpServer=True, ipv6=True)
+ self.addLink(dhcp, cs1)
+ else:
+ dhcp = self.addHost('dhcp', cls=TrellisHost, mac='00:99:00:00:00:01',
+ ips=['10.0.3.253/24'], gateway='10.0.3.254',
+ dhcpServer=True)
+ self.addLink(dhcp, cs1)
+
+
class LeafSpineFabric (Topo) :
- def __init__(self, spine = 2, leaf = 2, fanout = 2, vlan_id = [], **opts):
+ def __init__(self, spine = 2, leaf = 2, fanout = 2, vlan_id = [], ipv6 = False,
+ dhcp_client = False, dhcp_relay = False,
+ multiple_server = False, remote_server = False, **opts):
Topo.__init__(self, **opts)
spines = dict()
leafs = dict()
@@ -240,35 +255,56 @@
# Add hosts
for f in range(fanout):
- if vlan_id[ls * fanout + f] != 0:
- host = self.addHost(
- name='h%s' % (ls * fanout + f + 1),
- cls=TrellisHost,
- ips=['10.0.%d.%d/%d' % (ls+2, f+1, IP4_SUBNET_CLASS)],
- gateway='10.0.%d.254' % (ls+2),
- mac='00:aa:00:00:00:%02x' % (ls * fanout + f + 1),
- vlan=vlan_id[ ls*fanout + f ]
- )
+ name = 'h%s%s' % (ls * fanout + f + 1, "v6" if ipv6 else "")
+ if ipv6:
+ ips = ['2000::%d0%d/%d' % (ls+2, f+1, IP6_SUBNET_CLASS)]
+ gateway = '2000::%dff' % (ls+2)
+ mac = '00:bb:00:00:00:%02x' % (ls * fanout + f + 1)
else:
- host = self.addHost(
- name='h%s' % (ls * fanout + f + 1),
- cls=TrellisHost,
- ips=['10.0.%d.%d/%d' % (ls+2, f+1, IP4_SUBNET_CLASS)],
- gateway='10.0.%d.254' % (ls+2),
- mac='00:aa:00:00:00:%02x' % (ls * fanout + f + 1)
- )
- self.addLink(host, leafs[ls], **linkopts)
+ ips = ['10.0.%d.%d/%d' % (ls+2, f+1, IP4_SUBNET_CLASS)]
+ gateway = '10.0.%d.254' % (ls+2)
+ mac = '00:aa:00:00:00:%02x' % (ls * fanout + f + 1)
+ host = self.addHost( name=name, cls=TrellisHost, ips=ips, gateway=gateway, mac=mac,
+ vlan=vlan_id[ ls*fanout + f ] if vlan_id[ls * fanout + f] != 0 else None,
+ dhcpClient=dhcp_client, ipv6=ipv6 )
+ if dhcp_relay and f % 2:
+ relayIndex = ls * fanout + f + 1
+ if ipv6:
+ intfs = {
+ 'relay%s-eth0' % relayIndex: { 'ipAddrs': ['2000::%dff/%d' % (leaf + ls + 2, IP6_SUBNET_CLASS)] },
+ 'relay%s-eth1' % relayIndex: { 'ipAddrs': ['2000::%d5%d/%d' % (ls + 2, f, IP6_SUBNET_CLASS)] }
+ }
+ if remote_server:
+ serverIp = '2000::99fd'
+ elif multiple_server:
+ serverIp = '2000::3fc'
+ else:
+ serverIp = '2000::3fd'
+ dhcpRelay = self.addHost(name='relay%s' % relayIndex, cls=DhcpRelay, serverIp=serverIp,
+ gateway='2000::%dff' % (ls+2), interfaces=intfs)
+ else:
+ intfs = {
+ 'relay%s-eth0' % relayIndex: { 'ipAddrs': ['10.0.%d.254/%d' % (leaf + ls + 2, IP4_SUBNET_CLASS)] },
+ 'relay%s-eth1' % relayIndex: { 'ipAddrs': ['10.0.%d.%d/%d' % (ls + 2, f + 99, IP4_SUBNET_CLASS)] }
+ }
+ if remote_server:
+ serverIp = '10.0.99.3'
+ elif multiple_server:
+ serverIp = '10.0.3.252'
+ else:
+ serverIp = '10.0.3.253'
+ dhcpRelay = self.addHost(name='relay%s' % relayIndex, cls=DhcpRelay, serverIp=serverIp,
+ gateway='10.0.%d.254' % (ls+2), interfaces=intfs)
+ self.addLink(host, dhcpRelay, **linkopts)
+ self.addLink(dhcpRelay, leafs[ls], **linkopts)
+ else:
+ self.addLink(host, leafs[ls], **linkopts)
last_ls = leafs[leaf-1]
# Create common components
- # DHCP server
- dhcp = self.addHost('dhcp', cls=TrellisHost, mac='00:99:00:00:00:01', ips=['10.0.3.253/24'],
- gateway='10.0.3.254', dhcpServer=True)
-
# Control plane switch (for DHCP servers)
cs1 = self.addSwitch('cs1', cls=OVSBridge)
self.addLink(cs1, last_ls)
- self.addLink(dhcp, cs1)
# Control plane switch (for quagga fpm)
cs0 = self.addSwitch('cs0', cls=OVSBridge)
@@ -284,8 +320,8 @@
'bgp1-eth1': {'ipAddrs': ['172.16.0.2/12']}}
bgp1 = self.addHost('bgp1', cls=BgpRouter,
interfaces=intfs,
- quaggaConfFile='conf/bgpdbgp1.conf',
- zebraConfFile='conf/zebradbgp1.conf')
+ quaggaConfFile='./bgpdbgp1.conf',
+ zebraConfFile='./zebradbgp1.conf')
self.addLink(bgp1, last_ls)
self.addLink(bgp1, cs0)
@@ -295,18 +331,59 @@
'r1-eth2': {'ipAddrs': ['2000::9901/120']}}
r1 = self.addHost('r1', cls=BgpRouter,
interfaces=intfs,
- quaggaConfFile='conf/bgpdr1.conf')
+ quaggaConfFile='./bgpdr1.conf')
self.addLink(r1, last_ls)
+ # External switch behind r1
+ rs0 = self.addSwitch('rs0', cls=OVSBridge)
+ self.addLink(r1, rs0)
+
# External IPv4 Host behind r1
rh1 = self.addHost('rh1', cls=TrellisHost, ips=['10.0.99.2/24'], gateway='10.0.99.1')
self.addLink(r1, rh1)
+ # External IPv6 Host behind r1
+ rh1v6 = self.addHost('rh1v6', cls=TrellisHost, ips=['2000::9902/120'], gateway='2000::9901')
+ self.addLink(r1, rh1v6)
+
+ # DHCP server
+ if ipv6:
+ if remote_server:
+ dhcp = self.addHost('dhcp', cls=TrellisHost, mac='00:99:00:00:00:01',
+ ips=['2000::99fd/120'], gateway='2000::9901',
+ dhcpServer=True, ipv6=True)
+ self.addLink(rs0, dhcp)
+ else:
+ dhcp = self.addHost('dhcp', cls=TrellisHost, mac='00:99:00:00:00:01',
+ ips=['2000::3fd/120'], gateway='2000::3ff',
+ dhcpServer=True, ipv6=True)
+ self.addLink(dhcp, cs1)
+ if multiple_server:
+ dhcp2 = self.addHost('dhcp2', cls=TrellisHost, mac='00:99:00:00:00:02',
+ ips=['2000::3fc/120'], gateway='2000::3ff',
+ dhcpServer=True, ipv6=True)
+ self.addLink(dhcp2, cs1)
+ else:
+ if remote_server:
+ dhcp = self.addHost('dhcp', cls=TrellisHost, mac='00:99:00:00:00:01',
+ ips=['10.0.99.3/24'], gateway='10.0.99.1',
+ dhcpServer=True)
+ self.addLink(rs0, dhcp)
+ else:
+ dhcp = self.addHost('dhcp', cls=TrellisHost, mac='00:99:00:00:00:01',
+ ips=['10.0.3.253/24'], gateway='10.0.3.254',
+ dhcpServer=True)
+ self.addLink(dhcp, cs1)
+ if multiple_server:
+ dhcp2 = self.addHost('dhcp2', cls=TrellisHost, mac='00:99:00:00:00:02',
+ ips=['10.0.3.252/24'], gateway='10.0.3.254',
+ dhcpServer=True)
+ self.addLink(dhcp2, cs1)
+
def config( opts ):
spine = opts.spine
leaf = opts.leaf
fanout = opts.fanout
- ipv6 = opts.ipv6
dualhomed = opts.dualhomed
if opts.vlan == '':
vlan = [0] * (((leaf / 2) if dualhomed else leaf) * fanout)
@@ -322,18 +399,23 @@
print "Invalid vlan configuration is given."
return
- if not ipv6:
- if dualhomed:
- if leaf % 2 == 1 or leaf == 0:
- print "Even number of leaf switches (at least two) are needed to build dual-homed topology."
- return
- else:
- topo = DualHomedLeafSpineFabric(spine=spine, leaf=leaf, fanout=fanout, vlan_id=vlan)
+ if dualhomed:
+ if leaf % 2 == 1 or leaf == 0:
+ print "Even number of leaf switches (at least two) are needed to build dual-homed topology."
+ return
else:
- topo = LeafSpineFabric(spine=spine, leaf=leaf, fanout=fanout, vlan_id=vlan)
+ topo = DualHomedLeafSpineFabric(spine=spine, leaf=leaf, fanout=fanout, vlan_id=vlan,
+ ipv6=opts.ipv6,
+ dhcp_client=opts.dhcpClient,
+ dhcp_relay=opts.dhcpRelay,
+ multiple_server=opts.multipleServer,
+ remote_server=opts.remoteServer)
else:
- print "IPv6 hosts are not supported yet."
- return
+ topo = LeafSpineFabric(spine=spine, leaf=leaf, fanout=fanout, vlan_id=vlan, ipv6=opts.ipv6,
+ dhcp_client=opts.dhcpClient,
+ dhcp_relay=opts.dhcpRelay,
+ multiple_server=opts.multipleServer,
+ remote_server=opts.remoteServer)
net = Mininet( topo=topo, link=TCLink, build=False,
controller=None, autoSetMacs=True )