Moving LabelResourceManager to incubator

Breaking apart resource package into {device, link, label}
Refactored cluster serializers so they are visible

Change-Id: I71051bcd5e790ae6abeb154bf58286e584c32858
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/ObjectiveTracker.java b/core/net/src/main/java/org/onosproject/net/intent/impl/ObjectiveTracker.java
index b7ad184..939b9a1 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/ObjectiveTracker.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/ObjectiveTracker.java
@@ -41,9 +41,9 @@
 import org.onosproject.net.intent.IntentService;
 import org.onosproject.net.intent.Key;
 import org.onosproject.net.link.LinkEvent;
-import org.onosproject.net.resource.LinkResourceEvent;
-import org.onosproject.net.resource.LinkResourceListener;
-import org.onosproject.net.resource.LinkResourceService;
+import org.onosproject.net.resource.link.LinkResourceEvent;
+import org.onosproject.net.resource.link.LinkResourceListener;
+import org.onosproject.net.resource.link.LinkResourceService;
 import org.onosproject.net.topology.TopologyEvent;
 import org.onosproject.net.topology.TopologyListener;
 import org.onosproject.net.topology.TopologyService;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/ConnectivityIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/ConnectivityIntentCompiler.java
index d9e68bd..0a73d9a 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/ConnectivityIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/ConnectivityIntentCompiler.java
@@ -29,7 +29,7 @@
 import org.onosproject.net.intent.IntentExtensionService;
 import org.onosproject.net.intent.impl.PathNotFoundException;
 import org.onosproject.net.provider.ProviderId;
-import org.onosproject.net.resource.LinkResourceService;
+import org.onosproject.net.resource.link.LinkResourceService;
 import org.onosproject.net.topology.LinkWeight;
 import org.onosproject.net.topology.PathService;
 import org.onosproject.net.topology.TopologyEdge;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompiler.java
index d8990ea..4116825 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompiler.java
@@ -31,7 +31,7 @@
 import org.onosproject.net.intent.Intent;
 import org.onosproject.net.intent.PathIntent;
 import org.onosproject.net.intent.constraint.AsymmetricPathConstraint;
-import org.onosproject.net.resource.LinkResourceAllocations;
+import org.onosproject.net.resource.link.LinkResourceAllocations;
 
 import java.util.ArrayList;
 import java.util.Arrays;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
index 94f85bd..9085f08 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
@@ -41,7 +41,7 @@
 import org.onosproject.net.intent.IntentCompiler;
 import org.onosproject.net.intent.IntentExtensionService;
 import org.onosproject.net.intent.LinkCollectionIntent;
-import org.onosproject.net.resource.LinkResourceAllocations;
+import org.onosproject.net.resource.link.LinkResourceAllocations;
 
 import java.util.ArrayList;
 import java.util.Collections;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsIntentCompiler.java
index b59d7eb..609f9a3 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsIntentCompiler.java
@@ -19,7 +19,7 @@
 import org.onosproject.net.intent.MplsIntent;
 import org.onosproject.net.intent.MplsPathIntent;
 import org.onosproject.net.provider.ProviderId;
-import org.onosproject.net.resource.LinkResourceAllocations;
+import org.onosproject.net.resource.link.LinkResourceAllocations;
 
 
 @Component(immediate = true)
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java
index 9f835cf..d6eae35 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java
@@ -42,12 +42,12 @@
 import org.onosproject.net.intent.IntentExtensionService;
 import org.onosproject.net.intent.MplsPathIntent;
 import org.onosproject.net.link.LinkStore;
-import org.onosproject.net.resource.DefaultLinkResourceRequest;
-import org.onosproject.net.resource.LinkResourceAllocations;
-import org.onosproject.net.resource.LinkResourceRequest;
-import org.onosproject.net.resource.LinkResourceService;
-import org.onosproject.net.resource.MplsLabel;
-import org.onosproject.net.resource.MplsLabelResourceAllocation;
+import org.onosproject.net.resource.link.DefaultLinkResourceRequest;
+import org.onosproject.net.resource.link.LinkResourceAllocations;
+import org.onosproject.net.resource.link.LinkResourceRequest;
+import org.onosproject.net.resource.link.LinkResourceService;
+import org.onosproject.net.resource.link.MplsLabel;
+import org.onosproject.net.resource.link.MplsLabelResourceAllocation;
 import org.onosproject.net.resource.ResourceAllocation;
 import org.onosproject.net.resource.ResourceType;
 import org.slf4j.Logger;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MultiPointToSinglePointIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MultiPointToSinglePointIntentCompiler.java
