SRBridging test (CASE-6) Paired-leaf pod

Change-Id: I452cb1619e9d433142626c95c95ed0794b4b749a
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params.tofino b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params.tucson
similarity index 78%
copy from TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params.tofino
copy to TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params.tucson
index 51490de..67b0d48 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params.tofino
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params.tucson
@@ -1,8 +1,8 @@
 <PARAMS>
-    <testcases>9,19,29,39,49,59,69,79</testcases>
+    <testcases>6</testcases>
 
     <GRAPH>
-        <nodeCluster>QA-Pod</nodeCluster>
+        <nodeCluster>pairedleaves</nodeCluster>
         <builds>20</builds>
         <jobName>SRBridging-tofino</jobName>
         <branch>master</branch>
@@ -33,35 +33,6 @@
         <namespace>tost</namespace>
     </kubernetes>
 
-    <PERF>
-        <traffic_host>Host1</traffic_host>
-        <pcap_host>ng40vm</pcap_host>
-        <pcap_cmd_arguments>-t e -F pcap -s 100 </pcap_cmd_arguments>
-        <iterations>1</iterations>
-        <topo>
-            <leaf1>
-                <ports>260 268 276 284</ports>
-                <note>eNB</note>
-            </leaf1>
-            <leaf2>
-                <ports>132 140 148 156</ports>
-                <note>upstream</note>
-            </leaf2>
-            <spine1>
-                <ports>132 140 148 156</ports>
-                <note>spine</note>
-            </spine1>
-            <spine2>
-                <ports>132 140 148 156</ports>
-                <note>spine</note>
-            </spine2>
-        </topo>
-    </PERF>
-
-
-
-
-
     <ENV>
         <cellName>productionCell</cellName>
         <cellApps>drivers,fpm,lldpprovider,hostprovider,netcfghostprovider,drivers.bmv2,pipelines.fabric,org.stratumproject.fabric-tna,drivers.barefoot,segmentrouting,t3</cellApps>
@@ -118,8 +89,8 @@
     </SLEEP>
 
     <TOPO>
-        <switchNum>4</switchNum>
-        <linkNum>16</linkNum>
+        <switchNum>2</switchNum>
+        <linkNum>2</linkNum>
     </TOPO>
 
     <ALARM>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.0x2.tucson b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.0x2.tucson
