[CORD-2862] TestON drivers for OFDPA and Host

Change-Id: I5a0005c128c091aadee567a144c0acef55235184
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/README.md b/TestON/tests/USECASE/SegmentRouting/SRMulticast/README.md
new file mode 100644
index 0000000..2fd9f95
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/README.md
@@ -0,0 +1 @@
+TBD
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.params b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.params
new file mode 100644
index 0000000..b7a9a36
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.params
@@ -0,0 +1,43 @@
+<PARAMS>
+    <testcases>1</testcases>
+
+    <GRAPH>
+        <nodeCluster>VM</nodeCluster>
+        <builds>20</builds>
+    </GRAPH>
+
+    <SCALE>
+        <size>1</size>
+        <max>1</max>
+    </SCALE>
+
+    <DEPENDENCY>
+        <useCommonConf>False</useCommonConf>
+        <useCommonTopo>True</useCommonTopo>
+        <topology>trellis_fabric.py</topology>
+        <lib>routinglib.py,trellislib.py</lib>
+    </DEPENDENCY>
+
+    <ENV>
+        <cellName>productionCell</cellName>
+        <cellApps>drivers,segmentrouting,openflow,fpm,netcfghostprovider</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/SRMulticast/SRMulticast.py b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.py
new file mode 100644
index 0000000..ae42d61
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.py
@@ -0,0 +1,23 @@
+class SRMulticast:
+    def __init__( self ):
+        self.default = ''
+
+    def CASE1( self, main ):
+        """
+        Sets up 3 ONOS instance
+        Start 2x2 topology
+        """
+        try:
+            from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest
+        except ImportError:
+            main.log.error( "SRMulticastTest not found. Exiting the test" )
+            main.cleanAndExit()
+        try:
+            main.funcs
+        except ( NameError, AttributeError ):
+            main.funcs = SRMulticastTest()
+        main.funcs.runTest( main,
+                            test_idx=1,
+                            topology='2x2',
+                            onosNodes=1,
+                            description="TBD" )
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.topo b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.topo
new file mode 100644
index 0000000..34a2013
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.topo
@@ -0,0 +1,166 @@
+<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>1</nodes>  # number of nodes in the cluster
+            </COMPONENTS>
+        </ONOScell>
+
+        <OFDPASwitchLeaf205>
+            <host>10.128.0.205</host>
+            <user>root</user>
+            <password>onl</password>
+            <type>OFDPASwitchDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS>
+                <shortName>leaf205</shortName>
+                <dpid>0x205</dpid>
+                <port1>49</port1>
+                <link1>OFDPASwitchSpine227</link1>
+                <port2>51</port2>
+                <link2>OFDPASwitchSpine228</link2>
+                <port3>33</port3>
+                <link3>Host1</link3>
+                <port4>44</port4>
+                <link4>Host2</link4>
+            </COMPONENTS>
+        </OFDPASwitchLeaf205>
+
+        <OFDPASwitchLeaf206>
+            <host>10.128.0.206</host>
+            <user>root</user>
+            <password>onl</password>
+            <type>OFDPASwitchDriver</type>
+            <connect_order>3</connect_order>
+            <COMPONENTS>
+                <shortName>leaf206</shortName>
+                <dpid>0x206</dpid>
+                <port1>49</port1>
+                <link1>OFDPASwitchSpine227</link1>
+                <port2>51</port2>
+                <link2>OFDPASwitchSpine228</link2>
+                <port3>33</port3>
+                <link3>Host3</link3>
+                <port4>44</port4>
+                <link4>Host4</link4>
+            </COMPONENTS>
+        </OFDPASwitchLeaf206>
+
+        <OFDPASwitchSpine227>
+            <host>10.128.0.227</host>
+            <user>root</user>
+            <password>onl</password>
+            <type>OFDPASwitchDriver</type>
+            <connect_order>4</connect_order>
+            <COMPONENTS>
+                <shortName>spine227</shortName>
+                <dpid>0x227</dpid>
+                <port1>25</port1>
+                <link1>OFDPASwitchLeaf205</link1>
+                <port2>27</port2>
+                <link2>OFDPASwitchLeaf206</link2>
+            </COMPONENTS>
+        </OFDPASwitchSpine227>
+
+        <OFDPASwitchSpine228>
+            <host>10.128.0.228</host>
+            <user>root</user>
+            <password>onl</password>
+            <type>OFDPASwitchDriver</type>
+            <connect_order>5</connect_order>
+            <COMPONENTS>
+                <shortName>spine228</shortName>
+                <dpid>0x228</dpid>
+                <port1>25</port1>
+                <link1>OFDPASwitchLeaf205</link1>
+                <port2>27</port2>
+                <link2>OFDPASwitchLeaf206</link2>
+            </COMPONENTS>
+        </OFDPASwitchSpine228>
+
+        <Host1>
+            <host>10.128.100.58</host>
+            <user>mininet</user>
+            <password>mininet</password>
+            <type>HostDriver</type>
+            <connect_order>6</connect_order>
+            <COMPONENTS>
+                <ip>10.0.10.10</ip>
+                <ip6></ip6>
+                <shortName>h1</shortName>
+                <port1>0</port1>
+                <link1>OFDPASwitchLeaf205</link1>
+            </COMPONENTS>
+        </Host1>
+
+        <Host2>
+            <host>10.128.100.59</host>
+            <user>mininet</user>
+            <password>mininet</password>
+            <type>HostDriver</type>
+            <connect_order>7</connect_order>
+            <COMPONENTS>
+                <ip>10.0.10.20</ip>
+                <ip6></ip6>
+                <shortName>h2</shortName>
+                <port1>0</port1>
+                <link1>OFDPASwitchLeaf205</link1>
+            </COMPONENTS>
+        </Host2>
+
+        <Host3>
+            <host>10.128.100.60</host>
+            <user>mininet</user>
+            <password>mininet</password>
+            <type>HostDriver</type>
+            <connect_order>8</connect_order>
+            <COMPONENTS>
+                <ip>10.0.20.10</ip>
+                <ip6></ip6>
+                <shortName>h3</shortName>
+                <port1>0</port1>
+                <link1>OFDPASwitchLeaf206</link1>
+            </COMPONENTS>
+        </Host3>
+
+        <Host4>
+            <host>10.128.100.61</host>
+            <user>mininet</user>
+            <password>mininet</password>
+            <type>HostDriver</type>
+            <connect_order>9</connect_order>
+            <COMPONENTS>
+                <ip>10.0.20.20</ip>
+                <ip6></ip6>
+                <shortName>h4</shortName>
+                <port1>0</port1>
+                <link1>OFDPASwitchLeaf206</link1>
+            </COMPONENTS>
+        </Host4>
+
+        <NetworkBench>
+            <host>localhost</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>NetworkDriver</type>
+            <connect_order>10</connect_order>
+            <COMPONENTS>
+            </COMPONENTS>
+        </NetworkBench>
+
+    </COMPONENT>
+</TOPOLOGY>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/__init__.py b/TestON/tests/USECASE/SegmentRouting/SRMulticast/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/__init__.py
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/SRMulticastTest.py b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/SRMulticastTest.py
new file mode 100644
index 0000000..e822c29
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/SRMulticastTest.py
@@ -0,0 +1,61 @@
+"""
+Copyright 2018 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 SRMulticastTest ():
+
+    def __init__( self ):
+        self.default = ''
+        self.topo = dict()
+        # (number of spine switch, number of leaf switch, dual-homed, description, minFlowCount - leaf)
+        self.topo[ '2x2' ] = ( 2, 2, False, '2x2 leaf-spine topology', 1 )
+        self.switchNames = {}
+        self.switchNames[ '2x2' ] = [ "leaf205", "leaf206", "spine227", "spine228" ]
+
+    def runTest( self, main, test_idx, topology, onosNodes, description, vlan = [] ):
+        skipPackage = False
+        init = False
+        if not hasattr( main, 'apps' ):
+            init = True
+            run.initTest( main )
+        # Skip onos packaging if the cluster size stays the same
+        if not init and onosNodes == main.Cluster.numCtrls:
+            skipPackage = True
+
+        main.case( '%s, with %s and %d ONOS instance%s' %
+                   ( description, self.topo[ topology ][ 3 ], onosNodes, 's' if onosNodes > 1 else '' ) )
+
+        main.cfgName = 'CASE%01d%01d' % ( test_idx / 10, ( ( test_idx - 1 ) % 10 ) % 4 + 1 )
+        main.Cluster.setRunningNode( onosNodes )
+        run.installOnos( main, skipPackage=skipPackage, cliSleep=5 )
+        if hasattr( main, 'Mininet1' ):
+            # TODO Mininet implementation
+            pass
+        else:
+            # Run the test with physical devices
+            run.connectToPhysicalNetwork( main, self.switchNames[ topology ] )
+        # Check if the devices are up
+        run.checkDevices( main, switches=len(self.switchNames[ topology ]))
+        # Check the flows against the devices
+        run.checkFlows( main, minFlowCount=self.topo[ topology ][ 4 ] * self.topo[ topology ][ 1 ], sleep=5 )
+        # Clean up the environment
+        run.cleanup( main, physical=(not hasattr( main, 'Mininet1' )))
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/__init__.py b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/__init__.py
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/bgpdbgp1.conf b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/bgpdbgp1.conf
new file mode 100644
index 0000000..8870fb4
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/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/SRMulticast/dependencies/conf/bgpdbgp2.conf b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/bgpdbgp2.conf
new file mode 100644
index 0000000..e554de4
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/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/SRMulticast/dependencies/conf/bgpdr1.conf b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/bgpdr1.conf
new file mode 100644
index 0000000..9e526b8
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/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/SRMulticast/dependencies/conf/bgpdr2.conf b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/bgpdr2.conf
new file mode 100644
index 0000000..49553e2
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/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/SRMulticast/dependencies/conf/dhcpd.conf b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/dhcpd.conf
new file mode 100644
index 0000000..aa559d2
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/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/SRMulticast/dependencies/conf/dhcpd6.conf b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/dhcpd6.conf
new file mode 100644
index 0000000..526de85
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/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/SRMulticast/dependencies/conf/zebradbgp1.conf b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/zebradbgp1.conf
new file mode 100644
index 0000000..51991a4
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/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/SRMulticast/dependencies/conf/zebradbgp2.conf b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/zebradbgp2.conf
new file mode 100644
index 0000000..dce218d
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/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/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index 5455847..45d166e 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -316,6 +316,21 @@
                                         tag + "_GroupsBefore" )
 
     @staticmethod
+    def checkDevices( main, switches, tag="", sleep=10 ):
+        main.step(
+                "Check whether the switches count is equal to %s" % switches )
+        if tag == "":
+            tag = 'CASE%d' % main.CurrentTestCaseNumber
+        result = utilities.retry( main.Cluster.active( 0 ).CLI.checkStatus,
+                                    main.FALSE,
+                                    kwargs={ 'numoswitch': switches},
+                                    attempts=10,
+                                    sleep=sleep )
+        utilities.assert_equals( expect=main.TRUE, actual=result,
+                                 onpass="Device up successful",
+                                 onfail="Failed to boot up devices?" )
+
+    @staticmethod
     def checkFlowsByDpid( main, dpid, minFlowCount, sleep=10 ):
         main.step(
             " Check whether the flow count of device %s is bigger than %s" % ( dpid, minFlowCount ) )
@@ -613,7 +628,7 @@
                                  onfail="Failed to recover switch?" )
 
     @staticmethod
-    def cleanup( main ):
+    def cleanup( main, physical=False):
         """
         Stop Onos-cluster.
         Stops Mininet