index d004d6f..3a40622 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MultiPointToSinglePointIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MultiPointToSinglePointIntentCompiler.java
@@ -37,7 +37,7 @@
 import org.onosproject.net.intent.MultiPointToSinglePointIntent;
 import org.onosproject.net.intent.PointToPointIntent;
 import org.onosproject.net.intent.impl.PathNotFoundException;
-import org.onosproject.net.resource.LinkResourceAllocations;
+import org.onosproject.net.resource.link.LinkResourceAllocations;
 import org.onosproject.net.topology.PathService;
 
 import com.google.common.collect.ImmutableSet;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java
index 91c9df3..4f8527e 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java
@@ -40,13 +40,13 @@
 import org.onosproject.net.intent.IntentExtensionService;
 import org.onosproject.net.intent.OpticalConnectivityIntent;
 import org.onosproject.net.intent.OpticalPathIntent;
-import org.onosproject.net.resource.DefaultLinkResourceRequest;
-import org.onosproject.net.resource.DeviceResourceService;
-import org.onosproject.net.resource.LambdaResource;
-import org.onosproject.net.resource.LambdaResourceAllocation;
-import org.onosproject.net.resource.LinkResourceAllocations;
-import org.onosproject.net.resource.LinkResourceRequest;
-import org.onosproject.net.resource.LinkResourceService;
+import org.onosproject.net.resource.link.DefaultLinkResourceRequest;
+import org.onosproject.net.resource.device.DeviceResourceService;
+import org.onosproject.net.resource.link.LambdaResource;
+import org.onosproject.net.resource.link.LambdaResourceAllocation;
+import org.onosproject.net.resource.link.LinkResourceAllocations;
+import org.onosproject.net.resource.link.LinkResourceRequest;
+import org.onosproject.net.resource.link.LinkResourceService;
 import org.onosproject.net.resource.ResourceAllocation;
 import org.onosproject.net.resource.ResourceType;
 import org.onosproject.net.topology.LinkWeight;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompiler.java
index 84368d9..f4b11db 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompiler.java
@@ -37,8 +37,8 @@
 import org.onosproject.net.intent.IntentCompiler;
 import org.onosproject.net.intent.IntentExtensionService;
 import org.onosproject.net.intent.OpticalPathIntent;
-import org.onosproject.net.resource.LinkResourceAllocations;
-import org.onosproject.net.resource.LinkResourceService;
+import org.onosproject.net.resource.link.LinkResourceAllocations;
+import org.onosproject.net.resource.link.LinkResourceService;
 
 import java.util.Collections;
 import java.util.LinkedList;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java
index 61c13e7..d6187cd 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java
@@ -35,7 +35,7 @@
 import org.onosproject.net.intent.IntentCompiler;
 import org.onosproject.net.intent.IntentExtensionService;
 import org.onosproject.net.intent.PathIntent;
-import org.onosproject.net.resource.LinkResourceAllocations;
+import org.onosproject.net.resource.link.LinkResourceAllocations;
 
 import java.util.ArrayList;
 import java.util.Collections;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompiler.java
index 1c24d90..5644ee2 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompiler.java
@@ -26,7 +26,7 @@
 import org.onosproject.net.intent.PathIntent;
 import org.onosproject.net.intent.PointToPointIntent;
 import org.onosproject.net.provider.ProviderId;
-import org.onosproject.net.resource.LinkResourceAllocations;
+import org.onosproject.net.resource.link.LinkResourceAllocations;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/SinglePointToMultiPointIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/SinglePointToMultiPointIntentCompiler.java
index 0021cd2..91341d2 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/SinglePointToMultiPointIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/SinglePointToMultiPointIntentCompiler.java
@@ -30,7 +30,7 @@
 import org.onosproject.net.intent.LinkCollectionIntent;
 import org.onosproject.net.intent.SinglePointToMultiPointIntent;
 import org.onosproject.net.provider.ProviderId;