new file mode 100644
index 0000000..7289a0d
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.0x2.tucson
@@ -0,0 +1,186 @@
+<TOPOLOGY>
+    <COMPONENT>
+        <ONOScell>
+            <host>localhost</host>  # ONOS "bench" machine
+            <user>sdn</user>
+            <password>rocks</password>
+            <type>OnosClusterDriver</type>
+            <connect_order>1</connect_order>
+            <home></home>   # defines where onos home is on the build machine. Defaults to "~/onos/" if empty.
+            <COMPONENTS>
+                <kubeConfig>~/.kube/dev-pairedleaves-tucson</kubeConfig>  # If set, will attempt to use this file for setting up port-forwarding
+                <useDocker>True</useDocker>  # Whether to use docker for ONOS nodes
+                <docker_prompt>\$</docker_prompt>
+                <cluster_name></cluster_name>  # Used as a prefix for cluster components. Defaults to 'ONOS'
+                <diff_clihost>True</diff_clihost> # if it has different host other than localhost for CLI. True or empty. OC# will be used if True.
+                <karaf_username>karaf</karaf_username>
+                <karaf_password>karaf</karaf_password>
+                <node_username>sdn</node_username>
+                <node_password>rocks</node_password>
+                <karafPrompt_username>karaf</karafPrompt_username>
+                <karafPrompt_password>karaf</karafPrompt_password>
+                <web_user>karaf</web_user>
+                <web_pass>karaf</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 on the target cell machine. Defaults to entry in "home" if empty.
+                <nodes> 3 </nodes>  # number of nodes in the cluster
+            </COMPONENTS>
+        </ONOScell>
+
+        <Leaf1>
+            <host>10.128.13.209</host>
+            <user>root</user>
+            <password>onl</password>
+            <type>StratumOSSwitchDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS>
+                <prompt>#</prompt>
+                <shortName>leaf1</shortName>
+                <port1>1</port1>
+                <link1>Host1</link1>
+                <onosConfigPath></onosConfigPath>
+                <onosConfigFile></onosConfigFile>
+            </COMPONENTS>
+        </Leaf1>
+
+        <Leaf2>
+            <host>10.128.13.211</host>
+            <user>root</user>
+            <password>onl</password>
+            <type>StratumOSSwitchDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS>
+                <prompt>#</prompt>
+                <shortName>leaf2</shortName>
+                <port1>2</port1>
+                <link1>Host2</link1>
+                <onosConfigPath></onosConfigPath>
+                <onosConfigFile></onosConfigFile>
+            </COMPONENTS>
+        </Leaf2>
+
+        <Compute1>
+            <host>10.76.28.74</host>
+            <user>jenkins</user>
+            <password></password>
+            <type>HostDriver</type>
+            <connect_order>6</connect_order>
+            <jump_host></jump_host>
+            <COMPONENTS>
+                <mac></mac>
+                <inband>false</inband>
+                <dhcp>True</dhcp>
+                <ip>10.32.11.2</ip>
+                <shortName>h1</shortName>
+                <port1></port1>
+                <link1></link1>
+                <interfaceName>pairbond</interfaceName>
+                <routes>
+                    <route1>
+                        <network>10.32.11.126</network>
+                        <netmask>25</netmask>
+                        <gw>10.32.11.126</gw>
+                        <interface>pairbond</interface>
+                    </route1>
+                </routes>
+                <sudo_required>true</sudo_required>
+            </COMPONENTS>
+        </Compute1>
+
+        <Compute2>
+            <host>10.76.28.72</host>
+            <user>jenkins</user>
+            <password></password>
+            <type>HostDriver</type>
+            <connect_order>7</connect_order>
+            <jump_host></jump_host>
+            <COMPONENTS>
+                <mac></mac>
+                <inband>false</inband>
+                <dhcp>True</dhcp>
+                <ip>10.32.11.3</ip>
+                <shortName>h2</shortName>
+                <port1></port1>
+                <link1></link1>
+                <interfaceName>pairbond</interfaceName>
+                <routes>
+                    <route1>
+                        <network>10.32.11.126</network>
+                        <netmask>25</netmask>
+                        <gw>10.32.11.126</gw>
+                        <interface>pairbond</interface>
+                    </route1>
+                </routes>
+                <sudo_required>true</sudo_required>
+            </COMPONENTS>
+        </Compute2>
+
+        <Compute3>
+            <host>10.76.28.68</host>
+            <user>jenkins</user>
+            <password></password>
+            <type>HostDriver</type>
+            <connect_order>8</connect_order>
+            <jump_host></jump_host>
+            <COMPONENTS>
+                <mac></mac>
+                <inband>false</inband>
+                <dhcp>True</dhcp>
+                <ip>10.32.11.194</ip>
+                <shortName>h3</shortName>
+                <port1></port1>
+                <link1></link1>
+                <interfaceName>eno2</interfaceName>
+                <routes>
+                    <route1>
+                        <network>10.32.11.254</network>
+                        <netmask>26</netmask>
+                        <gw>10.32.11.254</gw>
+                        <interface>26</interface>
+                    </route1>
+                </routes>
+                <sudo_required>true</sudo_required>
+            </COMPONENTS>
+        </Compute3>
+
+        <ManagmentServer>
+            <host>10.76.28.66</host>
+            <user>jenkins</user>
+            <password></password>
+            <type>HostDriver</type>
+            <connect_order>1</connect_order>
+            <COMPONENTS>
+                <mac></mac>
+                <inband>false</inband>
+                <dhcp>True</dhcp>
+                <ip>10.32.11.1</ip>
+                <shortName>mgmt</shortName>
+                <port1></port1>
+                <link1></link1>
+                <interfaceName>pairbond</interfaceName>
+                <routes>
+                    <route1>
+                        <network>10.32.11.126</network>
+                        <netmask>25</netmask>
+                        <gw>10.32.11.126</gw>
+                        <interface>pairbond</interface>
+                    </route1>
+                </routes>
+                <sudo_required>true</sudo_required>
+
+            </COMPONENTS>
+        </ManagmentServer>
+
+        <NetworkBench>
+            <host>10.128.13.253</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 458a4a7..e2b175f 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py
@@ -34,7 +34,6 @@
         self.switchNames[ '2x2' ] = [ "leaf1", "leaf2", "spine101", "spine102" ]
         main.switchType = "ovs"
 
