Refactor of CFM code part1 - NBI
Change-Id: I5f37a05cb3978ff3a6d3cba8802a462452cecf06
diff --git a/apps/cfm/BUCK b/apps/cfm/BUCK
index 6e2c44a..6f1cef6 100644
--- a/apps/cfm/BUCK
+++ b/apps/cfm/BUCK
@@ -1,32 +1,13 @@
-COMPILE_DEPS = [
- '//lib:CORE_DEPS',
- '//lib:javax.ws.rs-api',
- '//utils/rest:onlab-rest',
- '//lib:JACKSON',
- '//cli:onos-cli',
- '//lib:org.apache.karaf.shell.console',
- '//incubator/api:onos-incubator-api'
+BUNDLES = [
+# '//apps/cfm/api:onos-apps-cfm-api',
+# '//apps/cfm/app:onos-apps-cfm-app',
+ '//apps/cfm/nbi:onos-apps-cfm-nbi',
]
-TEST_DEPS = [
- '//lib:TEST_REST',
- '//utils/osgi:onlab-osgi-tests',
- '//web/api:onos-rest-tests',
-]
-
-osgi_jar_with_tests (
- deps = COMPILE_DEPS,
- test_deps = TEST_DEPS,
- web_context = '/onos/cfm',
- api_title = 'L2 Monitoring CFM',
- api_version = '1.0',
- api_description = 'REST API for L2 Monitoring CFM',
- api_package = 'org.onosproject.soam.rest',
-)
-
onos_app (
title = 'Layer 2 Monitoring CFM Application',
category = 'Utility',
url = 'http://onosproject.org',
description = 'Layer 2 Monitoring Connectivity Fault Management App',
+ included_bundles = BUNDLES,
)
diff --git a/apps/cfm/nbi/BUCK b/apps/cfm/nbi/BUCK
new file mode 100644
index 0000000..9acd4a0
--- /dev/null
+++ b/apps/cfm/nbi/BUCK
@@ -0,0 +1,25 @@
+COMPILE_DEPS = [
+ '//lib:CORE_DEPS',
+ '//lib:javax.ws.rs-api',
+ '//utils/rest:onlab-rest',
+ '//lib:JACKSON',
+ '//cli:onos-cli',
+ '//lib:org.apache.karaf.shell.console',
+ '//incubator/api:onos-incubator-api'
+]
+
+TEST_DEPS = [
+ '//lib:TEST_REST',
+ '//utils/osgi:onlab-osgi-tests',
+ '//web/api:onos-rest-tests',
+]
+
+osgi_jar_with_tests (
+ deps = COMPILE_DEPS,
+ test_deps = TEST_DEPS,
+ web_context = '/onos/cfm',
+ api_title = 'L2 Monitoring CFM',
+ api_version = '1.0',
+ api_description = 'REST API for L2 Monitoring CFM',
+ api_package = 'org.onosproject.soam.rest',
+)
diff --git a/apps/cfm/nbi/pom.xml b/apps/cfm/nbi/pom.xml
new file mode 100644
index 0000000..9036ba1
--- /dev/null
+++ b/apps/cfm/nbi/pom.xml
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ~ Copyright 2017 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. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-apps</artifactId>
+ <version>1.13.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>onos-apps-cfm</artifactId>
+ <packaging>bundle</packaging>
+ <version>1.13.0-SNAPSHOT</version>
+
+ <description>ONOS OSGi bundle archetype</description>
+ <url>http://onosproject.org</url>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <web.context>/onos/cfm</web.context>
+ <api.description>Layer 2 Monitoring CFM REST API</api.description>
+ <api.version>1.0.0</api.version>
+ <api.package>org.onosproject.cfm</api.package>
+ <api.title>Layer 2 Monitoring CFM REST API</api.title>
+ <onos.app.name>org.onosproject.cfm</onos.app.name>
+ <onos.app.title>Layer 2 Monitoring CFM App</onos.app.title>
+ <onos.app.origin>Microsemi Inc</onos.app.origin>
+ <onos.app.category>default</onos.app.category>
+ <onos.app.url>http://onosproject.org</onos.app.url>
+ <onos.app.readme>Layer 2 Monitoring Connectivity Fault Management App</onos.app.readme>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-incubator-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-core-common</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-cli</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.karaf.shell</groupId>
+ <artifactId>org.apache.karaf.shell.console</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onlab-junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onlab-osgi</artifactId>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework</groupId>
+ <artifactId>jersey-test-framework-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-jetty</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-rest</artifactId>
+ <version>${project.version}</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <_wab>src/main/webapp/</_wab>
+ <Include-Resource>WEB-INF/classes/apidoc/swagger.json=target/swagger.json,
+ {maven-resources}</Include-Resource>
+ <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
+ <Import-Package>*,org.glassfish.jersey.servlet</Import-Package>
+ <Web-ContextPath>${web.context}</Web-ContextPath>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/CfmWebComponent.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/CfmWebComponent.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/CfmWebComponent.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/CfmWebComponent.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/CfmMaAddCommand.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/CfmMaAddCommand.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/CfmMaAddCommand.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/CfmMaAddCommand.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/CfmMaDeleteCommand.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/CfmMaDeleteCommand.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/CfmMaDeleteCommand.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/CfmMaDeleteCommand.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/CfmMdAddCommand.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/CfmMdAddCommand.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/CfmMdAddCommand.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/CfmMdAddCommand.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/CfmMdDeleteCommand.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/CfmMdDeleteCommand.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/CfmMdDeleteCommand.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/CfmMdDeleteCommand.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/CfmMdListMdCommand.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/CfmMdListMdCommand.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/CfmMdListMdCommand.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/CfmMdListMdCommand.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/CfmMepListCommand.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/CfmMepListCommand.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/CfmMepListCommand.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/CfmMepListCommand.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/CfmMepListDeviceCommand.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/CfmMepListDeviceCommand.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/CfmMepListDeviceCommand.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/CfmMepListDeviceCommand.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmCompMhfCompleter.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmCompMhfCompleter.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmCompMhfCompleter.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmCompMhfCompleter.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmCompTagTypeCompleter.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmCompTagTypeCompleter.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmCompTagTypeCompleter.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmCompTagTypeCompleter.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmDeviceIdCompleter.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmDeviceIdCompleter.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmDeviceIdCompleter.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmDeviceIdCompleter.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmMaCcmIntervalCompleter.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmMaCcmIntervalCompleter.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmMaCcmIntervalCompleter.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmMaCcmIntervalCompleter.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmMaNameCompleter.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmMaNameCompleter.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmMaNameCompleter.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmMaNameCompleter.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmMaNameTypeCompleter.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmMaNameTypeCompleter.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmMaNameTypeCompleter.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmMaNameTypeCompleter.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmMdLevelCompleter.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmMdLevelCompleter.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmMdLevelCompleter.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmMdLevelCompleter.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmMdNameCompleter.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmMdNameCompleter.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmMdNameCompleter.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmMdNameCompleter.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmMdNameTypeCompleter.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmMdNameTypeCompleter.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmMdNameTypeCompleter.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmMdNameTypeCompleter.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmMepIdCompleter.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmMepIdCompleter.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/CfmMepIdCompleter.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/CfmMepIdCompleter.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/package-info.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/package-info.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/completer/package-info.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/completer/package-info.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/cli/package-info.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/package-info.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/cli/package-info.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/cli/package-info.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/package-info.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/package-info.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/package-info.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/package-info.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/rest/CfmWebApplication.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/rest/CfmWebApplication.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/rest/CfmWebApplication.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/rest/CfmWebApplication.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/rest/DeviceMepWebResource.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/rest/DeviceMepWebResource.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/rest/DeviceMepWebResource.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/rest/DeviceMepWebResource.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/rest/MaWebResource.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/rest/MaWebResource.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/rest/MaWebResource.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/rest/MaWebResource.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/rest/MdWebResource.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/rest/MdWebResource.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/rest/MdWebResource.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/rest/MdWebResource.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/rest/MepWebResource.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/rest/MepWebResource.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/rest/MepWebResource.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/rest/MepWebResource.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/rest/package-info.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/rest/package-info.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/rest/package-info.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/rest/package-info.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/web/ComponentCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/ComponentCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/web/ComponentCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/ComponentCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/web/FngAddressCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/FngAddressCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/web/FngAddressCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/FngAddressCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/web/MaintenanceAssociationCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/MaintenanceAssociationCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/web/MaintenanceAssociationCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/MaintenanceAssociationCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/web/MaintenanceDomainCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/MaintenanceDomainCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/web/MaintenanceDomainCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/MaintenanceDomainCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/web/MepCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/MepCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/web/MepCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/MepCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/web/MepEntryCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/MepEntryCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/web/MepEntryCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/MepEntryCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/web/MepLbCreateCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/MepLbCreateCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/web/MepLbCreateCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/MepLbCreateCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/web/MepLbEntryCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/MepLbEntryCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/web/MepLbEntryCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/MepLbEntryCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/web/MepLtCreateCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/MepLtCreateCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/web/MepLtCreateCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/MepLtCreateCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/web/RMepCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/RMepCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/web/RMepCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/RMepCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/web/RemoteMepEntryCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/RemoteMepEntryCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/web/RemoteMepEntryCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/RemoteMepEntryCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/web/VidCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/VidCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/web/VidCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/VidCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/cfm/web/package-info.java b/apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/package-info.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/cfm/web/package-info.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/cfm/web/package-info.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/rest/DmWebResource.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/rest/DmWebResource.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/rest/DmWebResource.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/rest/DmWebResource.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/rest/LmWebResource.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/rest/LmWebResource.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/rest/LmWebResource.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/rest/LmWebResource.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/rest/package-info.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/rest/package-info.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/rest/package-info.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/rest/package-info.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/DelayMeasurementStatCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/DelayMeasurementStatCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/DelayMeasurementStatCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/DelayMeasurementStatCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/DelayMeasurementStatCurrentCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/DelayMeasurementStatCurrentCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/DelayMeasurementStatCurrentCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/DelayMeasurementStatCurrentCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/DelayMeasurementStatHistoryCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/DelayMeasurementStatHistoryCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/DelayMeasurementStatHistoryCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/DelayMeasurementStatHistoryCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/DmCreateCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/DmCreateCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/DmCreateCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/DmCreateCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/DmEntryCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/DmEntryCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/DmEntryCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/DmEntryCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/DmMeasurementOptionCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/DmMeasurementOptionCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/DmMeasurementOptionCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/DmMeasurementOptionCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/LmCounterOptionCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LmCounterOptionCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/LmCounterOptionCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LmCounterOptionCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/LmCreateCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LmCreateCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/LmCreateCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LmCreateCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/LmEntryCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LmEntryCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/LmEntryCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LmEntryCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/LmThresholdOptionCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LmThresholdOptionCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/LmThresholdOptionCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LmThresholdOptionCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/LossAvailabilityStatCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LossAvailabilityStatCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/LossAvailabilityStatCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LossAvailabilityStatCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/LossAvailabilityStatCurrentCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LossAvailabilityStatCurrentCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/LossAvailabilityStatCurrentCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LossAvailabilityStatCurrentCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/LossAvailabilityStatHistoryCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LossAvailabilityStatHistoryCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/LossAvailabilityStatHistoryCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LossAvailabilityStatHistoryCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/LossMeasurementStatCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LossMeasurementStatCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/LossMeasurementStatCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LossMeasurementStatCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/LossMeasurementStatCurrentCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LossMeasurementStatCurrentCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/LossMeasurementStatCurrentCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LossMeasurementStatCurrentCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/LossMeasurementStatHistoryCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LossMeasurementStatHistoryCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/LossMeasurementStatHistoryCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LossMeasurementStatHistoryCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/LossMeasurementThresholdCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LossMeasurementThresholdCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/LossMeasurementThresholdCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/LossMeasurementThresholdCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/StartTimeCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/StartTimeCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/StartTimeCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/StartTimeCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/StopTimeCodec.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/StopTimeCodec.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/StopTimeCodec.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/StopTimeCodec.java
diff --git a/apps/cfm/src/main/java/org/onosproject/soam/web/package-info.java b/apps/cfm/nbi/src/main/java/org/onosproject/soam/web/package-info.java
similarity index 100%
rename from apps/cfm/src/main/java/org/onosproject/soam/web/package-info.java
rename to apps/cfm/nbi/src/main/java/org/onosproject/soam/web/package-info.java
diff --git a/apps/cfm/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/apps/cfm/nbi/src/main/resources/OSGI-INF/blueprint/shell-config.xml
similarity index 100%
rename from apps/cfm/src/main/resources/OSGI-INF/blueprint/shell-config.xml
rename to apps/cfm/nbi/src/main/resources/OSGI-INF/blueprint/shell-config.xml
diff --git a/apps/cfm/src/main/resources/definitions/DmCreate.json b/apps/cfm/nbi/src/main/resources/definitions/DmCreate.json
similarity index 100%
rename from apps/cfm/src/main/resources/definitions/DmCreate.json
rename to apps/cfm/nbi/src/main/resources/definitions/DmCreate.json
diff --git a/apps/cfm/src/main/resources/definitions/LmCreate.json b/apps/cfm/nbi/src/main/resources/definitions/LmCreate.json
similarity index 100%
rename from apps/cfm/src/main/resources/definitions/LmCreate.json
rename to apps/cfm/nbi/src/main/resources/definitions/LmCreate.json
diff --git a/apps/cfm/src/main/resources/definitions/MaCreate.json b/apps/cfm/nbi/src/main/resources/definitions/MaCreate.json
similarity index 100%
rename from apps/cfm/src/main/resources/definitions/MaCreate.json
rename to apps/cfm/nbi/src/main/resources/definitions/MaCreate.json
diff --git a/apps/cfm/src/main/resources/definitions/MdCreate.json b/apps/cfm/nbi/src/main/resources/definitions/MdCreate.json
similarity index 100%
rename from apps/cfm/src/main/resources/definitions/MdCreate.json
rename to apps/cfm/nbi/src/main/resources/definitions/MdCreate.json
diff --git a/apps/cfm/src/main/resources/definitions/MepCreate.json b/apps/cfm/nbi/src/main/resources/definitions/MepCreate.json
similarity index 100%
rename from apps/cfm/src/main/resources/definitions/MepCreate.json
rename to apps/cfm/nbi/src/main/resources/definitions/MepCreate.json
diff --git a/apps/cfm/src/main/resources/definitions/MepLbTransmit.json b/apps/cfm/nbi/src/main/resources/definitions/MepLbTransmit.json
similarity index 100%
rename from apps/cfm/src/main/resources/definitions/MepLbTransmit.json
rename to apps/cfm/nbi/src/main/resources/definitions/MepLbTransmit.json
diff --git a/apps/cfm/src/main/resources/definitions/MepLtTransmit.json b/apps/cfm/nbi/src/main/resources/definitions/MepLtTransmit.json
similarity index 100%
rename from apps/cfm/src/main/resources/definitions/MepLtTransmit.json
rename to apps/cfm/nbi/src/main/resources/definitions/MepLtTransmit.json
diff --git a/apps/cfm/src/main/webapp/WEB-INF/web.xml b/apps/cfm/nbi/src/main/webapp/WEB-INF/web.xml
similarity index 100%
rename from apps/cfm/src/main/webapp/WEB-INF/web.xml
rename to apps/cfm/nbi/src/main/webapp/WEB-INF/web.xml
diff --git a/apps/cfm/src/test/java/org/onosproject/cfm/CfmCodecContext.java b/apps/cfm/nbi/src/test/java/org/onosproject/cfm/CfmCodecContext.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/cfm/CfmCodecContext.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/cfm/CfmCodecContext.java
diff --git a/apps/cfm/src/test/java/org/onosproject/cfm/impl/CfmResourceTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/cfm/impl/CfmResourceTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/cfm/impl/CfmResourceTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/cfm/impl/CfmResourceTest.java
diff --git a/apps/cfm/src/test/java/org/onosproject/cfm/impl/MaWebResourceTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/cfm/impl/MaWebResourceTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/cfm/impl/MaWebResourceTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/cfm/impl/MaWebResourceTest.java
diff --git a/apps/cfm/src/test/java/org/onosproject/cfm/impl/MdWebResourceTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/cfm/impl/MdWebResourceTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/cfm/impl/MdWebResourceTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/cfm/impl/MdWebResourceTest.java
diff --git a/apps/cfm/src/test/java/org/onosproject/cfm/impl/MepWebResourceTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/cfm/impl/MepWebResourceTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/cfm/impl/MepWebResourceTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/cfm/impl/MepWebResourceTest.java
diff --git a/apps/cfm/src/test/java/org/onosproject/cfm/web/MaintenanceAssociationCodecTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/cfm/web/MaintenanceAssociationCodecTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/cfm/web/MaintenanceAssociationCodecTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/cfm/web/MaintenanceAssociationCodecTest.java
diff --git a/apps/cfm/src/test/java/org/onosproject/cfm/web/MaintenanceDomainCodecTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/cfm/web/MaintenanceDomainCodecTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/cfm/web/MaintenanceDomainCodecTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/cfm/web/MaintenanceDomainCodecTest.java
diff --git a/apps/cfm/src/test/java/org/onosproject/cfm/web/MepEntryCodecTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/cfm/web/MepEntryCodecTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/cfm/web/MepEntryCodecTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/cfm/web/MepEntryCodecTest.java
diff --git a/apps/cfm/src/test/java/org/onosproject/cfm/web/MepLbCreateCodecTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/cfm/web/MepLbCreateCodecTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/cfm/web/MepLbCreateCodecTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/cfm/web/MepLbCreateCodecTest.java
diff --git a/apps/cfm/src/test/java/org/onosproject/cfm/web/MepLbEntryCodecTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/cfm/web/MepLbEntryCodecTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/cfm/web/MepLbEntryCodecTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/cfm/web/MepLbEntryCodecTest.java
diff --git a/apps/cfm/src/test/java/org/onosproject/cfm/web/MepLtCreateCodecTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/cfm/web/MepLtCreateCodecTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/cfm/web/MepLtCreateCodecTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/cfm/web/MepLtCreateCodecTest.java
diff --git a/apps/cfm/src/test/java/org/onosproject/cfm/web/RemoteMepEntryCodecTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/cfm/web/RemoteMepEntryCodecTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/cfm/web/RemoteMepEntryCodecTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/cfm/web/RemoteMepEntryCodecTest.java
diff --git a/apps/cfm/src/test/java/org/onosproject/soam/impl/DmWebResourceTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/soam/impl/DmWebResourceTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/soam/impl/DmWebResourceTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/soam/impl/DmWebResourceTest.java
diff --git a/apps/cfm/src/test/java/org/onosproject/soam/impl/LmWebResourceTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/soam/impl/LmWebResourceTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/soam/impl/LmWebResourceTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/soam/impl/LmWebResourceTest.java
diff --git a/apps/cfm/src/test/java/org/onosproject/soam/web/DmCreateCodecTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/soam/web/DmCreateCodecTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/soam/web/DmCreateCodecTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/soam/web/DmCreateCodecTest.java
diff --git a/apps/cfm/src/test/java/org/onosproject/soam/web/DmEntryCodecTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/soam/web/DmEntryCodecTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/soam/web/DmEntryCodecTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/soam/web/DmEntryCodecTest.java
diff --git a/apps/cfm/src/test/java/org/onosproject/soam/web/DmMeasurementOptionCodecTest.java b/apps/cfm/nbi/src/test/java/org/onosproject/soam/web/DmMeasurementOptionCodecTest.java
similarity index 100%
rename from apps/cfm/src/test/java/org/onosproject/soam/web/DmMeasurementOptionCodecTest.java
rename to apps/cfm/nbi/src/test/java/org/onosproject/soam/web/DmMeasurementOptionCodecTest.java
diff --git a/apps/cfm/src/test/resources/examples/CreateDM_Mep10.json b/apps/cfm/nbi/src/test/resources/examples/CreateDM_Mep10.json
similarity index 100%
rename from apps/cfm/src/test/resources/examples/CreateDM_Mep10.json
rename to apps/cfm/nbi/src/test/resources/examples/CreateDM_Mep10.json
diff --git a/apps/cfm/src/test/resources/examples/CreateMa1InDomainA.json b/apps/cfm/nbi/src/test/resources/examples/CreateMa1InDomainA.json
similarity index 100%
rename from apps/cfm/src/test/resources/examples/CreateMa1InDomainA.json
rename to apps/cfm/nbi/src/test/resources/examples/CreateMa1InDomainA.json
diff --git a/apps/cfm/src/test/resources/examples/CreateMa2InDomainA.json b/apps/cfm/nbi/src/test/resources/examples/CreateMa2InDomainA.json
similarity index 100%
rename from apps/cfm/src/test/resources/examples/CreateMa2InDomainA.json
rename to apps/cfm/nbi/src/test/resources/examples/CreateMa2InDomainA.json
diff --git a/apps/cfm/src/test/resources/examples/CreateMdDomainA.json b/apps/cfm/nbi/src/test/resources/examples/CreateMdDomainA.json
similarity index 100%
rename from apps/cfm/src/test/resources/examples/CreateMdDomainA.json
rename to apps/cfm/nbi/src/test/resources/examples/CreateMdDomainA.json
diff --git a/apps/cfm/src/test/resources/examples/CreateMep10.json b/apps/cfm/nbi/src/test/resources/examples/CreateMep10.json
similarity index 100%
rename from apps/cfm/src/test/resources/examples/CreateMep10.json
rename to apps/cfm/nbi/src/test/resources/examples/CreateMep10.json
diff --git a/apps/cfm/src/test/resources/examples/README.md b/apps/cfm/nbi/src/test/resources/examples/README.md
similarity index 100%
rename from apps/cfm/src/test/resources/examples/README.md
rename to apps/cfm/nbi/src/test/resources/examples/README.md