ONOS-2488 Finished moving network config stuff out of the incubator area.
Change-Id: I62c511938fdf8f33def99ce43f0d4417b4ba1918
diff --git a/apps/routing/src/main/java/org/onosproject/routing/config/impl/RoutingConfigurationImpl.java b/apps/routing/src/main/java/org/onosproject/routing/config/impl/RoutingConfigurationImpl.java
index 760801d..ec0d901 100644
--- a/apps/routing/src/main/java/org/onosproject/routing/config/impl/RoutingConfigurationImpl.java
+++ b/apps/routing/src/main/java/org/onosproject/routing/config/impl/RoutingConfigurationImpl.java
@@ -32,7 +32,7 @@
import org.onlab.packet.MacAddress;
import org.onosproject.net.config.ConfigFactory;
import org.onosproject.net.config.NetworkConfigRegistry;
-import org.onosproject.incubator.net.config.basics.SubjectFactories;
+import org.onosproject.net.config.basics.SubjectFactories;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.host.HostService;
import org.onosproject.routing.config.BgpPeer;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/AllowedEntityConfig.java b/core/api/src/main/java/org/onosproject/net/config/basics/AllowedEntityConfig.java
similarity index 96%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/AllowedEntityConfig.java
rename to core/api/src/main/java/org/onosproject/net/config/basics/AllowedEntityConfig.java
index b712fb6..6e6663c 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/AllowedEntityConfig.java
+++ b/core/api/src/main/java/org/onosproject/net/config/basics/AllowedEntityConfig.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.incubator.net.config.basics;
+package org.onosproject.net.config.basics;
import org.onosproject.net.config.Config;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/BasicDeviceConfig.java b/core/api/src/main/java/org/onosproject/net/config/basics/BasicDeviceConfig.java
similarity index 96%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/BasicDeviceConfig.java
rename to core/api/src/main/java/org/onosproject/net/config/basics/BasicDeviceConfig.java
index c3eb099..fd8bfa3 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/BasicDeviceConfig.java
+++ b/core/api/src/main/java/org/onosproject/net/config/basics/BasicDeviceConfig.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.incubator.net.config.basics;
+package org.onosproject.net.config.basics;
import org.onosproject.net.Device;
import org.onosproject.net.DeviceId;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/BasicElementConfig.java b/core/api/src/main/java/org/onosproject/net/config/basics/BasicElementConfig.java
similarity index 98%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/BasicElementConfig.java
rename to core/api/src/main/java/org/onosproject/net/config/basics/BasicElementConfig.java
index 1b13915..7b3248c 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/BasicElementConfig.java
+++ b/core/api/src/main/java/org/onosproject/net/config/basics/BasicElementConfig.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.incubator.net.config.basics;
+package org.onosproject.net.config.basics;
/**
* Basic configuration for network elements, e.g. devices, hosts. Such elements
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/BasicHostConfig.java b/core/api/src/main/java/org/onosproject/net/config/basics/BasicHostConfig.java
similarity index 93%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/BasicHostConfig.java
rename to core/api/src/main/java/org/onosproject/net/config/basics/BasicHostConfig.java
index 2f4b799..2fe2b2c 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/BasicHostConfig.java
+++ b/core/api/src/main/java/org/onosproject/net/config/basics/BasicHostConfig.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.incubator.net.config.basics;
+package org.onosproject.net.config.basics;
import org.onosproject.net.HostId;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/BasicLinkConfig.java b/core/api/src/main/java/org/onosproject/net/config/basics/BasicLinkConfig.java
similarity index 97%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/BasicLinkConfig.java
rename to core/api/src/main/java/org/onosproject/net/config/basics/BasicLinkConfig.java
index 620a033..b6068ee 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/BasicLinkConfig.java
+++ b/core/api/src/main/java/org/onosproject/net/config/basics/BasicLinkConfig.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.incubator.net.config.basics;
+package org.onosproject.net.config.basics;
import org.onosproject.net.Link;
import org.onosproject.net.LinkKey;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/OpticalPortConfig.java b/core/api/src/main/java/org/onosproject/net/config/basics/OpticalPortConfig.java
similarity index 98%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/OpticalPortConfig.java
rename to core/api/src/main/java/org/onosproject/net/config/basics/OpticalPortConfig.java
index c873d84..4478ead 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/OpticalPortConfig.java
+++ b/core/api/src/main/java/org/onosproject/net/config/basics/OpticalPortConfig.java
@@ -1,4 +1,4 @@
-package org.onosproject.incubator.net.config.basics;
+package org.onosproject.net.config.basics;
import java.util.Optional;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/SubjectFactories.java b/core/api/src/main/java/org/onosproject/net/config/basics/SubjectFactories.java
similarity index 87%
rename from incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/SubjectFactories.java
rename to core/api/src/main/java/org/onosproject/net/config/basics/SubjectFactories.java
index 5110a8f..884f2e2 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/SubjectFactories.java
+++ b/core/api/src/main/java/org/onosproject/net/config/basics/SubjectFactories.java
@@ -13,16 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.incubator.net.config.basics;
+package org.onosproject.net.config.basics;
import org.onosproject.core.ApplicationId;
import org.onosproject.core.CoreService;
-import org.onosproject.net.config.SubjectFactory;
-import org.onosproject.incubator.net.domain.IntentDomainId;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;
import org.onosproject.net.HostId;
import org.onosproject.net.LinkKey;
+import org.onosproject.net.config.SubjectFactory;
import static com.google.common.base.Preconditions.checkArgument;
@@ -81,14 +80,6 @@
}
};
- public static final SubjectFactory<IntentDomainId> INTENT_DOMAIN_SUBJECT_FACTORY =
- new SubjectFactory<IntentDomainId>(IntentDomainId.class, "domains") {
- @Override
- public IntentDomainId createSubject(String key) {
- return IntentDomainId.valueOf(key);
- }
- };
-
/**
* Provides reference to the core service, which is required for
* application subject factory.
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/package-info.java b/core/api/src/main/java/org/onosproject/net/config/basics/package-info.java
similarity index 83%
copy from incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/package-info.java
copy to core/api/src/main/java/org/onosproject/net/config/basics/package-info.java
index 19b6c5a..4d0f27e 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/package-info.java
+++ b/core/api/src/main/java/org/onosproject/net/config/basics/package-info.java
@@ -15,6 +15,6 @@
*/
/**
- * Implementation of the network configuration distributed store.
+ * Various basic builtin network configurations.
*/
-package org.onosproject.incubator.store.config.impl;
\ No newline at end of file
+package org.onosproject.net.config.basics;
\ No newline at end of file
diff --git a/core/net/pom.xml b/core/net/pom.xml
index dfd5f21..4ba04c5 100644
--- a/core/net/pom.xml
+++ b/core/net/pom.xml
@@ -60,6 +60,13 @@
<dependency>
<groupId>org.onosproject</groupId>
+ <artifactId>onos-core-dist</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
<artifactId>onos-incubator-api</artifactId>
<scope>test</scope>
<classifier>tests</classifier>
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/config/impl/BasicNetworkConfigs.java b/core/net/src/main/java/org/onosproject/net/config/impl/BasicNetworkConfigs.java
similarity index 77%
rename from incubator/net/src/main/java/org/onosproject/incubator/net/config/impl/BasicNetworkConfigs.java
rename to core/net/src/main/java/org/onosproject/net/config/impl/BasicNetworkConfigs.java
index ce984f6..ec0b124 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/config/impl/BasicNetworkConfigs.java
+++ b/core/net/src/main/java/org/onosproject/net/config/impl/BasicNetworkConfigs.java
@@ -13,36 +13,33 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.incubator.net.config.impl;
+package org.onosproject.net.config.impl;
import com.google.common.collect.ImmutableSet;
-
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.onosproject.core.CoreService;
-import org.onosproject.net.config.ConfigFactory;
-import org.onosproject.net.config.NetworkConfigRegistry;
-import org.onosproject.incubator.net.config.basics.BasicDeviceConfig;
-import org.onosproject.incubator.net.config.basics.BasicHostConfig;
-import org.onosproject.incubator.net.config.basics.BasicLinkConfig;
import org.onosproject.incubator.net.config.basics.InterfaceConfig;
-import org.onosproject.incubator.net.config.basics.OpticalPortConfig;
-import org.onosproject.incubator.net.config.basics.SubjectFactories;
-import org.onosproject.incubator.net.domain.IntentDomainConfig;
-import org.onosproject.incubator.net.domain.IntentDomainId;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;
import org.onosproject.net.HostId;
import org.onosproject.net.LinkKey;
+import org.onosproject.net.config.ConfigFactory;
+import org.onosproject.net.config.NetworkConfigRegistry;
+import org.onosproject.net.config.basics.BasicDeviceConfig;
+import org.onosproject.net.config.basics.BasicHostConfig;
+import org.onosproject.net.config.basics.BasicLinkConfig;
+import org.onosproject.net.config.basics.OpticalPortConfig;
+import org.onosproject.net.config.basics.SubjectFactories;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Set;
-import static org.onosproject.incubator.net.config.basics.SubjectFactories.*;
+import static org.onosproject.net.config.basics.SubjectFactories.*;
/**
* Component for registration of builtin basic network configurations.
@@ -85,17 +82,9 @@
return new BasicLinkConfig();
}
},
- new ConfigFactory<IntentDomainId, IntentDomainConfig>(INTENT_DOMAIN_SUBJECT_FACTORY,
- IntentDomainConfig.class,
- "basic") {
- @Override
- public IntentDomainConfig createConfig() {
- return new IntentDomainConfig();
- }
- },
new ConfigFactory<ConnectPoint, OpticalPortConfig>(CONNECT_POINT_SUBJECT_FACTORY,
- OpticalPortConfig.class,
- "basic") {
+ OpticalPortConfig.class,
+ "basic") {
@Override
public OpticalPortConfig createConfig() {
return new OpticalPortConfig();
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/config/impl/NetworkConfigLoader.java b/core/net/src/main/java/org/onosproject/net/config/impl/NetworkConfigLoader.java
similarity index 98%
rename from incubator/net/src/main/java/org/onosproject/incubator/net/config/impl/NetworkConfigLoader.java
rename to core/net/src/main/java/org/onosproject/net/config/impl/NetworkConfigLoader.java
index 974c706..e66c81b 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/config/impl/NetworkConfigLoader.java
+++ b/core/net/src/main/java/org/onosproject/net/config/impl/NetworkConfigLoader.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.incubator.net.config.impl;
+package org.onosproject.net.config.impl;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/config/impl/NetworkConfigManager.java b/core/net/src/main/java/org/onosproject/net/config/impl/NetworkConfigManager.java
similarity index 98%
rename from incubator/net/src/main/java/org/onosproject/incubator/net/config/impl/NetworkConfigManager.java
rename to core/net/src/main/java/org/onosproject/net/config/impl/NetworkConfigManager.java
index 50cf578..5c6cc0e 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/config/impl/NetworkConfigManager.java
+++ b/core/net/src/main/java/org/onosproject/net/config/impl/NetworkConfigManager.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.incubator.net.config.impl;
+package org.onosproject.net.config.impl;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.common.collect.ImmutableSet;
@@ -258,7 +258,7 @@
return new ConfigIdentifier(factory.subjectFactory().subjectKey(), factory.configKey());
}
- protected static final class ConfigIdentifier {
+ static final class ConfigIdentifier {
final String subjectKey;
final String configKey;
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/package-info.java b/core/net/src/main/java/org/onosproject/net/config/impl/package-info.java
similarity index 83%
copy from incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/package-info.java
copy to core/net/src/main/java/org/onosproject/net/config/impl/package-info.java
index 19b6c5a..38f7694 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/package-info.java
+++ b/core/net/src/main/java/org/onosproject/net/config/impl/package-info.java
@@ -15,6 +15,6 @@
*/
/**
- * Implementation of the network configuration distributed store.
+ * Implementation of the network configuration subsystem.
*/
-package org.onosproject.incubator.store.config.impl;
\ No newline at end of file
+package org.onosproject.net.config.impl;
\ No newline at end of file
diff --git a/core/net/src/main/java/org/onosproject/net/device/impl/BasicDeviceOperator.java b/core/net/src/main/java/org/onosproject/net/device/impl/BasicDeviceOperator.java
index ae6a3b2..36686d8 100644
--- a/core/net/src/main/java/org/onosproject/net/device/impl/BasicDeviceOperator.java
+++ b/core/net/src/main/java/org/onosproject/net/device/impl/BasicDeviceOperator.java
@@ -18,7 +18,7 @@
import static org.slf4j.LoggerFactory.getLogger;
import org.onosproject.net.config.ConfigOperator;
-import org.onosproject.incubator.net.config.basics.BasicDeviceConfig;
+import org.onosproject.net.config.basics.BasicDeviceConfig;
import org.onosproject.net.AnnotationKeys;
import org.onosproject.net.DefaultAnnotations;
import org.onosproject.net.Device;
diff --git a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
index 83c4a69..24ea9f9 100644
--- a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
+++ b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
@@ -31,7 +31,7 @@
import org.onosproject.net.config.NetworkConfigEvent;
import org.onosproject.net.config.NetworkConfigListener;
import org.onosproject.net.config.NetworkConfigService;
-import org.onosproject.incubator.net.config.basics.BasicDeviceConfig;
+import org.onosproject.net.config.basics.BasicDeviceConfig;
import org.onosproject.mastership.MastershipEvent;
import org.onosproject.mastership.MastershipListener;
import org.onosproject.mastership.MastershipService;
diff --git a/core/net/src/main/java/org/onosproject/net/device/impl/OpticalPortOperator.java b/core/net/src/main/java/org/onosproject/net/device/impl/OpticalPortOperator.java
index 7c551eb..ca43f95 100644
--- a/core/net/src/main/java/org/onosproject/net/device/impl/OpticalPortOperator.java
+++ b/core/net/src/main/java/org/onosproject/net/device/impl/OpticalPortOperator.java
@@ -18,7 +18,7 @@
import static org.slf4j.LoggerFactory.getLogger;
import org.onosproject.net.config.ConfigOperator;
-import org.onosproject.incubator.net.config.basics.OpticalPortConfig;
+import org.onosproject.net.config.basics.OpticalPortConfig;
import org.onosproject.net.AnnotationKeys;
import org.onosproject.net.DefaultAnnotations;
import org.onosproject.net.PortNumber;
diff --git a/core/net/src/main/java/org/onosproject/net/host/impl/BasicHostOperator.java b/core/net/src/main/java/org/onosproject/net/host/impl/BasicHostOperator.java
index f0e100c..68aa27f 100644
--- a/core/net/src/main/java/org/onosproject/net/host/impl/BasicHostOperator.java
+++ b/core/net/src/main/java/org/onosproject/net/host/impl/BasicHostOperator.java
@@ -19,7 +19,7 @@
import org.slf4j.Logger;
import org.onosproject.net.config.ConfigOperator;
-import org.onosproject.incubator.net.config.basics.BasicHostConfig;
+import org.onosproject.net.config.basics.BasicHostConfig;
import org.onosproject.net.AnnotationKeys;
import org.onosproject.net.DefaultAnnotations;
import org.onosproject.net.SparseAnnotations;
diff --git a/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java b/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java
index b94ca68..fe369ae 100644
--- a/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java
+++ b/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java
@@ -29,7 +29,7 @@
import org.onosproject.net.config.NetworkConfigEvent;
import org.onosproject.net.config.NetworkConfigListener;
import org.onosproject.net.config.NetworkConfigService;
-import org.onosproject.incubator.net.config.basics.BasicHostConfig;
+import org.onosproject.net.config.basics.BasicHostConfig;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;
import org.onosproject.net.Host;
diff --git a/core/net/src/main/java/org/onosproject/net/link/impl/BasicLinkOperator.java b/core/net/src/main/java/org/onosproject/net/link/impl/BasicLinkOperator.java
index 6a21fdd..a6b08f6 100644
--- a/core/net/src/main/java/org/onosproject/net/link/impl/BasicLinkOperator.java
+++ b/core/net/src/main/java/org/onosproject/net/link/impl/BasicLinkOperator.java
@@ -21,7 +21,7 @@
import org.onosproject.net.AnnotationKeys;
import org.onosproject.net.config.ConfigOperator;
-import org.onosproject.incubator.net.config.basics.BasicLinkConfig;
+import org.onosproject.net.config.basics.BasicLinkConfig;
import org.onosproject.net.DefaultAnnotations;
import org.onosproject.net.Link;
import org.onosproject.net.SparseAnnotations;
diff --git a/core/net/src/main/java/org/onosproject/net/link/impl/LinkManager.java b/core/net/src/main/java/org/onosproject/net/link/impl/LinkManager.java
index 04e7939..b4cc17c 100644
--- a/core/net/src/main/java/org/onosproject/net/link/impl/LinkManager.java
+++ b/core/net/src/main/java/org/onosproject/net/link/impl/LinkManager.java
@@ -29,7 +29,7 @@
import org.onosproject.net.config.NetworkConfigEvent;
import org.onosproject.net.config.NetworkConfigListener;
import org.onosproject.net.config.NetworkConfigService;
-import org.onosproject.incubator.net.config.basics.BasicLinkConfig;
+import org.onosproject.net.config.basics.BasicLinkConfig;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;
import org.onosproject.net.Link;
diff --git a/incubator/net/src/test/java/org/onosproject/incubator/net/config/impl/NetworkConfigManagerTest.java b/core/net/src/test/java/org/onosproject/net/config/impl/NetworkConfigManagerTest.java
similarity index 98%
rename from incubator/net/src/test/java/org/onosproject/incubator/net/config/impl/NetworkConfigManagerTest.java
rename to core/net/src/test/java/org/onosproject/net/config/impl/NetworkConfigManagerTest.java
index 3f3cdd7..2d03bfc 100644
--- a/incubator/net/src/test/java/org/onosproject/incubator/net/config/impl/NetworkConfigManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/config/impl/NetworkConfigManagerTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.incubator.net.config.impl;
+package org.onosproject.net.config.impl;
import java.util.Set;
@@ -27,8 +27,8 @@
import org.onosproject.net.config.NetworkConfigRegistry;
import org.onosproject.net.config.NetworkConfigService;
import org.onosproject.net.config.SubjectFactory;
-import org.onosproject.incubator.store.config.impl.DistributedNetworkConfigStore;
import org.onosproject.net.NetTestTools;
+import org.onosproject.store.config.impl.DistributedNetworkConfigStore;
import org.onosproject.store.service.TestStorageService;
import static org.hamcrest.Matchers.hasSize;
diff --git a/core/net/src/test/java/org/onosproject/net/device/impl/BasicDeviceOperatorTest.java b/core/net/src/test/java/org/onosproject/net/device/impl/BasicDeviceOperatorTest.java
index 66d74c5..8827c55 100644
--- a/core/net/src/test/java/org/onosproject/net/device/impl/BasicDeviceOperatorTest.java
+++ b/core/net/src/test/java/org/onosproject/net/device/impl/BasicDeviceOperatorTest.java
@@ -26,7 +26,7 @@
import org.onlab.packet.ChassisId;
import org.onosproject.net.config.Config;
import org.onosproject.net.config.ConfigApplyDelegate;
-import org.onosproject.incubator.net.config.basics.BasicDeviceConfig;
+import org.onosproject.net.config.basics.BasicDeviceConfig;
import org.onosproject.net.AnnotationKeys;
import org.onosproject.net.DefaultAnnotations;
import org.onosproject.net.DeviceId;
diff --git a/core/net/src/test/java/org/onosproject/net/device/impl/OpticalPortOperatorTest.java b/core/net/src/test/java/org/onosproject/net/device/impl/OpticalPortOperatorTest.java
index 83aa8a0..78bc08e 100644
--- a/core/net/src/test/java/org/onosproject/net/device/impl/OpticalPortOperatorTest.java
+++ b/core/net/src/test/java/org/onosproject/net/device/impl/OpticalPortOperatorTest.java
@@ -4,7 +4,7 @@
import org.junit.Test;
import org.onosproject.net.config.Config;
import org.onosproject.net.config.ConfigApplyDelegate;
-import org.onosproject.incubator.net.config.basics.OpticalPortConfig;
+import org.onosproject.net.config.basics.OpticalPortConfig;
import org.onosproject.net.AnnotationKeys;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DefaultAnnotations;
diff --git a/core/net/src/test/java/org/onosproject/net/host/impl/BasicHostOperatorTest.java b/core/net/src/test/java/org/onosproject/net/host/impl/BasicHostOperatorTest.java
index fe0d97a..e7f14b5 100644
--- a/core/net/src/test/java/org/onosproject/net/host/impl/BasicHostOperatorTest.java
+++ b/core/net/src/test/java/org/onosproject/net/host/impl/BasicHostOperatorTest.java
@@ -24,7 +24,7 @@
import org.onlab.packet.VlanId;
import org.onosproject.net.config.Config;
import org.onosproject.net.config.ConfigApplyDelegate;
-import org.onosproject.incubator.net.config.basics.BasicHostConfig;
+import org.onosproject.net.config.basics.BasicHostConfig;
import org.onosproject.net.AnnotationKeys;
import org.onosproject.net.DeviceId;
import org.onosproject.net.HostId;
diff --git a/core/net/src/test/java/org/onosproject/net/link/impl/BasicLinkOperatorTest.java b/core/net/src/test/java/org/onosproject/net/link/impl/BasicLinkOperatorTest.java
index 610c974..fe9e37c 100644
--- a/core/net/src/test/java/org/onosproject/net/link/impl/BasicLinkOperatorTest.java
+++ b/core/net/src/test/java/org/onosproject/net/link/impl/BasicLinkOperatorTest.java
@@ -24,7 +24,7 @@
import org.junit.Test;
import org.onosproject.net.config.Config;
import org.onosproject.net.config.ConfigApplyDelegate;
-import org.onosproject.incubator.net.config.basics.BasicLinkConfig;
+import org.onosproject.net.config.basics.BasicLinkConfig;
import org.onosproject.net.AnnotationKeys;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DefaultAnnotations;
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/DistributedNetworkConfigStore.java b/core/store/dist/src/main/java/org/onosproject/store/config/impl/DistributedNetworkConfigStore.java
similarity index 99%
rename from incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/DistributedNetworkConfigStore.java
rename to core/store/dist/src/main/java/org/onosproject/store/config/impl/DistributedNetworkConfigStore.java
index 6e0c094..5ef4045 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/DistributedNetworkConfigStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/config/impl/DistributedNetworkConfigStore.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.incubator.store.config.impl;
+package org.onosproject.store.config.impl;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/package-info.java b/core/store/dist/src/main/java/org/onosproject/store/config/impl/package-info.java
similarity index 92%
rename from incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/package-info.java
rename to core/store/dist/src/main/java/org/onosproject/store/config/impl/package-info.java
index 19b6c5a..0e1264e 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/config/impl/package-info.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/config/impl/package-info.java
@@ -17,4 +17,4 @@
/**
* Implementation of the network configuration distributed store.
*/
-package org.onosproject.incubator.store.config.impl;
\ No newline at end of file
+package org.onosproject.store.config.impl;
\ No newline at end of file
diff --git a/incubator/store/src/test/java/org/onosproject/incubator/store/config/impl/DistributedNetworkConfigStoreTest.java b/core/store/dist/src/test/java/org/onosproject/store/config/impl/DistributedNetworkConfigStoreTest.java
similarity index 98%
rename from incubator/store/src/test/java/org/onosproject/incubator/store/config/impl/DistributedNetworkConfigStoreTest.java
rename to core/store/dist/src/test/java/org/onosproject/store/config/impl/DistributedNetworkConfigStoreTest.java
index 4db7b17..06fe7b3 100644
--- a/incubator/store/src/test/java/org/onosproject/incubator/store/config/impl/DistributedNetworkConfigStoreTest.java
+++ b/core/store/dist/src/test/java/org/onosproject/store/config/impl/DistributedNetworkConfigStoreTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onosproject.incubator.store.config.impl;
+package org.onosproject.store.config.impl;
import org.junit.After;
import org.junit.Before;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/ExtraSubjectFactories.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/ExtraSubjectFactories.java
new file mode 100644
index 0000000..474ef6a
--- /dev/null
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/ExtraSubjectFactories.java
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+package org.onosproject.incubator.net.config.basics;
+
+import org.onosproject.incubator.net.domain.IntentDomainId;
+import org.onosproject.net.config.SubjectFactory;
+
+/**
+ * Set of subject factories for potential configuration subjects.
+ */
+public final class ExtraSubjectFactories {
+
+ // Construction forbidden
+ private ExtraSubjectFactories() {
+ }
+
+ public static final SubjectFactory<IntentDomainId> INTENT_DOMAIN_SUBJECT_FACTORY =
+ new SubjectFactory<IntentDomainId>(IntentDomainId.class, "domains") {
+ @Override
+ public IntentDomainId createSubject(String key) {
+ return IntentDomainId.valueOf(key);
+ }
+ };
+
+}
diff --git a/incubator/api/src/test/java/org/onosproject/incubator/net/config/basics/OpticalPortConfigTest.java b/incubator/api/src/test/java/org/onosproject/incubator/net/config/basics/OpticalPortConfigTest.java
index 8a2325d..9d56ca2 100644
--- a/incubator/api/src/test/java/org/onosproject/incubator/net/config/basics/OpticalPortConfigTest.java
+++ b/incubator/api/src/test/java/org/onosproject/incubator/net/config/basics/OpticalPortConfigTest.java
@@ -2,11 +2,11 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
-import static org.onosproject.incubator.net.config.basics.OpticalPortConfig.TYPE;
-import static org.onosproject.incubator.net.config.basics.OpticalPortConfig.NAME;
-import static org.onosproject.incubator.net.config.basics.OpticalPortConfig.PORT;
-import static org.onosproject.incubator.net.config.basics.OpticalPortConfig.STATIC_LAMBDA;
-import static org.onosproject.incubator.net.config.basics.OpticalPortConfig.STATIC_PORT;
+import static org.onosproject.net.config.basics.OpticalPortConfig.TYPE;
+import static org.onosproject.net.config.basics.OpticalPortConfig.NAME;
+import static org.onosproject.net.config.basics.OpticalPortConfig.PORT;
+import static org.onosproject.net.config.basics.OpticalPortConfig.STATIC_LAMBDA;
+import static org.onosproject.net.config.basics.OpticalPortConfig.STATIC_PORT;
import java.io.IOException;
import java.util.Iterator;
@@ -26,6 +26,7 @@
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.common.collect.Lists;
+import org.onosproject.net.config.basics.OpticalPortConfig;
public class OpticalPortConfigTest {
private static final String FIELD = "ports";
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/config/impl/ExtraNetworkConfigs.java b/incubator/net/src/main/java/org/onosproject/incubator/net/config/impl/ExtraNetworkConfigs.java
new file mode 100644
index 0000000..e77e1da
--- /dev/null
+++ b/incubator/net/src/main/java/org/onosproject/incubator/net/config/impl/ExtraNetworkConfigs.java
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+package org.onosproject.incubator.net.config.impl;
+
+import com.google.common.collect.ImmutableSet;
+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.onosproject.incubator.net.domain.IntentDomainConfig;
+import org.onosproject.incubator.net.domain.IntentDomainId;
+import org.onosproject.net.config.ConfigFactory;
+import org.onosproject.net.config.NetworkConfigRegistry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Set;
+
+import static org.onosproject.incubator.net.config.basics.ExtraSubjectFactories.INTENT_DOMAIN_SUBJECT_FACTORY;
+
+/**
+ * Component for registration of builtin basic network configurations.
+ */
+@Component(immediate = true)
+public class ExtraNetworkConfigs {
+
+ private final Logger log = LoggerFactory.getLogger(getClass());
+
+ private final Set<ConfigFactory> factories = ImmutableSet.of(
+ new ConfigFactory<IntentDomainId, IntentDomainConfig>(INTENT_DOMAIN_SUBJECT_FACTORY,
+ IntentDomainConfig.class,
+ "basic") {
+ @Override
+ public IntentDomainConfig createConfig() {
+ return new IntentDomainConfig();
+ }
+ }
+ );
+
+ @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+ protected NetworkConfigRegistry registry;
+
+ @Activate
+ public void activate() {
+ factories.forEach(registry::registerConfigFactory);
+ log.info("Started");
+ }
+
+ @Deactivate
+ public void deactivate() {
+ factories.forEach(registry::unregisterConfigFactory);
+ log.info("Stopped");
+ }
+
+}