-
     def runTest( self, main, test_idx, topology, onosNodes, description, vlan = [] ):
         try:
             skipPackage = False
@@ -90,7 +89,6 @@
                     main.log.info( "Using %s switch" % main.switchType )
 
                 run.startMininet( main, 'trellis_fabric.py', args=mininet_args )
-
             else:
                 # Run the test with physical devices
                 run.connectToPhysicalNetwork( main, hostDiscovery=False )  # We don't want to do host discovery in the pod
@@ -112,6 +110,7 @@
                 leaf_dpid = [ "of:%016d" % ( ls + 1 ) for ls in range( self.topo[ topology ][ 'leaves' ] ) ]
             for dpid in leaf_dpid:
                 run.checkFlowsByDpid( main, dpid, self.topo[ topology ][ 'minFlow-Stratum' if main.useBmv2 else 'minFlow-OvS' ], sleep=5 )
+            run.populateHostsVlan( main, main.Network.hosts.keys()  )
             run.verifyTopology( main, switches, links, onosNodes )
             run.pingAll( main )
         except Exception as e:
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE09.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE09.chart
index f52bad8..f1fe795 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE09.chart
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE09.chart
@@ -1,4 +1,4 @@
 {
   "leaf1": {"expect": "True",
-    "hosts":["h1", "ng40"]}
+    "hosts":["h1", "h2"]}
 }
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE19.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE19.chart
index f1fe795..f52bad8 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE19.chart
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE19.chart
@@ -1,4 +1,4 @@
 {
   "leaf1": {"expect": "True",
-    "hosts":["h1", "h2"]}
+    "hosts":["h1", "ng40"]}
 }
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE06.json.tucson b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE06.json.tucson
new file mode 100644
index 0000000..a10a0ca
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/json/CASE06.json.tucson
@@ -0,0 +1,48 @@
+{
+"ports":{
+        "device:leaf1/56":{
+            "interfaces":[
+                {
+                    "ips":[
+                        "10.32.11.126/25"
+                    ],
+                    "vlan-untagged":111,
+                    "name": "compute-1-1"
+                }
+            ]
+        },
+        "device:leaf2/56":{
+            "interfaces":[
+                {
+                    "ips":[
+                        "10.32.11.126/25"
+                    ],
+                    "vlan-untagged":111,
+                    "name": "compute-1-2"
+                }
+            ]
+        },
+        "device:leaf1/40": {
+            "interfaces": [
+              {
+                "ips": [
+                  "10.32.11.126/25"
+                ],
+                "vlan-untagged": 111,
+                "name": "compute-2-1"
+              }
+            ]
+          },
+          "device:leaf2/40": {
+            "interfaces": [
+              {
+                "ips": [
+                  "10.32.11.126/25"
+                ],
+                "vlan-untagged": 111,
+                "name": "compute-2-2"
+              }
+            ]
+          }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE06.cfg b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE06.cfg
new file mode 100644
index 0000000..ced0429
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE06.cfg
@@ -0,0 +1,24 @@
+{
+"ports":{
+        "device:leaf1/56":{
+            "interfaces":[
+                {
+                    "ips":[
+                        "192.168.103.1/24"
+                    ],
+                    "vlan-untagged":102
+                }
+            ]
+        },
+        "device:leaf2/56":{
+            "interfaces":[
+                {
+                    "ips":[
+                        "192.168.103.2/24"
+                    ],
+                    "vlan-untagged":102
+                }
+            ]
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE09.cfg b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE09.cfg
index ced0429..4cb68f0 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE09.cfg
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE09.cfg
@@ -6,7 +6,7 @@
                     "ips":[
                         "192.168.103.1/24"
                     ],
-                    "vlan-untagged":102
+                    "vlan-untagged":[102]
                 }
             ]
         },
@@ -16,7 +16,7 @@
                     "ips":[
                         "192.168.103.2/24"
                     ],
-                    "vlan-untagged":102
+                    "vlan-untagged":[102]
                 }
             ]
         }
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE19.cfg b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE19.cfg
index 7fe7a67..d5c73e0 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE19.cfg
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE19.cfg
@@ -6,7 +6,7 @@
                     "ips":[
                         "192.168.103.1/24"
                     ],
