[ONOS-7369] Proof-of-concept testing for network driver to manage physical switches/hosts

Change-Id: If35298e29af22307d65f8f38546b0a21271ae333
diff --git a/TestON/tests/FUNC/FUNCgroup/FUNCgroup.params b/TestON/tests/FUNC/FUNCgroup/FUNCgroup.params
index 99a8e01..2be846e 100644
--- a/TestON/tests/FUNC/FUNCgroup/FUNCgroup.params
+++ b/TestON/tests/FUNC/FUNCgroup/FUNCgroup.params
@@ -4,13 +4,16 @@
     # 1    - Variable initialization and optional pull and build ONOS package
     # 2    - install ONOS
     # 3    - Start mininet and scapy and verify topology
+    # 11   - Connect to physical network and start scapy
     # 4    - Testing Scapy
     # 5    - Testing GROUP with type "ALL"
     # 6    - Deleting the Group and Flow
     # 7    - Testing GROUP with type "INDIRECT"
     # 8    - Deleting the group and flow
-    # 10    - Stop mininet and scapy
+    # 10   - Stop mininet and scapy
+    # 12   - Stop physical scapy hosts
     # 100  - Check logs for Errors and Warnings
+    # Sample testcases for physical network: 1,2,11,5,6,7,6,12,100
     <testcases>1,2,3,5,6,7,6,10,100</testcases>
 
     <GRAPH>
diff --git a/TestON/tests/FUNC/FUNCgroup/FUNCgroup.py b/TestON/tests/FUNC/FUNCgroup/FUNCgroup.py
index bbe759d..4a83581 100644
--- a/TestON/tests/FUNC/FUNCgroup/FUNCgroup.py
+++ b/TestON/tests/FUNC/FUNCgroup/FUNCgroup.py
@@ -84,15 +84,6 @@
                                             bucket +
                                             ".py" )
 
-            copyResult = main.ONOSbench.scp( main.Mininet1,
-                                             main.dependencyPath + main.topology,
-                                             main.Mininet1.home + '/custom/',
-                                             direction="to" )
-
-            utilities.assert_equals( expect=main.TRUE,
-                                     actual=copyResult,
-                                     onpass="Successfully copy " + "test variables ",
-                                     onfail="Failed to copy test variables" )
             stepResult = main.testSetUp.envSetup()
 
         except Exception as e:
@@ -134,6 +125,16 @@
         main.caseExplanation = "Start mininet with custom topology and compare topology " +\
                 "elements between Mininet and ONOS"
 
+        main.step( "Copy Mininet topology file" )
+        copyResult = main.ONOSbench.scp( main.Mininet1,
+                                         main.dependencyPath + main.topology,
+                                         main.Mininet1.home + '/custom/',
+                                         direction="to" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=copyResult,
+                                 onpass="Successfully copy mininet topo file",
+                                 onfail="Failed to copy mininet topo file" )
+
         main.step( "Setup Mininet Topology" )
         topology = main.Mininet1.home + '/custom/' + main.topology
         stepResult = main.Mininet1.startNet( topoFile=topology )
@@ -175,6 +176,52 @@
                                  onpass="Successfully created Scapy Components",
                                  onfail="Failed to discover Scapy Components" )
 
+    def CASE11( self, main ):
+        """
+            Connect to a physical network, assign controllers and start scapy
+        """
+        import time
+        main.case( "Connecting to physical network" )
+
+        main.step( "Connecting to physical network" )
+        topoResult = main.NetworkBench.connectToNet()
+        stepResult = topoResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully loaded topology",
+                                 onfail="Failed to load topology" )
+        # Exit if topology did not load properly
+        if not topoResult:
+            main.cleanAndExit()
+
+        main.step( "Assign switches to controllers." )
+        assignResult = main.TRUE
+        for i in range( 1, 2 ):
+            assignResult = assignResult & main.NetworkBench.assignSwController( sw="s" + str( i ),
+                                                                                ip=main.Cluster.getIps(),
+                                                                                port='6653' )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully assign switches to controllers",
+                                 onfail="Failed to assign switches to controllers" )
+
+        main.step( "Start scapy" )
+        scapyResult = main.TRUE
+        for hostName in main.scapyHostNames:
+            main.scapyHosts.append( getattr( main, hostName ) )
+
+        for host in main.scapyHosts:
+            host.startScapy()
+            host.updateSelf()
+            main.log.debug( host.name )
+            main.log.debug( host.hostIp )
+            main.log.debug( host.hostMac )
+
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=scapyResult,
+                                 onpass="Successfully created Scapy Components",
+                                 onfail="Failed to discover Scapy Components" )
+
     def CASE4( self, main ):
         """
         Testing scapy
@@ -557,6 +604,20 @@
         if not ( mininetResult and scapyResult ):
             main.cleanAndExit()
 
+    def CASE12( self, main ):
+        """
+        Stop Scapy on physical hosts
+        """
+        main.case( "Stop Scapy" )
+        main.step( "Stopping Scapy Hosts" )
+        scapyResult = main.TRUE
+        for host in main.scapyHosts:
+            host.stopScapy()
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=scapyResult,
+                                 onpass="Successfully stopped scapy",
+                                 onfail="Failed to stop scapy" )
+
     def CASE100( self, main ):
         """
             Report errors/warnings/exceptions
