diff options
author | 2015-10-09 18:32:44 -0700 | |
---|---|---|
committer | 2015-10-09 18:32:44 -0700 | |
commit | 6a07d2d622eaa06953f3353e39c080984076e8de (patch) | |
tree | bfb50a2090fce186c2cc545a400c969bf2ea702b /framework/src/onos/apps/optical | |
parent | e6d71622143ff9b2421a1abbe8434b954b5b1099 (diff) |
Updated master to commit id 6ee8aa3e67ce89908a8c93aa9445c6f71a18f986
Change-Id: I94b055ee2f298daf71e2ec794fd0f2495bd8081f
Diffstat (limited to 'framework/src/onos/apps/optical')
-rw-r--r-- | framework/src/onos/apps/optical/src/main/java/org/onosproject/optical/OpticalPathProvisioner.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/framework/src/onos/apps/optical/src/main/java/org/onosproject/optical/OpticalPathProvisioner.java b/framework/src/onos/apps/optical/src/main/java/org/onosproject/optical/OpticalPathProvisioner.java index 85b5de27..8466b95e 100644 --- a/framework/src/onos/apps/optical/src/main/java/org/onosproject/optical/OpticalPathProvisioner.java +++ b/framework/src/onos/apps/optical/src/main/java/org/onosproject/optical/OpticalPathProvisioner.java @@ -45,7 +45,8 @@ import org.onosproject.net.intent.IntentState; import org.onosproject.net.intent.OpticalCircuitIntent; import org.onosproject.net.intent.OpticalConnectivityIntent; import org.onosproject.net.intent.PointToPointIntent; -import org.onosproject.net.resource.device.DeviceResourceService; +import org.onosproject.net.newresource.ResourceService; +import org.onosproject.net.resource.device.IntentSetMultimap; import org.onosproject.net.resource.link.LinkResourceAllocations; import org.onosproject.net.resource.link.LinkResourceService; import org.onosproject.net.topology.LinkWeight; @@ -97,11 +98,14 @@ public class OpticalPathProvisioner { protected DeviceService deviceService; @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) - protected DeviceResourceService deviceResourceService; + protected IntentSetMultimap intentSetMultimap; @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected LinkResourceService linkResourceService; + @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) + protected ResourceService resourceService; + private ApplicationId appId; private final InternalOpticalPathProvisioner pathProvisioner = new InternalOpticalPathProvisioner(); @@ -292,7 +296,6 @@ public class OpticalPathProvisioner { .bidirectional(true) .build(); intents.add(circuitIntent); - continue; } else if (srcPort instanceof OchPort && dstPort instanceof OchPort) { // Create lightpath // FIXME: hardcoded ODU signal type @@ -304,7 +307,6 @@ public class OpticalPathProvisioner { .bidirectional(true) .build(); intents.add(opticalIntent); - continue; } else { log.warn("Unsupported cross connect point types {} {}", srcPort.type(), dstPort.type()); return Collections.emptyList(); @@ -377,13 +379,13 @@ public class OpticalPathProvisioner { private void releaseResources(Intent intent) { LinkResourceAllocations lra = linkResourceService.getAllocations(intent.id()); if (intent instanceof OpticalConnectivityIntent) { - deviceResourceService.releasePorts(intent.id()); + resourceService.release(intent.id()); if (lra != null) { linkResourceService.releaseResources(lra); } } else if (intent instanceof OpticalCircuitIntent) { - deviceResourceService.releasePorts(intent.id()); - deviceResourceService.releaseMapping(intent.id()); + resourceService.release(intent.id()); + intentSetMultimap.releaseMapping(intent.id()); if (lra != null) { linkResourceService.releaseResources(lra); } |