-                    "vlan-tagged":102
+                    "vlan-tagged":[102]
                 }
             ]
         },
@@ -16,7 +16,7 @@
                     "ips":[
                         "192.168.103.2/24"
                     ],
-                    "vlan-tagged":103
+                    "vlan-tagged":[103]
                 }
             ]
         }
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE29.cfg b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE29.cfg
index c09601a..b09226c 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE29.cfg
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE29.cfg
@@ -6,8 +6,8 @@
                     "ips":[
                         "192.168.103.1/24"
                     ],
-                    "vlan-native":103
-                    "vlan-tagged":102
+                    "vlan-native":[103]
+                    "vlan-tagged":[102]
                 }
             ]
         },
@@ -17,8 +17,8 @@
                     "ips":[
                         "192.168.103.2/24"
                     ],
-                    "vlan-native":103
-                    "vlan-untagged":102
+                    "vlan-native":[103]
+                    "vlan-untagged":[102]
                 }
             ]
         }
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params.tofino b/TestON/tests/USECASE/SegmentRouting/SRDynamicConf/SRDynamicConf.params.tofino
similarity index 97%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params.tofino
rename to TestON/tests/USECASE/SegmentRouting/SRDynamicConf/SRDynamicConf.params.tofino
index 51490de..48d8d67 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params.tofino
+++ b/TestON/tests/USECASE/SegmentRouting/SRDynamicConf/SRDynamicConf.params.tofino
@@ -1,10 +1,10 @@
 <PARAMS>
-    <testcases>9,19,29,39,49,59,69,79</testcases>
+    <testcases>13,23</testcases>
 
     <GRAPH>
         <nodeCluster>QA-Pod</nodeCluster>
         <builds>20</builds>
-        <jobName>SRBridging-tofino</jobName>
+        <jobName>SRDynamicConf-tofino</jobName>
         <branch>master</branch>
     </GRAPH>
 
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDynamicConf/SRDynamicConf.py b/TestON/tests/USECASE/SegmentRouting/SRDynamicConf/SRDynamicConf.py
index 78e25c2..d36c9bb 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRDynamicConf/SRDynamicConf.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRDynamicConf/SRDynamicConf.py
@@ -76,11 +76,15 @@
         Pingall
         """
         from tests.USECASE.SegmentRouting.SRDynamicConf.dependencies.SRDynamicConfTest import SRDynamicConfTest
-        SRDynamicConfTest.runTest( main,
+        try:
+            test=SRDynamicConfTest()
+            test.runTest( main,
                                    testIndex=13,
                                    topology='2x2',
                                    onosNodes=3,
                                    description='Changing port configuration from untagged 10 to tagged 10' )
+        except Exception:
+            main.log.exception("debug")
 
     def CASE14( self, main ):
         """
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.2x2.physical b/TestON/tests/USECASE/SegmentRouting/SRDynamicConf/SRDynamicConf.topo.2x2.physical
similarity index 94%
rename from TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.2x2.physical
rename to TestON/tests/USECASE/SegmentRouting/SRDynamicConf/SRDynamicConf.topo.2x2.physical
index e4a823b..8353070 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.2x2.physical
+++ b/TestON/tests/USECASE/SegmentRouting/SRDynamicConf/SRDynamicConf.topo.2x2.physical
@@ -2,8 +2,8 @@
     <COMPONENT>
         <ONOScell>
             <host>localhost</host>  # ONOS "bench" machine
-            <user>sdn</user>
-            <password>rocks</password>
+            <user>sid</user>
+            <password>sid</password>
             <type>OnosClusterDriver</type>
             <connect_order>1</connect_order>
             <home></home>   # defines where onos home is on the build machine. Defaults to "~/onos/" if empty.