diff --git a/TestON/tests/FUNC/FUNCgroup/FUNCgroup.topo.physical b/TestON/tests/FUNC/FUNCgroup/FUNCgroup.topo.physical
new file mode 100644
index 0000000..956d1ef
--- /dev/null
+++ b/TestON/tests/FUNC/FUNCgroup/FUNCgroup.topo.physical
@@ -0,0 +1,154 @@
+<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 for 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>
+
+        <MininetSwitch1>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetSwitchDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS>
+                <shortName>s1</shortName>
+                <port1>1</port1>
+                <link1>MininetHost1</link1>
+                <port2>2</port2>
+                <link2>MininetHost2</link2>
+                <port3>3</port3>
+                <link3>MininetHost3</link3>
+                <port4>4</port4>
+                <link4>MininetHost4</link4>
+            </COMPONENTS>
+        </MininetSwitch1>
+
+        <MininetHost1>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>3</connect_order>
+            <COMPONENTS>
+                <ip>10.0.0.1</ip>
+                <shortName>h1</shortName>
+                <port1>0</port1>
+                <link1>MininetSwitch1</link1>
+            </COMPONENTS>
+        </MininetHost1>
+
+        <MininetHost2>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>4</connect_order>
+            <COMPONENTS>
+                <ip>10.0.0.2</ip>
+                <shortName>h2</shortName>
+                <port1>0</port1>
+                <link1>MininetSwitch1</link1>
+            </COMPONENTS>
+        </MininetHost2>
+
+        <MininetHost3>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>5</connect_order>
+            <COMPONENTS>
+                <ip>10.0.0.3</ip>
+                <shortName>h3</shortName>
+                <port1>0</port1>
+                <link1>MininetSwitch1</link1>
+            </COMPONENTS>
+        </MininetHost3>
+
+        <MininetHost4>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>6</connect_order>
+            <COMPONENTS>
+                <ip>10.0.0.4</ip>
+                <shortName>h4</shortName>
+                <port1>0</port1>
+                <link1>MininetSwitch1</link1>
+            </COMPONENTS>
+        </MininetHost4>
+
+        <NetworkBench>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>NetworkDriver</type>
+            <connect_order>7</connect_order>
+            <COMPONENTS>
+            </COMPONENTS>
+        </NetworkBench>
+
+        <h1>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>8</connect_order>
+            <COMPONENTS>
+                <ifaceName>h1-eth0</ifaceName>
+            </COMPONENTS>
+        </h1>
+
+        <h2>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>9</connect_order>
+            <COMPONENTS>
+                <ifaceName>h2-eth0</ifaceName>
+            </COMPONENTS>
+        </h2>
+
+        <h3>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>10</connect_order>
+            <COMPONENTS>
+                <ifaceName>h3-eth0</ifaceName>
+            </COMPONENTS>
+        </h3>
+
+        <h4>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>11</connect_order>
+            <COMPONENTS>
+                <ifaceName>h4-eth0</ifaceName>
+            </COMPONENTS>
+        </h4>
+
+    </COMPONENT>
+</TOPOLOGY>
diff --git a/TestON/tests/FUNC/FUNCintent/FUNCintent.params b/TestON/tests/FUNC/FUNCintent/FUNCintent.params
index 4976a0f..659a02c 100644
--- a/TestON/tests/FUNC/FUNCintent/FUNCintent.params
+++ b/TestON/tests/FUNC/FUNCintent/FUNCintent.params
@@ -14,12 +14,16 @@
     # 17 - Activate Flow Objectives
     # 18 - Stop Mininet
     # 19 - Copy karaf logs from ONOS nodes to TestON log directory
+    # 100 - Connect to physical network and start scapy
+    # 101 - Stop physical scapy hosts
     # 1000 - Test host intents
     # 2000 - Test point intents
     # 3000 - Test single to multi point intents
     # 4000 - Test multi to single point intents
     # 5000 - Test host mobility
     # 6000 - Test Multi Point intent End Point Failure
+    # Sample testcases for physical network: 1,2,100,15,16,1000,2000,3000,4000,6000,101,19
+    # Note: set usePortstate to True for tests with physical switches
 
     <testcases>1,[2,10,12,13,15,16,1000,2000,3000,4000,5000,6000,18,19]*2,[2,10,12,13,15,16,17,1000,2000,3000,4000,5000,6000,18,19]*2,[2,11,12,13,15,16,1000,2000,3000,4000,5000,6000,18,19]*2,[2,11,12,13,15,16,17,1000,2000,3000,4000,5000,6000,18,19]*2</testcases>
 
