update configs for mwc pod

Change-Id: Iaf7adfcac419f925e526c57d8fe501f5a1b05642
diff --git a/mwc-provision.sh b/mwc-provision.sh
index f8a2e26..6e8fd0f 100755
--- a/mwc-provision.sh
+++ b/mwc-provision.sh
@@ -1,17 +1,24 @@
 #!/usr/bin/env bash
 
 MWC_HEAD_IP="10.128.13.3"
+ENODEB_ADDR="119.0.0.10"
+UE_SUBNET="17.255.0.0/16"
 
 set -ex
 
+onos-netcfg ${MWC_HEAD_IP} ${ONOS_ROOT}/p4-pod-configs/mwc-pod/mwc-demo.json
+sleep 2
+onos-netcfg ${MWC_HEAD_IP} ${ONOS_ROOT}/p4-pod-configs/mwc-pod/hosts.json
+sleep 2
 onos-netcfg ${MWC_HEAD_IP} ${ONOS_ROOT}/p4-pod-configs/mwc-pod/tofino-leaf1-netcfg.json
 sleep 5
 onos-netcfg ${MWC_HEAD_IP} ${ONOS_ROOT}/p4-pod-configs/mwc-pod/tofino-leaf2-netcfg.json
 sleep 5
-onos-netcfg ${MWC_HEAD_IP} ${ONOS_ROOT}/p4-pod-configs/mwc-pod/mellanox-spine2.json
-sleep 5
+#onos-netcfg ${MWC_HEAD_IP} ${ONOS_ROOT}/p4-pod-configs/mwc-pod/mellanox-spine2.json
+#sleep 5
 onos-netcfg ${MWC_HEAD_IP} ${ONOS_ROOT}/p4-pod-configs/mwc-pod/cavium-spine1.json
-sleep 10
-onos-netcfg ${MWC_HEAD_IP} ${ONOS_ROOT}/p4-pod-configs/mwc-pod/mwc-demo.json
-sleep 10
+sleep 5
 bash fpcagent/scripts/addP4DPN.sh ${MWC_HEAD_IP} device:tofino:leaf2
