Jonathan Hart

Static port mappings based on attachment ports

Change-Id: I73e5aff749b33f0bb3b946406dbf3db029bf0784
...@@ -118,6 +118,7 @@ public class OnosXOSIntegrationManager implements VoltTenantService { ...@@ -118,6 +118,7 @@ public class OnosXOSIntegrationManager implements VoltTenantService {
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 private Map<Long, Short> portToVlan;
121 + private Map<ConnectPoint, String> portToSsid;
121 122
122 @Activate 123 @Activate
123 public void activate(ComponentContext context) { 124 public void activate(ComponentContext context) {
...@@ -155,6 +156,10 @@ public class OnosXOSIntegrationManager implements VoltTenantService { ...@@ -155,6 +156,10 @@ public class OnosXOSIntegrationManager implements VoltTenantService {
155 portToVlan = Maps.newHashMap(); 156 portToVlan = Maps.newHashMap();
156 portToVlan.putIfAbsent(2L, (short) 201); 157 portToVlan.putIfAbsent(2L, (short) 201);
157 portToVlan.putIfAbsent(6L, (short) 401); 158 portToVlan.putIfAbsent(6L, (short) 401);
159 +
160 + portToSsid = Maps.newHashMap();
161 + portToSsid.put(new ConnectPoint(FABRIC_DEVICE_ID, PortNumber.portNumber(2)), "0");
162 + portToSsid.put(new ConnectPoint(FABRIC_DEVICE_ID, PortNumber.portNumber(6)), "1");
158 } 163 }
159 164
160 /** 165 /**
...@@ -324,7 +329,7 @@ public class OnosXOSIntegrationManager implements VoltTenantService { ...@@ -324,7 +329,7 @@ public class OnosXOSIntegrationManager implements VoltTenantService {
324 } 329 }
325 VoltTenant tenantToCreate = VoltTenant.builder() 330 VoltTenant tenantToCreate = VoltTenant.builder()
326 .withProviderService(providerServiceId) 331 .withProviderService(providerServiceId)
327 - .withServiceSpecificId(newTenant.serviceSpecificId()) 332 + .withServiceSpecificId(portToSsid.get(newTenant.port()))
328 .withVlanId(newTenant.vlanId()) 333 .withVlanId(newTenant.vlanId())
329 .withPort(newTenant.port()) 334 .withPort(newTenant.port())
330 .build(); 335 .build();
......