diff --git a/TestON/tests/FUNC/FUNCintent/FUNCintent.py b/TestON/tests/FUNC/FUNCintent/FUNCintent.py
index c7ae062..bd100f4 100644
--- a/TestON/tests/FUNC/FUNCintent/FUNCintent.py
+++ b/TestON/tests/FUNC/FUNCintent/FUNCintent.py
@@ -440,6 +440,66 @@
             main.Utils = Utils()
         main.Utils.copyKarafLog( "cycle" + str( main.cycle ) )
 
+    def CASE100( self, main):
+        """
+        Connect to a physical network, assign controllers and start scapy
+        """
+        import time
+        main.case( "Connecting to physical network" )
+        main.step( "Connecting to physical network" )
+        main.OFProtocol = "1.3"
+        topoResult = main.NetworkBench.connectToNet()
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=topoResult,
+                                 onpass="Successfully loaded topology",
+                                 onfail="Failed to load topology" )
+        # Exit if topology did not load properly
+        if not topoResult:
+            main.cleanAndExit()
+
+        main.step( "Assign switches to controllers." )
+        assignResult = main.TRUE
+        switchList = []
+        for i in range( 1, ( main.numSwitch + 1 ) ):
+            switchList.append( 's' + str( i ) )
+        tempONOSip = main.Cluster.getIps()
+        assignResult = main.Network.assignSwController( sw=switchList,
+                                                        ip=tempONOSip,
+                                                        port="6653" )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=assignResult,
+                                 onpass="Successfully assigned switches to controller",
+                                 onfail="Failed to assgin switches to controller" )
+
+        main.step( "Start scapy" )
+        scapyResult = main.TRUE
+        for hostName in main.scapyHostNames:
+            main.scapyHosts.append( getattr( main, hostName ) )
+
+        for host in main.scapyHosts:
+            host.startScapy()
+            host.updateSelf()
+            main.log.debug( host.name )
+            main.log.debug( host.hostIp )
+            main.log.debug( host.hostMac )
+
+        utilities.assert_equals( expect=main.TRUE, actual=scapyResult,
+                                 onpass="Successfully created Scapy Components",
+                                 onfail="Failed to discover Scapy Components" )
+
+    def CASE101( self, main ):
+        """
+        Stop Scapy on physical hosts
+        """
+        main.case( "Stop Scapy" )
+        main.step( "Stopping Scapy Hosts" )
+        scapyResult = main.TRUE
+        for host in main.scapyHosts:
+            host.stopScapy()
+        utilities.assert_equals( expect=main.TRUE, actual=scapyResult,
+                                 onpass="Successfully stopped scapy",
+                                 onfail="Failed to stop scapy" )
+
     def CASE1000( self, main ):
         """
             Add host intents between 2 host:
diff --git a/TestON/tests/FUNC/FUNCintent/FUNCintent.topo.physical b/TestON/tests/FUNC/FUNCintent/FUNCintent.topo.physical
new file mode 100755
index 0000000..0407aa2
--- /dev/null
+++ b/TestON/tests/FUNC/FUNCintent/FUNCintent.topo.physical
@@ -0,0 +1,723 @@
+<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 for 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>
+
+        <MininetSwitch1>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetSwitchDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS>
+                <shortName>s1</shortName>
+                <link1>MininetSwitch2</link1>
+                <link2>MininetSwitch3</link2>
+                <link3>MininetSwitch4</link3>
+                <link4>MininetSwitch5</link4>
+            </COMPONENTS>
+        </MininetSwitch1>
+
+        <MininetSwitch2>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetSwitchDriver</type>
+            <connect_order>3</connect_order>
+            <COMPONENTS>
+                <shortName>s2</shortName>
+                <link1>MininetSwitch1</link1>
+                <link2>MininetSwitch3</link2>
+                <link3>MininetSwitch5</link3>
+                <link4>MininetSwitch6</link4>
+            </COMPONENTS>
+        </MininetSwitch2>
+
+        <MininetSwitch3>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetSwitchDriver</type>
+            <connect_order>4</connect_order>
+            <COMPONENTS>
+                <shortName>s3</shortName>
+                <link1>MininetSwitch1</link1>
+                <link2>MininetSwitch2</link2>
+                <link3>MininetSwitch4</link3>
+                <link4>MininetSwitch6</link4>
+            </COMPONENTS>
+        </MininetSwitch3>
+
+        <MininetSwitch4>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetSwitchDriver</type>
+            <connect_order>5</connect_order>
+            <COMPONENTS>
+                <shortName>s4</shortName>
+                <link1>MininetSwitch1</link1>
+                <link2>MininetSwitch3</link2>
+                <link3>MininetSwitch7</link3>
+            </COMPONENTS>
+        </MininetSwitch4>
+
+        <MininetSwitch5>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetSwitchDriver</type>
+            <connect_order>6</connect_order>
+            <COMPONENTS>
+                <shortName>s5</shortName>
+                <link1>MininetHost1</link1>
+                <link2>MininetHost2</link2>
+                <link3>MininetHost3</link3>
+                <link4>MininetHost4</link4>
+                <link5>MininetHost5</link5>
+                <link6>MininetHost6</link6>
+                <link7>MininetHost7</link7>
+                <link8>MininetHost8</link8>
+                <link9>MininetSwitch1</link9>
+                <link10>MininetSwitch2</link10>
+            </COMPONENTS>
+        </MininetSwitch5>
+
+        <MininetSwitch6>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetSwitchDriver</type>
+            <connect_order>7</connect_order>
+            <COMPONENTS>
+                <shortName>s6</shortName>
+                <link1>MininetHost9</link1>
+                <link2>MininetHost10</link2>
+                <link3>MininetHost11</link3>
+                <link4>MininetHost12</link4>
+                <link5>MininetHost13</link5>
+                <link6>MininetHost14</link6>
+                <link7>MininetHost15</link7>
+                <link8>MininetHost16</link8>
+                <link9>MininetSwitch2</link9>
+                <link10>MininetSwitch3</link10>
+            </COMPONENTS>
+        </MininetSwitch6>
+
+        <MininetSwitch7>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetSwitchDriver</type>
+            <connect_order>8</connect_order>
+            <COMPONENTS>
+                <shortName>s7</shortName>
+                <link1>MininetHost17</link1>
+                <link2>MininetHost18</link2>
+                <link3>MininetHost19</link3>
+                <link4>MininetHost20</link4>
+                <link5>MininetHost21</link5>
+                <link6>MininetHost22</link6>
+                <link7>MininetHost23</link7>
+                <link8>MininetHost24</link8>
+                <link9>MininetSwitch4</link9>
+            </COMPONENTS>
+        </MininetSwitch7>
+
+        <MininetHost1>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>9</connect_order>
+            <COMPONENTS>
+                <ip>10.1.0.2</ip>
+                <shortName>h1</shortName>
+            </COMPONENTS>
+        </MininetHost1>
+
+        <MininetHost2>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>10</connect_order>
+            <COMPONENTS>
+                <ip6>1000::2</ip6>
+                <shortName>h2</shortName>
+            </COMPONENTS>
+        </MininetHost2>
+
+        <MininetHost3>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>11</connect_order>
+            <COMPONENTS>
+                <ip>10.1.0.3</ip>
+                <ip6>2000::2</ip6>
+                <shortName>h3</shortName>
+            </COMPONENTS>
+        </MininetHost3>
+
+        <MininetHost4>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>12</connect_order>
+            <COMPONENTS>
+                <ip>100.1.0.2</ip>
+                <ip6>3000::2</ip6>
+                <vlan>100</vlan>
+                <shortName>h4</shortName>
+            </COMPONENTS>
+        </MininetHost4>
+
+        <MininetHost5>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>13</connect_order>
+            <COMPONENTS>
+                <ip>200.1.0.2</ip>
+                <ip6>4000::2</ip6>
+                <vlan>200</vlan>
+                <shortName>h5</shortName>
+            </COMPONENTS>
+        </MininetHost5>
+
+        <MininetHost6>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>14</connect_order>
+            <COMPONENTS>
+                <ip>11.1.0.2</ip>
+                <shortName>h6</shortName>
+            </COMPONENTS>
+        </MininetHost6>
+
+        <MininetHost7>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>15</connect_order>
+            <COMPONENTS>
+                <ip>12.1.0.2</ip>
+                <shortName>h7</shortName>
+            </COMPONENTS>
+        </MininetHost7>
+
+        <MininetHost8>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>16</connect_order>
+            <COMPONENTS>
+                <ip>10.1.0.4</ip>
+                <shortName>h8</shortName>
+            </COMPONENTS>
+        </MininetHost8>
+
+        <MininetHost9>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>17</connect_order>
+            <COMPONENTS>
+                <ip>10.1.0.5</ip>
+                <shortName>h9</shortName>
+            </COMPONENTS>
+        </MininetHost9>
+
+        <MininetHost10>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>18</connect_order>
+            <COMPONENTS>
+                <ip6>1000::3</ip6>
+                <shortName>h10</shortName>
+            </COMPONENTS>
+        </MininetHost10>
+
+        <MininetHost11>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>19</connect_order>
+            <COMPONENTS>
+                <ip>10.1.0.6</ip>
+                <ip6>2000::3</ip6>
+                <shortName>h11</shortName>
+            </COMPONENTS>
+        </MininetHost11>
+
+        <MininetHost12>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>20</connect_order>
+            <COMPONENTS>
+                <ip>100.1.0.3</ip>
+                <ip6>3000::3</ip6>
+                <vlan>100</vlan>
+                <shortName>h12</shortName>
+            </COMPONENTS>
+        </MininetHost12>
+
+        <MininetHost13>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>21</connect_order>
+            <COMPONENTS>
+                <ip>200.1.0.3</ip>
+                <ip6>4000::3</ip6>
+                <vlan>200</vlan>
+                <shortName>h13</shortName>
+            </COMPONENTS>
+        </MininetHost13>
+
+        <MininetHost14>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>22</connect_order>
+            <COMPONENTS>
+                <ip>11.1.0.3</ip>
+                <shortName>h14</shortName>
+            </COMPONENTS>
+        </MininetHost14>
+
+        <MininetHost15>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>23</connect_order>
+            <COMPONENTS>
+                <ip>12.1.0.3</ip>
+                <shortName>h15</shortName>
+            </COMPONENTS>
+        </MininetHost15>
+
+        <MininetHost16>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>24</connect_order>
+            <COMPONENTS>
+                <ip>10.1.0.7</ip>
+                <shortName>h16</shortName>
+            </COMPONENTS>
+        </MininetHost16>
+
+        <MininetHost17>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>25</connect_order>
+            <COMPONENTS>
+                <ip>10.1.0.8</ip>
+                <shortName>h17</shortName>
+            </COMPONENTS>
+        </MininetHost17>
+
+        <MininetHost18>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>26</connect_order>
+            <COMPONENTS>
+                <ip6>1000::4</ip6>
+                <shortName>h18</shortName>
+            </COMPONENTS>
+        </MininetHost18>
+
+        <MininetHost19>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>27</connect_order>
+            <COMPONENTS>
+                <ip>10.1.0.9</ip>
+                <ip6>2000::4</ip6>
+                <shortName>h19</shortName>
+            </COMPONENTS>
+        </MininetHost19>
+
+        <MininetHost20>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>28</connect_order>
+            <COMPONENTS>
+                <ip>100.1.0.4</ip>
+                <ip6>3000::4</ip6>
+                <vlan>100</vlan>
+                <shortName>h20</shortName>
+            </COMPONENTS>
+        </MininetHost20>
+
+        <MininetHost21>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>29</connect_order>
+            <COMPONENTS>
+                <ip>200.1.0.4</ip>
+                <ip6>4000::4</ip6>
+                <vlan>200</vlan>
+                <shortName>h21</shortName>
+            </COMPONENTS>
+        </MininetHost21>
+
+        <MininetHost22>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>30</connect_order>
+            <COMPONENTS>
+                <ip>11.1.0.4</ip>
+                <shortName>h22</shortName>
+            </COMPONENTS>
+        </MininetHost22>
+
+        <MininetHost23>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>31</connect_order>
+            <COMPONENTS>
+                <ip>12.1.0.4</ip>
+                <shortName>h23</shortName>
+            </COMPONENTS>
+        </MininetHost23>
+
+        <MininetHost24>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>32</connect_order>
+            <COMPONENTS>
+                <ip>10.1.0.10</ip>
+                <shortName>h24</shortName>
+            </COMPONENTS>
+        </MininetHost24>
+
+        <h1>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>33</connect_order>
+            <COMPONENTS>
+                <ifaceName>h1-eth0</ifaceName>
+            </COMPONENTS>
+        </h1>
+
+        <h2>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>34</connect_order>
+            <COMPONENTS>
+                <ifaceName>h2-eth0</ifaceName>
+            </COMPONENTS>
+        </h2>
+
+        <h3>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>35</connect_order>
+            <COMPONENTS>
+                <ifaceName>h3-eth0</ifaceName>
+            </COMPONENTS>
+        </h3>
+
+        <h4>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>36</connect_order>
+            <COMPONENTS>
+                <ifaceName>h4-eth0</ifaceName>
+            </COMPONENTS>
+        </h4>
+
+        <h5>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>37</connect_order>
+            <COMPONENTS>
+                <ifaceName>h5-eth0</ifaceName>
+            </COMPONENTS>
+        </h5>
+
+        <h6>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>38</connect_order>
+            <COMPONENTS>
+                <ifaceName>h6-eth0</ifaceName>
+            </COMPONENTS>
+        </h6>
+
+        <h7>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>39</connect_order>
+            <COMPONENTS>
+                <ifaceName>h7-eth0</ifaceName>
+            </COMPONENTS>
+        </h7>
+
+        <h8>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>40</connect_order>
+            <COMPONENTS>
+                <ifaceName>h8-eth0</ifaceName>
+            </COMPONENTS>
+        </h8>
+
+        <h9>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>41</connect_order>
+            <COMPONENTS>
+                <ifaceName>h9-eth0</ifaceName>
+            </COMPONENTS>
+        </h9>
+
+        <h10>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>42</connect_order>
+            <COMPONENTS>
+                <ifaceName>h10-eth0</ifaceName>
+            </COMPONENTS>
+        </h10>
+
+        <h11>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>43</connect_order>
+            <COMPONENTS>
+                <ifaceName>h11-eth0</ifaceName>
+            </COMPONENTS>
+        </h11>
+
+        <h12>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>44</connect_order>
+            <COMPONENTS>
+                <ifaceName>h12-eth0</ifaceName>
+            </COMPONENTS>
+        </h12>
+
+        <h13>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>45</connect_order>
+            <COMPONENTS>
+                <ifaceName>h13-eth0</ifaceName>
+            </COMPONENTS>
+        </h13>
+
+        <h14>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>46</connect_order>
+            <COMPONENTS>
+                <ifaceName>h14-eth0</ifaceName>
+            </COMPONENTS>
+        </h14>
+
+        <h15>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>47</connect_order>
+            <COMPONENTS>
+                <ifaceName>h15-eth0</ifaceName>
+            </COMPONENTS>
+        </h15>
+
+        <h16>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>48</connect_order>
+            <COMPONENTS>
+                <ifaceName>h16-eth0</ifaceName>
+            </COMPONENTS>
+        </h16>
+
+        <h17>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>49</connect_order>
+            <COMPONENTS>
+                <ifaceName>h17-eth0</ifaceName>
+            </COMPONENTS>
+        </h17>
+
+        <h18>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>50</connect_order>
+            <COMPONENTS>
+                <ifaceName>h18-eth0</ifaceName>
+            </COMPONENTS>
+        </h18>
+
+        <h19>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>51</connect_order>
+            <COMPONENTS>
+                <ifaceName>h19-eth0</ifaceName>
+            </COMPONENTS>
+        </h19>
+
+        <h20>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>52</connect_order>
+            <COMPONENTS>
+                <ifaceName>h20-eth0</ifaceName>
+            </COMPONENTS>
+        </h20>
+
+        <h21>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>53</connect_order>
+            <COMPONENTS>
+                <ifaceName>h21-eth0</ifaceName>
+            </COMPONENTS>
+        </h21>
+
+        <h22>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>54</connect_order>
+            <COMPONENTS>
+                <ifaceName>h22-eth0</ifaceName>
+            </COMPONENTS>
+        </h22>
+
+        <h23>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>55</connect_order>
+            <COMPONENTS>
+                <ifaceName>h23-eth0</ifaceName>
+            </COMPONENTS>
+        </h23>
+
+        <h24>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostScapyCliDriver</type>
+            <connect_order>56</connect_order>
+            <COMPONENTS>
+                <ifaceName>h24-eth0</ifaceName>
+            </COMPONENTS>
+        </h24>
+
+        <NetworkBench>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>NetworkDriver</type>
+            <connect_order>57</connect_order>
+            <COMPONENTS>
+            </COMPONENTS>
+        </NetworkBench>
+
+    </COMPONENT>
+</TOPOLOGY>
diff --git a/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.params b/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.params
index 0eead29..73759e5 100755
--- a/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.params
+++ b/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.params
@@ -5,12 +5,14 @@
         CASE2: get onos warnings, errors from log
         CASE10: start a 3-node ONOS Cluster
         CASE11: Start Mininet and assign controllers
-        CASE12: Sample case of using onos cli
-        CASE22: Sample case of using onos rest
-        CASE32: Configure fwd apps
+        CASE12: Connect to a physical network and assign controllers
+        CASE20: Sample case of using onos cli
+        CASE30: Sample case of using onos rest
+        CASE40: Configure fwd apps and run pingall
+        Sample testcases for physical network: 0,1,10,12,20,30,40,2
    -->
 
-    <testcases>0,1,10,11,12,22,2,32</testcases>
+    <testcases>0,1,10,11,20,30,40,2</testcases>
     <GIT>
         <pull>False</pull>
         <branch>master</branch>
diff --git a/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.py b/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.py
index 21d86d4..a8634ae 100644
--- a/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.py
+++ b/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.py
@@ -137,7 +137,7 @@
         main.case( "Start Mininet topology" )
 
         main.step( "Starting Mininet Topology" )
-        topoResult = main.Network.startNet( mnCmd=topology )
+        topoResult = main.Mininet1.startNet( mnCmd=topology )
         stepResult = topoResult
         utilities.assert_equals( expect=main.TRUE,
                                  actual=stepResult,
@@ -150,7 +150,7 @@
         main.step( "Assign switches to controllers." )
         assignResult = main.TRUE
         for i in range( 1, 8 ):
-            assignResult = assignResult & main.Network.assignSwController( sw="s" + str( i ),
+            assignResult = assignResult & main.Mininet1.assignSwController( sw="s" + str( i ),
                                                                             ip=main.Cluster.getIps(),
                                                                             port='6653' )
         time.sleep( main.mnCfgSleep )
@@ -161,13 +161,42 @@
 
     def CASE12( self, main ):
         """