-import org.onosproject.net.resource.LinkResourceAllocations;
+import org.onosproject.net.resource.link.LinkResourceAllocations;
 
 import com.google.common.collect.ImmutableSet;
 
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/TwoWayP2PIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/TwoWayP2PIntentCompiler.java
index 63f8ebb..50a6754 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/TwoWayP2PIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/TwoWayP2PIntentCompiler.java
@@ -22,7 +22,7 @@
 import org.onosproject.net.intent.Intent;
 import org.onosproject.net.intent.PointToPointIntent;
 import org.onosproject.net.intent.TwoWayP2PIntent;
-import org.onosproject.net.resource.LinkResourceAllocations;
+import org.onosproject.net.resource.link.LinkResourceAllocations;
 
 import java.util.List;
 import java.util.Set;
diff --git a/core/net/src/main/java/org/onosproject/net/resource/impl/DeviceResourceManager.java b/core/net/src/main/java/org/onosproject/net/resource/impl/DeviceResourceManager.java
index cfa290b..71fa9d5 100644
--- a/core/net/src/main/java/org/onosproject/net/resource/impl/DeviceResourceManager.java
+++ b/core/net/src/main/java/org/onosproject/net/resource/impl/DeviceResourceManager.java
@@ -25,8 +25,8 @@
 import org.onosproject.net.intent.Intent;
 import org.onosproject.net.intent.IntentId;
 import org.onosproject.net.intent.OpticalConnectivityIntent;
-import org.onosproject.net.resource.DeviceResourceService;
-import org.onosproject.net.resource.DeviceResourceStore;
+import org.onosproject.net.resource.device.DeviceResourceService;
+import org.onosproject.net.resource.device.DeviceResourceStore;
 import org.slf4j.Logger;
 
 import java.util.Arrays;
