Move files under newresource package to resource package

Change-Id: Ifedb99be4671ada97fafe3ecfd196939207baa86
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
index 1fc64d6..d214c7f 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
@@ -44,8 +44,8 @@
 import org.onosproject.net.intent.Key;
 import org.onosproject.net.intent.impl.phase.FinalIntentProcessPhase;
 import org.onosproject.net.intent.impl.phase.IntentProcessPhase;
-import org.onosproject.net.newresource.ResourceService;
 import org.osgi.service.component.ComponentContext;
+import org.onosproject.net.resource.ResourceService;
 import org.slf4j.Logger;
 
 import java.util.Collection;
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 5de3b32..f11b9e8 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
@@ -49,9 +49,9 @@
 import org.onosproject.net.intent.IntentPartitionEventListener;
 import org.onosproject.net.intent.IntentPartitionService;
 import org.onosproject.net.link.LinkEvent;
-import org.onosproject.net.newresource.ResourceEvent;
-import org.onosproject.net.newresource.ResourceListener;
-import org.onosproject.net.newresource.ResourceService;
+import org.onosproject.net.resource.ResourceEvent;
+import org.onosproject.net.resource.ResourceListener;
+import org.onosproject.net.resource.ResourceService;
 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 69101a9..ea3e28b 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
@@ -27,7 +27,7 @@
 import org.onosproject.net.intent.IntentCompiler;
 import org.onosproject.net.intent.IntentExtensionService;
 import org.onosproject.net.intent.impl.PathNotFoundException;
-import org.onosproject.net.newresource.ResourceService;
+import org.onosproject.net.resource.ResourceService;
 import org.onosproject.net.provider.ProviderId;
 import org.onosproject.net.topology.LinkWeight;
 import org.onosproject.net.topology.PathService;
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 37c0dcb..080c71d 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
@@ -48,9 +48,10 @@
 import org.onosproject.net.intent.IntentCompiler;
 import org.onosproject.net.intent.IntentExtensionService;
 import org.onosproject.net.intent.MplsPathIntent;
-import org.onosproject.net.newresource.Resource;
-import org.onosproject.net.newresource.ResourceService;
-import org.onosproject.net.newresource.Resources;
+import org.onosproject.net.resource.Resource;
+import org.onosproject.net.resource.ResourceAllocation;
+import org.onosproject.net.resource.ResourceService;
+import org.onosproject.net.resource.Resources;
 import org.slf4j.Logger;
 
 import java.util.Collections;
@@ -134,7 +135,7 @@
                                 .resource()
                 ))
                 .collect(Collectors.toSet());
-        List<org.onosproject.net.newresource.ResourceAllocation> allocations =
+        List<ResourceAllocation> allocations =
                 resourceService.allocate(intent.id(), ImmutableList.copyOf(resources));
         if (allocations.isEmpty()) {
             Collections.emptyMap();
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 8dea447..b96b79b 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
@@ -59,11 +59,11 @@
 import org.onosproject.net.intent.OpticalCircuitIntent;
 import org.onosproject.net.intent.OpticalConnectivityIntent;
 import org.onosproject.net.intent.impl.IntentCompilationException;
-import org.onosproject.net.newresource.ResourceAllocation;
-import org.onosproject.net.newresource.Resource;
-import org.onosproject.net.newresource.ResourceService;
-import org.onosproject.net.newresource.Resources;
 import org.onosproject.net.intent.IntentSetMultimap;
+import org.onosproject.net.resource.ResourceAllocation;
+import org.onosproject.net.resource.Resource;
+import org.onosproject.net.resource.ResourceService;
+import org.onosproject.net.resource.Resources;
 import org.osgi.service.component.ComponentContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
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 3555454..63fd631 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
@@ -43,10 +43,10 @@
 import org.onosproject.net.intent.OpticalConnectivityIntent;
 import org.onosproject.net.intent.OpticalPathIntent;
 import org.onosproject.net.intent.impl.IntentCompilationException;
-import org.onosproject.net.newresource.ResourceAllocation;
-import org.onosproject.net.newresource.Resource;
-import org.onosproject.net.newresource.ResourceService;
-import org.onosproject.net.newresource.Resources;
+import org.onosproject.net.resource.ResourceAllocation;
+import org.onosproject.net.resource.Resource;
+import org.onosproject.net.resource.ResourceService;
+import org.onosproject.net.resource.Resources;
 import org.onosproject.net.topology.LinkWeight;
 import org.onosproject.net.topology.Topology;
 import org.onosproject.net.topology.TopologyService;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathCompiler.java
index 1cffdd4..b954305 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathCompiler.java
@@ -46,10 +46,10 @@
 import org.onosproject.net.intent.PathIntent;
 import org.onosproject.net.intent.constraint.EncapsulationConstraint;
 import org.onosproject.net.intent.impl.IntentCompilationException;
-import org.onosproject.net.newresource.Resource;
-import org.onosproject.net.newresource.ResourceAllocation;
-import org.onosproject.net.newresource.ResourceService;
-import org.onosproject.net.newresource.Resources;
+import org.onosproject.net.resource.Resource;
+import org.onosproject.net.resource.ResourceAllocation;
+import org.onosproject.net.resource.ResourceService;
+import org.onosproject.net.resource.Resources;
 import org.slf4j.Logger;
 
 import com.google.common.collect.ImmutableList;
@@ -112,7 +112,7 @@
                                 .resource()
                 ))
                 .collect(Collectors.toSet());