@@ -629,7 +644,8 @@
         except ( NameError, AttributeError ):
             main.utils = Utils()
 
-        main.utils.mininetCleanup( main.Mininet1 )
+        if not physical:
+            main.utils.mininetCleanup( main.Mininet1 )
 
         main.utils.copyKarafLog( "CASE%d" % main.CurrentTestCaseNumber, before=True, includeCaseDesc=False )
 
diff --git a/TestON/tests/dependencies/Network.py b/TestON/tests/dependencies/Network.py
index 6377c0c..e5c2200 100644
--- a/TestON/tests/dependencies/Network.py
+++ b/TestON/tests/dependencies/Network.py
@@ -38,7 +38,7 @@
         We will look into each of the network component handles to try
         to find the attreibute.
         """
-        #FIXME: allow to call a specific driver
+        # FIXME: allow to call a specific driver
         for component in self.components:
             if hasattr( component, name ):
                 main.log.debug( "%s has attribute '%s'" % ( component.options[ 'name' ], name ) )
@@ -53,6 +53,6 @@
         # Get a list of network components that are created in the test
         self.components = []
         for key, value in main.componentDictionary.items():
-            if value[ 'type' ] in [ 'MininetCliDriver', 'RemoteMininetDriver', 'NetworkDriver' ] and hasattr( main, key ):
+            if value[ 'type' ] in [ 'MininetCliDriver', 'RemoteMininetDriver', 'NetworkDriver', 'OFDPASwitchDriver' ] and hasattr( main, key ):
                 self.components.append( getattr( main, key ) )
         main.log.debug( "%s initialized with components: %s" % ( self.name, self.components ) )