+            Connect to a physical network and assign controllers
+        """
+        main.case( "Connecting to physical network" )
+
+        main.step( "Connecting to physical network" )
+        topoResult = main.NetworkBench.connectToNet()
+        stepResult = topoResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully loaded topology",
+                                 onfail="Failed to load topology" )
+        # Exit if topology did not load properly
+        if not topoResult:
+            main.cleanAndExit()
+
+        main.step( "Assign switches to controllers." )
+        assignResult = main.TRUE
+        for i in range( 1, 2 ):
+            assignResult = assignResult & main.NetworkBench.assignSwController( sw="s" + str( i ),
+                                                                                ip=main.Cluster.getIps(),
+                                                                                port='6653' )
+        time.sleep( main.mnCfgSleep )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully assign switches to controllers",
+                                 onfail="Failed to assign switches to controllers" )
+
+    def CASE20( self, main ):
+        """
             Tests using through ONOS CLI handles
         """
         main.case( "Test some onos commands through CLI. " )
         main.log.debug( main.Cluster.active( 0 ).CLI.sendline( "summary" ) )
         main.log.debug( main.Cluster.active( 1 ).CLI.sendline( "devices" ) )
 
-    def CASE22( self, main ):
+    def CASE30( self, main ):
         """
             Tests using ONOS REST API handles
         """
@@ -175,7 +204,7 @@
         main.log.debug( main.Cluster.active( 0 ).REST.send( "/devices" ) )
         main.log.debug( main.Cluster.active( 2 ).REST.apps() )
 
-    def CASE32( self, main ):
+    def CASE40( self, main ):
         """
             Configure fwd app from .params json string with parameter configured
             Check if configuration successful
