Rename Bandwidth to BandwidthResource
To distinguish unit of bandwidth and resource of bandwidth
Change-Id: Ice52538f0c00f6d7743ca247d0f9bab3febdc94b
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 a7dccc6..ed1a498 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
@@ -28,6 +28,7 @@
import org.onlab.packet.IpPrefix;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
+import org.onlab.util.Bandwidth;
import org.onlab.util.Frequency;
import org.onlab.util.KryoNamespace;
import org.onosproject.app.ApplicationState;
@@ -147,7 +148,7 @@
import org.onosproject.net.packet.DefaultPacketRequest;
import org.onosproject.net.packet.PacketPriority;
import org.onosproject.net.provider.ProviderId;
-import org.onosproject.net.resource.Bandwidth;
+import org.onosproject.net.resource.BandwidthResource;
import org.onosproject.net.resource.BandwidthResourceAllocation;
import org.onosproject.net.resource.BandwidthResourceRequest;
import org.onosproject.net.resource.DefaultLinkResourceAllocations;
@@ -223,7 +224,7 @@
.register(new MacAddressSerializer(), MacAddress.class)
.register(VlanId.class)
.register(Frequency.class)
- .register(org.onlab.util.Bandwidth.class)
+ .register(Bandwidth.class)
.build();
/**
@@ -357,7 +358,7 @@
BandwidthResourceRequest.class,
LambdaResourceRequest.class,
LambdaResource.class,
- Bandwidth.class,
+ BandwidthResource.class,
DefaultLinkResourceAllocations.class,
BandwidthResourceAllocation.class,
LambdaResourceAllocation.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 98ee193..94aa5ee 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
@@ -24,6 +24,7 @@
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.onlab.util.Bandwidth;
import org.onlab.util.Frequency;
import org.onosproject.cluster.NodeId;
import org.onosproject.cluster.RoleInfo;
@@ -58,7 +59,7 @@
import org.onosproject.net.flow.FlowRuleBatchEntry;
import org.onosproject.net.intent.IntentId;
import org.onosproject.net.provider.ProviderId;
-import org.onosproject.net.resource.Bandwidth;
+import org.onosproject.net.resource.BandwidthResource;
import org.onosproject.net.resource.BandwidthResourceAllocation;
import org.onosproject.net.resource.DefaultLinkResourceAllocations;
import org.onosproject.net.resource.DefaultLinkResourceRequest;
@@ -354,7 +355,7 @@
.build();
Map<Link, Set<ResourceAllocation>> allocations = new HashMap<>();
allocations.put(new DefaultLink(PID, CP1, CP2, Type.DIRECT),
- ImmutableSet.of(new BandwidthResourceAllocation(Bandwidth.bps(10.0)),
+ ImmutableSet.of(new BandwidthResourceAllocation(BandwidthResource.bps(10.0)),
new LambdaResourceAllocation(LambdaResource.valueOf(1))));
testSerializable(new DefaultLinkResourceAllocations(request, allocations));
}
@@ -367,7 +368,7 @@
@Test
public void testBandwidth() {
- testSerializedEquals(org.onlab.util.Bandwidth.mbps(1000.0));
+ testSerializedEquals(Bandwidth.mbps(1000.0));
}
@Test
@@ -377,7 +378,7 @@
@Test
public void testBandwidthConstraint() {
- testSerializable(new BandwidthConstraint(Bandwidth.bps(1000.0)));
+ testSerializable(new BandwidthConstraint(BandwidthResource.bps(1000.0)));
}
@Test