SR fixes

- Update trellis-* app versions
- Fix xconnect configuration
- Avoid reserved MPLS labels

Change-Id: Ie7755f6afc4fcb3480e7f218f7e2e76f70c57531
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index 4ce8934..68072a7 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -184,6 +184,13 @@
             main.Cluster.active( 0 ).REST.setNetCfg( json.load( cfg ) )
 
     @staticmethod
+    def loadXconnects( main, suffix='' ):
+        with open( "%s%s-xconnects.json%s" % ( main.configPath + main.forJson,
+                                     main.cfgName, suffix ) ) as cfg:
+            for xconnect in json.load( cfg ).get('xconnects'):
+                main.Cluster.active( 0 ).REST.setXconnectJson( xconnect )
+
+    @staticmethod
     def loadChart( main ):
         try:
             with open( "%s%s.chart" % ( main.configPath + main.forChart,
@@ -1180,12 +1187,10 @@
                                             "hosts": [ "olt1", "vsg1" ] } } )
         main.pingChart[ 'vlan5' ][ 'expect' ] = 0
         main.pingChart[ 'vlan10' ][ 'expect' ] = 0
-        ports = "[%s,%s]" % ( 5, 6 )
-        cfg = '{"of:0000000000000001":[{"vlan":1,"ports":%s,"name":"OLT 1"}]}' % ports
-        main.Cluster.active( 0 ).REST.setNetCfg( json.loads( cfg ),
-                                                 subjectClass="apps",
-                                                 subjectKey="org.onosproject.segmentrouting",
-                                                 configKey="xconnect" )
+        main.Cluster.active( 0 ).REST.setXconnect( "of:0000000000000001",
+                                                   vlanId=1,
+                                                   port1=5,
+                                                   port2=6 )
 
     @staticmethod
     def delHostCfg( main ):
@@ -1215,9 +1220,8 @@
                                                     configKey="basic" )
         main.step( "Removing vlan configuration" )
         main.pingChart[ 'vlan1' ][ 'expect' ] = 0
-        main.Cluster.active( 0 ).REST.removeNetCfg( subjectClass="apps",
-                                                    subjectKey="org.onosproject.segmentrouting",
-                                                    configKey="xconnect" )
+        main.Cluster.active( 0 ).REST.deleteXconnect( "of:0000000000000001",
+                                                      vlanId=1 )
 
     @staticmethod
     def verifyNetworkHostIp( main, attempts=10, sleep=10 ):
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/chart/0x1.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/chart/0x1.chart
index 1d999c4..472465f 100755
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/chart/0x1.chart
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/chart/0x1.chart
@@ -1,8 +1,10 @@
 {
   "ip": {"expect": "True",
     "hosts":["h1", "h2"]},
+  "vlan1": {"expect":"True",
+    "hosts":["olt1", "vsg1"]},
   "vlan5": {"expect":"True",
     "hosts":["olt5", "vsg5"]},
   "vlan10": {"expect":"True",
     "hosts":["olt10", "vsg10"]}
-}
\ No newline at end of file
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/0x1.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/0x1.json
index 90cf052..2b78717 100755
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/json/0x1.json
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/0x1.json
@@ -38,7 +38,7 @@
             "basic":{ "driver" : "ofdpa-ovs" },
             "segmentrouting" : {
                 "name" : "Leaf-R1",
-                "ipv4NodeSid" : 1,
+                "ipv4NodeSid" : 101,
                 "ipv4Loopback" : "192.168.0.1",
                 "routerMac" : "10:00:00:00:00:01",
                 "isEdgeRouter" : true,
@@ -59,23 +59,5 @@
                 "locations": ["of:0000000000000001/2"]
             }
         }
