ONOS-2190 - Move org.onosproject.net.config.* out of the incubator

Change-Id: I57cac27ae370ce1155b4f637646d6c25732844e9
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/Config.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/Config.java
deleted file mode 100644
index dcdb008..0000000
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/Config.java
+++ /dev/null
@@ -1,305 +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.
- */
-package org.onosproject.incubator.net.config;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.node.ArrayNode;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.google.common.annotations.Beta;
-import com.google.common.collect.Lists;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.function.Function;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Base abstraction of a configuration facade for a specific subject. Derived
- * classes should keep all state in the specified JSON tree as that is the
- * only state that will be distributed or persisted; this class is merely
- * a facade for interacting with a particular facet of configuration on a
- * given subject.
- *
- * @param <S> type of subject
- */
-@Beta
-public abstract class Config<S> {
-
-    protected S subject;
-    protected String key;
-    protected ObjectNode node;
-    protected ObjectMapper mapper;
-    protected ConfigApplyDelegate delegate;
-
-    /**
-     * Initializes the configuration behaviour with necessary context.
-     *
-     * @param subject  configuration subject
-     * @param key      configuration key
-     * @param node     JSON object node where configuration data is stored
-     * @param mapper   JSON object mapper
-     * @param delegate delegate context
-     */
-    public void init(S subject, String key, ObjectNode node, ObjectMapper mapper,
-                     ConfigApplyDelegate delegate) {
-        this.subject = checkNotNull(subject);
-        this.key = key;
-        this.node = checkNotNull(node);
-        this.mapper = checkNotNull(mapper);
-        this.delegate = checkNotNull(delegate);
-    }
-
-    /**
-     * Returns the specific subject to which this configuration pertains.
-     *
-     * @return configuration subject
-     */
-    public S subject() {
-        return subject;
-    }
-
-    /**
-     * Returns the configuration key. This is primarily aimed for use in
-     * composite JSON trees in external representations and has no bearing on
-     * the internal behaviours.
-     *
-     * @return configuration key
-     */
-    public String key() {
-        return key;
-    }
-
-    /**
-     * Returns the JSON node that contains the configuration data.
-     *
-     * @return JSON node backing the configuration
-     */
-    public ObjectNode node() {
-        return node;
-    }
-
-    /**
-     * Applies any configuration changes made via this configuration.
-     */
-    public void apply() {
-        delegate.onApply(this);
-    }
-
-
-    // Miscellaneous helpers for interacting with JSON
-
-    /**
-     * Gets the specified property as a string.
-     *
-     * @param name         property name
-     * @param defaultValue default value if property not set
-     * @return property value or default value
-     */
-    protected String get(String name, String defaultValue) {
-        return node.path(name).asText(defaultValue);
-    }
-
-    /**
-     * Sets the specified property as a string or clears it if null value given.
-     *
-     * @param name  property name
-     * @param value new value or null to clear the property
-     * @return self
-     */
-    protected Config<S> setOrClear(String name, String value) {
-        if (value != null) {
-            node.put(name, value);
-        } else {
-            node.remove(name);
-        }
-        return this;
-    }
-
-    /**
-     * Gets the specified property as a boolean.
-     *
-     * @param name         property name
-     * @param defaultValue default value if property not set
-     * @return property value or default value
-     */
-    protected boolean get(String name, boolean defaultValue) {
-        return node.path(name).asBoolean(defaultValue);
-    }
-
-    /**
-     * Sets the specified property as a boolean or clears it if null value given.
-     *
-     * @param name  property name
-     * @param value new value or null to clear the property
-     * @return self
-     */
-    protected Config<S> setOrClear(String name, Boolean value) {
-        if (value != null) {
-            node.put(name, value.booleanValue());
-        } else {
-            node.remove(name);
-        }
-        return this;
-    }
-
-    /**
-     * Gets the specified property as an integer.
-     *
-     * @param name         property name
-     * @param defaultValue default value if property not set
-     * @return property value or default value
-     */
-    protected int get(String name, int defaultValue) {
-        return node.path(name).asInt(defaultValue);
-    }
-
-    /**
-     * Sets the specified property as an integer or clears it if null value given.
-     *
-     * @param name  property name
-     * @param value new value or null to clear the property
-     * @return self
-     */
-    protected Config<S> setOrClear(String name, Integer value) {
-        if (value != null) {
-            node.put(name, value.intValue());
-        } else {
-            node.remove(name);
-        }
-        return this;
-    }
-
-    /**
-     * Gets the specified property as a long.
-     *
-     * @param name         property name
-     * @param defaultValue default value if property not set
-     * @return property value or default value
-     */
-    protected long get(String name, long defaultValue) {
-        return node.path(name).asLong(defaultValue);
-    }
-
-    /**
-     * Sets the specified property as a long or clears it if null value given.
-     *
-     * @param name  property name
-     * @param value new value or null to clear the property
-     * @return self
-     */
-    protected Config<S> setOrClear(String name, Long value) {
-        if (value != null) {
-            node.put(name, value.longValue());
-        } else {
-            node.remove(name);
-        }
-        return this;
-    }
-
-    /**
-     * Gets the specified property as a double.
-     *
-     * @param name         property name
-     * @param defaultValue default value if property not set
-     * @return property value or default value
-     */
-    protected double get(String name, double defaultValue) {
-        return node.path(name).asDouble(defaultValue);
-    }
-
-    /**
-     * Sets the specified property as a double or clears it if null value given.
-     *
-     * @param name  property name
-     * @param value new value or null to clear the property
-     * @return self
-     */
-    protected Config<S> setOrClear(String name, Double value) {
-        if (value != null) {
-            node.put(name, value.doubleValue());
-        } else {
-            node.remove(name);
-        }
-        return this;
-    }
-
-    /**
-     * Gets the specified property as an enum.
-     *
-     * @param name         property name
-     * @param defaultValue default value if property not set
-     * @param enumClass    the enum class
-     * @param <E>          type of enum
-     * @return property value or default value
-     */
-    protected <E extends Enum<E>> E get(String name, E defaultValue, Class<E> enumClass) {
-        return Enum.valueOf(enumClass, node.path(name).asText(defaultValue.toString()));
-    }
-
-    /**
-     * Sets the specified property as a double or clears it if null value given.
-     *
-     * @param name  property name
-     * @param value new value or null to clear the property
-     * @param <E>   type of enum
-     * @return self
-     */
-    protected <E extends Enum> Config<S> setOrClear(String name, E value) {
-        if (value != null) {
-            node.put(name, value.toString());
-        } else {
-            node.remove(name);
-        }
-        return this;
-    }
-
-    /**
-     * Gets the specified array property as a list of items.
-     *
-     * @param name     property name
-     * @param function mapper from string to item
-     * @param <T>      type of item
-     * @return list of items
-     */
-    protected <T> List<T> getList(String name, Function<String, T> function) {
-        List<T> list = Lists.newArrayList();
-        ArrayNode arrayNode = (ArrayNode) node.path(name);
-        arrayNode.forEach(i -> list.add(function.apply(i.asText())));
-        return list;
-    }
-
-    /**
-     * Sets the specified property as an array of items in a given collection or
-     * clears it if null is given.
-     *
-     * @param name       propertyName
-     * @param collection collection of items
-     * @param <T>        type of items
-     * @return self
-     */
-    protected <T> Config<S> setOrClear(String name, Collection<T> collection) {
-        if (collection == null) {
-            node.remove(name);
-        } else {
-            ArrayNode arrayNode = mapper.createArrayNode();
-            collection.forEach(i -> arrayNode.add(i.toString()));
-            node.set(name, arrayNode);
-        }
-        return this;
-    }
-
-}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/ConfigApplyDelegate.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/ConfigApplyDelegate.java
deleted file mode 100644
index bcce280..0000000
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/ConfigApplyDelegate.java
+++ /dev/null
@@ -1,33 +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.
- */
-package org.onosproject.incubator.net.config;
-
-import com.google.common.annotations.Beta;
-
-/**
- * Delegate for notification when configuration changes have been applied.
- */
-@Beta
-public interface ConfigApplyDelegate {
-
-    /**
-     * Processes changes applied to the specified configuration.
-     *
-     * @param config changed configuration
-     */
-    void onApply(Config config);
-
-}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/ConfigFactory.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/ConfigFactory.java
deleted file mode 100644
index 673c7f3..0000000
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/ConfigFactory.java
+++ /dev/null
@@ -1,88 +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.
- */
-package org.onosproject.incubator.net.config;
-
-
-import com.google.common.annotations.Beta;
-
-/**
- * Base abstract factory for creating configurations for the specified subject type.
- *
- * @param <S> type of subject
- * @param <C> type of configuration
- */
-@Beta
-public abstract class ConfigFactory<S, C extends Config<S>> {
-
-    private final SubjectFactory<S> subjectFactory;
-    private final Class<C> configClass;
-    private final String configKey;
-
-    /**
-     * Creates a new configuration factory for the specified class of subjects
-     * capable of generating the configurations of the specified class. The
-     * subject and configuration class keys are used merely as keys for use in
-     * composite JSON trees.
-     *
-     * @param subjectFactory subject factory
-     * @param configClass  configuration class
-     * @param configKey    configuration class key
-     */
-    protected ConfigFactory(SubjectFactory<S> subjectFactory,
-                            Class<C> configClass, String configKey) {
-        this.subjectFactory = subjectFactory;
-        this.configClass = configClass;
-        this.configKey = configKey;
-    }
-
-    /**
-     * Returns the class of the subject to which this factory applies.
-     *
-     * @return subject type
-     */
-    public SubjectFactory<S> subjectFactory() {
-        return subjectFactory;
-    }
-
-    /**
-     * Returns the class of the configuration which this factory generates.
-     *
-     * @return configuration type
-     */
-    public Class<C> configClass() {
-        return configClass;
-    }
-
-    /**
-     * Returns the unique key (within subject class) of this configuration.
-     * This is primarily aimed for use in composite JSON trees in external
-     * representations and has no bearing on the internal behaviours.
-     *
-     * @return configuration key
-     */
-    public String configKey() {
-        return configKey;
-    }
-
-    /**
-     * Creates a new but uninitialized configuration. Framework will initialize
-     * the configuration via {@link Config#init} method.
-     *
-     * @return new uninitialized configuration
-     */
-    public abstract C createConfig();
-
-}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/ConfigOperator.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/ConfigOperator.java
deleted file mode 100644
index ab02e88..0000000
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/ConfigOperator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2014-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;
-
-/**
- * An interface signifying a class that implements network configuration
- * information from multiple sources. There is a natural ordering to the
- * precedence of information, depending on its source:
- * <ol>
- * <li>Intents (from applications), which override</li>
- * <li>Configs (from the network configuration subsystem), which override</li>
- * <li>Descriptions (from southbound)</li>
- * </ol>
- * i.e., for a field representing the same attribute, the value from a Config
- * entity will be used over that from the Description.
- */
-public interface ConfigOperator {
-}
\ No newline at end of file
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigEvent.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigEvent.java
deleted file mode 100644
index 1673f73..0000000
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigEvent.java
+++ /dev/null
@@ -1,92 +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.
- */
-package org.onosproject.incubator.net.config;
-
-import org.onosproject.event.AbstractEvent;
-
-/**
- * Describes network configuration event.
- */
-public class NetworkConfigEvent extends AbstractEvent<NetworkConfigEvent.Type, Object> {
-
-    private final Class configClass;
-
-    /**
-     * Type of network configuration events.
-     */
-    public enum Type {
-        /**
-         * Signifies that a network configuration was registered.
-         */
-        CONFIG_REGISTERED,
-
-        /**
-         * Signifies that a network configuration was unregistered.
-         */
-        CONFIG_UNREGISTERED,
-
-        /**
-         * Signifies that network configuration was added.
-         */
-        CONFIG_ADDED,
-
-        /**
-         * Signifies that network configuration was updated.
-         */
-        CONFIG_UPDATED,
-
-        /**
-         * Signifies that network configuration was removed.
-         */
-        CONFIG_REMOVED
-    }
-
-    /**
-     * Creates an event of a given type and for the specified subject and the
-     * current time.
-     *
-     * @param type        event type
-     * @param subject     event subject
-     * @param configClass configuration class
-     */
-    public NetworkConfigEvent(Type type, Object subject, Class configClass) {
-        super(type, subject);
-        this.configClass = configClass;
-    }
-
-    /**
-     * Creates an event of a given type and for the specified subject and time.
-     *
-     * @param type        device event type
-     * @param subject     event subject
-     * @param configClass configuration class
-     * @param time        occurrence time
-     */
-    public NetworkConfigEvent(Type type, Object subject, Class configClass, long time) {
-        super(type, subject, time);
-        this.configClass = configClass;
-    }
-
-    /**
-     * Returns the class of configuration that has been changed.
-     *
-     * @return configuration class
-     */
-    public Class configClass() {
-        return configClass;
-    }
-
-}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigListener.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigListener.java
deleted file mode 100644
index 38a0079..0000000
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigListener.java
+++ /dev/null
@@ -1,24 +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.
- */
-package org.onosproject.incubator.net.config;
-
-import org.onosproject.event.EventListener;
-
-/**
- * Entity capable of receiving network configuration related events.
- */
-public interface NetworkConfigListener extends EventListener<NetworkConfigEvent> {
-}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigRegistry.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigRegistry.java
deleted file mode 100644
index 1e24f4a..0000000
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigRegistry.java
+++ /dev/null
@@ -1,75 +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.
- */
-package org.onosproject.incubator.net.config;
-
-import com.google.common.annotations.Beta;
-
-import java.util.Set;
-
-/**
- * Service for tracking network configuration factories. It is the basis for
- * extensibility to allow various core subsystems or apps to register their
- * own configuration factories that permit use to inject additional meta
- * information about how various parts of the network should be viewed and
- * treated.
- */
-@Beta
-public interface NetworkConfigRegistry extends NetworkConfigService {
-
-    /**
-     * Registers the specified configuration factory.
-     *
-     * @param configFactory configuration factory
-     */
-    void registerConfigFactory(ConfigFactory configFactory);
-
-    /**
-     * Unregisters the specified configuration factory.
-     *
-     * @param configFactory configuration factory
-     */
-    void unregisterConfigFactory(ConfigFactory configFactory);
-
-    /**
-     * Returns set of all registered configuration factories.
-     *
-     * @return set of config factories
-     */
-    Set<ConfigFactory> getConfigFactories();
-
-    /**
-     * Returns set of all configuration factories registered for the specified
-     * class of subject.
-     *
-     * @param subjectClass subject class
-     * @param <S>          type of subject
-     * @param <C>          type of configuration
-     * @return set of config factories
-     */
-    <S, C extends Config<S>> Set<ConfigFactory<S, C>> getConfigFactories(Class<S> subjectClass);
-
-    /**
-     * Returns the configuration factory that produces the specified class of
-     * configurations.
-     *
-     * @param configClass configuration class
-     * @param <S>         type of subject
-     * @param <C>         type of configuration
-     * @return config factory
-     */
-    <S, C extends Config<S>> ConfigFactory<S, C> getConfigFactory(Class<C> configClass);
-
-}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigService.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigService.java
deleted file mode 100644
index 85cc6ee..0000000
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigService.java
+++ /dev/null
@@ -1,146 +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.
- */
-package org.onosproject.incubator.net.config;
-
-import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.google.common.annotations.Beta;
-import org.onosproject.event.ListenerService;
-
-import java.util.Set;
-
-/**
- * Service for tracking network configurations which specify how the discovered
- * network information should be interpreted and how the core or applications
- * should act on or configure the network.
- */
-@Beta
-public interface NetworkConfigService
-        extends ListenerService<NetworkConfigEvent, NetworkConfigListener> {
-
-    /**
-     * Returns the set of subject classes for which configuration may be
-     * available.
-     *
-     * @return set of subject classes
-     */
-    Set<Class> getSubjectClasses();
-
-    /**
-     * Returns the subject factory with the specified key.
-     *
-     * @param subjectKey subject class key
-     * @return subject class
-     */
-    SubjectFactory getSubjectFactory(String subjectKey);
-
-    /**
-     * Returns the subject factory for the specified class.
-     *
-     * @param subjectClass subject class
-     * @return subject class key
-     */
-    SubjectFactory getSubjectFactory(Class subjectClass);
-
-    /**
-     * Returns the configuration class with the specified key.
-     *
-     * @param subjectKey subject class key
-     * @param configKey  subject class name
-     * @return subject class
-     */
-    Class<? extends Config> getConfigClass(String subjectKey, String configKey);
-
-    /**
-     * Returns the set of subjects for which some configuration is available.
-     *
-     * @param subjectClass subject class
-     * @param <S>          type of subject
-     * @return set of configured subjects
-     */
-    <S> Set<S> getSubjects(Class<S> subjectClass);
-
-    /**
-     * Returns the set of subjects for which the specified configuration is
-     * available.
-     *
-     * @param subjectClass subject class
-     * @param configClass  configuration class
-     * @param <S>          type of subject
-     * @param <C>          type of configuration
-     * @return set of configured subjects
-     */
-    <S, C extends Config<S>> Set<S> getSubjects(Class<S> subjectClass, Class<C> configClass);
-
-    /**
-     * Returns all configurations for the specified subject.
-     *
-     * @param subject configuration subject
-     * @param <S>     type of subject
-     * @return set of configurations
-     */
-    <S> Set<? extends Config<S>> getConfigs(S subject);
-
-    /**
-     * Returns the configuration for the specified subject and configuration
-     * class if one is available; null otherwise.
-     *
-     * @param subject     configuration subject
-     * @param configClass configuration class
-     * @param <S>         type of subject
-     * @param <C>         type of configuration
-     * @return configuration or null if one is not available
-     */
-    <S, C extends Config<S>> C getConfig(S subject, Class<C> configClass);
-
-    /**
-     * Creates a new configuration for the specified subject and configuration
-     * class. If one already exists, it is simply returned.
-     *
-     * @param subject     configuration subject
-     * @param configClass configuration class
-     * @param <S>         type of subject
-     * @param <C>         type of configuration
-     * @return configuration or null if one is not available
-     */
-    <S, C extends Config<S>> C addConfig(S subject, Class<C> configClass);
-
-    /**
-     * Applies configuration for the specified subject and configuration
-     * class using the raw JSON object. If configuration already exists, it
-     * will be updated.
-     *
-     * @param subject     configuration subject
-     * @param configClass configuration class
-     * @param json        raw JSON node containing the configuration data
-     * @param <S>         type of subject
-     * @param <C>         type of configuration
-     * @return configuration or null if one is not available
-     */
-    <S, C extends Config<S>> C applyConfig(S subject, Class<C> configClass,
-                                           ObjectNode json);
-
-    /**
-     * Clears any configuration for the specified subject and configuration
-     * class. If one does not exist, this call has no effect.
-     *
-     * @param subject     configuration subject
-     * @param configClass configuration class
-     * @param <S>         type of subject
-     * @param <C>         type of configuration
-     */
-    <S, C extends Config<S>> void removeConfig(S subject, Class<C> configClass);
-
-}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigStore.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigStore.java
deleted file mode 100644
index 96f9c59..0000000
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigStore.java
+++ /dev/null
@@ -1,130 +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.
- */
-package org.onosproject.incubator.net.config;
-
-import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.onosproject.store.Store;
-
-import java.util.Set;
-
-/**
- * Mechanism for distributing and storing network configuration information.
- */
-public interface NetworkConfigStore extends Store<NetworkConfigEvent, NetworkConfigStoreDelegate> {
-
-    /**
-     * Adds a new configuration factory.
-     *
-     * @param configFactory configuration factory to add
-     */
-    void addConfigFactory(ConfigFactory configFactory);
-
-    /**
-     * Removes a configuration factory.
-     *
-     * @param configFactory configuration factory to remove
-     */
-    void removeConfigFactory(ConfigFactory configFactory);
-
-    /**
-     * Returns the configuration factory for the specified configuration class.
-     *
-     * @param configClass configuration class
-     * @param <S>         type of subject
-     * @param <C>         type of configuration
-     * @return configuration factory or null
-     */
-    <S, C extends Config<S>> ConfigFactory<S, C> getConfigFactory(Class<C> configClass);
-
-    /**
-     * Returns set of subjects of the specified class, which have some
-     * network configuration associated with them.
-     *
-     * @param subjectClass subject class
-     * @param <S>          type of subject
-     * @return set of subject
-     */
-    <S> Set<S> getSubjects(Class<S> subjectClass);
-
-    /**
-     * Returns set of subjects of the specified class, which have the
-     * specified class of network configuration associated with them.
-     *
-     * @param subjectClass subject class
-     * @param configClass  configuration class
-     * @param <S>          type of subject
-     * @param <C>          type of configuration
-     * @return set of subject
-     */
-    <S, C extends Config<S>> Set<S> getSubjects(Class<S> subjectClass, Class<C> configClass);
-
-    /**
-     * Returns set of configuration classes available for the specified subject.
-     *
-     * @param subject configuration subject
-     * @param <S>     type of subject
-     * @return set of configuration classes
-     */
-    <S> Set<Class<? extends Config<S>>> getConfigClasses(S subject);
-
-    /**
-     * Get the configuration of the given class and for the specified subject.
-     *
-     * @param subject     configuration subject
-     * @param configClass configuration class
-     * @param <S>         type of subject
-     * @param <C>         type of configuration
-     * @return configuration object
-     */
-    <S, C extends Config<S>> C getConfig(S subject, Class<C> configClass);
-
-    /**
-     * Creates a new configuration of the given class for the specified subject.
-     *
-     * @param subject     configuration subject
-     * @param configClass configuration class
-     * @param <S>         type of subject
-     * @param <C>         type of configuration
-     * @return configuration object
-     */
-    <S, C extends Config<S>> C createConfig(S subject, Class<C> configClass);
-
-    /**
-     * Applies configuration for the specified subject and configuration
-     * class using the raw JSON object. If configuration already exists, it
-     * will be updated.
-     *
-     * @param subject     configuration subject
-     * @param configClass configuration class
-     * @param json        raw JSON node containing the configuration data
-     * @param <S>         type of subject
-     * @param <C>         type of configuration
-     * @return configuration object
-     */
-    <S, C extends Config<S>> C applyConfig(S subject, Class<C> configClass,
-                                           ObjectNode json);
-
-    /**
-     * Clears the configuration of the given class for the specified subject.
-     *
-     * @param subject     configuration subject
-     * @param configClass configuration class
-     * @param <S>         type of subject
-     * @param <C>         type of configuration
-     */
-    <S, C extends Config<S>> void clearConfig(S subject, Class<C> configClass);
-
-}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigStoreDelegate.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigStoreDelegate.java
deleted file mode 100644
index a77988d..0000000
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/NetworkConfigStoreDelegate.java
+++ /dev/null
@@ -1,24 +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.
- */
-package org.onosproject.incubator.net.config;
-
-import org.onosproject.store.StoreDelegate;
-
-/**
- * Network configuration store delegate abstraction.
- */
-public interface NetworkConfigStoreDelegate extends StoreDelegate<NetworkConfigEvent> {
-}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/SubjectFactory.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/SubjectFactory.java
deleted file mode 100644
index 7e6448b..0000000
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/SubjectFactory.java
+++ /dev/null
@@ -1,75 +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.
- */
-package org.onosproject.incubator.net.config;
-
-
-import com.google.common.annotations.Beta;
-
-/**
- * Base abstract factory for creating configuration subjects from their
- * string key image.
- *
- * @param <S> subject class
- */
-@Beta
-public abstract class SubjectFactory<S> {
-
-    private final Class<S> subjectClass;
-    private final String subjectKey;
-
-    /**
-     * Creates a new configuration factory for the specified class of subjects
-     * capable of generating the configurations of the specified class. The
-     * subject and configuration class keys are used merely as keys for use in
-     * composite JSON trees.
-     *
-     * @param subjectClass subject class
-     * @param subjectKey   subject class key
-     */
-    protected SubjectFactory(Class<S> subjectClass, String subjectKey) {
-        this.subjectClass = subjectClass;
-        this.subjectKey = subjectKey;
-    }
-
-    /**
-     * Returns the class of the subject to which this factory applies.
-     *
-     * @return subject type
-     */
-    public Class<S> subjectClass() {
-        return subjectClass;
-    }
-
-    /**
-     * Returns the unique key of this configuration subject class.
-     * This is primarily aimed for use in composite JSON trees in external
-     * representations and has no bearing on the internal behaviours.
-     *
-     * @return configuration key
-     */
-    public String subjectKey() {
-        return subjectKey;
-    }
-
-    /**
-     * Creates a configuration subject from its key image.
-     *
-     * @param subjectKey subject class key
-     * @return configuration subject
-     */
-    public abstract S createSubject(String subjectKey);
-
-}
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/AllowedEntityConfig.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/AllowedEntityConfig.java
index 6651ad4..b712fb6 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/AllowedEntityConfig.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/AllowedEntityConfig.java
@@ -15,7 +15,7 @@
  */
 package org.onosproject.incubator.net.config.basics;
 
