Make the old resource APIs deprecated
Change-Id: Ib3158f3f363c928353f6ef82aac98a8e4e589953
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/BandwidthResource.java b/core/api/src/main/java/org/onosproject/net/resource/link/BandwidthResource.java
index 0bfb379..d3bd2d7 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/BandwidthResource.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/BandwidthResource.java
@@ -23,7 +23,10 @@
/**
* Representation of bandwidth resource in bps.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public final class BandwidthResource implements LinkResource {
private final Bandwidth bandwidth;
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/BandwidthResourceAllocation.java b/core/api/src/main/java/org/onosproject/net/resource/link/BandwidthResourceAllocation.java
index 05cf28f..5f36d5f 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/BandwidthResourceAllocation.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/BandwidthResourceAllocation.java
@@ -23,7 +23,10 @@
/**
* Representation of allocated bandwidth resource.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public class BandwidthResourceAllocation implements ResourceAllocation {
private final BandwidthResource bandwidth;
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/BandwidthResourceRequest.java b/core/api/src/main/java/org/onosproject/net/resource/link/BandwidthResourceRequest.java
index 722b870..ff26e81 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/BandwidthResourceRequest.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/BandwidthResourceRequest.java
@@ -23,7 +23,10 @@
/**
* Representation of a request for bandwidth resource.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public class BandwidthResourceRequest implements ResourceRequest {
private final BandwidthResource bandwidth;
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/DefaultLinkResourceAllocations.java b/core/api/src/main/java/org/onosproject/net/resource/link/DefaultLinkResourceAllocations.java
index 379bf71..2fa4fa6 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/DefaultLinkResourceAllocations.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/DefaultLinkResourceAllocations.java
@@ -36,7 +36,10 @@
/**
* Implementation of {@link LinkResourceAllocations}.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public class DefaultLinkResourceAllocations implements LinkResourceAllocations {
private final LinkResourceRequest request;
// TODO: probably should be using LinkKey instead
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/DefaultLinkResourceRequest.java b/core/api/src/main/java/org/onosproject/net/resource/link/DefaultLinkResourceRequest.java
index f8e143a..b57465f 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/DefaultLinkResourceRequest.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/DefaultLinkResourceRequest.java
@@ -39,7 +39,10 @@
/**
* Implementation of {@link LinkResourceRequest}.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public final class DefaultLinkResourceRequest implements LinkResourceRequest {
private final IntentId intentId;
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/LambdaResource.java b/core/api/src/main/java/org/onosproject/net/resource/link/LambdaResource.java
index 3733e46..0658249 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/LambdaResource.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/LambdaResource.java
@@ -23,7 +23,10 @@
/**
* Representation of lambda resource.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public final class LambdaResource implements LinkResource {
private final IndexedLambda lambda;
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/LambdaResourceAllocation.java b/core/api/src/main/java/org/onosproject/net/resource/link/LambdaResourceAllocation.java
index 161cf45..930a6b2 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/LambdaResourceAllocation.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/LambdaResourceAllocation.java
@@ -23,7 +23,10 @@
/**
* Representation of allocated lambda resource.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public class LambdaResourceAllocation implements ResourceAllocation {
private final LambdaResource lambda;
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/LambdaResourceRequest.java b/core/api/src/main/java/org/onosproject/net/resource/link/LambdaResourceRequest.java
index d264d5e..24d3d78 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/LambdaResourceRequest.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/LambdaResourceRequest.java
@@ -24,7 +24,10 @@
/**
* Representation of a request for lambda resource.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public class LambdaResourceRequest implements ResourceRequest {
private final LambdaResource lambda;
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResource.java b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResource.java
index ec06611..b06f16b 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResource.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResource.java
@@ -17,6 +17,9 @@
/**
* Abstraction of link resource.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public interface LinkResource {
}
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceAllocations.java b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceAllocations.java
index 7828867..d0211e2 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceAllocations.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceAllocations.java
@@ -25,7 +25,10 @@
/**
* Representation of allocated link resources.
+ *
+ * @deprecated
*/
+@Deprecated
public interface LinkResourceAllocations extends ResourceAllocation {
/**
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceEvent.java b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceEvent.java
index 3edb386..a370292 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceEvent.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceEvent.java
@@ -23,7 +23,10 @@
/**
* Describes an event related to a Link Resource.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public final class LinkResourceEvent
extends AbstractEvent<LinkResourceEvent.Type, Collection<LinkResourceAllocations>> {
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceListener.java b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceListener.java
index 599dd4f..bbb02e2 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceListener.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceListener.java
@@ -19,6 +19,9 @@
/**
* Entity for receiving link resource events.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public interface LinkResourceListener extends EventListener<LinkResourceEvent> {
}
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceRequest.java b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceRequest.java
index 37622e7..9774e8e 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceRequest.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceRequest.java
@@ -27,7 +27,10 @@
/**
* Representation of a request for link resource.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public interface LinkResourceRequest extends ResourceRequest {
/**
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceStore.java b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceStore.java
index e6674db..e8a295c 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceStore.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceStore.java
@@ -23,7 +23,10 @@
/**
* Manages link resources.
+ *
+ * @deprecated in Emu Release.
*/
+@Deprecated
public interface LinkResourceStore {
/**
* Returns free resources for given link.
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceStoreDelegate.java b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceStoreDelegate.java
index 6c051d6..dbfb3b0 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceStoreDelegate.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceStoreDelegate.java
@@ -19,6 +19,9 @@
/**
* Link resource store delegate abstraction.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public interface LinkResourceStoreDelegate extends StoreDelegate<LinkResourceEvent> {
}
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResources.java b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResources.java
index dc00522..4645042 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResources.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResources.java
@@ -19,7 +19,10 @@
/**
* Abstraction of a resources of a link.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public interface LinkResources {
/**
@@ -31,7 +34,10 @@
/**
* Builder of {@link LinkResources}.
+ *
+ * @deprecated in Emu Release
*/
+ @Deprecated
interface Builder {
/**
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/MplsLabel.java b/core/api/src/main/java/org/onosproject/net/resource/link/MplsLabel.java
index 89c8776..5138d02 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/MplsLabel.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/MplsLabel.java
@@ -20,7 +20,10 @@
/**
* Representation of MPLS label resource.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public final class MplsLabel implements LinkResource {
private final org.onlab.packet.MplsLabel mplsLabel;
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/MplsLabelResourceAllocation.java b/core/api/src/main/java/org/onosproject/net/resource/link/MplsLabelResourceAllocation.java
index cc9edc2..7441bee 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/MplsLabelResourceAllocation.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/MplsLabelResourceAllocation.java
@@ -24,7 +24,10 @@
/**
* Representation of allocated MPLS label resource.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public class MplsLabelResourceAllocation implements ResourceAllocation {
private final MplsLabel mplsLabel;
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/MplsLabelResourceRequest.java b/core/api/src/main/java/org/onosproject/net/resource/link/MplsLabelResourceRequest.java
index 01a048b..5b9c4a0 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/MplsLabelResourceRequest.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/MplsLabelResourceRequest.java
@@ -24,7 +24,10 @@
/**
* Representation of a request for lambda resource.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
public class MplsLabelResourceRequest implements ResourceRequest {
private final MplsLabel mplsLabel;
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/package-info.java b/core/api/src/main/java/org/onosproject/net/resource/link/package-info.java
index b10e4ba..f374d77 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/package-info.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/package-info.java
@@ -17,5 +17,11 @@
/**
* Services for reserving links and their capacity as network resources,
* e.g. bandwidth, lambdas.
+ * <p>
+ * Note: Classes under the package will be remove.
+ * Developers should not use the classes.
+ * This package is marked as deprecated in Emu Release.
+ * </p>
*/
+@Deprecated
package org.onosproject.net.resource.link;
diff --git a/core/api/src/main/java/org/onosproject/net/resource/package-info.java b/core/api/src/main/java/org/onosproject/net/resource/package-info.java
index e676fc8..a05dfda 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/package-info.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/package-info.java
@@ -16,5 +16,9 @@
/**
* Abstractions for reserving network resources.
+ * <p>
+ * Note: Classes under the package will be removed.
+ * Developers should not use the classes.
+ * </p>
*/
package org.onosproject.net.resource;
diff --git a/core/common/src/test/java/org/onosproject/store/trivial/SimpleLinkResourceStore.java b/core/common/src/test/java/org/onosproject/store/trivial/SimpleLinkResourceStore.java
index 58b446c..22df937 100644
--- a/core/common/src/test/java/org/onosproject/store/trivial/SimpleLinkResourceStore.java
+++ b/core/common/src/test/java/org/onosproject/store/trivial/SimpleLinkResourceStore.java
@@ -52,7 +52,10 @@
/**
* Manages link resources using trivial in-memory structures implementation.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
@Component(immediate = true)
@Service
public class SimpleLinkResourceStore implements LinkResourceStore {
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 a38550e..351c7a5 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
@@ -72,7 +72,10 @@
/**
* Store that manages link resources using Copycat-backed TransactionalMaps.
+ *
+ * @deprecated in Emu Release
*/
+@Deprecated
@Component(immediate = true, enabled = true)
@Service
public class ConsistentLinkResourceStore extends