@@ -15,8 +15,8 @@
                 <diff_clihost>True</diff_clihost> # if it has different host other than localhost for CLI. True or empty. OC# will be used if True.
                 <karaf_username>karaf</karaf_username>
                 <karaf_password>karaf</karaf_password>
-                <node_username>sdn</node_username>
-                <node_password>rocks</node_password>
+                <node_username>sid</node_username>
+                <node_password>sid</node_password>
                 <karafPrompt_username>karaf</karafPrompt_username>
                 <karafPrompt_password>karaf</karafPrompt_password>
                 <web_user>karaf</web_user>
@@ -104,9 +104,9 @@
                 <interfaceName>ens6f0</interfaceName>
                 <routes>
                     <route1>
-                        <network>192.168.101.1</network>
+                        <network>192.168.103.1</network>
                         <netmask>24</netmask>
-                        <gw>192.168.103.1</gw>
+                        <gw>192.168.102.1</gw>
                         <interface></interface>
                     </route1>
                 </routes>
@@ -129,7 +129,7 @@
                 <interfaceName>ens6f1</interfaceName>
                 <routes>
                     <route1>
-                        <network>192.168.101.1</network>
+                        <network>192.168.102.1</network>
                         <netmask>24</netmask>
                         <gw>192.168.103.1</gw>
                         <interface></interface>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDynamicConf/dependencies/SRDynamicConfTest.py b/TestON/tests/USECASE/SegmentRouting/SRDynamicConf/dependencies/SRDynamicConfTest.py
index f58e4f8..7388172 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRDynamicConf/dependencies/SRDynamicConfTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRDynamicConf/dependencies/SRDynamicConfTest.py
@@ -18,6 +18,7 @@
     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
 
 import tests.USECASE.SegmentRouting.dependencies.cfgtranslator as translator
 
@@ -26,8 +27,7 @@
         self.default = ''
         self.topo = run.getTopo()
 