diff --git a/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.topo.physical b/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.topo.physical
new file mode 100755
index 0000000..5409afd
--- /dev/null
+++ b/TestON/tests/SAMP/SAMPstartTemplate_3node/SAMPstartTemplate_3node.topo.physical
@@ -0,0 +1,82 @@
+<TOPOLOGY>
+    <COMPONENT>
+    <!--
+        This is a list of all components and their handles in the test setup.
+        Even with some handles not used in test cases, we want to define
+        all onos cells here, for cases to set up onos cluster.
+    -->
+        <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>
+
+        <MininetSwitch1>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetSwitchDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS>
+                <shortName>s1</shortName>
+                <port1>1</port1>
+                <link1>MininetHost1</link1>
+                <port2>2</port2>
+                <link2>MininetHost2</link2>
+            </COMPONENTS>
+        </MininetSwitch1>
+
+        <MininetHost1>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>3</connect_order>
+            <COMPONENTS>
+                <ip>10.0.0.1</ip>
+                <shortName>h1</shortName>
+                <port1>0</port1>
+                <link1>MininetSwitch1</link1>
+            </COMPONENTS>
+        </MininetHost1>
+
+        <MininetHost2>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>4</connect_order>
+            <COMPONENTS>
+                <ip>10.0.0.2</ip>
+                <shortName>h2</shortName>
+                <port1>0</port1>
+                <link1>MininetSwitch1</link1>
+            </COMPONENTS>
+        </MininetHost2>
+
+        <NetworkBench>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>NetworkDriver</type>
+            <connect_order>5</connect_order>
+            <COMPONENTS>
+            </COMPONENTS>
+        </NetworkBench>
+
+    </COMPONENT>
+</TOPOLOGY>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params
index 09d8b19..0fbda47 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params
@@ -1,4 +1,5 @@
 <PARAMS>
