adding driver for g.fast and port to vlan mapping in xos-integration
Change-Id: I661decb973f626e6c9b3c07cbbf935d1bfa63848
Showing
2 changed files
with
10 additions
and
1 deletions
| ... | @@ -117,6 +117,7 @@ public class OnosXOSIntegrationManager implements VoltTenantService { | ... | @@ -117,6 +117,7 @@ public class OnosXOSIntegrationManager implements VoltTenantService { |
| 117 | 117 | ||
| 118 | private ApplicationId appId; | 118 | private ApplicationId appId; |
| 119 | private Map<String, ConnectPoint> nodeToPort; | 119 | private Map<String, ConnectPoint> nodeToPort; |
| 120 | + private Map<Long, Short> portToVlan; | ||
| 120 | 121 | ||
| 121 | @Activate | 122 | @Activate |
| 122 | public void activate(ComponentContext context) { | 123 | public void activate(ComponentContext context) { |
| ... | @@ -150,6 +151,9 @@ public class OnosXOSIntegrationManager implements VoltTenantService { | ... | @@ -150,6 +151,9 @@ public class OnosXOSIntegrationManager implements VoltTenantService { |
| 150 | 151 | ||
| 151 | nodeToPort.put("cordcompute02.onlab.us", new ConnectPoint(FABRIC_DEVICE_ID, | 152 | nodeToPort.put("cordcompute02.onlab.us", new ConnectPoint(FABRIC_DEVICE_ID, |
| 152 | PortNumber.portNumber(3))); | 153 | PortNumber.portNumber(3))); |
| 154 | + | ||
| 155 | + portToVlan.putIfAbsent(2L, (short) 201); | ||
| 156 | + portToVlan.putIfAbsent(6L, (short) 401); | ||
| 153 | } | 157 | } |
| 154 | 158 | ||
| 155 | /** | 159 | /** |
| ... | @@ -412,7 +416,7 @@ public class OnosXOSIntegrationManager implements VoltTenantService { | ... | @@ -412,7 +416,7 @@ public class OnosXOSIntegrationManager implements VoltTenantService { |
| 412 | //json += "]}"; | 416 | //json += "]}"; |
| 413 | 417 | ||
| 414 | JsonObject node = new JsonObject(); | 418 | JsonObject node = new JsonObject(); |
| 415 | - node.add("vlan", vlanId.toShort()); | 419 | + node.add("vlan", portToVlan.get(fromPoint.port().toLong())); |
| 416 | JsonArray array = new JsonArray(); | 420 | JsonArray array = new JsonArray(); |
| 417 | JsonObject cp1 = new JsonObject(); | 421 | JsonObject cp1 = new JsonObject(); |
| 418 | JsonObject cp2 = new JsonObject(); | 422 | JsonObject cp2 = new JsonObject(); | ... | ... |
| ... | @@ -67,6 +67,11 @@ | ... | @@ -67,6 +67,11 @@ |
| 67 | <behaviour api="org.onosproject.net.behaviour.Pipeliner" | 67 | <behaviour api="org.onosproject.net.behaviour.Pipeliner" |
| 68 | impl="org.onosproject.driver.pipeline.OLTPipeline"/> | 68 | impl="org.onosproject.driver.pipeline.OLTPipeline"/> |
| 69 | </driver> | 69 | </driver> |
| 70 | + <driver name="g.fast" extends="default" | ||
| 71 | + manufacturer="TEST1" hwVersion="TEST2" swVersion="TEST3"> | ||
| 72 | + <behaviour api="org.onosproject.net.behaviour.Pipeliner" | ||
| 73 | + impl="org.onosproject.driver.pipeline.OLTPipeline"/> | ||
| 74 | + </driver> | ||
| 70 | <!-- The SoftRouter driver is meant to be used by any software/NPU based | 75 | <!-- The SoftRouter driver is meant to be used by any software/NPU based |
| 71 | ~ switch that wishes to implement a simple 2-table router. To use this | 76 | ~ switch that wishes to implement a simple 2-table router. To use this |
| 72 | ~ driver, configure ONOS with the dpid of the device, or extend the | 77 | ~ driver, configure ONOS with the dpid of the device, or extend the | ... | ... |
-
Please register or login to post a comment