Rename Lambda in org.onosproject.net.resource to LambdaResource
To avoid naming conflict with Lambda in org.onosproject.net
Change-Id: Ic8a670e7e2fb022f44f5a83cf4805f3ce0f29694
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
index 595ade8..660440c 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/ConsistentLinkResourceStore.java
@@ -25,7 +25,7 @@
import org.onosproject.net.link.LinkService;
import org.onosproject.net.resource.Bandwidth;
import org.onosproject.net.resource.BandwidthResourceAllocation;
-import org.onosproject.net.resource.Lambda;
+import org.onosproject.net.resource.LambdaResource;
import org.onosproject.net.resource.LambdaResourceAllocation;
import org.onosproject.net.resource.LinkResourceAllocations;
import org.onosproject.net.resource.LinkResourceEvent;
@@ -138,7 +138,7 @@
try {
final int waves = Integer.parseInt(link.annotations().value(OPTICAL_WAVES));
for (int i = 1; i <= waves; i++) {
- allocations.add(new LambdaResourceAllocation(Lambda.valueOf(i)));
+ allocations.add(new LambdaResourceAllocation(LambdaResource.valueOf(i)));
}
} catch (NumberFormatException e) {
log.debug("No {} annotation on link {}", OPTICAL_WAVES, link);
diff --git a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/HazelcastLinkResourceStore.java b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/HazelcastLinkResourceStore.java
index f7ff098..8eca091 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/resource/impl/HazelcastLinkResourceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/resource/impl/HazelcastLinkResourceStore.java
@@ -38,7 +38,7 @@
import org.onosproject.net.link.LinkService;
import org.onosproject.net.resource.Bandwidth;
import org.onosproject.net.resource.BandwidthResourceAllocation;
-import org.onosproject.net.resource.Lambda;
+import org.onosproject.net.resource.LambdaResource;
import org.onosproject.net.resource.LambdaResourceAllocation;
import org.onosproject.net.resource.LinkResourceAllocations;
import org.onosproject.net.resource.LinkResourceEvent;
@@ -157,7 +157,7 @@
try {
final int waves = Integer.parseInt(link.annotations().value(wavesAnnotation));
for (int i = 1; i <= waves; i++) {
- allocations.add(new LambdaResourceAllocation(Lambda.valueOf(i)));
+ allocations.add(new LambdaResourceAllocation(LambdaResource.valueOf(i)));
}
} catch (NumberFormatException e) {
log.debug("No {} annotation on link %s", wavesAnnotation, link);
diff --git a/core/store/dist/src/test/java/org/onosproject/store/resource/impl/HazelcastLinkResourceStoreTest.java b/core/store/dist/src/test/java/org/onosproject/store/resource/impl/HazelcastLinkResourceStoreTest.java
index cc577fe..fb32bc3 100644
--- a/core/store/dist/src/test/java/org/onosproject/store/resource/impl/HazelcastLinkResourceStoreTest.java
+++ b/core/store/dist/src/test/java/org/onosproject/store/resource/impl/HazelcastLinkResourceStoreTest.java
@@ -33,7 +33,7 @@
import org.onosproject.net.resource.BandwidthResourceAllocation;
import org.onosproject.net.resource.DefaultLinkResourceAllocations;
import org.onosproject.net.resource.DefaultLinkResourceRequest;
-import org.onosproject.net.resource.Lambda;
+import org.onosproject.net.resource.LambdaResource;
import org.onosproject.net.resource.LambdaResourceAllocation;
import org.onosproject.net.resource.LinkResourceAllocations;
import org.onosproject.net.resource.LinkResourceRequest;
@@ -279,7 +279,7 @@
ImmutableSet.of(link))
.build();
final ResourceAllocation allocation =
- new LambdaResourceAllocation(Lambda.valueOf(33));
+ new LambdaResourceAllocation(LambdaResource.valueOf(33));
final Set<ResourceAllocation> allocationSet = ImmutableSet.of(allocation);
final LinkResourceAllocations allocations =
diff --git a/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java b/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
index debdde2..b276af2 100644
--- a/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
+++ b/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
@@ -152,7 +152,7 @@
import org.onosproject.net.resource.BandwidthResourceRequest;
import org.onosproject.net.resource.DefaultLinkResourceAllocations;
import org.onosproject.net.resource.DefaultLinkResourceRequest;
-import org.onosproject.net.resource.Lambda;
+import org.onosproject.net.resource.LambdaResource;
import org.onosproject.net.resource.LambdaResourceAllocation;
import org.onosproject.net.resource.LambdaResourceRequest;
import org.onosproject.net.resource.LinkResourceRequest;
@@ -355,7 +355,7 @@
DefaultLinkResourceRequest.class,
BandwidthResourceRequest.class,
LambdaResourceRequest.class,
- Lambda.class,
+ LambdaResource.class,
Bandwidth.class,
DefaultLinkResourceAllocations.class,
BandwidthResourceAllocation.class,
diff --git a/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java b/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
index 19656fc..c93da2c 100644
--- a/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
+++ b/core/store/serializers/src/test/java/org/onosproject/store/serializers/KryoSerializerTest.java
@@ -62,7 +62,7 @@
import org.onosproject.net.resource.BandwidthResourceAllocation;
import org.onosproject.net.resource.DefaultLinkResourceAllocations;
import org.onosproject.net.resource.DefaultLinkResourceRequest;
-import org.onosproject.net.resource.Lambda;
+import org.onosproject.net.resource.LambdaResource;
import org.onosproject.net.resource.LambdaResourceAllocation;
import org.onosproject.net.resource.LinkResourceRequest;
import org.onosproject.net.resource.ResourceAllocation;
@@ -355,7 +355,7 @@
Map<Link, Set<ResourceAllocation>> allocations = new HashMap<>();
allocations.put(new DefaultLink(PID, CP1, CP2, Type.DIRECT),
ImmutableSet.of(new BandwidthResourceAllocation(Bandwidth.bps(10.0)),
- new LambdaResourceAllocation(Lambda.valueOf(1))));
+ new LambdaResourceAllocation(LambdaResource.valueOf(1))));
testSerializable(new DefaultLinkResourceAllocations(request, allocations));
}
@@ -367,7 +367,7 @@
@Test
public void testLambdaConstraint() {
- testSerializable(new LambdaConstraint(Lambda.valueOf(1)));
+ testSerializable(new LambdaConstraint(LambdaResource.valueOf(1)));
}
@Test
diff --git a/core/store/trivial/src/main/java/org/onosproject/store/trivial/impl/SimpleLinkResourceStore.java b/core/store/trivial/src/main/java/org/onosproject/store/trivial/impl/SimpleLinkResourceStore.java
index 0d9d09c..a8f8f51 100644
--- a/core/store/trivial/src/main/java/org/onosproject/store/trivial/impl/SimpleLinkResourceStore.java
+++ b/core/store/trivial/src/main/java/org/onosproject/store/trivial/impl/SimpleLinkResourceStore.java
@@ -33,7 +33,7 @@
import org.onosproject.net.intent.IntentId;
import org.onosproject.net.resource.Bandwidth;
import org.onosproject.net.resource.BandwidthResourceAllocation;
-import org.onosproject.net.resource.Lambda;
+import org.onosproject.net.resource.LambdaResource;
import org.onosproject.net.resource.LambdaResourceAllocation;
import org.onosproject.net.resource.LinkResourceAllocations;
import org.onosproject.net.resource.LinkResourceEvent;
@@ -90,7 +90,7 @@
try {
int waves = Integer.parseInt(annotations.value(AnnotationKeys.OPTICAL_WAVES));
for (int i = 1; i <= waves; i++) {
- allocations.add(new LambdaResourceAllocation(Lambda.valueOf(i)));
+ allocations.add(new LambdaResourceAllocation(LambdaResource.valueOf(i)));
}
} catch (NumberFormatException e) {
log.debug("No optical.wave annotation on link %s", link);
diff --git a/core/store/trivial/src/test/java/org/onosproject/store/trivial/impl/SimpleLinkResourceStoreTest.java b/core/store/trivial/src/test/java/org/onosproject/store/trivial/impl/SimpleLinkResourceStoreTest.java
index 3b281c7..5abaa6d 100644
--- a/core/store/trivial/src/test/java/org/onosproject/store/trivial/impl/SimpleLinkResourceStoreTest.java
+++ b/core/store/trivial/src/test/java/org/onosproject/store/trivial/impl/SimpleLinkResourceStoreTest.java
@@ -32,7 +32,7 @@
import org.onosproject.net.provider.ProviderId;
import org.onosproject.net.resource.Bandwidth;
import org.onosproject.net.resource.BandwidthResourceAllocation;
-import org.onosproject.net.resource.Lambda;
+import org.onosproject.net.resource.LambdaResource;
import org.onosproject.net.resource.LambdaResourceAllocation;
import org.onosproject.net.resource.LinkResourceAllocations;
import org.onosproject.net.resource.LinkResourceStore;
@@ -220,7 +220,7 @@
@Override
public Set<ResourceAllocation> getResourceAllocation(Link link) {
final ResourceAllocation allocation =
- new LambdaResourceAllocation(Lambda.valueOf(allocatedLambda));
+ new LambdaResourceAllocation(LambdaResource.valueOf(allocatedLambda));
final Set<ResourceAllocation> allocations = new HashSet<>();
allocations.add(allocation);
return allocations;