[ONOS-3532] Update PORT_MAC to AnnotationKeys.PORT_MAC.
Change-Id: I18c81bc616f94f69f69741621da56c60c784ec3f
Showing
1 changed file
with
6 additions
and
2 deletions
... | @@ -201,7 +201,6 @@ public class VTNManager implements VTNService { | ... | @@ -201,7 +201,6 @@ public class VTNManager implements VTNService { |
201 | private static final String HOSTS_OF_SUBNET = "hostsOfSubnet"; | 201 | private static final String HOSTS_OF_SUBNET = "hostsOfSubnet"; |
202 | private static final String EX_PORT_OF_DEVICE = "exPortOfDevice"; | 202 | private static final String EX_PORT_OF_DEVICE = "exPortOfDevice"; |
203 | private static final String DEFAULT_IP = "0.0.0.0"; | 203 | private static final String DEFAULT_IP = "0.0.0.0"; |
204 | - private static final String PORT_MAC = "portMac"; | ||
205 | private static final int SUBNET_NUM = 2; | 204 | private static final int SUBNET_NUM = 2; |
206 | 205 | ||
207 | private EventuallyConsistentMap<VirtualPortId, VirtualPort> vPortStore; | 206 | private EventuallyConsistentMap<VirtualPortId, VirtualPort> vPortStore; |
... | @@ -407,8 +406,12 @@ public class VTNManager implements VTNService { | ... | @@ -407,8 +406,12 @@ public class VTNManager implements VTNService { |
407 | return; | 406 | return; |
408 | } | 407 | } |
409 | if (type == Objective.Operation.ADD) { | 408 | if (type == Objective.Operation.ADD) { |
409 | + // Save external port | ||
410 | + Port export = getExPort(device.id()); | ||
411 | + exPortOfDevice.put(device.id(), export); | ||
410 | switchOfLocalHostPorts.put(device.id(), new NetworkOfLocalHostPorts()); | 412 | switchOfLocalHostPorts.put(device.id(), new NetworkOfLocalHostPorts()); |
411 | } else if (type == Objective.Operation.REMOVE) { | 413 | } else if (type == Objective.Operation.REMOVE) { |
414 | + exPortOfDevice.remove(device.id()); | ||
412 | switchOfLocalHostPorts.remove(device.id()); | 415 | switchOfLocalHostPorts.remove(device.id()); |
413 | } | 416 | } |
414 | Iterable<Device> devices = deviceService.getAvailableDevices(); | 417 | Iterable<Device> devices = deviceService.getAvailableDevices(); |
... | @@ -898,7 +901,8 @@ public class VTNManager implements VTNService { | ... | @@ -898,7 +901,8 @@ public class VTNManager implements VTNService { |
898 | TenantNetwork fipNetwork = tenantNetworkService | 901 | TenantNetwork fipNetwork = tenantNetworkService |
899 | .getNetwork(fipPort.networkId()); | 902 | .getNetwork(fipPort.networkId()); |
900 | // L3 downlink traffic flow | 903 | // L3 downlink traffic flow |
901 | - MacAddress exPortMac = MacAddress.valueOf(exPort.annotations().value(PORT_MAC)); | 904 | + MacAddress exPortMac = MacAddress.valueOf(exPort.annotations() |
905 | + .value(AnnotationKeys.PORT_MAC)); | ||
902 | classifierService.programArpClassifierRules(deviceId, floatingIp.floatingIp(), | 906 | classifierService.programArpClassifierRules(deviceId, floatingIp.floatingIp(), |
903 | fipNetwork.segmentationId(), | 907 | fipNetwork.segmentationId(), |
904 | operation); | 908 | operation); | ... | ... |
-
Please register or login to post a comment