-        List<org.onosproject.net.newresource.ResourceAllocation> allocations =
+        List<ResourceAllocation> allocations =
                 creator.resourceService().allocate(intent.id(), ImmutableList.copyOf(resources));
         if (allocations.isEmpty()) {
             Collections.emptyMap();
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 36ca6e3..71d1b0e 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.Intent;
 import org.onosproject.net.intent.IntentCompiler;
 import org.onosproject.net.intent.PathIntent;
-import org.onosproject.net.newresource.ResourceService;
+import org.onosproject.net.resource.ResourceService;
 import org.slf4j.Logger;
 
 import java.util.LinkedList;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentFlowObjectiveCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentFlowObjectiveCompiler.java
index 4b746fa..0c15399 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentFlowObjectiveCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentFlowObjectiveCompiler.java
@@ -38,7 +38,7 @@
 import org.onosproject.net.intent.Intent;
 import org.onosproject.net.intent.IntentCompiler;
 import org.onosproject.net.intent.PathIntent;
-import org.onosproject.net.newresource.ResourceService;
+import org.onosproject.net.resource.ResourceService;
 import org.slf4j.Logger;
 
 import com.google.common.collect.ImmutableList;
diff --git a/core/net/src/main/java/org/onosproject/net/newresource/impl/package-info.java b/core/net/src/main/java/org/onosproject/net/newresource/impl/package-info.java
deleted file mode 100644
index bddfdfc..0000000
--- a/core/net/src/main/java/org/onosproject/net/newresource/impl/package-info.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2015 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Implementation of the generic network resource subsystem.
- */
-package org.onosproject.net.newresource.impl;
\ No newline at end of file
diff --git a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceDeviceListener.java b/core/net/src/main/java/org/onosproject/net/resource/impl/ResourceDeviceListener.java
similarity index 96%
rename from core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceDeviceListener.java
rename to core/net/src/main/java/org/onosproject/net/resource/impl/ResourceDeviceListener.java
index 8e36ea9..1cd47aa 100644
--- a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceDeviceListener.java
+++ b/core/net/src/main/java/org/onosproject/net/resource/impl/ResourceDeviceListener.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Open Networking Laboratory
+ * Copyright 2015-2016 Open Networking Laboratory
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.net.newresource.impl;
+package org.onosproject.net.resource.impl;
 
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Lists;
@@ -39,12 +39,12 @@
 import org.onosproject.net.device.DeviceService;
 import org.onosproject.net.driver.DriverHandler;
 import org.onosproject.net.driver.DriverService;
-import org.onosproject.net.newresource.DiscreteResource;
-import org.onosproject.net.newresource.ResourceAdminService;
-import org.onosproject.net.newresource.BandwidthCapacity;
-import org.onosproject.net.newresource.Resource;
-import org.onosproject.net.newresource.Resources;
-import org.onosproject.net.newresource.ResourceService;
+import org.onosproject.net.resource.DiscreteResource;
+import org.onosproject.net.resource.ResourceAdminService;
+import org.onosproject.net.resource.BandwidthCapacity;
+import org.onosproject.net.resource.Resource;
+import org.onosproject.net.resource.Resources;
+import org.onosproject.net.resource.ResourceService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceManager.java b/core/net/src/main/java/org/onosproject/net/resource/impl/ResourceManager.java
similarity index 90%
rename from core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceManager.java
rename to core/net/src/main/java/org/onosproject/net/resource/impl/ResourceManager.java
index 5b29401..04499bb 100644
--- a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceManager.java
+++ b/core/net/src/main/java/org/onosproject/net/resource/impl/ResourceManager.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.net.newresource.impl;
+package org.onosproject.net.resource.impl;
 
 import com.google.common.annotations.Beta;
 import com.google.common.collect.ImmutableList;
@@ -26,17 +26,17 @@
 import org.onlab.util.GuavaCollectors;
 import org.onlab.util.Tools;
 import org.onosproject.event.AbstractListenerManager;
-import org.onosproject.net.newresource.DiscreteResourceId;
-import org.onosproject.net.newresource.ResourceAdminService;
-import org.onosproject.net.newresource.ResourceAllocation;
-import org.onosproject.net.newresource.ResourceConsumer;
-import org.onosproject.net.newresource.ResourceEvent;
-import org.onosproject.net.newresource.ResourceId;
-import org.onosproject.net.newresource.ResourceListener;
-import org.onosproject.net.newresource.ResourceService;
-import org.onosproject.net.newresource.Resource;
-import org.onosproject.net.newresource.ResourceStore;
-import org.onosproject.net.newresource.ResourceStoreDelegate;
+import org.onosproject.net.resource.DiscreteResourceId;
+import org.onosproject.net.resource.ResourceAdminService;
+import org.onosproject.net.resource.ResourceAllocation;
+import org.onosproject.net.resource.ResourceConsumer;
+import org.onosproject.net.resource.ResourceEvent;
+import org.onosproject.net.resource.ResourceId;
+import org.onosproject.net.resource.ResourceListener;
+import org.onosproject.net.resource.ResourceService;
+import org.onosproject.net.resource.Resource;
+import org.onosproject.net.resource.ResourceStore;
+import org.onosproject.net.resource.ResourceStoreDelegate;
 import org.slf4j.Logger;
 
 import java.util.Collection;
diff --git a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceNetworkConfigListener.java b/core/net/src/main/java/org/onosproject/net/resource/impl/ResourceNetworkConfigListener.java
similarity index 96%
rename from core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceNetworkConfigListener.java
rename to core/net/src/main/java/org/onosproject/net/resource/impl/ResourceNetworkConfigListener.java
index 07561e4..12acc19 100644
--- a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceNetworkConfigListener.java
+++ b/core/net/src/main/java/org/onosproject/net/resource/impl/ResourceNetworkConfigListener.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.net.newresource.impl;
+package org.onosproject.net.resource.impl;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Preconditions.checkNotNull;
@@ -28,9 +28,9 @@
 import org.onosproject.net.config.NetworkConfigEvent;
 import org.onosproject.net.config.NetworkConfigListener;
 import org.onosproject.net.config.NetworkConfigService;
-import org.onosproject.net.newresource.BandwidthCapacity;
-import org.onosproject.net.newresource.ResourceAdminService;
-import org.onosproject.net.newresource.Resources;
+import org.onosproject.net.resource.BandwidthCapacity;
+import org.onosproject.net.resource.ResourceAdminService;
+import org.onosproject.net.resource.Resources;
 import org.slf4j.Logger;
 
 import com.google.common.annotations.Beta;
diff --git a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceRegistrar.java b/core/net/src/main/java/org/onosproject/net/resource/impl/ResourceRegistrar.java
similarity index 93%
rename from core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceRegistrar.java
rename to core/net/src/main/java/org/onosproject/net/resource/impl/ResourceRegistrar.java
index 77216ff..a13c5e7 100644
--- a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceRegistrar.java
+++ b/core/net/src/main/java/org/onosproject/net/resource/impl/ResourceRegistrar.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Open Networking Laboratory
+ * Copyright 2015-2016 Open Networking Laboratory
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.net.newresource.impl;
+package org.onosproject.net.resource.impl;
 
 import com.google.common.annotations.Beta;
 import com.google.common.collect.ImmutableList;
@@ -31,9 +31,9 @@
 import org.onosproject.net.device.DeviceListener;
 import org.onosproject.net.device.DeviceService;
 import org.onosproject.net.driver.DriverService;
-import org.onosproject.net.newresource.BandwidthCapacity;
-import org.onosproject.net.newresource.ResourceAdminService;
-import org.onosproject.net.newresource.ResourceService;
+import org.onosproject.net.resource.BandwidthCapacity;
+import org.onosproject.net.resource.ResourceAdminService;
+import org.onosproject.net.resource.ResourceService;
 import org.slf4j.Logger;
 
 import java.util.List;
diff --git a/core/net/src/main/java/org/onosproject/net/resource/impl/package-info.java b/core/net/src/main/java/org/onosproject/net/resource/impl/package-info.java
index fd0bbde..1537829 100644
--- a/core/net/src/main/java/org/onosproject/net/resource/impl/package-info.java
+++ b/core/net/src/main/java/org/onosproject/net/resource/impl/package-info.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Open Networking Laboratory
+ * Copyright 2015-2016 Open Networking Laboratory
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -15,6 +15,6 @@
  */
 
 /**
- * Services for reserving network resources, e.g.&nbsp;bandwidth, lambdas.
+ * Implementation of the generic network resource subsystem.
  */
 package org.onosproject.net.resource.impl;