-import org.onosproject.incubator.net.config.Config;
+import org.onosproject.net.config.Config;
 
 /**
  * Base abstraction for network entities for which admission into control
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/InterfaceConfig.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/InterfaceConfig.java
index 4211fd2..6244676 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/InterfaceConfig.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/InterfaceConfig.java
@@ -20,7 +20,7 @@
 import com.google.common.collect.Sets;
 import org.onlab.packet.MacAddress;
 import org.onlab.packet.VlanId;
-import org.onosproject.incubator.net.config.Config;
+import org.onosproject.net.config.Config;
 import org.onosproject.incubator.net.intf.Interface;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.host.InterfaceIpAddress;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/OpticalPortConfig.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/OpticalPortConfig.java
index e9aad7a..c873d84 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/OpticalPortConfig.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/OpticalPortConfig.java
@@ -2,7 +2,7 @@
 
 import java.util.Optional;
 
-import org.onosproject.incubator.net.config.Config;
+import org.onosproject.net.config.Config;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.Port;
 
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/SubjectFactories.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/SubjectFactories.java
index 0ba9459..5110a8f 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/SubjectFactories.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/config/basics/SubjectFactories.java
@@ -17,7 +17,7 @@
 
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
-import org.onosproject.incubator.net.config.SubjectFactory;
+import org.onosproject.net.config.SubjectFactory;
 import org.onosproject.incubator.net.domain.IntentDomainId;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.DeviceId;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/config/package-info.java b/incubator/api/src/main/java/org/onosproject/incubator/net/config/package-info.java
deleted file mode 100644
index f40c586..0000000
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/config/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.
- */
-
-/**
- * Subsystem for tracking network environment configuration.
- */
-package org.onosproject.incubator.net.config;
\ No newline at end of file
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainConfig.java b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainConfig.java
index 6cc6fb8..e903c32 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainConfig.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/IntentDomainConfig.java
@@ -17,7 +17,7 @@
 
 import com.google.common.annotations.Beta;
 import com.google.common.collect.ImmutableSet;