+    # Sample testcase for physical network: 7
     <testcases>5,6,7,8,15,16,17,18,25,26,27,28,35,36,37,38,45,46,47,48,55,56,57,58,65,66,67,68,75,76,77,78</testcases>
 
     <GRAPH>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.physical b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.physical
new file mode 100644
index 0000000..4605185
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.physical
@@ -0,0 +1,158 @@
+<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>
+
+        <MininetSwitchLeaf1>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetSwitchDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS>
+                <shortName>leaf1</shortName>
+                <port1>1</port1>
+                <link1>MininetSwitchSpine101</link1>
+                <port2>2</port2>
+                <link2>MininetSwitchSpine102</link2>
+                <port3>3</port3>
+                <link3>MininetHost1</link3>
+                <port4>4</port4>
+                <link4>MininetHost2</link4>
+            </COMPONENTS>
+        </MininetSwitchLeaf1>
+
+        <MininetSwitchLeaf2>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetSwitchDriver</type>
+            <connect_order>3</connect_order>
+            <COMPONENTS>
+                <shortName>leaf2</shortName>
+                <port1>1</port1>
+                <link1>MininetSwitchSpine101</link1>
+                <port2>2</port2>
+                <link2>MininetSwitchSpine102</link2>
+                <port3>3</port3>
+                <link3>MininetHost3</link3>
+                <port4>4</port4>
+                <link4>MininetHost4</link4>
+            </COMPONENTS>
+        </MininetSwitchLeaf2>
+
+        <MininetSwitchSpine101>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetSwitchDriver</type>
+            <connect_order>4</connect_order>
+            <COMPONENTS>
+                <shortName>spine101</shortName>
+                <port1>1</port1>
+                <link1>MininetSwitchLeaf1</link1>
+                <port2>2</port2>
+                <link2>MininetSwitchLeaf2</link2>
+            </COMPONENTS>
+        </MininetSwitchSpine101>
+
+        <MininetSwitchSpine102>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetSwitchDriver</type>
+            <connect_order>5</connect_order>
+            <COMPONENTS>
+                <shortName>spine102</shortName>
+                <port1>1</port1>
+                <link1>MininetSwitchLeaf1</link1>
+                <port2>2</port2>
+                <link2>MininetSwitchLeaf2</link2>
+            </COMPONENTS>
+        </MininetSwitchSpine102>
+
+        <MininetHost1>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>6</connect_order>
+            <COMPONENTS>
+                <ip>10.0.2.1</ip>
+                <shortName>h1</shortName>
+                <port1>0</port1>
+                <link1>MininetSwitchLeaf1</link1>
+            </COMPONENTS>
+        </MininetHost1>
+
+        <MininetHost2>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>7</connect_order>
+            <COMPONENTS>
+                <ip>10.0.2.2</ip>
+                <shortName>h2</shortName>
+                <port1>0</port1>
+                <link1>MininetSwitchLeaf1</link1>
+            </COMPONENTS>
+        </MininetHost2>
+
+        <MininetHost3>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>8</connect_order>
+            <COMPONENTS>
+                <ip>10.0.3.1</ip>
+                <shortName>h3</shortName>
+                <port1>0</port1>
+                <link1>MininetSwitchLeaf2</link1>
+            </COMPONENTS>
+        </MininetHost3>
+
+        <MininetHost4>
+            <host>OCN</host>
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>MininetHostDriver</type>
+            <connect_order>9</connect_order>
+            <COMPONENTS>
+                <ip>10.0.3.2</ip>
+                <shortName>h4</shortName>
+                <port1>0</port1>
+                <link1>MininetSwitchLeaf2</link1>
+            </COMPONENTS>
+        </MininetHost4>
+
+        <NetworkBench>
+            <host>OCN</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/SRBridging/dependencies/SRBridgingTest.py b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py
index 6b869c1..fa496dd 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py
@@ -36,6 +36,8 @@
         # TODO: Implement 2x3 topology
         # topo[ '2x3' ] = ( 2, 3, True, '2x3 leaf-spine topology with dual ToR and single ToR', 28 )
         topo[ '2x4' ] = ( 2, 4, True, '2x4 dual-homed leaf-spine topology', 53 )
