cord fixes

Change-Id: I63ea3b451a70c978172821ff7c81c22e2dfc1e21
diff --git a/apps/cordfabric/src/main/java/org/onosproject/cordfabric/CordFabricManager.java b/apps/cordfabric/src/main/java/org/onosproject/cordfabric/CordFabricManager.java
index fb7703c..f3bd96c 100644
--- a/apps/cordfabric/src/main/java/org/onosproject/cordfabric/CordFabricManager.java
+++ b/apps/cordfabric/src/main/java/org/onosproject/cordfabric/CordFabricManager.java
@@ -120,11 +120,11 @@
                 .matchEthType(Ethernet.TYPE_IPV4)
                 .matchIPProtocol(IPv4.PROTOCOL_TCP)
                 .matchTcpSrc(ofPort)
-                .matchInPort(PortNumber.portNumber(5))
+                .matchInPort(PortNumber.portNumber(1))
                 .build();
 
         TrafficTreatment up = DefaultTrafficTreatment.builder()
-                .setOutput(PortNumber.portNumber(5))
+                .setOutput(PortNumber.portNumber(1))
                 .build();
 
         TrafficTreatment down = DefaultTrafficTreatment.builder()
diff --git a/apps/xos-integration/src/main/java/org/onosproject/xosintegration/OnosXOSIntegrationManager.java b/apps/xos-integration/src/main/java/org/onosproject/xosintegration/OnosXOSIntegrationManager.java
index ce26786..2cd3d62 100644
--- a/apps/xos-integration/src/main/java/org/onosproject/xosintegration/OnosXOSIntegrationManager.java
+++ b/apps/xos-integration/src/main/java/org/onosproject/xosintegration/OnosXOSIntegrationManager.java
@@ -339,9 +339,10 @@
 
         if (json.get("computeNodeName") != null) {
             ConnectPoint point = nodeToPort.get(json.get("computeNodeName").asString());
+            ConnectPoint fromPoint = newTenant.port();
 
             provisionFabric(VlanId.vlanId(Short.parseShort(newTenant.vlanId())),
-                            point);
+                            point, fromPoint);
         }
 
     }
@@ -402,7 +403,7 @@
         flowObjectiveService.forward(FABRIC_PORT.deviceId(), forwardToGateway);
     }
 
-    private void provisionFabric(VlanId vlanId, ConnectPoint point) {
+    private void provisionFabric(VlanId vlanId, ConnectPoint point, ConnectPoint fromPoint) {
         //String json = "{\"vlan\":" + vlanId + ",\"ports\":[";
         //json += "{\"device\":\"" + FABRIC_DEVICE_ID.toString() + "\",\"port\":\""
         //       + FABRIC_OLT_CONNECT_POINT.toString() + "\"},";
@@ -417,8 +418,8 @@
         JsonObject cp2 = new JsonObject();
         cp1.add("device", point.deviceId().toString());
         cp1.add("port", point.port().toLong());
-        cp2.add("device", FABRIC_DEVICE_ID.toString());
-        cp2.add("port", FABRIC_OLT_CONNECT_POINT.toString());
+        cp2.add("device", fromPoint.deviceId().toString());
+        cp2.add("port", fromPoint.port().toLong());
         array.add(cp1);
         array.add(cp2);
         node.add("ports", array);