diff --git a/core/net/src/main/java/org/onosproject/net/resource/impl/LabelResourceManager.java b/core/net/src/main/java/org/onosproject/net/resource/impl/LabelResourceManager.java
deleted file mode 100644
index e719ab8..0000000
--- a/core/net/src/main/java/org/onosproject/net/resource/impl/LabelResourceManager.java
+++ /dev/null
@@ -1,251 +0,0 @@
-package org.onosproject.net.resource.impl;
-
-import static org.slf4j.LoggerFactory.getLogger;
-
-import java.util.Collection;
-import java.util.Set;
-
-import org.apache.felix.scr.annotations.Activate;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Deactivate;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.ReferenceCardinality;
-import org.apache.felix.scr.annotations.Service;
-import org.onosproject.event.EventDeliveryService;
-import org.onosproject.event.ListenerRegistry;
-import org.onosproject.net.Device;
-import org.onosproject.net.DeviceId;
-import org.onosproject.net.device.DeviceEvent;
-import org.onosproject.net.device.DeviceEvent.Type;
-import org.onosproject.net.device.DeviceListener;
-import org.onosproject.net.device.DeviceService;
-import org.onosproject.net.provider.AbstractProviderRegistry;
-import org.onosproject.net.provider.AbstractProviderService;
-import org.onosproject.net.resource.LabelResource;
-import org.onosproject.net.resource.LabelResourceAdminService;
-import org.onosproject.net.resource.LabelResourceDelegate;
-import org.onosproject.net.resource.LabelResourceEvent;
-import org.onosproject.net.resource.LabelResourceId;
-import org.onosproject.net.resource.LabelResourceListener;
-import org.onosproject.net.resource.LabelResourcePool;
-import org.onosproject.net.resource.LabelResourceProvider;
-import org.onosproject.net.resource.LabelResourceProviderRegistry;
-import org.onosproject.net.resource.LabelResourceProviderService;
-import org.onosproject.net.resource.LabelResourceService;
-import org.onosproject.net.resource.LabelResourceStore;
-import org.slf4j.Logger;
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.base.Preconditions.checkArgument;
-
-import com.google.common.collect.Multimap;
-
-/**
- * provides implementation of the label resource NB & SB APIs.
- *
- */
-@Component(immediate = true)
-@Service
-public class LabelResourceManager
-        extends
-        AbstractProviderRegistry<LabelResourceProvider, LabelResourceProviderService>
-        implements LabelResourceService, LabelResourceAdminService,
-        LabelResourceProviderRegistry {
-    private final Logger log = getLogger(getClass());
-    private final LabelResourceDelegate delegate = new InternalLabelResourceDelegate();
-
-    private final ListenerRegistry<LabelResourceEvent, LabelResourceListener> listenerRegistry
-                            = new ListenerRegistry<>();
-
-    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
-    protected LabelResourceStore store;
-
-    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
-    protected EventDeliveryService eventDispatcher;
-
-    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
-    protected DeviceService deviceService;
-
-    private DeviceListener deviceListener = new InternalDeviceListener();
-
-    @Activate
-    public void activate() {
-        store.setDelegate(delegate);
-        eventDispatcher.addSink(LabelResourceEvent.class, listenerRegistry);
-        deviceService.addListener(deviceListener);
-        log.info("Started");
-
-    }
-
-    @Deactivate
-    public void deactivate() {
-        deviceService.removeListener(deviceListener);
-        store.unsetDelegate(delegate);
-        eventDispatcher.removeSink(LabelResourceEvent.class);
-        log.info("Stopped");
-    }
-
-    @Override
-    public boolean createDevicePool(DeviceId deviceId,
-                                    LabelResourceId beginLabel,
-                                    LabelResourceId endLabel) {
-        checkNotNull(deviceId, "deviceId is not null");
-        checkNotNull(beginLabel, "beginLabel is not null");
-        checkNotNull(endLabel, "beginLabel is not null");
-        checkArgument(beginLabel.labelId() < 0 || endLabel.labelId() < 0,
-                      "The value of beginLabel and the value of endLabel must be both positive number.");
-        checkArgument(beginLabel.labelId() > endLabel.labelId(),
-                      "The value of endLabel must be greater than the value of endLabel.");
-        return store.createDevicePool(deviceId, beginLabel, endLabel);
-    }
-
-    @Override
-    public boolean createGlobalPool(LabelResourceId beginLabel,
-                                    LabelResourceId endLabel) {
-        checkNotNull(beginLabel, "beginLabel is not null");
-        checkNotNull(endLabel, "beginLabel is not null");
-        checkArgument(beginLabel.labelId() < 0 || endLabel.labelId() < 0,
-                      "The value of beginLabel and the value of endLabel must be both positive number.");
-        checkArgument(beginLabel.labelId() > endLabel.labelId(),
-                      "The value of endLabel must be greater than the value of endLabel.");
-        return store.createGlobalPool(beginLabel, endLabel);
-    }
-
-    @Override
-    public boolean destroyDevicePool(DeviceId deviceId) {
-        checkNotNull(deviceId, "deviceId is not null");
-        return store.destroyDevicePool(deviceId);
-    }
-
-    @Override
-    public boolean destroyGlobalPool() {
-        return store.destroyGlobalPool();
-    }
-
-    @Override
-    public Collection<LabelResource> applyFromDevicePool(DeviceId deviceId,
-                                                         long applyNum) {
-        checkNotNull(deviceId, "deviceId is not null");
-        checkNotNull(applyNum, "applyNum is not null");
-        return store.applyFromDevicePool(deviceId, applyNum);
-    }
-
-    @Override
-    public Collection<LabelResource> applyFromGlobalPool(long applyNum) {
-        checkNotNull(applyNum, "applyNum is not null");
-        return store.applyFromGlobalPool(applyNum);
-    }
-
-    @Override
-    public boolean releaseToDevicePool(Multimap<DeviceId, LabelResource> release) {
-        checkNotNull(release, "release is not null");
-        return store.releaseToDevicePool(release);
-    }
-
-    @Override
-    public boolean releaseToGlobalPool(Set<LabelResourceId> release) {
-        checkNotNull(release, "release is not null");
-        return store.releaseToGlobalPool(release);
-    }
-
-    @Override
-    public boolean isDevicePoolFull(DeviceId deviceId) {
-        checkNotNull(deviceId, "deviceId is not null");
-        return store.isDevicePoolFull(deviceId);
-    }
-
-    @Override
-    public boolean isGlobalPoolFull() {
-        return store.isGlobalPoolFull();
-    }
-
-    @Override
-    public long getFreeNumOfDevicePool(DeviceId deviceId) {
-        checkNotNull(deviceId, "deviceId is not null");
-        return store.getFreeNumOfDevicePool(deviceId);
-    }
-
-    @Override
-    public long getFreeNumOfGlobalPool() {
-        return store.getFreeNumOfGlobalPool();
-    }
-
-    @Override
-    public LabelResourcePool getDeviceLabelResourcePool(DeviceId deviceId) {
-        checkNotNull(deviceId, "deviceId is not null");
-        return store.getDeviceLabelResourcePool(deviceId);
-    }
-
-    @Override
-    public LabelResourcePool getGlobalLabelResourcePool() {
-        return store.getGlobalLabelResourcePool();
-    }
-
-    @Override
-    public void addListener(LabelResourceListener listener) {
-        listenerRegistry.addListener(listener);
-    }
-
-    @Override
-    public void removeListener(LabelResourceListener listener) {
-        listenerRegistry.removeListener(listener);
-
-    }
-
-    private void post(LabelResourceEvent event) {
-        if (event != null) {
-            eventDispatcher.post(event);
-        }
-    }
-
-    private class InternalLabelResourceDelegate
-            implements LabelResourceDelegate {
-
-        @Override
-        public void notify(LabelResourceEvent event) {
-            post(event);
-        }
-
-    }
-
-    private class InternalDeviceListener implements DeviceListener {
-
-        @Override
-        public void event(DeviceEvent event) {
-            Device device = event.subject();
-            if (Type.DEVICE_REMOVED.equals(event.type())) {
-                destroyDevicePool(device.id());
-            }
-        }
-    }
-
-    private class InternalLabelResourceProviderService
-            extends AbstractProviderService<LabelResourceProvider>
-            implements LabelResourceProviderService {
-
-        protected InternalLabelResourceProviderService(LabelResourceProvider provider) {
-            super(provider);
-        }
-
-        @Override
-        public void deviceLabelResourcePoolDetected(DeviceId deviceId,
-                                                    LabelResourceId beginLabel,
-                                                    LabelResourceId endLabel) {
-            checkNotNull(deviceId, "deviceId is not null");
-            checkNotNull(beginLabel, "beginLabel is not null");
-            checkNotNull(endLabel, "endLabel is not null");
-            createDevicePool(deviceId, beginLabel, endLabel);
-        }
-
-        @Override
-        public void deviceLabelResourcePoolDestroyed(DeviceId deviceId) {
-            checkNotNull(deviceId, "deviceId is not null");
-            destroyDevicePool(deviceId);
-        }
-
-    }
-
-    @Override
-    protected LabelResourceProviderService createProviderService(LabelResourceProvider provider) {
-        return new InternalLabelResourceProviderService(provider);
-    }
-}
diff --git a/core/net/src/main/java/org/onosproject/net/resource/impl/LinkResourceManager.java b/core/net/src/main/java/org/onosproject/net/resource/impl/LinkResourceManager.java
index 57bae5a..6b02edd 100644
--- a/core/net/src/main/java/org/onosproject/net/resource/impl/LinkResourceManager.java
+++ b/core/net/src/main/java/org/onosproject/net/resource/impl/LinkResourceManager.java
@@ -25,22 +25,22 @@
 import org.onosproject.event.EventDeliveryService;
 import org.onosproject.net.Link;
 import org.onosproject.net.intent.IntentId;
