Committed by
Gerrit Code Review
[ONOS-3659] Submit the modified content of onos-1.4 to onos-master.
Change-Id: Ibdb9897cde6bc7622276178a6087f02c49da2a48
Showing
6 changed files
with
152 additions
and
125 deletions
... | @@ -20,6 +20,7 @@ import java.util.Iterator; | ... | @@ -20,6 +20,7 @@ import java.util.Iterator; |
20 | import org.onlab.packet.MacAddress; | 20 | import org.onlab.packet.MacAddress; |
21 | import org.onosproject.net.Device; | 21 | import org.onosproject.net.Device; |
22 | import org.onosproject.net.DeviceId; | 22 | import org.onosproject.net.DeviceId; |
23 | +import org.onosproject.net.Host; | ||
23 | import org.onosproject.net.HostId; | 24 | import org.onosproject.net.HostId; |
24 | import org.onosproject.vtnrsc.SegmentationId; | 25 | import org.onosproject.vtnrsc.SegmentationId; |
25 | import org.onosproject.vtnrsc.TenantId; | 26 | import org.onosproject.vtnrsc.TenantId; |
... | @@ -69,4 +70,14 @@ public class VtnRscManagerTestImpl implements VtnRscService { | ... | @@ -69,4 +70,14 @@ public class VtnRscManagerTestImpl implements VtnRscService { |
69 | public DeviceId getSFToSFFMaping(VirtualPortId portId) { | 70 | public DeviceId getSFToSFFMaping(VirtualPortId portId) { |
70 | return DeviceId.deviceId("www.google.com"); | 71 | return DeviceId.deviceId("www.google.com"); |
71 | } | 72 | } |
73 | + | ||
74 | + @Override | ||
75 | + public void addDeviceIdOfOvsMap(VirtualPortId virtualPortId, | ||
76 | + TenantId tenantId, DeviceId deviceId) { | ||
77 | + } | ||
78 | + | ||
79 | + @Override | ||
80 | + public void removeDeviceIdOfOvsMap(Host host, TenantId tenantId, | ||
81 | + DeviceId deviceId) { | ||
82 | + } | ||
72 | } | 83 | } | ... | ... |
... | @@ -19,6 +19,7 @@ import static org.onosproject.net.flow.instructions.ExtensionTreatmentType.Exten | ... | @@ -19,6 +19,7 @@ import static org.onosproject.net.flow.instructions.ExtensionTreatmentType.Exten |
19 | import static org.slf4j.LoggerFactory.getLogger; | 19 | import static org.slf4j.LoggerFactory.getLogger; |
20 | 20 | ||
21 | import java.util.ArrayList; | 21 | import java.util.ArrayList; |
22 | +import java.util.Arrays; | ||
22 | import java.util.Collection; | 23 | import java.util.Collection; |
23 | import java.util.HashMap; | 24 | import java.util.HashMap; |
24 | import java.util.HashSet; | 25 | import java.util.HashSet; |
... | @@ -75,9 +76,12 @@ import org.onosproject.net.host.HostEvent; | ... | @@ -75,9 +76,12 @@ import org.onosproject.net.host.HostEvent; |
75 | import org.onosproject.net.host.HostListener; | 76 | import org.onosproject.net.host.HostListener; |
76 | import org.onosproject.net.host.HostService; | 77 | import org.onosproject.net.host.HostService; |
77 | import org.onosproject.store.serializers.KryoNamespaces; | 78 | import org.onosproject.store.serializers.KryoNamespaces; |
79 | +import org.onosproject.store.service.ConsistentMap; | ||
78 | import org.onosproject.store.service.EventuallyConsistentMap; | 80 | import org.onosproject.store.service.EventuallyConsistentMap; |
79 | import org.onosproject.store.service.LogicalClockService; | 81 | import org.onosproject.store.service.LogicalClockService; |
82 | +import org.onosproject.store.service.Serializer; | ||
80 | import org.onosproject.store.service.StorageService; | 83 | import org.onosproject.store.service.StorageService; |
84 | +import org.onosproject.store.service.Versioned; | ||
81 | import org.onosproject.vtn.manager.VTNService; | 85 | import org.onosproject.vtn.manager.VTNService; |
82 | import org.onosproject.vtn.table.ArpService; | 86 | import org.onosproject.vtn.table.ArpService; |
83 | import org.onosproject.vtn.table.ClassifierService; | 87 | import org.onosproject.vtn.table.ClassifierService; |
... | @@ -188,7 +192,7 @@ public class VTNManager implements VTNService { | ... | @@ -188,7 +192,7 @@ public class VTNManager implements VTNService { |
188 | private final DeviceListener deviceListener = new InnerDeviceListener(); | 192 | private final DeviceListener deviceListener = new InnerDeviceListener(); |
189 | private final VtnRscListener l3EventListener = new VtnL3EventListener(); | 193 | private final VtnRscListener l3EventListener = new VtnL3EventListener(); |
190 | 194 | ||
191 | - private static String exPortName = "eth0"; | 195 | + private static final String EX_PORT_KEY = "exPortKey"; |
192 | private static final String IFACEID = "ifaceid"; | 196 | private static final String IFACEID = "ifaceid"; |
193 | private static final String CONTROLLER_IP_KEY = "ipaddress"; | 197 | private static final String CONTROLLER_IP_KEY = "ipaddress"; |
194 | public static final String DRIVER_NAME = "onosfw"; | 198 | public static final String DRIVER_NAME = "onosfw"; |
... | @@ -198,6 +202,7 @@ public class VTNManager implements VTNService { | ... | @@ -198,6 +202,7 @@ public class VTNManager implements VTNService { |
198 | private static final String ROUTERINF_FLAG_OF_TENANT = "routerInfFlagOfTenant"; | 202 | private static final String ROUTERINF_FLAG_OF_TENANT = "routerInfFlagOfTenant"; |
199 | private static final String HOSTS_OF_SUBNET = "hostsOfSubnet"; | 203 | private static final String HOSTS_OF_SUBNET = "hostsOfSubnet"; |
200 | private static final String EX_PORT_OF_DEVICE = "exPortOfDevice"; | 204 | private static final String EX_PORT_OF_DEVICE = "exPortOfDevice"; |
205 | + private static final String EX_PORT_MAP = "exPortMap"; | ||
201 | private static final String DEFAULT_IP = "0.0.0.0"; | 206 | private static final String DEFAULT_IP = "0.0.0.0"; |
202 | private static final int SUBNET_NUM = 2; | 207 | private static final int SUBNET_NUM = 2; |
203 | 208 | ||
... | @@ -207,6 +212,7 @@ public class VTNManager implements VTNService { | ... | @@ -207,6 +212,7 @@ public class VTNManager implements VTNService { |
207 | private EventuallyConsistentMap<SubnetId, Map<HostId, Host>> hostsOfSubnet; | 212 | private EventuallyConsistentMap<SubnetId, Map<HostId, Host>> hostsOfSubnet; |
208 | private EventuallyConsistentMap<TenantId, Boolean> routerInfFlagOfTenant; | 213 | private EventuallyConsistentMap<TenantId, Boolean> routerInfFlagOfTenant; |
209 | private EventuallyConsistentMap<DeviceId, Port> exPortOfDevice; | 214 | private EventuallyConsistentMap<DeviceId, Port> exPortOfDevice; |
215 | + private static ConsistentMap<String, String> exPortMap; | ||
210 | 216 | ||
211 | @Activate | 217 | @Activate |
212 | public void activate() { | 218 | public void activate() { |
... | @@ -275,6 +281,14 @@ public class VTNManager implements VTNService { | ... | @@ -275,6 +281,14 @@ public class VTNManager implements VTNService { |
275 | .withTimestampProvider((k, v) -> clockService.getTimestamp()) | 281 | .withTimestampProvider((k, v) -> clockService.getTimestamp()) |
276 | .build(); | 282 | .build(); |
277 | 283 | ||
284 | + exPortMap = storageService | ||
285 | + .<String, String>consistentMapBuilder() | ||
286 | + .withName(EX_PORT_MAP) | ||
287 | + .withApplicationId(appId) | ||
288 | + .withPurgeOnUninstall() | ||
289 | + .withSerializer(Serializer.using(Arrays.asList(KryoNamespaces.API))) | ||
290 | + .build(); | ||
291 | + | ||
278 | log.info("Started"); | 292 | log.info("Started"); |
279 | } | 293 | } |
280 | 294 | ||
... | @@ -310,8 +324,11 @@ public class VTNManager implements VTNService { | ... | @@ -310,8 +324,11 @@ public class VTNManager implements VTNService { |
310 | config.driver(DRIVER_NAME); | 324 | config.driver(DRIVER_NAME); |
311 | configService.applyConfig(deviceId, BasicDeviceConfig.class, config.node()); | 325 | configService.applyConfig(deviceId, BasicDeviceConfig.class, config.node()); |
312 | // Add Bridge | 326 | // Add Bridge |
313 | - VtnConfig.applyBridgeConfig(handler, dpid, exPortName); | 327 | + Versioned<String> exPortVersioned = exPortMap.get(EX_PORT_KEY); |
314 | - log.info("A new ovs is created in node {}", localIp.toString()); | 328 | + if (exPortVersioned != null) { |
329 | + VtnConfig.applyBridgeConfig(handler, dpid, exPortVersioned.value()); | ||
330 | + log.info("A new ovs is created in node {}", localIp.toString()); | ||
331 | + } | ||
315 | switchesOfController.put(localIp, true); | 332 | switchesOfController.put(localIp, true); |
316 | } | 333 | } |
317 | // Create tunnel in br-int on all controllers | 334 | // Create tunnel in br-int on all controllers |
... | @@ -330,8 +347,6 @@ public class VTNManager implements VTNService { | ... | @@ -330,8 +347,6 @@ public class VTNManager implements VTNService { |
330 | if (mastershipService.isLocalMaster(controllerDeviceId)) { | 347 | if (mastershipService.isLocalMaster(controllerDeviceId)) { |
331 | switchesOfController.remove(dstIpAddress); | 348 | switchesOfController.remove(dstIpAddress); |
332 | } | 349 | } |
333 | - // remove tunnel in br-int on other controllers | ||
334 | - programTunnelConfig(controllerDeviceId, dstIpAddress, null); | ||
335 | } | 350 | } |
336 | 351 | ||
337 | @Override | 352 | @Override |
... | @@ -357,6 +372,7 @@ public class VTNManager implements VTNService { | ... | @@ -357,6 +372,7 @@ public class VTNManager implements VTNService { |
357 | log.error("The ifaceId of Host is null"); | 372 | log.error("The ifaceId of Host is null"); |
358 | return; | 373 | return; |
359 | } | 374 | } |
375 | + programSffAndClassifierHost(host, Objective.Operation.ADD); | ||
360 | // apply L2 openflow rules | 376 | // apply L2 openflow rules |
361 | applyHostMonitoredL2Rules(host, Objective.Operation.ADD); | 377 | applyHostMonitoredL2Rules(host, Objective.Operation.ADD); |
362 | // apply L3 openflow rules | 378 | // apply L3 openflow rules |
... | @@ -374,6 +390,7 @@ public class VTNManager implements VTNService { | ... | @@ -374,6 +390,7 @@ public class VTNManager implements VTNService { |
374 | log.error("The ifaceId of Host is null"); | 390 | log.error("The ifaceId of Host is null"); |
375 | return; | 391 | return; |
376 | } | 392 | } |
393 | + programSffAndClassifierHost(host, Objective.Operation.REMOVE); | ||
377 | // apply L2 openflow rules | 394 | // apply L2 openflow rules |
378 | applyHostMonitoredL2Rules(host, Objective.Operation.REMOVE); | 395 | applyHostMonitoredL2Rules(host, Objective.Operation.REMOVE); |
379 | // apply L3 openflow rules | 396 | // apply L3 openflow rules |
... | @@ -463,6 +480,22 @@ public class VTNManager implements VTNService { | ... | @@ -463,6 +480,22 @@ public class VTNManager implements VTNService { |
463 | } | 480 | } |
464 | } | 481 | } |
465 | 482 | ||
483 | + private void programSffAndClassifierHost(Host host, Objective.Operation type) { | ||
484 | + DeviceId deviceId = host.location().deviceId(); | ||
485 | + String ifaceId = host.annotations().value(IFACEID); | ||
486 | + VirtualPortId virtualPortId = VirtualPortId.portId(ifaceId); | ||
487 | + VirtualPort virtualPort = virtualPortService.getPort(virtualPortId); | ||
488 | + if (virtualPort == null) { | ||
489 | + virtualPort = VtnData.getPort(vPortStore, virtualPortId); | ||
490 | + } | ||
491 | + TenantId tenantId = virtualPort.tenantId(); | ||
492 | + if (Objective.Operation.ADD == type) { | ||
493 | + vtnRscService.addDeviceIdOfOvsMap(virtualPortId, tenantId, deviceId); | ||
494 | + } else if (Objective.Operation.REMOVE == type) { | ||
495 | + vtnRscService.removeDeviceIdOfOvsMap(host, tenantId, deviceId); | ||
496 | + } | ||
497 | + } | ||
498 | + | ||
466 | private void applyHostMonitoredL2Rules(Host host, Objective.Operation type) { | 499 | private void applyHostMonitoredL2Rules(Host host, Objective.Operation type) { |
467 | DeviceId deviceId = host.location().deviceId(); | 500 | DeviceId deviceId = host.location().deviceId(); |
468 | if (!mastershipService.isLocalMaster(deviceId)) { | 501 | if (!mastershipService.isLocalMaster(deviceId)) { |
... | @@ -971,7 +1004,9 @@ public class VTNManager implements VTNService { | ... | @@ -971,7 +1004,9 @@ public class VTNManager implements VTNService { |
971 | Port exPort = null; | 1004 | Port exPort = null; |
972 | for (Port port : ports) { | 1005 | for (Port port : ports) { |
973 | String portName = port.annotations().value(AnnotationKeys.PORT_NAME); | 1006 | String portName = port.annotations().value(AnnotationKeys.PORT_NAME); |
974 | - if (portName != null && portName.equals(exPortName)) { | 1007 | + Versioned<String> exPortVersioned = exPortMap.get(EX_PORT_KEY); |
1008 | + if (portName != null && exPortVersioned != null && portName. | ||
1009 | + equals(exPortVersioned.value())) { | ||
975 | exPort = port; | 1010 | exPort = port; |
976 | break; | 1011 | break; |
977 | } | 1012 | } |
... | @@ -1071,6 +1106,6 @@ public class VTNManager implements VTNService { | ... | @@ -1071,6 +1106,6 @@ public class VTNManager implements VTNService { |
1071 | } | 1106 | } |
1072 | 1107 | ||
1073 | public static void setExPortName(String name) { | 1108 | public static void setExPortName(String name) { |
1074 | - exPortName = name; | 1109 | + exPortMap.put(EX_PORT_KEY, name); |
1075 | } | 1110 | } |
1076 | } | 1111 | } | ... | ... |
... | @@ -176,23 +176,11 @@ public class FloatingIpManager implements FloatingIpService { | ... | @@ -176,23 +176,11 @@ public class FloatingIpManager implements FloatingIpService { |
176 | boolean result = true; | 176 | boolean result = true; |
177 | for (FloatingIp floatingIp : floatingIps) { | 177 | for (FloatingIp floatingIp : floatingIps) { |
178 | verifyFloatingIpData(floatingIp); | 178 | verifyFloatingIpData(floatingIp); |
179 | - if (floatingIp.portId() != null) { | 179 | + floatingIpStore.put(floatingIp.id(), floatingIp); |
180 | - floatingIpStore.put(floatingIp.id(), floatingIp); | 180 | + if (!floatingIpStore.containsKey(floatingIp.id())) { |
181 | - if (!floatingIpStore.containsKey(floatingIp.id())) { | 181 | + log.debug("The floating Ip is created failed whose identifier is {}", |
182 | - log.debug("The floating Ip is created failed whose identifier is {}", | 182 | + floatingIp.id().toString()); |
183 | - floatingIp.id().toString()); | 183 | + result = false; |
184 | - result = false; | ||
185 | - } | ||
186 | - } else { | ||
187 | - FloatingIp oldFloatingIp = floatingIpStore.get(floatingIp.id()); | ||
188 | - if (oldFloatingIp != null) { | ||
189 | - floatingIpStore.remove(floatingIp.id(), oldFloatingIp); | ||
190 | - if (floatingIpStore.containsKey(floatingIp.id())) { | ||
191 | - log.debug("The floating Ip is created failed whose identifier is {}", | ||
192 | - floatingIp.id().toString()); | ||
193 | - result = false; | ||
194 | - } | ||
195 | - } | ||
196 | } | 184 | } |
197 | } | 185 | } |
198 | return result; | 186 | return result; |
... | @@ -204,23 +192,11 @@ public class FloatingIpManager implements FloatingIpService { | ... | @@ -204,23 +192,11 @@ public class FloatingIpManager implements FloatingIpService { |
204 | boolean result = true; | 192 | boolean result = true; |
205 | for (FloatingIp floatingIp : floatingIps) { | 193 | for (FloatingIp floatingIp : floatingIps) { |
206 | verifyFloatingIpData(floatingIp); | 194 | verifyFloatingIpData(floatingIp); |
207 | - if (floatingIp.portId() != null) { | 195 | + floatingIpStore.put(floatingIp.id(), floatingIp); |
208 | - floatingIpStore.put(floatingIp.id(), floatingIp); | 196 | + if (!floatingIpStore.containsKey(floatingIp.id())) { |
209 | - if (!floatingIpStore.containsKey(floatingIp.id())) { | 197 | + log.debug("The floating Ip is updated failed whose identifier is {}", |
210 | - log.debug("The floating Ip is updated failed whose identifier is {}", | 198 | + floatingIp.id().toString()); |
211 | - floatingIp.id().toString()); | 199 | + result = false; |
212 | - result = false; | ||
213 | - } | ||
214 | - } else { | ||
215 | - FloatingIp oldFloatingIp = floatingIpStore.get(floatingIp.id()); | ||
216 | - if (oldFloatingIp != null) { | ||
217 | - floatingIpStore.remove(floatingIp.id(), oldFloatingIp); | ||
218 | - if (floatingIpStore.containsKey(floatingIp.id())) { | ||
219 | - log.debug("The floating Ip is updated failed whose identifier is {}", | ||
220 | - floatingIp.id().toString()); | ||
221 | - result = false; | ||
222 | - } | ||
223 | - } | ||
224 | } | 200 | } |
225 | } | 201 | } |
226 | return result; | 202 | return result; |
... | @@ -238,6 +214,11 @@ public class FloatingIpManager implements FloatingIpService { | ... | @@ -238,6 +214,11 @@ public class FloatingIpManager implements FloatingIpService { |
238 | "FloatingIP ID doesn't exist"); | 214 | "FloatingIP ID doesn't exist"); |
239 | } | 215 | } |
240 | FloatingIp floatingIp = floatingIpStore.get(floatingIpId); | 216 | FloatingIp floatingIp = floatingIpStore.get(floatingIpId); |
217 | + if (floatingIp.portId() != null) { | ||
218 | + log.debug("The floating Ip is uesd by the port whose identifier is {}", | ||
219 | + floatingIp.portId().toString()); | ||
220 | + return false; | ||
221 | + } | ||
241 | floatingIpStore.remove(floatingIpId, floatingIp); | 222 | floatingIpStore.remove(floatingIpId, floatingIp); |
242 | if (floatingIpStore.containsKey(floatingIpId)) { | 223 | if (floatingIpStore.containsKey(floatingIpId)) { |
243 | log.debug("The floating Ip is deleted failed whose identifier is {}", | 224 | log.debug("The floating Ip is deleted failed whose identifier is {}", | ... | ... |
... | @@ -21,6 +21,7 @@ import org.onlab.packet.MacAddress; | ... | @@ -21,6 +21,7 @@ import org.onlab.packet.MacAddress; |
21 | import org.onosproject.event.ListenerService; | 21 | import org.onosproject.event.ListenerService; |
22 | import org.onosproject.net.Device; | 22 | import org.onosproject.net.Device; |
23 | import org.onosproject.net.DeviceId; | 23 | import org.onosproject.net.DeviceId; |
24 | +import org.onosproject.net.Host; | ||
24 | import org.onosproject.net.HostId; | 25 | import org.onosproject.net.HostId; |
25 | import org.onosproject.vtnrsc.SegmentationId; | 26 | import org.onosproject.vtnrsc.SegmentationId; |
26 | import org.onosproject.vtnrsc.TenantId; | 27 | import org.onosproject.vtnrsc.TenantId; |
... | @@ -79,4 +80,24 @@ public interface VtnRscService extends ListenerService<VtnRscEvent, VtnRscListen | ... | @@ -79,4 +80,24 @@ public interface VtnRscService extends ListenerService<VtnRscEvent, VtnRscListen |
79 | * @return device identifier | 80 | * @return device identifier |
80 | */ | 81 | */ |
81 | DeviceId getSFToSFFMaping(VirtualPortId portId); | 82 | DeviceId getSFToSFFMaping(VirtualPortId portId); |
83 | + | ||
84 | + /** | ||
85 | + * Adds specify Device identifier to Service Function Forward OvsMap | ||
86 | + * or Classifier OvsMap. | ||
87 | + * | ||
88 | + * @param virtualPortId the VirtualPort identifier | ||
89 | + * @param tenantId the tenant identifier | ||
90 | + * @param deviceId the device identifier | ||
91 | + */ | ||
92 | + void addDeviceIdOfOvsMap(VirtualPortId virtualPortId, TenantId tenantId, DeviceId deviceId); | ||
93 | + | ||
94 | + /** | ||
95 | + * Removes specify Device identifier from Service Function Forward OvsMap | ||
96 | + * or Classifier OvsMap. | ||
97 | + * | ||
98 | + * @param host Host | ||
99 | + * @param tenantId the tenant identifier | ||
100 | + * @param deviceId the device identifier | ||
101 | + */ | ||
102 | + void removeDeviceIdOfOvsMap(Host host, TenantId tenantId, DeviceId deviceId); | ||
82 | } | 103 | } | ... | ... |
... | @@ -37,16 +37,19 @@ import org.onosproject.net.Device; | ... | @@ -37,16 +37,19 @@ import org.onosproject.net.Device; |
37 | import org.onosproject.net.DeviceId; | 37 | import org.onosproject.net.DeviceId; |
38 | import org.onosproject.net.Host; | 38 | import org.onosproject.net.Host; |
39 | import org.onosproject.net.HostId; | 39 | import org.onosproject.net.HostId; |
40 | -import org.onosproject.net.host.HostEvent; | ||
41 | -import org.onosproject.net.host.HostListener; | ||
42 | -import org.onosproject.net.host.HostService; | ||
43 | import org.onosproject.net.device.DeviceService; | 40 | import org.onosproject.net.device.DeviceService; |
41 | +import org.onosproject.net.host.HostService; | ||
44 | import org.onosproject.store.serializers.KryoNamespaces; | 42 | import org.onosproject.store.serializers.KryoNamespaces; |
45 | import org.onosproject.store.service.EventuallyConsistentMap; | 43 | import org.onosproject.store.service.EventuallyConsistentMap; |
46 | import org.onosproject.store.service.LogicalClockService; | 44 | import org.onosproject.store.service.LogicalClockService; |
47 | import org.onosproject.store.service.StorageService; | 45 | import org.onosproject.store.service.StorageService; |
48 | import org.onosproject.vtnrsc.FixedIp; | 46 | import org.onosproject.vtnrsc.FixedIp; |
49 | import org.onosproject.vtnrsc.FloatingIp; | 47 | import org.onosproject.vtnrsc.FloatingIp; |
48 | +import org.onosproject.vtnrsc.FlowClassifier; | ||
49 | +import org.onosproject.vtnrsc.PortChain; | ||
50 | +import org.onosproject.vtnrsc.PortPair; | ||
51 | +import org.onosproject.vtnrsc.PortPairGroup; | ||
52 | +import org.onosproject.vtnrsc.PortPairId; | ||
50 | import org.onosproject.vtnrsc.Router; | 53 | import org.onosproject.vtnrsc.Router; |
51 | import org.onosproject.vtnrsc.RouterInterface; | 54 | import org.onosproject.vtnrsc.RouterInterface; |
52 | import org.onosproject.vtnrsc.SegmentationId; | 55 | import org.onosproject.vtnrsc.SegmentationId; |
... | @@ -55,17 +58,24 @@ import org.onosproject.vtnrsc.SubnetId; | ... | @@ -55,17 +58,24 @@ import org.onosproject.vtnrsc.SubnetId; |
55 | import org.onosproject.vtnrsc.TenantId; | 58 | import org.onosproject.vtnrsc.TenantId; |
56 | import org.onosproject.vtnrsc.VirtualPort; | 59 | import org.onosproject.vtnrsc.VirtualPort; |
57 | import org.onosproject.vtnrsc.VirtualPortId; | 60 | import org.onosproject.vtnrsc.VirtualPortId; |
58 | -import org.onosproject.vtnrsc.PortPair; | ||
59 | -import org.onosproject.vtnrsc.PortPairId; | ||
60 | -import org.onosproject.vtnrsc.PortPairGroup; | ||
61 | -import org.onosproject.vtnrsc.FlowClassifier; | ||
62 | -import org.onosproject.vtnrsc.PortChain; | ||
63 | import org.onosproject.vtnrsc.event.VtnRscEvent; | 61 | import org.onosproject.vtnrsc.event.VtnRscEvent; |
64 | import org.onosproject.vtnrsc.event.VtnRscEventFeedback; | 62 | import org.onosproject.vtnrsc.event.VtnRscEventFeedback; |
65 | import org.onosproject.vtnrsc.event.VtnRscListener; | 63 | import org.onosproject.vtnrsc.event.VtnRscListener; |
66 | import org.onosproject.vtnrsc.floatingip.FloatingIpEvent; | 64 | import org.onosproject.vtnrsc.floatingip.FloatingIpEvent; |
67 | import org.onosproject.vtnrsc.floatingip.FloatingIpListener; | 65 | import org.onosproject.vtnrsc.floatingip.FloatingIpListener; |
68 | import org.onosproject.vtnrsc.floatingip.FloatingIpService; | 66 | import org.onosproject.vtnrsc.floatingip.FloatingIpService; |
67 | +import org.onosproject.vtnrsc.flowclassifier.FlowClassifierEvent; | ||
68 | +import org.onosproject.vtnrsc.flowclassifier.FlowClassifierListener; | ||
69 | +import org.onosproject.vtnrsc.flowclassifier.FlowClassifierService; | ||
70 | +import org.onosproject.vtnrsc.portchain.PortChainEvent; | ||
71 | +import org.onosproject.vtnrsc.portchain.PortChainListener; | ||
72 | +import org.onosproject.vtnrsc.portchain.PortChainService; | ||
73 | +import org.onosproject.vtnrsc.portpair.PortPairEvent; | ||
74 | +import org.onosproject.vtnrsc.portpair.PortPairListener; | ||
75 | +import org.onosproject.vtnrsc.portpair.PortPairService; | ||
76 | +import org.onosproject.vtnrsc.portpairgroup.PortPairGroupEvent; | ||
77 | +import org.onosproject.vtnrsc.portpairgroup.PortPairGroupListener; | ||
78 | +import org.onosproject.vtnrsc.portpairgroup.PortPairGroupService; | ||
69 | import org.onosproject.vtnrsc.router.RouterEvent; | 79 | import org.onosproject.vtnrsc.router.RouterEvent; |
70 | import org.onosproject.vtnrsc.router.RouterListener; | 80 | import org.onosproject.vtnrsc.router.RouterListener; |
71 | import org.onosproject.vtnrsc.router.RouterService; | 81 | import org.onosproject.vtnrsc.router.RouterService; |
... | @@ -76,18 +86,6 @@ import org.onosproject.vtnrsc.service.VtnRscService; | ... | @@ -76,18 +86,6 @@ import org.onosproject.vtnrsc.service.VtnRscService; |
76 | import org.onosproject.vtnrsc.subnet.SubnetService; | 86 | import org.onosproject.vtnrsc.subnet.SubnetService; |
77 | import org.onosproject.vtnrsc.tenantnetwork.TenantNetworkService; | 87 | import org.onosproject.vtnrsc.tenantnetwork.TenantNetworkService; |
78 | import org.onosproject.vtnrsc.virtualport.VirtualPortService; | 88 | import org.onosproject.vtnrsc.virtualport.VirtualPortService; |
79 | -import org.onosproject.vtnrsc.portpair.PortPairEvent; | ||
80 | -import org.onosproject.vtnrsc.portpair.PortPairListener; | ||
81 | -import org.onosproject.vtnrsc.portpair.PortPairService; | ||
82 | -import org.onosproject.vtnrsc.portpairgroup.PortPairGroupEvent; | ||
83 | -import org.onosproject.vtnrsc.portpairgroup.PortPairGroupListener; | ||
84 | -import org.onosproject.vtnrsc.portpairgroup.PortPairGroupService; | ||
85 | -import org.onosproject.vtnrsc.flowclassifier.FlowClassifierEvent; | ||
86 | -import org.onosproject.vtnrsc.flowclassifier.FlowClassifierListener; | ||
87 | -import org.onosproject.vtnrsc.flowclassifier.FlowClassifierService; | ||
88 | -import org.onosproject.vtnrsc.portchain.PortChainEvent; | ||
89 | -import org.onosproject.vtnrsc.portchain.PortChainListener; | ||
90 | -import org.onosproject.vtnrsc.portchain.PortChainService; | ||
91 | import org.slf4j.Logger; | 89 | import org.slf4j.Logger; |
92 | 90 | ||
93 | /** | 91 | /** |
... | @@ -105,7 +103,6 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi | ... | @@ -105,7 +103,6 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi |
105 | protected LogicalClockService clockService; | 103 | protected LogicalClockService clockService; |
106 | 104 | ||
107 | private final Logger log = getLogger(getClass()); | 105 | private final Logger log = getLogger(getClass()); |
108 | - private HostListener hostListener = new InnerHostListener(); | ||
109 | private FloatingIpListener floatingIpListener = new InnerFloatingIpListener(); | 106 | private FloatingIpListener floatingIpListener = new InnerFloatingIpListener(); |
110 | private RouterListener routerListener = new InnerRouterListener(); | 107 | private RouterListener routerListener = new InnerRouterListener(); |
111 | private RouterInterfaceListener routerInterfaceListener = new InnerRouterInterfaceListener(); | 108 | private RouterInterfaceListener routerInterfaceListener = new InnerRouterInterfaceListener(); |
... | @@ -120,11 +117,11 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi | ... | @@ -120,11 +117,11 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi |
120 | 117 | ||
121 | private static final String IFACEID = "ifaceid"; | 118 | private static final String IFACEID = "ifaceid"; |
122 | private static final String RUNNELOPTOPOIC = "tunnel-ops-ids"; | 119 | private static final String RUNNELOPTOPOIC = "tunnel-ops-ids"; |
123 | - private static final String LISTENER_NOT_NULL = "listener cannot be null"; | ||
124 | private static final String EVENT_NOT_NULL = "event cannot be null"; | 120 | private static final String EVENT_NOT_NULL = "event cannot be null"; |
125 | private static final String TENANTID_NOT_NULL = "tenantId cannot be null"; | 121 | private static final String TENANTID_NOT_NULL = "tenantId cannot be null"; |
126 | private static final String DEVICEID_NOT_NULL = "deviceId cannot be null"; | 122 | private static final String DEVICEID_NOT_NULL = "deviceId cannot be null"; |
127 | - private static final String OVSMAP_NOT_NULL = "ovsMap cannot be null"; | 123 | + private static final String VIRTUALPORTID_NOT_NULL = "virtualPortId cannot be null"; |
124 | + private static final String HOST_NOT_NULL = "host cannot be null"; | ||
128 | private static final String L3VNIMAP = "l3vniMap"; | 125 | private static final String L3VNIMAP = "l3vniMap"; |
129 | private static final String CLASSIFIEROVSMAP = "classifierOvsMap"; | 126 | private static final String CLASSIFIEROVSMAP = "classifierOvsMap"; |
130 | private static final String SFFOVSMAP = "sffOvsMap"; | 127 | private static final String SFFOVSMAP = "sffOvsMap"; |
... | @@ -157,7 +154,6 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi | ... | @@ -157,7 +154,6 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi |
157 | @Activate | 154 | @Activate |
158 | public void activate() { | 155 | public void activate() { |
159 | eventDispatcher.addSink(VtnRscEvent.class, listenerRegistry); | 156 | eventDispatcher.addSink(VtnRscEvent.class, listenerRegistry); |
160 | - hostService.addListener(hostListener); | ||
161 | floatingIpService.addListener(floatingIpListener); | 157 | floatingIpService.addListener(floatingIpListener); |
162 | routerService.addListener(routerListener); | 158 | routerService.addListener(routerListener); |
163 | routerInterfaceService.addListener(routerInterfaceListener); | 159 | routerInterfaceService.addListener(routerInterfaceListener); |
... | @@ -191,7 +187,6 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi | ... | @@ -191,7 +187,6 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi |
191 | @Deactivate | 187 | @Deactivate |
192 | public void deactivate() { | 188 | public void deactivate() { |
193 | eventDispatcher.removeSink(VtnRscEvent.class); | 189 | eventDispatcher.removeSink(VtnRscEvent.class); |
194 | - hostService.removeListener(hostListener); | ||
195 | floatingIpService.removeListener(floatingIpListener); | 190 | floatingIpService.removeListener(floatingIpListener); |
196 | routerService.removeListener(routerListener); | 191 | routerService.removeListener(routerListener); |
197 | routerInterfaceService.removeListener(routerInterfaceListener); | 192 | routerInterfaceService.removeListener(routerInterfaceListener); |
... | @@ -220,37 +215,6 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi | ... | @@ -220,37 +215,6 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi |
220 | return l3vni; | 215 | return l3vni; |
221 | } | 216 | } |
222 | 217 | ||
223 | - private class InnerHostListener implements HostListener { | ||
224 | - | ||
225 | - @Override | ||
226 | - public void event(HostEvent event) { | ||
227 | - checkNotNull(event, EVENT_NOT_NULL); | ||
228 | - Host host = event.subject(); | ||
229 | - String ifaceId = host.annotations().value(IFACEID); | ||
230 | - if (ifaceId == null) { | ||
231 | - log.error("The ifaceId of Host is null"); | ||
232 | - return; | ||
233 | - } | ||
234 | - VirtualPortId hPortId = VirtualPortId.portId(ifaceId); | ||
235 | - TenantId tenantId = virtualPortService.getPort(hPortId).tenantId(); | ||
236 | - DeviceId deviceId = host.location().deviceId(); | ||
237 | - if (HostEvent.Type.HOST_ADDED == event.type()) { | ||
238 | - if (isServiceFunction(hPortId)) { | ||
239 | - addDeviceIdOfOvsMap(tenantId, deviceId, sffOvsMap); | ||
240 | - } else { | ||
241 | - addDeviceIdOfOvsMap(tenantId, deviceId, classifierOvsMap); | ||
242 | - } | ||
243 | - } else if (HostEvent.Type.HOST_REMOVED == event.type()) { | ||
244 | - if (isLastSFHostOfTenant(host, deviceId, tenantId)) { | ||
245 | - removeDeviceIdOfOvsMap(tenantId, deviceId, sffOvsMap); | ||
246 | - } | ||
247 | - if (isLastClassifierHostOfTenant(host, deviceId, tenantId)) { | ||
248 | - removeDeviceIdOfOvsMap(tenantId, deviceId, classifierOvsMap); | ||
249 | - } | ||
250 | - } | ||
251 | - } | ||
252 | - } | ||
253 | - | ||
254 | private class InnerFloatingIpListener implements FloatingIpListener { | 218 | private class InnerFloatingIpListener implements FloatingIpListener { |
255 | 219 | ||
256 | @Override | 220 | @Override |
... | @@ -466,6 +430,32 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi | ... | @@ -466,6 +430,32 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi |
466 | return null; | 430 | return null; |
467 | } | 431 | } |
468 | 432 | ||
433 | + @Override | ||
434 | + public void addDeviceIdOfOvsMap(VirtualPortId virtualPortId, | ||
435 | + TenantId tenantId, DeviceId deviceId) { | ||
436 | + checkNotNull(virtualPortId, VIRTUALPORTID_NOT_NULL); | ||
437 | + checkNotNull(tenantId, TENANTID_NOT_NULL); | ||
438 | + checkNotNull(deviceId, DEVICEID_NOT_NULL); | ||
439 | + if (isServiceFunction(virtualPortId)) { | ||
440 | + addDeviceIdToSpecificMap(tenantId, deviceId, sffOvsMap); | ||
441 | + } else { | ||
442 | + addDeviceIdToSpecificMap(tenantId, deviceId, classifierOvsMap); | ||
443 | + } | ||
444 | + } | ||
445 | + | ||
446 | + @Override | ||
447 | + public void removeDeviceIdOfOvsMap(Host host, TenantId tenantId, DeviceId deviceId) { | ||
448 | + checkNotNull(host, HOST_NOT_NULL); | ||
449 | + checkNotNull(tenantId, TENANTID_NOT_NULL); | ||
450 | + checkNotNull(deviceId, DEVICEID_NOT_NULL); | ||
451 | + if (isLastSFHostOfTenant(host, deviceId, tenantId)) { | ||
452 | + removeDeviceIdToSpecificMap(tenantId, deviceId, sffOvsMap); | ||
453 | + } | ||
454 | + if (isLastClassifierHostOfTenant(host, deviceId, tenantId)) { | ||
455 | + removeDeviceIdToSpecificMap(tenantId, deviceId, classifierOvsMap); | ||
456 | + } | ||
457 | + } | ||
458 | + | ||
469 | /** | 459 | /** |
470 | * Checks whether the last Service Function host of a specific tenant in | 460 | * Checks whether the last Service Function host of a specific tenant in |
471 | * this device. | 461 | * this device. |
... | @@ -477,11 +467,7 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi | ... | @@ -477,11 +467,7 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi |
477 | */ | 467 | */ |
478 | private boolean isLastSFHostOfTenant(Host host, DeviceId deviceId, | 468 | private boolean isLastSFHostOfTenant(Host host, DeviceId deviceId, |
479 | TenantId tenantId) { | 469 | TenantId tenantId) { |
480 | - checkNotNull(host, "host cannot be null"); | ||
481 | - checkNotNull(deviceId, DEVICEID_NOT_NULL); | ||
482 | - checkNotNull(tenantId, TENANTID_NOT_NULL); | ||
483 | Set<Host> hostSet = hostService.getConnectedHosts(deviceId); | 470 | Set<Host> hostSet = hostService.getConnectedHosts(deviceId); |
484 | - Set<Host> sfcHostSet = new HashSet<Host>(); | ||
485 | if (hostSet != null) { | 471 | if (hostSet != null) { |
486 | for (Host h : hostSet) { | 472 | for (Host h : hostSet) { |
487 | String ifaceId = h.annotations().value(IFACEID); | 473 | String ifaceId = h.annotations().value(IFACEID); |
... | @@ -490,15 +476,14 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi | ... | @@ -490,15 +476,14 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi |
490 | if (virtualPortService.getPort(hPortId).tenantId().tenantId() | 476 | if (virtualPortService.getPort(hPortId).tenantId().tenantId() |
491 | .equals(tenantId.tenantId()) | 477 | .equals(tenantId.tenantId()) |
492 | && isServiceFunction(hPortId)) { | 478 | && isServiceFunction(hPortId)) { |
493 | - sfcHostSet.add(h); | 479 | + if (!h.equals(host)) { |
480 | + return false; | ||
481 | + } | ||
494 | } | 482 | } |
495 | } | 483 | } |
496 | } | 484 | } |
497 | } | 485 | } |
498 | - if (sfcHostSet.size() == 1 && sfcHostSet.contains(host)) { | 486 | + return true; |
499 | - return true; | ||
500 | - } | ||
501 | - return false; | ||
502 | } | 487 | } |
503 | 488 | ||
504 | /** | 489 | /** |
... | @@ -512,11 +497,7 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi | ... | @@ -512,11 +497,7 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi |
512 | */ | 497 | */ |
513 | private boolean isLastClassifierHostOfTenant(Host host, DeviceId deviceId, | 498 | private boolean isLastClassifierHostOfTenant(Host host, DeviceId deviceId, |
514 | TenantId tenantId) { | 499 | TenantId tenantId) { |
515 | - checkNotNull(host, "host cannot be null"); | ||
516 | - checkNotNull(deviceId, DEVICEID_NOT_NULL); | ||
517 | - checkNotNull(tenantId, TENANTID_NOT_NULL); | ||
518 | Set<Host> hostSet = hostService.getConnectedHosts(deviceId); | 500 | Set<Host> hostSet = hostService.getConnectedHosts(deviceId); |
519 | - Set<Host> sfcHostSet = new HashSet<Host>(); | ||
520 | if (hostSet != null) { | 501 | if (hostSet != null) { |
521 | for (Host h : hostSet) { | 502 | for (Host h : hostSet) { |
522 | String ifaceId = h.annotations().value(IFACEID); | 503 | String ifaceId = h.annotations().value(IFACEID); |
... | @@ -525,15 +506,14 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi | ... | @@ -525,15 +506,14 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi |
525 | if (virtualPortService.getPort(hPortId).tenantId().tenantId() | 506 | if (virtualPortService.getPort(hPortId).tenantId().tenantId() |
526 | .equals(tenantId.tenantId()) | 507 | .equals(tenantId.tenantId()) |
527 | && !isServiceFunction(hPortId)) { | 508 | && !isServiceFunction(hPortId)) { |
528 | - sfcHostSet.add(h); | 509 | + if (!h.equals(host)) { |
510 | + return false; | ||
511 | + } | ||
529 | } | 512 | } |
530 | } | 513 | } |
531 | } | 514 | } |
532 | } | 515 | } |
533 | - if (sfcHostSet.size() == 1 && sfcHostSet.contains(host)) { | 516 | + return true; |
534 | - return true; | ||
535 | - } | ||
536 | - return false; | ||
537 | } | 517 | } |
538 | 518 | ||
539 | /** | 519 | /** |
... | @@ -543,12 +523,9 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi | ... | @@ -543,12 +523,9 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi |
543 | * @param deviceId the device identifier | 523 | * @param deviceId the device identifier |
544 | * @param ovsMap the instance of map to store device identifier | 524 | * @param ovsMap the instance of map to store device identifier |
545 | */ | 525 | */ |
546 | - private void addDeviceIdOfOvsMap(TenantId tenantId, | 526 | + private void addDeviceIdToSpecificMap(TenantId tenantId, |
547 | DeviceId deviceId, | 527 | DeviceId deviceId, |
548 | EventuallyConsistentMap<TenantId, Set<DeviceId>> ovsMap) { | 528 | EventuallyConsistentMap<TenantId, Set<DeviceId>> ovsMap) { |
549 | - checkNotNull(tenantId, TENANTID_NOT_NULL); | ||
550 | - checkNotNull(deviceId, DEVICEID_NOT_NULL); | ||
551 | - checkNotNull(ovsMap, OVSMAP_NOT_NULL); | ||
552 | if (ovsMap.containsKey(tenantId)) { | 529 | if (ovsMap.containsKey(tenantId)) { |
553 | Set<DeviceId> deviceIdSet = ovsMap.get(tenantId); | 530 | Set<DeviceId> deviceIdSet = ovsMap.get(tenantId); |
554 | deviceIdSet.add(deviceId); | 531 | deviceIdSet.add(deviceId); |
... | @@ -567,14 +544,11 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi | ... | @@ -567,14 +544,11 @@ public class VtnRscManager extends AbstractListenerManager<VtnRscEvent, VtnRscLi |
567 | * @param deviceId the device identifier | 544 | * @param deviceId the device identifier |
568 | * @param ovsMap the instance of map to store device identifier | 545 | * @param ovsMap the instance of map to store device identifier |
569 | */ | 546 | */ |
570 | - private void removeDeviceIdOfOvsMap(TenantId tenantId, | 547 | + private void removeDeviceIdToSpecificMap(TenantId tenantId, |
571 | DeviceId deviceId, | 548 | DeviceId deviceId, |
572 | EventuallyConsistentMap<TenantId, Set<DeviceId>> ovsMap) { | 549 | EventuallyConsistentMap<TenantId, Set<DeviceId>> ovsMap) { |
573 | - checkNotNull(tenantId, TENANTID_NOT_NULL); | ||
574 | - checkNotNull(deviceId, DEVICEID_NOT_NULL); | ||
575 | - checkNotNull(ovsMap, OVSMAP_NOT_NULL); | ||
576 | Set<DeviceId> deviceIdSet = ovsMap.get(tenantId); | 550 | Set<DeviceId> deviceIdSet = ovsMap.get(tenantId); |
577 | - if (deviceIdSet.size() > 1) { | 551 | + if (deviceIdSet != null && deviceIdSet.size() > 1) { |
578 | deviceIdSet.remove(deviceId); | 552 | deviceIdSet.remove(deviceId); |
579 | ovsMap.put(tenantId, deviceIdSet); | 553 | ovsMap.put(tenantId, deviceIdSet); |
580 | } else { | 554 | } else { | ... | ... |
... | @@ -70,6 +70,7 @@ public class FloatingIpWebResource extends AbstractWebResource { | ... | @@ -70,6 +70,7 @@ public class FloatingIpWebResource extends AbstractWebResource { |
70 | .getLogger(FloatingIpWebResource.class); | 70 | .getLogger(FloatingIpWebResource.class); |
71 | public static final String CREATE_FAIL = "Floating IP is failed to create!"; | 71 | public static final String CREATE_FAIL = "Floating IP is failed to create!"; |
72 | public static final String UPDATE_FAIL = "Floating IP is failed to update!"; | 72 | public static final String UPDATE_FAIL = "Floating IP is failed to update!"; |
73 | + public static final String DELETE_FAIL = "Floating IP is failed to delete!"; | ||
73 | public static final String GET_FAIL = "Floating IP is failed to get!"; | 74 | public static final String GET_FAIL = "Floating IP is failed to get!"; |
74 | public static final String NOT_EXIST = "Floating IP does not exist!"; | 75 | public static final String NOT_EXIST = "Floating IP does not exist!"; |
75 | public static final String DELETE_SUCCESS = "Floating IP delete success!"; | 76 | public static final String DELETE_SUCCESS = "Floating IP delete success!"; |
... | @@ -157,7 +158,11 @@ public class FloatingIpWebResource extends AbstractWebResource { | ... | @@ -157,7 +158,11 @@ public class FloatingIpWebResource extends AbstractWebResource { |
157 | try { | 158 | try { |
158 | FloatingIpId floatingIpId = FloatingIpId.of(id); | 159 | FloatingIpId floatingIpId = FloatingIpId.of(id); |
159 | Set<FloatingIpId> floatingIpIds = Sets.newHashSet(floatingIpId); | 160 | Set<FloatingIpId> floatingIpIds = Sets.newHashSet(floatingIpId); |
160 | - get(FloatingIpService.class).removeFloatingIps(floatingIpIds); | 161 | + Boolean result = nullIsNotFound(get(FloatingIpService.class) |
162 | + .removeFloatingIps(floatingIpIds), DELETE_FAIL); | ||
163 | + if (!result) { | ||
164 | + return Response.status(CONFLICT).entity(DELETE_FAIL).build(); | ||
165 | + } | ||
161 | return Response.status(NO_CONTENT).entity(DELETE_SUCCESS).build(); | 166 | return Response.status(NO_CONTENT).entity(DELETE_SUCCESS).build(); |
162 | } catch (Exception e) { | 167 | } catch (Exception e) { |
163 | return Response.status(NOT_FOUND).entity(e.getMessage()).build(); | 168 | return Response.status(NOT_FOUND).entity(e.getMessage()).build(); | ... | ... |
-
Please register or login to post a comment