+        switchNames = {}
+        switchNames[ '2x2' ] = [ "leaf1", "leaf2", "spine101", "spine102" ]
 
         skipPackage = False
         init = False
@@ -64,8 +66,7 @@
             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.connectToPhysicalNetwork( main, switchNames[ topology ] )
 
         run.checkFlows( main, minFlowCount=topo[ topology ][ 4 ] * topo[ topology ][ 1 ], sleep=5 )
         leaf_dpid = [ "of:%016d" % ( ls + 1 ) for ls in range( topo[ topology ][ 1 ] ) ]
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index c912ea2..8d929ad 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -158,6 +158,30 @@
             main.cleanAndExit()
 
     @staticmethod
+    def connectToPhysicalNetwork( main, switchNames ):
+        main.step( "Connecting to physical netowrk" )
+        topoResult = main.NetworkBench.connectToNet()
+        stepResult = topoResult
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully loaded topology",
+                                 onfail="Failed to load topology" )
+        # Exit if topology did not load properly
+        if not topoResult:
+            main.cleanAndExit()
+
+        main.step( "Assign switches to controllers." )
+        assignResult = main.TRUE
+        for name in switchNames:
+            assignResult = assignResult & main.NetworkBench.assignSwController( sw=name,
+                                                                                ip=main.Cluster.getIps(),
+                                                                                port='6653' )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=stepResult,
+                                 onpass="Successfully assign switches to controllers",
+                                 onfail="Failed to assign switches to controllers" )
+
+    @staticmethod
     def config( main, cfgName ):
         main.spines = []