-    @staticmethod
-    def runTest( main, testIndex, topology, onosNodes, description, vlan=( 0, 0, 0, 0 ) ):
+    def runTest( self, main, testIndex, topology, onosNodes, description, vlan=( 0, 0, 0, 0 ) ):
         '''
         Tests connectivity for each test case.
         Configuration files:
@@ -51,7 +51,6 @@
             portNum = self.topo[ topology ][ 'description' ]
             defaultIntf = 'bond0' if dualHomed else 'eth0'
 
-            from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as run
             if not hasattr( main, 'apps' ):
                 init = True
                 run.initTest( main )
@@ -78,38 +77,41 @@
                 translator.bmv2ToOfdpa( main )
             if not main.persistentSetup:
                 run.loadJson( main )
-            run.loadChart( main )
 
             # Provide topology-specific interface configuration
             import json
-            try:
-                intfCfg = "%s%s%s.json" % ( main.configPath, main.forJson, TAG )
-                if main.useBmv2:
-                    # Translate configuration file from OVS-OFDPA to BMv2 driver
-                    translator.bmv2ToOfdpa( main, intfCfg )  # Try to cleanup if switching between switch types
-                    switchPrefix = main.params[ 'DEPENDENCY' ].get( 'switchPrefix', "bmv2" )
-                    translator.ofdpaToBmv2( main, switchPrefix=switchPrefix, cfgFile=intfCfg )
-                else:
-                    translator.bmv2ToOfdpa( main, intfCfg )
-                with open( intfCfg ) as cfg:
-                    main.Cluster.active( 0 ).REST.setNetCfg( json.load( cfg ) )
-            except IOError:
-                # Load default interface configuration
-                defaultIntfCfg = "%s%s%s_ports.json" % ( main.configPath, main.forJson, topology )
-                if main.useBmv2:
-                    # Translate configuration file from OVS-OFDPA to BMv2 driver
-                    translator.bmv2ToOfdpa( main, defaultIntfCfg )  # Try to cleanup if switching between switch types
-                    switchPrefix = main.params[ 'DEPENDENCY' ].get( 'switchPrefix', "bmv2" )
-                    translator.ofdpaToBmv2( main, switchPrefix=switchPrefix, cfgFile=defaultIntfCfg )
-                else:
-                    translator.bmv2ToOfdpa( main, defaultIntfCfg )
-                with open( defaultIntfCfg ) as cfg:
-                    main.Cluster.active( 0 ).REST.setNetCfg( json.load( cfg ) )
+            if not main.persistentSetup:
+                try:
+                    intfCfg = "%s%s%s.json" % ( main.configPath, main.forJson, TAG )
+                    if main.useBmv2:
+                        # Translate configuration file from OVS-OFDPA to BMv2 driver
+                        translator.bmv2ToOfdpa( main, intfCfg )  # Try to cleanup if switching between switch types
+                        switchPrefix = main.params[ 'DEPENDENCY' ].get( 'switchPrefix', "bmv2" )
+                        translator.ofdpaToBmv2( main, switchPrefix=switchPrefix, cfgFile=intfCfg )
+                    else:
+                        translator.bmv2ToOfdpa( main, intfCfg )
+                    with open( intfCfg ) as cfg:
+                        main.Cluster.active( 0 ).REST.setNetCfg( json.load( cfg ) )
+                except IOError:
+                    # Load default interface configuration
+                    defaultIntfCfg = "%s%s%s_ports.json" % ( main.configPath, main.forJson, topology )
+                    if main.useBmv2:
+                        # Translate configuration file from OVS-OFDPA to BMv2 driver
+                        translator.bmv2ToOfdpa( main, defaultIntfCfg )  # Try to cleanup if switching between switch types
+                        switchPrefix = main.params[ 'DEPENDENCY' ].get( 'switchPrefix', "bmv2" )
+                        translator.ofdpaToBmv2( main, switchPrefix=switchPrefix, cfgFile=defaultIntfCfg )
+                    else:
+                        translator.bmv2ToOfdpa( main, defaultIntfCfg )
+                    with open( defaultIntfCfg ) as cfg:
+                        main.Cluster.active( 0 ).REST.setNetCfg( json.load( cfg ) )
 
             try:
-                with open( "%s%sCASE%d.chart" % (main.configPath, main.forChart, testIndex / 10 * 10) ) as chart:
+                suffix='qa'
+                main.log.debug("%s%sCASE%d.chart%s" % (main.configPath, main.forChart, testIndex / 10 * 10, suffix ))
+                with open( "%s%sCASE%d.chart.%s" % (main.configPath, main.forChart, testIndex / 10 * 10, suffix ) ) as chart:
                     main.pingChart = json.load( chart )
             except IOError:
+                main.log.debug("default_chart")
                 # Load default chart
                 with open( "%s%sdefault.chart" % (main.configPath, main.forChart) ) as chart:
                     main.pingChart = json.load( chart )
diff --git a/TestON/tests/USECASE/SegmentRouting/SRDynamicConf/dependencies/chart/CASE10.chart.qa b/TestON/tests/USECASE/SegmentRouting/SRDynamicConf/dependencies/chart/CASE10.chart.qa
new file mode 100644
index 0000000..f1fe795
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRDynamicConf/dependencies/chart/CASE10.chart.qa
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]}
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index 3541ef0..78be8ac 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -226,7 +226,7 @@
 
                 currentJSON = json.loads( currentJSON )
                 if currentJSON['interfaces'][0]['ips'] != deviceCfg['interfaces'][0]['ips']:
-                    currentJSON['interfaces'][0]['ips'] == deviceCfg['interfaces'][0]['ips']
+                    currentJSON['interfaces'][0]['ips'] = deviceCfg['interfaces'][0]['ips']
                     data = { 'interfaces': currentJSON['interfaces'] }
                     A = main.Cluster.active( 0 ).REST.setNetCfg(  data , subjectClass = "ports", subjectKey = device )
                     returnValue = returnValue and A
@@ -873,7 +873,7 @@
                             if len( vlans ) == 0:
                                 main.log.debug( "Could not find vlan setting for %s" % hostname )
                 vlans = set( vlans )
-                hostComponent.interfaces[0][ 'vlan' ] = vlans
+                hostComponent.interfaces[0][ 'vlan' ] = list( vlans )
                 main.log.debug( repr( hostComponent.interfaces[0] ) )
                 main.log.debug( repr( hostComponent.interfaces[0].get( 'vlan' ) ) )
             except ValueError: