Static port mappings based on attachment ports
Change-Id: I73e5aff749b33f0bb3b946406dbf3db029bf0784
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 48bfe77..0dc6f8e 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
@@ -118,6 +118,7 @@
private ApplicationId appId;
private Map<String, ConnectPoint> nodeToPort;
private Map<Long, Short> portToVlan;
+ private Map<ConnectPoint, String> portToSsid;
@Activate
public void activate(ComponentContext context) {
@@ -155,6 +156,10 @@
portToVlan = Maps.newHashMap();
portToVlan.putIfAbsent(2L, (short) 201);
portToVlan.putIfAbsent(6L, (short) 401);
+
+ portToSsid = Maps.newHashMap();
+ portToSsid.put(new ConnectPoint(FABRIC_DEVICE_ID, PortNumber.portNumber(2)), "0");
+ portToSsid.put(new ConnectPoint(FABRIC_DEVICE_ID, PortNumber.portNumber(6)), "1");
}
/**
@@ -324,7 +329,7 @@
}
VoltTenant tenantToCreate = VoltTenant.builder()
.withProviderService(providerServiceId)
- .withServiceSpecificId(newTenant.serviceSpecificId())
+ .withServiceSpecificId(portToSsid.get(newTenant.port()))
.withVlanId(newTenant.vlanId())
.withPort(newTenant.port())
.build();