-import org.onosproject.net.resource.BandwidthResourceAllocation;
-import org.onosproject.net.resource.BandwidthResourceRequest;
-import org.onosproject.net.resource.DefaultLinkResourceAllocations;
-import org.onosproject.net.resource.LambdaResource;
-import org.onosproject.net.resource.LambdaResourceAllocation;
-import org.onosproject.net.resource.LambdaResourceRequest;
-import org.onosproject.net.resource.LinkResourceAllocations;
-import org.onosproject.net.resource.LinkResourceEvent;
-import org.onosproject.net.resource.LinkResourceListener;
-import org.onosproject.net.resource.LinkResourceRequest;
-import org.onosproject.net.resource.LinkResourceService;
-import org.onosproject.net.resource.LinkResourceStore;
-import org.onosproject.net.resource.LinkResourceStoreDelegate;
-import org.onosproject.net.resource.MplsLabel;
-import org.onosproject.net.resource.MplsLabelResourceAllocation;
-import org.onosproject.net.resource.MplsLabelResourceRequest;
+import org.onosproject.net.resource.link.BandwidthResourceAllocation;
+import org.onosproject.net.resource.link.BandwidthResourceRequest;
+import org.onosproject.net.resource.link.DefaultLinkResourceAllocations;
+import org.onosproject.net.resource.link.LambdaResource;
+import org.onosproject.net.resource.link.LambdaResourceAllocation;
+import org.onosproject.net.resource.link.LambdaResourceRequest;
+import org.onosproject.net.resource.link.LinkResourceAllocations;
+import org.onosproject.net.resource.link.LinkResourceEvent;
+import org.onosproject.net.resource.link.LinkResourceListener;
+import org.onosproject.net.resource.link.LinkResourceRequest;
+import org.onosproject.net.resource.link.LinkResourceService;
+import org.onosproject.net.resource.link.LinkResourceStore;
+import org.onosproject.net.resource.link.LinkResourceStoreDelegate;
+import org.onosproject.net.resource.link.MplsLabel;
+import org.onosproject.net.resource.link.MplsLabelResourceAllocation;
+import org.onosproject.net.resource.link.MplsLabelResourceRequest;
 import org.onosproject.net.resource.ResourceAllocation;
 import org.onosproject.net.resource.ResourceRequest;
 import org.onosproject.net.resource.ResourceType;
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
index d48d107..ca75a20 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
@@ -43,7 +43,7 @@
 import org.onosproject.net.intent.IntentService;
 import org.onosproject.net.intent.IntentState;
 import org.onosproject.net.intent.Key;
