alshabib

adding driver for g.fast and port to vlan mapping in xos-integration

Change-Id: I661decb973f626e6c9b3c07cbbf935d1bfa63848
......@@ -117,6 +117,7 @@ public class OnosXOSIntegrationManager implements VoltTenantService {
private ApplicationId appId;
private Map<String, ConnectPoint> nodeToPort;
private Map<Long, Short> portToVlan;
@Activate
public void activate(ComponentContext context) {
......@@ -150,6 +151,9 @@ public class OnosXOSIntegrationManager implements VoltTenantService {
nodeToPort.put("cordcompute02.onlab.us", new ConnectPoint(FABRIC_DEVICE_ID,
PortNumber.portNumber(3)));
portToVlan.putIfAbsent(2L, (short) 201);
portToVlan.putIfAbsent(6L, (short) 401);
}
/**
......@@ -412,7 +416,7 @@ public class OnosXOSIntegrationManager implements VoltTenantService {
//json += "]}";
JsonObject node = new JsonObject();
node.add("vlan", vlanId.toShort());
node.add("vlan", portToVlan.get(fromPoint.port().toLong()));
JsonArray array = new JsonArray();
JsonObject cp1 = new JsonObject();
JsonObject cp2 = new JsonObject();
......
......@@ -67,6 +67,11 @@
<behaviour api="org.onosproject.net.behaviour.Pipeliner"
impl="org.onosproject.driver.pipeline.OLTPipeline"/>
</driver>
<driver name="g.fast" extends="default"
manufacturer="TEST1" hwVersion="TEST2" swVersion="TEST3">
<behaviour api="org.onosproject.net.behaviour.Pipeliner"
impl="org.onosproject.driver.pipeline.OLTPipeline"/>
</driver>
<!-- The SoftRouter driver is meant to be used by any software/NPU based
~ switch that wishes to implement a simple 2-table router. To use this
~ driver, configure ONOS with the dpid of the device, or extend the
......