Rename: use plural according to the returned type
Change-Id: I7db9ae2fda2f7240d69ad7dbd028ccc0ea8a8fd8
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 9bcd7a9..5d47658 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
@@ -312,7 +312,7 @@
if (ochCP != null) {
OchPort ochPort = (OchPort) deviceService.getPort(ochCP.deviceId(), ochCP.port());
Optional<IntentId> intentId =
- resourceService.getResourceAllocation(Resource.discrete(ochCP.deviceId(), ochCP.port()))
+ resourceService.getResourceAllocations(Resource.discrete(ochCP.deviceId(), ochCP.port()))
.stream()
.map(ResourceAllocation::consumer)
.filter(x -> x instanceof IntentId)
@@ -333,7 +333,7 @@
}
Optional<IntentId> intentId =
- resourceService.getResourceAllocation(Resource.discrete(oduPort.deviceId(), port.number()))
+ resourceService.getResourceAllocations(Resource.discrete(oduPort.deviceId(), port.number()))
.stream()
.map(ResourceAllocation::consumer)
.filter(x -> x instanceof IntentId)
diff --git a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceManager.java b/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceManager.java
index ae7c7f4..b4badb8 100644
--- a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceManager.java
+++ b/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceManager.java
@@ -114,7 +114,7 @@
}
@Override
- public List<ResourceAllocation> getResourceAllocation(Resource resource) {
+ public List<ResourceAllocation> getResourceAllocations(Resource resource) {
checkNotNull(resource);
List<ResourceConsumer> consumers = store.getConsumers(resource);
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MockResourceService.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MockResourceService.java
index a41616b..7e3beca 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MockResourceService.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MockResourceService.java
@@ -68,7 +68,7 @@
}
@Override
- public List<ResourceAllocation> getResourceAllocation(Resource resource) {
+ public List<ResourceAllocation> getResourceAllocations(Resource resource) {
return Optional.ofNullable(assignment.get(resource))
.map(x -> ImmutableList.of(new ResourceAllocation(resource, x)))
.orElse(ImmutableList.of());