+sleep 2
+sshpass -p rocks -t onos@${MWC_HEAD_IP} "route-add ${UE_SUBNET} ${ENODEB_ADDR}"
+
diff --git a/p4-pod-configs/mwc-pod/cavium-spine1.json b/p4-pod-configs/mwc-pod/cavium-spine1.json
index 0749d84..102ca0f 100644
--- a/p4-pod-configs/mwc-pod/cavium-spine1.json
+++ b/p4-pod-configs/mwc-pod/cavium-spine1.json
@@ -1,7 +1,6 @@
 {
   "devices": {
     "device:cavium:spine1": {
-      "chassisId": "000000000226",
       "generalprovider": {
         "p4runtime": {
           "ip": "10.128.13.101",
diff --git a/p4-pod-configs/mwc-pod/hosts.json b/p4-pod-configs/mwc-pod/hosts.json
new file mode 100644
index 0000000..012bee5
--- /dev/null
+++ b/p4-pod-configs/mwc-pod/hosts.json
@@ -0,0 +1,54 @@
+{
+  "hosts": {
+    "00:1e:67:d2:ee:b2/None": {
+      "basic": {
+        "name": "Compute node 1",
+        "ips": ["10.6.1.3"],
+        "locations": ["device:tofino:leaf1/144"]
+      }
+    },
+    "00:AD:DE:00:00:80/None": {
+      "basic": {
+        "name": "eNodeB",
+        "ips": ["119.0.0.10", "118.0.0.10"],
+        "locations": ["device:tofino:leaf1/145"]
+      }
+    },
+    "00:1e:67:d2:c9:8a/None": {
+      "basic": {
+        "name": "Compute node 2",
+        "ips": ["10.6.2.2"],
+        "locations": ["device:tofino:leaf2/144"]
+      }
+    },
+    "72:9D:0F:57:D5:BD/None": {
+      "basic": {
+        "name": "ARM server",
+        "ips": ["150.0.0.10"],
+        "locations": ["device:tofino:leaf2/146"]
+      }
+    },
+    "fa:16:3e:95:0f:87/None": {
+      "basic": {
+        "name": "spgw-u 1",
+        "ips": ["119.0.0.2"],
+        "locations": ["device:tofino:leaf1/144"]
+      }
+    },
+    "fa:16:3e:64:cc:23/None": {
+      "basic": {
+        "name": "MME1",
+        "ips": ["118.0.0.2"],
+        "locations": ["device:tofino:leaf1/144"]
+      }
+    },
+    "fa:16:3e:49:75:ad/None": {
+      "basic": {
+        "name": "MME2",
+        "ips": ["122.0.0.4"],
+        "locations": ["device:tofino:leaf2/144"]
+      }
+    }
+  }
+}
+
diff --git a/p4-pod-configs/mwc-pod/mwc-demo.json b/p4-pod-configs/mwc-pod/mwc-demo.json
index e53acd4..7b63d1e 100644
--- a/p4-pod-configs/mwc-pod/mwc-demo.json
+++ b/p4-pod-configs/mwc-pod/mwc-demo.json
@@ -66,7 +66,7 @@
     "device:tofino:leaf1/145": {
       "interfaces": [
         {
-          "name": "leaf1-3/1------mgmt-25-----enb",
+          "name": "leaf1-3/1-mgmt25-enb",
           "ips": [
             "118.0.0.254/24",
             "119.0.0.254/24"
@@ -75,12 +75,24 @@
         }
       ]
     },
+    "device:tofino:leaf1/146": {
+      "interfaces": [
+        {
+          "name": "leaf1-3/2--head-node(ProgRAN)",
+          "ips": [
+            "118.0.0.254/24"
+          ],
+          "vlan-untagged": 10
+        }
+      ]
+    },
     "device:tofino:leaf2/144": {
       "interfaces": [
         {
           "name": "leaf2-3/0-compute-2",
           "ips": [
-            "10.6.2.254/24"
+            "10.6.2.254/24",
+            "122.0.0.254/24"
           ],
           "vlan-untagged": 20
         }
@@ -89,11 +101,11 @@
     "device:tofino:leaf2/145": {
       "interfaces": [
         {
-          "name": "leaf2-3/1-------mgmt-26---enb",
+          "name": "leaf2-3/1-P4-DP",
           "ips": [
             "140.0.0.2/24"
           ],
-          "vlan-untagged": 140
+          "vlan-untagged": 20
         }
       ]
     },
diff --git a/p4-pod-configs/mwc-pod/tofino-leaf1-netcfg.json b/p4-pod-configs/mwc-pod/tofino-leaf1-netcfg.json
index a38df4c..cdf6bfc 100644
--- a/p4-pod-configs/mwc-pod/tofino-leaf1-netcfg.json
+++ b/p4-pod-configs/mwc-pod/tofino-leaf1-netcfg.json
@@ -1,7 +1,6 @@
 {
   "devices": {
     "device:tofino:leaf1": {
-      "chassisId": "000000000204",
       "generalprovider": {
         "p4runtime": {
           "ip": "10.128.13.221",
@@ -45,6 +44,14 @@
           "number": 145,
           "removed": false,
           "type": "copper"
+        },
+        "3/2": {
+          "name": "3/2",
+          "speed": 10000,
+          "enabled": true,
+          "number": 146,
+          "removed": false,
+          "type": "copper"
         }
       },
       "basic": {
diff --git a/p4-pod-configs/mwc-pod/vtn-rules.json b/p4-pod-configs/mwc-pod/vtn-rules.json
new file mode 100644
index 0000000..cbc0b62
--- /dev/null
+++ b/p4-pod-configs/mwc-pod/vtn-rules.json
@@ -0,0 +1,35 @@
+{
+    "flows": [
+    {
+        "deviceId":"of:0000001e67d2c98b",
+            "isPermanent":true,
+            "priority":60000,
+            "selector":{
+                "criteria":[
+                {
+                    "ethType":"0x800",
+                    "type":"ETH_TYPE"
+                },
+                {
+                    "ip":"122.0.0.0/24",
+                    "type":"IPV4_SRC"
+                },
+                {
+                    "ip":"118.0.0.0/24",
+                    "type":"IPV4_DST"
+                }
+                ]
+            },
+            "tableId":0,
+            "timeout":0,
+            "treatment":{
+                "instructions":[
+                {
+                    "type":"TABLE",
+                    "tableId": "4"
+                }
+                ]
+            }
+    }
+    ]
+}