-    },
-    "apps": {
-        "org.onosproject.segmentrouting": {
-            "xconnect": {
-                "of:0000000000000001": [
-                    {
-                        "vlan": 5,
-                        "ports": [5, 7],
-                        "name": "OLT 1"
-                    },
-                    {
-                        "vlan": 10,
-                        "ports": [5, 8],
-                        "name": "OLT 2"
-                    }
-                ]
-            }
-        }
     }
 }
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/2x2.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/2x2.json
index 52625c7..7c9b5db 100755
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/json/2x2.json
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/2x2.json
@@ -54,7 +54,7 @@
             "basic":{ "driver" : "ofdpa-ovs" },
             "segmentrouting" : {
                 "name" : "Leaf-R1",
-                "ipv4NodeSid" : 1,
+                "ipv4NodeSid" : 201,
                 "ipv4Loopback" : "192.168.0.1",
                 "routerMac" : "10:00:00:00:00:01",
                 "isEdgeRouter" : true,
@@ -65,7 +65,7 @@
             "basic":{ "driver" : "ofdpa-ovs" },
             "segmentrouting" : {
                 "name" : "Leaf-R2",
-                "ipv4NodeSid" : 2,
+                "ipv4NodeSid" : 202,
                 "ipv4Loopback" : "192.168.0.2",
                 "routerMac" : "10:00:00:00:00:02",
                 "isEdgeRouter" : true,
@@ -120,23 +120,5 @@
                 "locations": ["of:0000000000000002/2"]
             }
         }
-    },
-    "apps": {
-        "org.onosproject.segmentrouting": {
-            "xconnect": {
-                "of:0000000000000001": [
-                    {
-                        "vlan": 5,
-                        "ports": [5,7],
-                        "name": "OLT 1"
-                    },
-                    {
-                        "vlan": 10,
-                        "ports": [5,8],
-                        "name": "OLT 2"
-                    }
-                ]
-            }
-        }
     }
 }
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/4x4.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/4x4.json
index 42223b6..e3c24e6 100755
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/json/4x4.json
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/4x4.json
@@ -86,7 +86,7 @@
             "basic":{ "driver" : "ofdpa-ovs" },
             "segmentrouting" : {
                 "name" : "Leaf-R1",
-                "ipv4NodeSid" : 1,
+                "ipv4NodeSid" : 201,
                 "ipv4Loopback" : "192.168.0.1",
                 "routerMac" : "10:00:00:00:00:01",
                 "isEdgeRouter" : true,
@@ -97,7 +97,7 @@
             "basic":{ "driver" : "ofdpa-ovs" },
             "segmentrouting" : {
                 "name" : "Leaf-R2",
-                "ipv4NodeSid" : 2,
+                "ipv4NodeSid" : 202,
                 "ipv4Loopback" : "192.168.0.2",
                 "routerMac" : "10:00:00:00:00:02",
                 "isEdgeRouter" : true,
@@ -108,7 +108,7 @@
             "basic" :{ "driver" : "ofdpa-ovs" },
             "segmentrouting" : {
                 "name" : "Leaf-R3",
-                "ipv4NodeSid" : 3,
+                "ipv4NodeSid" : 203,
                 "ipv4Loopback" : "192.168.0.3",
                 "routerMac" : "10:00:00:00:00:03",
                 "isEdgeRouter" : true,
@@ -119,7 +119,7 @@
             "basic":{ "driver" : "ofdpa-ovs" },
             "segmentrouting" : {
                 "name" : "Leaf-R4",
-                "ipv4NodeSid" : 4,
+                "ipv4NodeSid" : 204,
                 "ipv4Loopback" : "192.168.0.4",
                 "routerMac" : "10:00:00:00:00:04",
                 "isEdgeRouter" : true,
@@ -220,23 +220,5 @@
                 "locations": ["of:0000000000000004/2"]
             }
         }
-    },
-    "apps": {
-        "org.onosproject.segmentrouting": {
-            "xconnect": {
-                "of:0000000000000001": [
-                    {
-                        "vlan": 5,
-                        "ports": [5,7],
-                        "name": "OLT 1"
-                    },
-                    {
-                        "vlan": 10,
-                        "ports": [5,8],
-                        "name": "OLT 2"
-                    }
-                ]
-            }
-        }
     }
 }