Refactor: Remove intermediate layer just delegating to DeviceResourceStore
Change-Id: Ie46298311e889a737c4c2ecaefa09ba1bc13d547
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java
index de41acf..a54c92d 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java
@@ -52,7 +52,7 @@
import org.onosproject.net.newresource.ResourceAllocation;
import org.onosproject.net.newresource.ResourcePath;
import org.onosproject.net.newresource.ResourceService;
-import org.onosproject.net.resource.device.DeviceResourceService;
+import org.onosproject.net.resource.device.DeviceResourceStore;
import org.onosproject.net.resource.link.LinkResourceAllocations;
import org.osgi.service.component.ComponentContext;
import org.slf4j.Logger;
@@ -98,7 +98,7 @@
protected ResourceService resourceService;
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
- protected DeviceResourceService deviceResourceService;
+ protected DeviceResourceStore deviceResourceStore;
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
protected IntentService intentService;
@@ -208,7 +208,7 @@
circuitIntent = new FlowRuleIntent(appId, rules, intent.resources());
// Save circuit to connectivity intent mapping
- deviceResourceService.requestMapping(connIntent.id(), intent.id());
+ deviceResourceStore.allocateMapping(connIntent.id(), intent.id());
intents.add(circuitIntent);
return intents;
@@ -226,7 +226,7 @@
return true;
}
- Set<IntentId> mapping = deviceResourceService.getMapping(resource);
+ Set<IntentId> mapping = deviceResourceStore.getMapping(resource);
if (mapping == null) {
return true;