-import org.onosproject.incubator.net.config.Config;
+import org.onosproject.net.config.Config;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.DeviceId;
 
diff --git a/incubator/api/src/test/java/org/onosproject/incubator/net/config/NetworkConfigRegistryAdapter.java b/incubator/api/src/test/java/org/onosproject/incubator/net/config/NetworkConfigRegistryAdapter.java
deleted file mode 100644
index ab57254..0000000
--- a/incubator/api/src/test/java/org/onosproject/incubator/net/config/NetworkConfigRegistryAdapter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2014-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;
-
-import java.util.Set;
-
-/**
- * Test adapter for network configuration service registry.
- */
-public class NetworkConfigRegistryAdapter extends NetworkConfigServiceAdapter implements NetworkConfigRegistry {
-
-    public void registerConfigFactory(ConfigFactory configFactory) {
-    }
-
-    public void unregisterConfigFactory(ConfigFactory configFactory) {
-    }
-
-    public Set<ConfigFactory> getConfigFactories() {
-        return null;
-    }
-
-    public <S, C extends Config<S>> Set<ConfigFactory<S, C>> getConfigFactories(Class<S> subjectClass) {
-        return null;
-    }
-
-    public <S, C extends Config<S>> ConfigFactory<S, C> getConfigFactory(Class<C> configClass) {
-        return null;
-    }
-}
diff --git a/incubator/api/src/test/java/org/onosproject/incubator/net/config/NetworkConfigServiceAdapter.java b/incubator/api/src/test/java/org/onosproject/incubator/net/config/NetworkConfigServiceAdapter.java
deleted file mode 100644
index 0e108c9..0000000
--- a/incubator/api/src/test/java/org/onosproject/incubator/net/config/NetworkConfigServiceAdapter.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package org.onosproject.incubator.net.config;
-
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
-import java.util.Set;
-
-/**
- * Test adapter for network configuration service.
- */
-public class NetworkConfigServiceAdapter implements NetworkConfigService {
-    @Override
-    public Set<Class> getSubjectClasses() {
-        return null;
-    }
-
-    @Override
-    public SubjectFactory getSubjectFactory(String subjectKey) {
-        return null;
-    }
-
-    @Override
-    public SubjectFactory getSubjectFactory(Class subjectClass) {
-        return null;
-    }
-
-    @Override
-    public Class<? extends Config> getConfigClass(String subjectKey, String configKey) {
-        return null;
-    }
-
-    @Override
-    public <S> Set<S> getSubjects(Class<S> subjectClass) {
-        return null;
-    }
-
-    @Override
-    public <S, C extends Config<S>> Set<S> getSubjects(Class<S> subjectClass, Class<C> configClass) {
-        return null;
-    }
-
-    @Override
-    public <S> Set<? extends Config<S>> getConfigs(S subject) {
-        return null;
-    }
-
-    @Override
-    public <S, C extends Config<S>> C getConfig(S subject, Class<C> configClass) {
-        return null;
-    }
-
-    @Override
-    public <S, C extends Config<S>> C addConfig(S subject, Class<C> configClass) {
-        return null;
-    }
-
-    @Override
-    public <S, C extends Config<S>> C applyConfig(S subject, Class<C> configClass, ObjectNode json) {
-        return null;
-    }
-
-    @Override
-    public <S, C extends Config<S>> void removeConfig(S subject, Class<C> configClass) {
-
-    }
-
-    @Override
-    public void addListener(NetworkConfigListener listener) {
-
-    }
-
-    @Override
-    public void removeListener(NetworkConfigListener listener) {
-
-    }
-}
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 9a9a8b3..8a2325d 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
@@ -14,8 +14,8 @@
 
 import org.junit.Before;
 import org.junit.Test;
-import org.onosproject.incubator.net.config.Config;
-import org.onosproject.incubator.net.config.ConfigApplyDelegate;
+import org.onosproject.net.config.Config;
+import org.onosproject.net.config.ConfigApplyDelegate;
 import org.onosproject.net.ConnectPoint;
 import org.onosproject.net.DeviceId;
 import org.onosproject.net.Port;