-import org.onosproject.net.resource.LinkResourceAllocations;
+import org.onosproject.net.resource.link.LinkResourceAllocations;
 import org.onosproject.store.trivial.impl.SimpleIntentStore;
 
 import java.util.Collection;
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/ObjectiveTrackerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/ObjectiveTrackerTest.java
index 70b00e0..58fa129 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/ObjectiveTrackerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/ObjectiveTrackerTest.java
@@ -38,8 +38,8 @@
 import org.onosproject.net.intent.Key;
 import org.onosproject.net.intent.MockIdGenerator;
 import org.onosproject.net.link.LinkEvent;
-import org.onosproject.net.resource.LinkResourceEvent;
-import org.onosproject.net.resource.LinkResourceListener;
+import org.onosproject.net.resource.link.LinkResourceEvent;
+import org.onosproject.net.resource.link.LinkResourceListener;
 import org.onosproject.net.topology.Topology;
 import org.onosproject.net.topology.TopologyEvent;
 import org.onosproject.net.topology.TopologyListener;
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompilerTest.java
index 32d917f..e57d9db 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompilerTest.java
@@ -34,9 +34,9 @@
 import org.onosproject.net.intent.constraint.BandwidthConstraint;
 import org.onosproject.net.intent.constraint.LambdaConstraint;
 import org.onosproject.net.intent.impl.PathNotFoundException;
-import org.onosproject.net.resource.BandwidthResource;
-import org.onosproject.net.resource.LambdaResource;
-import org.onosproject.net.resource.LinkResourceService;
+import org.onosproject.net.resource.link.BandwidthResource;
+import org.onosproject.net.resource.link.LambdaResource;
+import org.onosproject.net.resource.link.LinkResourceService;
 
 import java.util.Collections;
 import java.util.List;