[ONOS-5805] MEF NRP REST API app for CE App

Migrating MEF NRP API translation app to onos-app-samples.

- Originally developed mainly by Konstantinos Kanonakis <kanonakisk@gmail.com>

- fixed NRP example JSON

Change-Id: If846dab4e08dcd17bc65a475b72fb3dc1a58cd9d
diff --git a/mef-nrp-api/examples/nrp-epl-fc-create-example-1.json b/mef-nrp-api/examples/nrp-epl-fc-create-example-1.json
new file mode 100644
index 0000000..98719fc
--- /dev/null
+++ b/mef-nrp-api/examples/nrp-epl-fc-create-example-1.json
@@ -0,0 +1,140 @@
+{
+  "id": "forwardingConstruct_1_to_2",
+  "adminState": "ACTIVE",
+  "fcPortList": [
+    {
+      "role": "WORKING",
+      "ltpRefList": [
+        {
+          "id": "of:0000000000000001/1",
+          "adminState": "ACTIVE",
+          "physicalPortReference": {
+            "CLLI": "CPqD1-Port1",
+            "Vendor": "Stanford University, Ericsson Research and CPqD Research",
+            "Hostname": "of:0000000000000001",
+            "Port": "1"
+          },
+          "lpList": [
+            {
+              "layerProtocolName": "string",
+              "nrp_lpSpec": {
+                "terminationSpec": {
+                  "id": "string",
+                  "nrp_physicalLayer": "string",
+                  "nrp_ingressBwProfile": {
+                    "bwpCfgCir": 2000000,
+                    "bwpCfgCbs": 2000,
+                    "bwpCfgEir": 1000000,
+                    "bwpCfgEbs": 2000
+                  },
+                  "nrp_uniTerminationSpec": {
+                    "id": "of:0000000000000001/1",
+                    "nrp_uniCfgCeVidUntagged": 0,
+                    "nrp_serviceprovideruniprofile": {
+                      "nrp_maxNumOfEvc": 1,
+                      "nrp_bundlingEnabled": true,
+                      "nrp_allToOneBundlingEnabled": true,
+                      "nrp_serviceMultiplexingEnabled": false
+                    },
+                    "nrp_operatoruniprofile": {
+                      "nrp_operatorUniId": "of:0000000000000001/1",
+                      "nrp_maxNumOfOvcEndPoint": 0,
+                      "nrp_maxNumOfCeVlanIdPerOvcEndPoint": 0
+                    }
+                  }
+                },
+                "connectionPointAndAdapterSpec": {
+                  "connectionPointAndAdapterSpec": {
+                    "connectionPointAndAdapterSpec": {
+                      "nrpEvcEndPointConnAdaptSpect": {
+                        "nrp_evcEndPointId": "string",
+                        "nrp_evcEndPointRole": {
+                          "role": "ROOT"
+                        },
+                        "nrp_evcEndPointMap": [
+                          {
+                            "nrp_endPointMapFormU": {
+                              "nrp_cevlanid": []
+                            }
+                          }
+                        ],
+                        "nrp_speed": "10000000"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "role": "WORKING",
+      "ltpRefList": [
+        {
+          "id": "of:0000000000000002/3",
+          "adminState": "ACTIVE",
+          "physicalPortReference": {
+            "CLLI": "CPqD2-Port1",
+            "Vendor": "Stanford University, Ericsson Research and CPqD Research",
+            "Hostname": "of:0000000000000002",
+            "Port": "3"
+          },
+          "lpList": [
+            {
+              "layerProtocolName": "string",
+              "nrp_lpSpec": {
+                "terminationSpec": {
+                  "id": "string",
+                  "nrp_physicalLayer": "string",
+                  "nrp_inniTerminationSpec": {
+                    "id": "string"
+                  }
+                },
+                "connectionPointAndAdapterSpec": {
+                  "connectionPointAndAdapterSpec": {
+                    "connectionPointAndAdapterSpec": {
+                      "nrpIvcEndPointConnAdaptSpect": {
+                        "nrp_ivcEndPointId": "string",
+                        "nrp_ivcEndPointRole": {
+                          "role": "TRUNK"
+                        },
+                        "nrp_ivcEndPointMap": [
+                          {
+                            "nrp_endPointMapFormT": {
+                              "nrp_svlanid": [
+                                "2"
+                              ],
+                              "nrp_tpid": [
+                                "0x8100"
+                              ]
+                            }
+                          }
+                        ],
+                        "nrp_speed": "10000000"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          ]
+        }
+      ]
+    }
+  ],
+  "nrpCeFcSpec": {
+    "nrp_connectionType": "PointToPoint",
+    "nrp_edgeCeFcSpec": {
+      "NRP_evcEndpoint": "string",
+      "nrp_ceVlanIdPreservation": true,
+      "nrp_ceVlanCosPreservation": true
+    },
+    "nrpTransitCeFcSpec": {
+      "NRP_evcEndpoint": "string",
+      "nrp_sVlanIdPreservation": true,
+      "nrp_sVlanCosPreservation": true
+    }
+  }
+}
diff --git a/mef-nrp-api/examples/nrp-epl-fc-create-example-2.json b/mef-nrp-api/examples/nrp-epl-fc-create-example-2.json
new file mode 100644
index 0000000..bea55fa
--- /dev/null
+++ b/mef-nrp-api/examples/nrp-epl-fc-create-example-2.json
@@ -0,0 +1,140 @@
+{
+  "id": "forwardingConstruct_3_to_4",
+  "adminState": "ACTIVE",
+  "fcPortList": [
+    {
+      "role": "WORKING",
+      "ltpRefList": [
+        {
+          "id": "of:0000000000000004/1",
+          "adminState": "ACTIVE",
+          "physicalPortReference": {
+            "CLLI": "CPqD4-Port1",
+            "Vendor": "Stanford University, Ericsson Research and CPqD Research",
+            "Hostname": "of:0000000000000004",
+            "Port": "1"
+          },
+          "lpList": [
+            {
+              "layerProtocolName": "string",
+              "nrp_lpSpec": {
+                "terminationSpec": {
+                  "id": "string",
+                  "nrp_physicalLayer": "string",
+                  "nrp_ingressBwProfile": {
+                    "bwpCfgCir": 2000000,
+                    "bwpCfgCbs": 2000,
+                    "bwpCfgEir": 1000000,
+                    "bwpCfgEbs": 2000
+                  },
+                  "nrp_uniTerminationSpec": {
+                    "id": "of:0000000000000001/1",
+                    "nrp_uniCfgCeVidUntagged": 0,
+                    "nrp_serviceprovideruniprofile": {
+                      "nrp_maxNumOfEvc": 1,
+                      "nrp_bundlingEnabled": true,
+                      "nrp_allToOneBundlingEnabled": true,
+                      "nrp_serviceMultiplexingEnabled": false
+                    },
+                    "nrp_operatoruniprofile": {
+                      "nrp_operatorUniId": "of:0000000000000004/1",
+                      "nrp_maxNumOfOvcEndPoint": 0,
+                      "nrp_maxNumOfCeVlanIdPerOvcEndPoint": 0
+                    }
+                  }
+                },
+                "connectionPointAndAdapterSpec": {
+                  "connectionPointAndAdapterSpec": {
+                    "connectionPointAndAdapterSpec": {
+                      "nrpEvcEndPointConnAdaptSpect": {
+                        "nrp_evcEndPointId": "string",
+                        "nrp_evcEndPointRole": {
+                          "role": "ROOT"
+                        },
+                        "nrp_evcEndPointMap": [
+                          {
+                            "nrp_endPointMapFormU": {
+                              "nrp_cevlanid": []
+                            }
+                          }
+                        ],
+                        "nrp_speed": "10000000"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "role": "WORKING",
+      "ltpRefList": [
+        {
+          "id": "of:0000000000000003/2",
+          "adminState": "ACTIVE",
+          "physicalPortReference": {
+            "CLLI": "CPqD3-Port2",
+            "Vendor": "Stanford University, Ericsson Research and CPqD Research",
+            "Hostname": "of:0000000000000003",
+            "Port": "2"
+          },
+          "lpList": [
+            {
+              "layerProtocolName": "string",
+              "nrp_lpSpec": {
+                "terminationSpec": {
+                  "id": "string",
+                  "nrp_physicalLayer": "string",
+                  "nrp_inniTerminationSpec": {
+                    "id": "string"
+                  }
+                },
+                "connectionPointAndAdapterSpec": {
+                  "connectionPointAndAdapterSpec": {
+                    "connectionPointAndAdapterSpec": {
+                      "nrpIvcEndPointConnAdaptSpect": {
+                        "nrp_ivcEndPointId": "string",
+                        "nrp_ivcEndPointRole": {
+                          "role": "TRUNK"
+                        },
+                        "nrp_ivcEndPointMap": [
+                          {
+                            "nrp_endPointMapFormT": {
+                              "nrp_svlanid": [
+                                "1"
+                              ],
+                              "nrp_tpid": [
+                                "0x8100"
+                              ]
+                            }
+                          }
+                        ],
+                        "nrp_speed": "10000000"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          ]
+        }
+      ]
+    }
+  ],
+  "nrpCeFcSpec": {
+    "nrp_connectionType": "PointToPoint",
+    "nrp_edgeCeFcSpec": {
+      "NRP_evcEndpoint": "string",
+      "nrp_ceVlanIdPreservation": true,
+      "nrp_ceVlanCosPreservation": true
+    },
+    "nrp_transitCeFcSpec": {
+      "NRP_evcEndpoint": "string",
+      "nrp_sVlanIdPreservation": true,
+      "nrp_sVlanCosPreservation": true
+    }
+  }
+}
diff --git a/mef-nrp-api/examples/nrp-ltp-create-example.json b/mef-nrp-api/examples/nrp-ltp-create-example.json
new file mode 100644
index 0000000..ac8a358
--- /dev/null
+++ b/mef-nrp-api/examples/nrp-ltp-create-example.json
@@ -0,0 +1,39 @@
+{
+    "id":"of:0000000000000001/2",
+    "adminState":"ACTIVE",
+    "physicalPortReference":
+    {
+        "CLLI":"CPqD1-Port2",
+        "Vendor":"Stanford University, Ericsson Research and CPqD Research",
+        "Hostname":"of:0000000000000001",
+        "Port":"2"
+    },
+    "lpList":
+    [
+        {
+            "layerProtocolName":"ETH",
+            "nrp_LpSpec":
+            {
+                "terminationSpec":
+                {
+                    "nrp_inniTerminationSpec":
+                    {
+                    }
+                },
+                "connectionPointAndAdapterSpec":
+                {
+                    "connectionPointAndAdapterSpec":
+                    {
+                        "connectionPointAndAdapterSpec":
+                        {
+                            "nrpIvcEndPointConnAdaptSpect":
+                            {
+                                "nrp_speed":"10000000"
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    ]
+}
diff --git a/mef-nrp-api/features.xml b/mef-nrp-api/features.xml
new file mode 100644
index 0000000..acc4098
--- /dev/null
+++ b/mef-nrp-api/features.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+  ~ 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.
+  -->
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="${project.artifactId}-${project.version}">
+    <feature name="${project.artifactId}" version="${project.version}"
+             description="${project.description}">
+        <feature>onos-api</feature>
+        <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/${jackson.version}</bundle>
+        <bundle>mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/${jackson.version}</bundle>
+        <bundle>mvn:${project.groupId}/${project.artifactId}/${project.version}</bundle>
+        <!-- Extra bundles due to MEF NRP API -->
+        <bundle>mvn:io.swagger/swagger-annotations/${swagger-core-version}</bundle>
+        <bundle>mvn:io.swagger/swagger-core/${swagger-core-version}</bundle>
+        <bundle>mvn:io.swagger/swagger-models/${swagger-core-version}</bundle>
+        <bundle>mvn:io.swagger/swagger-jaxrs/${swagger-core-version}</bundle>
+        <bundle>mvn:com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/${jackson.version}</bundle>
+        <bundle>mvn:com.google.guava/guava/18.0</bundle> <!-- swagger needs this -->
+        <bundle>wrap:mvn:org.reflections/reflections/0.9.10</bundle> <!-- swagger needs this -->
+        <!-- End of extra bundles due to MEF NRP API -->
+    </feature>
+</features>
diff --git a/mef-nrp-api/pom.xml b/mef-nrp-api/pom.xml
new file mode 100644
index 0000000..4e49e03
--- /dev/null
+++ b/mef-nrp-api/pom.xml
@@ -0,0 +1,312 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2016 Open Networking Laboratory
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ 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-dependencies</artifactId>
+        <version>1.8.0</version>
+        <relativePath/> <!-- parent is remote -->
+    </parent>
+
+    <groupId>org.onosproject</groupId>
+    <artifactId>mef-nrp-api</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+
+    <description>ONOS MEF NRP API application for Carrier Ethernet app</description>
+    <url>http://onosproject.org</url>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <onos.version>1.8.0</onos.version>
+        <carrierethernet.version>1.8.0-SNAPSHOT</carrierethernet.version>
+        <onos.app.requires>org.onosproject.ecord.carrierethernet</onos.app.requires>
+        <api.version>1.0.0</api.version>
+        <onos.app.name>org.onosproject.mefnrpapi</onos.app.name>
+        <onos.app.title>MEF NRP REST API</onos.app.title>
+        <onos.app.category>default</onos.app.category>
+        <api.description>MEF NRP REST API for Carrier Ethernet app</api.description>
+        <web.context>/onos/mef-nrp-api</web.context>
+        <api.title>MEF NRP REST API</api.title>
+        <onos.app.url>http://onosproject.org</onos.app.url>
+        <api.package>org.onosproject.mefnrpapi</api.package>
+        <onos.app.readme>MEF NRP REST API for Carrier Ethernet app.</onos.app.readme>
+        <!-- Extra properties due to MEF NRP API -->
+        <swagger-core-version>1.5.10</swagger-core-version>
+        <servlet-api-version>2.5</servlet-api-version>
+        <jersey2-version>2.22.2</jersey2-version>
+        <!-- End of extra properties due to MEF NRP API -->
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-api</artifactId>
+            <version>${onos.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-osgi</artifactId>
+            <version>${onos.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-api</artifactId>
+            <version>${onos.version}</version>
+            <scope>test</scope>
+            <classifier>tests</classifier>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>javax.ws.rs-api</artifactId>
+            <version>2.0.1</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-rest</artifactId>
+            <version>${onos.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.karaf.shell</groupId>
+            <artifactId>org.apache.karaf.shell.console</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-cli</artifactId>
+            <version>${onos.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.glassfish.jersey.containers</groupId>
+            <artifactId>jersey-container-servlet</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onlab-rest</artifactId>
+            <version>${onos.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-app-carrierethernet</artifactId>
+            <version>${carrierethernet.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- Extra dependencies due to MEF NRP API code -->
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-jersey2-jaxrs</artifactId>
+            <scope>compile</scope>
+            <version>${swagger-core-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>${servlet-api-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jersey.containers</groupId>
+            <artifactId>jersey-container-servlet-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.jersey.media</groupId>
+            <artifactId>jersey-media-multipart</artifactId>
+        </dependency>
+
+        <!-- End of extra dependencies due to MEF NRP API code -->
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <configuration>
+                    <excludes>org/onosproject/mefnrpapi/api/factories/**.java</excludes>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <niceManifest>true</niceManifest>
+                    <instructions>
+                        <_wab>src/main/webapp/</_wab>
+                        <Include-Resource>WEB-INF/classes/apidoc/swagger.json=src/main/resources/nrp.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>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.8</source>
+                    <target>1.8</target>
+                    <excludes>
+                        <exclude>**/exclude/*.java</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-scr-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>generate-scr-srcdescriptor</id>
+                        <goals>
+                            <goal>scr</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <scanClasses>true</scanClasses>
+                    <supportedProjectTypes>
+                        <supportedProjectType>bundle</supportedProjectType>
+                        <supportedProjectType>war</supportedProjectType>
+                    </supportedProjectTypes>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.onosproject</groupId>
+                <artifactId>onos-maven-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>io.swagger</groupId>
+                <artifactId>swagger-codegen-maven-plugin</artifactId>
+                <version>2.2.1</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                        <configuration>
+                            <inputSpec>${basedir}/src/main/resources/nrp.json</inputSpec>
+                            <language>jaxrs</language>
+                            <library>jersey2</library>
+                            <!-- will selectively add sourceFolder by build-helper-maven-plugin -->
+                            <addCompileSourceRoot>false</addCompileSourceRoot>
+                            <output>${project.build.directory}/swagger/</output>
+                            <configOptions>
+                                <title>MEF NRP REST Application</title>
+                                <!-- Don't use java8 date. This adds dependency to jersey1 classes -->
+                                <!-- <dateLibrary>java8</dateLibrary> -->
+                                <apiPackage>org.onosproject.mefnrpapi.api</apiPackage>
+                                <modelPackage>org.onosproject.mefnrpapi.api.model</modelPackage>
+                                <!-- workaround for StringUtil package location -->
+                                <invokerPackage>org.onosproject.mefnrpapi.api</invokerPackage>
+                                <sourceFolder>src/main/java</sourceFolder>
+                                <hideGenerationTimestamp>true</hideGenerationTimestamp>
+                                <implFolder>impl/main/java/exclude</implFolder>
+                                <library>jersey2</library>
+                                <!-- Workaround until swagger-code-gen 2.2.2 is released.
+                                    https://github.com/swagger-api/swagger-codegen/issues/3509
+                                 -->
+                                <additional-properties>jackson=true</additional-properties>
+                            </configOptions>
+                            <!-- Workaround until swagger-code-gen 2.2.2 is released.
+                                https://github.com/swagger-api/swagger-codegen/issues/3509
+                             -->
+                            <templateDirectory>${basedir}/swaggergen/template</templateDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>1.11</version>
+                <executions>
+                    <execution>
+                        <id>add-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <!-- only import generated sourceFolder -->
+                                <source>${project.build.directory}/swagger/src/main/java</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+        </plugins>
+    </build>
+
+</project>
diff --git a/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/ApiDocRegistrator.java b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/ApiDocRegistrator.java
new file mode 100644
index 0000000..756eef0
--- /dev/null
+++ b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/ApiDocRegistrator.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2016-present 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.mefnrpapi;
+
+import org.apache.felix.scr.annotations.Component;
+import org.onosproject.rest.AbstractApiDocRegistrator;
+import org.onosproject.rest.ApiDocProvider;
+
+// Usually onos-maven-plugin generates swagger.json and generate equivalent.
+// But this app is generated "from" swagger, so equivalent is not auto-generated
+// by the plugin. Manually creating one.
+@Component(immediate = true)
+public class ApiDocRegistrator extends AbstractApiDocRegistrator {
+    public ApiDocRegistrator() {
+        // sync with pom.xml web.context
+        super(new ApiDocProvider("/onos/mef-nrp-api",
+                                 "MEF NRP REST API",
+                                 ApiDocRegistrator.class.getClassLoader()));
+    }
+}
diff --git a/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/MefNrpApiAppComponent.java b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/MefNrpApiAppComponent.java
new file mode 100644
index 0000000..0728d1c
--- /dev/null
+++ b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/MefNrpApiAppComponent.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2014 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.mefnrpapi;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Skeletal ONOS application component.
+ */
+@Component(immediate = true)
+public class MefNrpApiAppComponent {
+
+    private final Logger log = LoggerFactory.getLogger(getClass());
+
+    @Activate
+    protected void activate() {
+        log.info("Started");
+    }
+
+    @Deactivate
+    protected void deactivate() {
+        log.info("Stopped");
+    }
+
+}
diff --git a/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/MefNrpApiWebApplication.java b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/MefNrpApiWebApplication.java
new file mode 100644
index 0000000..ce55dce
--- /dev/null
+++ b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/MefNrpApiWebApplication.java
@@ -0,0 +1,36 @@
+/*
+ * 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.mefnrpapi;
+
+import org.onosproject.mefnrpapi.api.JacksonJsonProvider;
+import org.onlab.rest.AbstractWebApplication;
+
+import java.util.Set;
+
+import org.onosproject.mefnrpapi.api.ForwardingConstructApi;
+import org.onosproject.mefnrpapi.api.LogicalTerminationPointApi;
+
+/**
+ * MEF SCA API web application.
+ */
+public class MefNrpApiWebApplication extends AbstractWebApplication {
+    @Override
+    public Set<Class<?>> getClasses() {
+        return getClasses(ForwardingConstructApi.class, LogicalTerminationPointApi.class,
+                JacksonJsonProvider.class);
+    }
+}
diff --git a/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/api/factories/ForwardingConstructApiServiceFactory.java b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/api/factories/ForwardingConstructApiServiceFactory.java
new file mode 100644
index 0000000..9780f19
--- /dev/null
+++ b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/api/factories/ForwardingConstructApiServiceFactory.java
@@ -0,0 +1,13 @@
+package org.onosproject.mefnrpapi.api.factories;
+
+import org.onosproject.mefnrpapi.api.ForwardingConstructApiService;
+import org.onosproject.mefnrpapi.api.impl.ForwardingConstructApiServiceImpl;
+
+
+public class ForwardingConstructApiServiceFactory {
+    private final static ForwardingConstructApiService service = new ForwardingConstructApiServiceImpl();
+
+    public static ForwardingConstructApiService getForwardingConstructApi() {
+        return service;
+    }
+}
diff --git a/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/api/factories/LogicalTerminationPointApiServiceFactory.java b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/api/factories/LogicalTerminationPointApiServiceFactory.java
new file mode 100644
index 0000000..0ac83a5
--- /dev/null
+++ b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/api/factories/LogicalTerminationPointApiServiceFactory.java
@@ -0,0 +1,13 @@
+package org.onosproject.mefnrpapi.api.factories;
+
+import org.onosproject.mefnrpapi.api.LogicalTerminationPointApiService;
+import org.onosproject.mefnrpapi.api.impl.LogicalTerminationPointApiServiceImpl;
+
+
+public class LogicalTerminationPointApiServiceFactory {
+    private final static LogicalTerminationPointApiService service = new LogicalTerminationPointApiServiceImpl();
+
+    public static LogicalTerminationPointApiService getLogicalTerminationPointApi() {
+        return service;
+    }
+}
diff --git a/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/api/impl/ForwardingConstructApiServiceImpl.java b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/api/impl/ForwardingConstructApiServiceImpl.java
new file mode 100644
index 0000000..086eead
--- /dev/null
+++ b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/api/impl/ForwardingConstructApiServiceImpl.java
@@ -0,0 +1,163 @@
+package org.onosproject.mefnrpapi.api.impl;
+
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetForwardingConstruct;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetManager;
+import org.onosproject.mefnrpapi.api.ApiResponseMessage;
+import org.onosproject.mefnrpapi.api.NotFoundException;
+import org.onosproject.mefnrpapi.api.ForwardingConstructApiService;
+import org.onosproject.mefnrpapi.api.model.ForwardingConstruct;
+import org.onosproject.mefnrpapi.translate.NrpApiTranslator;
+
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.SecurityContext;
+import javax.ws.rs.core.UriBuilder;
+import javax.ws.rs.core.UriInfo;
+import javax.ws.rs.core.Context;
+
+import java.util.LinkedList;
+import java.util.List;
+
+public class ForwardingConstructApiServiceImpl extends ForwardingConstructApiService {
+
+    CarrierEthernetManager ceManager = AbstractShellCommand.get(CarrierEthernetManager.class);
+
+    private static final String CHECK_LOG = " Check ONOS log for details.";
+    private static final String NOT_TRANSLATED = "Could not translate FC.";
+    private static final String NOT_EXISTS = "FC does not exist.";
+    private static final String CREATED = "FC was created successfully.";
+    private static final String NOT_CREATED = "FC could not be created.";
+    private static final String REMOVED = "FC was removed successfully.";
+    private static final String NOT_REMOVED = "FC could not be removed.";
+    private static final String REFCOUNT_NOT_ZERO = " RefCount is not zero.";
+    private static final String FC_REL_URI = "ForwardingConstruct/";
+
+    @Context
+    UriInfo uri;
+
+    @Override
+    public Response createAndActivateForwardingConstruct(ForwardingConstruct forwardingConstruct,
+                                                         SecurityContext securityContext)
+            throws NotFoundException {
+
+        CarrierEthernetForwardingConstruct ceFc = NrpApiTranslator.toCarrierEthernetFwc(forwardingConstruct);
+        if (ceFc == null) {
+            return response(Response.Status.BAD_REQUEST,
+                            responseMsg(ApiResponseMessage.ERROR, NOT_TRANSLATED));
+        } else {
+            ceManager.installFc(ceFc);
+            if (ceFc.isActive()) {
+                return response(FC_REL_URI + ceFc.id(),
+                                responseMsg(ApiResponseMessage.INFO, CREATED));
+            } else {
+                // TODO: Find out somehow the reason for the failure
+                return response(Response.Status.INTERNAL_SERVER_ERROR,
+                                responseMsg(ApiResponseMessage.ERROR, NOT_CREATED + CHECK_LOG));
+            }
+        }
+    }
+
+    @Override
+    public Response deleteForwardingConstruct(String id, SecurityContext securityContext)
+            throws NotFoundException {
+
+        if (ceManager.getFc(id) == null) {
+            return response(Response.Status.NOT_FOUND,
+                            responseMsg(ApiResponseMessage.ERROR, NOT_EXISTS));
+        } else if (ceManager.removeFc(id) == null) {
+            String msg = ceManager.getFc(id).refCount().get() != 0 ?
+                    REFCOUNT_NOT_ZERO : CHECK_LOG;
+            return response(Response.Status.FORBIDDEN,
+                            responseMsg(ApiResponseMessage.ERROR, NOT_REMOVED + msg));
+        } else {
+            return response(Response.Status.OK,
+                            responseMsg(ApiResponseMessage.INFO, REMOVED));
+        }
+    }
+
+    @Override
+    public Response getForwardingConstructById(String id, SecurityContext securityContext)
+            throws NotFoundException {
+
+        // If id is not provided, return all FCs
+        if (id == null) {
+            return findForwardingConstructByState(null, null, securityContext);
+        }
+
+        CarrierEthernetForwardingConstruct fc = ceManager.getFc(id);
+        if (fc == null) {
+            return response(Response.Status.NOT_FOUND,
+                            responseMsg(ApiResponseMessage.ERROR, NOT_EXISTS));
+        } else {
+            ForwardingConstruct nrpFc = NrpApiTranslator.fromCarrierEthernetFwc(fc);
+            if (nrpFc == null) {
+                return response(Response.Status.INTERNAL_SERVER_ERROR,
+                                responseMsg(ApiResponseMessage.ERROR, NOT_TRANSLATED));
+            } else {
+                return response(Response.Status.OK, nrpFc);
+            }
+        }
+    }
+
+    @Override
+    public Response findForwardingConstructByState(String state,
+                                                   String adminState,
+                                                   SecurityContext securityContext)
+            throws NotFoundException {
+
+        List<ForwardingConstruct> nrpFcList = new LinkedList<>();
+
+            // Browse through all CE FCs and translate them to NRP ones
+            for (CarrierEthernetForwardingConstruct ceFc : ceManager.fcMap().values()) {
+                ForwardingConstruct nrpFc = NrpApiTranslator.fromCarrierEthernetFwc(ceFc);
+                // FIXME: For some reason, calls with adminState query param trigger
+                // FIXME: getForwardingConstructById instead. May be an API issue
+                // If no state is provided, return all FCs
+                if (nrpFc != null &&
+                        (state == null && adminState == null ||
+                                matchState(state, adminState, nrpFc.getAdminState().toString()))) {
+                    nrpFcList.add(nrpFc);
+                }
+            }
+
+        // TODO: Indicate if some of the LTPs could not be translated?
+        return response(Response.Status.OK, nrpFcList);
+    }
+
+    @Override
+    public Response modifyForwardingConstruct(String id,
+                                              String state,
+                                              SecurityContext securityContext)
+            throws NotFoundException {
+        // do some magic!
+        return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK,
+                                                           "magic!")).build();
+    }
+
+    private <T>  Response response(Response.Status status, T entity) {
+        return Response
+                .status(status)
+                .entity(entity)
+                .build();
+    }
+
+    private <T>  Response response(String uri, T entity) {
+        return Response
+                .created(UriBuilder.fromUri(uri).build())
+                .entity(entity)
+                .build();
+    }
+
+    private ApiResponseMessage responseMsg(int msgCode, String msg) {
+        return new ApiResponseMessage(msgCode, msg == null ? "" : msg);
+    }
+
+    private boolean matchState(String state, String adminState, String fcState) {
+        if (state != null) {
+            return state.equalsIgnoreCase(fcState);
+        } else if (adminState != null) {
+            return adminState.equalsIgnoreCase(fcState);
+        }
+        return false;
+    }
+}
diff --git a/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/api/impl/LogicalTerminationPointApiServiceImpl.java b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/api/impl/LogicalTerminationPointApiServiceImpl.java
new file mode 100644
index 0000000..e7152c5
--- /dev/null
+++ b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/api/impl/LogicalTerminationPointApiServiceImpl.java
@@ -0,0 +1,208 @@
+package org.onosproject.mefnrpapi.api.impl;
+
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetLogicalTerminationPoint;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetManager;
+import org.onosproject.mefnrpapi.api.ApiResponseMessage;
+import org.onosproject.mefnrpapi.api.NotFoundException;
+import org.onosproject.mefnrpapi.api.LogicalTerminationPointApiService;
+import org.onosproject.mefnrpapi.api.model.LayerProtocol;
+import org.onosproject.mefnrpapi.api.model.LogicalTerminationPoint;
+import org.onosproject.mefnrpapi.api.model.LpSpec;
+import org.onosproject.mefnrpapi.api.model.NRPTerminationSpec;
+import org.onosproject.mefnrpapi.translate.NrpApiTranslator;
+
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.SecurityContext;
+import javax.ws.rs.core.UriBuilder;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class LogicalTerminationPointApiServiceImpl extends LogicalTerminationPointApiService {
+
+    CarrierEthernetManager ceManager =
+            AbstractShellCommand.get(CarrierEthernetManager.class);
+
+    private static final String NOT_TRANSLATED = "Could not translate LTP.";
+    private static final String EXISTS = "LTP already exists.";
+    private static final String NOT_EXISTS = "LTP does not exist.";
+    private static final String CREATED = "LTP was created successfully.";
+    private static final String REMOVED = "LTP was removed successfully.";
+    private static final String NOT_REMOVED = "LTP could not be removed.";
+    private static final String REFCOUNT_NOT_ZERO = " RefCount is not zero.";
+    private static final String LTP_REL_URI = "LogicalTerminationPoint/";
+
+    private static final String NRP_UNI_TERMINATIONSPEC = "NRP_UNI_TerminationSpec";
+    private static final String NRP_INNI_TERMINATIONSPEC = "NRP_INNI_TerminationSpec";
+    private static final String NRP_ENNI_TERMINATIONSPEC = "NRP_ENNI_TerminationSpec";
+
+    @Override
+    public Response createLogicalTerminationPoint(LogicalTerminationPoint ltp,
+                                                  SecurityContext securityContext) throws NotFoundException {
+
+        CarrierEthernetLogicalTerminationPoint ceLtp = NrpApiTranslator.toCarrierEthernetLtp(ltp);
+        if (ceLtp == null) {
+            return response(Response.Status.BAD_REQUEST,
+                            responseMsg(ApiResponseMessage.ERROR, NOT_TRANSLATED));
+        } else if (ceManager.addGlobalLtp(ceLtp) == null) {
+            return response(Response.Status.FORBIDDEN,
+                            responseMsg(ApiResponseMessage.ERROR, EXISTS));
+        } else {
+            return response(LTP_REL_URI + ceLtp.id(),
+                            responseMsg(ApiResponseMessage.INFO, CREATED));
+        }
+    }
+
+    @Override
+    public Response deleteLogicalTerminationPoint(String ltpId,
+                                                  SecurityContext securityContext) throws NotFoundException {
+
+        if (ceManager.ltpMap().get(ltpId) == null) {
+            return response(Response.Status.NOT_FOUND,
+                            responseMsg(ApiResponseMessage.ERROR, NOT_EXISTS));
+        } else if (ceManager.removeGlobalLtp(ltpId) == null) {
+            return response(Response.Status.FORBIDDEN,
+                            responseMsg(ApiResponseMessage.ERROR, NOT_REMOVED + REFCOUNT_NOT_ZERO));
+        } else {
+            return response(Response.Status.OK,
+                            responseMsg(ApiResponseMessage.INFO, REMOVED));
+        }
+    }
+
+    @Override
+    public Response getAllLogicalTerminationPoint(String fields,
+                                               SecurityContext securityContext) throws NotFoundException {
+        // TODO: Indicate if some of the LTPs could not be translated?
+        // TODO: Filter using provided fields
+        return response(Response.Status.OK, getNrpLtpList());
+    }
+
+    @Override
+    public Response getLogicalTerminationPoint(String ltpId,
+                                                  String fields,
+                                                  SecurityContext securityContext) throws NotFoundException {
+
+        // When id is null, return all LTPs
+        if (ltpId == null) {
+            return getAllLogicalTerminationPoint(fields, securityContext);
+        }
+
+        // Add all global LTPs if they are not there already
+        ceManager.getLtpsFromTopo(false, false).forEach(ltp -> ceManager.addGlobalLtp(ltp));
+
+        // Find the LTP using the provided id
+        CarrierEthernetLogicalTerminationPoint ceLtp = ceManager.ltpMap().get(ltpId);
+
+        if (ceLtp == null) {
+            return response(Response.Status.NOT_FOUND,
+                            responseMsg(ApiResponseMessage.ERROR, NOT_EXISTS));
+        } else {
+            // TODO: Match on provided fields
+            LogicalTerminationPoint nrpLtp = NrpApiTranslator.fromCarrierEthernetLtp(ceLtp);
+            if (nrpLtp == null) {
+                return response(Response.Status.INTERNAL_SERVER_ERROR,
+                                responseMsg(ApiResponseMessage.ERROR, NOT_TRANSLATED));
+            } else {
+                return response(Response.Status.OK, nrpLtp);
+            }
+        }
+    }
+
+    @Override
+    public Response patchLogicalTerminationPoint(String uniID,
+                                                 LogicalTerminationPoint individual,
+                                                 SecurityContext securityContext) throws NotFoundException {
+        // FIXME implement
+        // do some magic!
+        return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
+    }
+
+    @Override
+    public Response getAllLogicalTerminationPointOnNode(String id,
+                                                        SecurityContext securityContext)
+            throws NotFoundException {
+        // TODO: Indicate if some of the LTPs could not be translated?
+        // TODO: Filter using provided fields
+        return response(Response.Status.OK,
+                        getNrpLtpList()
+                                .stream()
+                                .filter(nrpLtp -> nrpLtp.getPhysicalPortReference().getHostname().equals(id))
+                                .collect(Collectors.toList()));
+    }
+
+    @Override
+    public Response getAllLtpsOnNodeOfLpspecType(String type,
+                                                 SecurityContext securityContext)
+            throws NotFoundException {
+        // TODO: Indicate if some of the LTPs could not be translated?
+        // TODO: Filter using provided fields
+        return response(Response.Status.OK,
+                        getNrpLtpList()
+                                .stream()
+                                .filter(nrpLtp -> hasType(nrpLtp, type))
+                                .collect(Collectors.toList()));
+    }
+
+    private <T>  Response response(Response.Status status, T entity) {
+        return Response
+                .status(status)
+                .entity(entity)
+                .build();
+    }
+
+    private <T>  Response response(String uri, T entity) {
+        return Response
+                .created(UriBuilder.fromUri(uri).build())
+                .entity(entity)
+                .build();
+    }
+
+    private ApiResponseMessage responseMsg(int msgCode, String msg) {
+        return new ApiResponseMessage(msgCode, msg == null ? "" : msg);
+    }
+
+    /**
+     * Browses through all global CE LTPs and translates them to NRP ones.
+     */
+    private List<LogicalTerminationPoint> getNrpLtpList() {
+        List<LogicalTerminationPoint> nrpLtpList = new LinkedList<>();
+        // Browse through all global CE LTPs and translate them to NRP ones
+        for (CarrierEthernetLogicalTerminationPoint ceLtp : ceManager.ltpMap().values()) {
+            LogicalTerminationPoint nrpLtp = NrpApiTranslator.fromCarrierEthernetLtp(ceLtp);
+            if (nrpLtp != null) {
+                nrpLtpList.add(nrpLtp);
+            }
+        }
+        return nrpLtpList;
+    }
+
+    /**
+     * Indicates whether an NRP LRP includes the provided type.
+     *
+     * Potential types are:
+     * NRP_UNI_TerminationSpec, NRP_INNI_TerminationSpec,
+     * NRP_ENNI_TerminationSpec, NRP_EvcEndpoint_ConnAdaptSpec,
+     * NRP_IvcEndpoint_ConnAdaptSpec, NRP_OvcEndpoint_ConnAdaptSpec
+     */
+    private boolean hasType(LogicalTerminationPoint nrpLtp, String type) {
+        for (LayerProtocol lp : nrpLtp.getLpList()) {
+            LpSpec lpSpec = lp.getNrpLpSpec();
+            if (lpSpec != null) {
+                NRPTerminationSpec nrpTerminationSpec = lpSpec.getTerminationSpec();
+                if (nrpTerminationSpec != null) {
+                    if (type.equals(NRP_UNI_TERMINATIONSPEC)) {
+                        return nrpTerminationSpec.getNrpUniTerminationSpec() != null;
+                    } else if (type.equals(NRP_INNI_TERMINATIONSPEC)) {
+                        return nrpTerminationSpec.getNrpInniTerminationSpec() != null;
+                    } else if (type.equals(NRP_ENNI_TERMINATIONSPEC)) {
+                        return nrpTerminationSpec.getNrpEnniTerminationSpec() != null;
+                    }
+                }
+            }
+        }
+        // TODO: Handle the NRP_EvcEndpoint_ConnAdaptSpec, NRP_IvcEndpoint_ConnAdaptSpec,
+        // TODO: and NRP_OvcEndpoint_ConnAdaptSpec cases
+        return false;
+    }
+}
diff --git a/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/api/impl/package-info.java b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/api/impl/package-info.java
new file mode 100644
index 0000000..8e09240
--- /dev/null
+++ b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/api/impl/package-info.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2016-present 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.
+ */
+/**
+ * MEF NRP app implementations.
+ */
+package org.onosproject.mefnrpapi.api.impl;
diff --git a/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/package-info.java b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/package-info.java
new file mode 100644
index 0000000..a9c80cf
--- /dev/null
+++ b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/package-info.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2016-present 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.
+ */
+/**
+ * MEF NRP app.
+ */
+package org.onosproject.mefnrpapi;
diff --git a/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/translate/NrpApiTranslator.java b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/translate/NrpApiTranslator.java
new file mode 100644
index 0000000..317a016
--- /dev/null
+++ b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/translate/NrpApiTranslator.java
@@ -0,0 +1,551 @@
+/*
+ * Copyright 2016-present 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.mefnrpapi.translate;
+
+import static org.slf4j.LoggerFactory.getLogger;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.onlab.packet.VlanId;
+import org.onlab.util.Bandwidth;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetBandwidthProfile;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetForwardingConstruct;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetInni;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetLogicalTerminationPoint;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetNetworkInterface;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetUni;
+import org.onosproject.ecord.carrierethernet.app.CarrierEthernetVirtualConnection;
+import org.onosproject.mefnrpapi.api.model.CeConnPtAndAdaptSpec;
+import org.onosproject.mefnrpapi.api.model.ConnectionPointAndAdapterSpec;
+import org.onosproject.mefnrpapi.api.model.FcPort;
+import org.onosproject.mefnrpapi.api.model.ForwardingConstruct;
+import org.onosproject.mefnrpapi.api.model.LayerProtocol;
+import org.onosproject.mefnrpapi.api.model.LogicalTerminationPoint;
+import org.onosproject.mefnrpapi.api.model.LpSpec;
+import org.onosproject.mefnrpapi.api.model.NRPBwpFlow;
+import org.onosproject.mefnrpapi.api.model.NRPCeFcSpec;
+import org.onosproject.mefnrpapi.api.model.NRPCeFcSpec.NrpConnectionTypeEnum;
+import org.onosproject.mefnrpapi.api.model.NRPConnAdaptSpec;
+import org.onosproject.mefnrpapi.api.model.NRPENNITerminationSpec;
+import org.onosproject.mefnrpapi.api.model.NRPEdgeCeFcSpec;
+import org.onosproject.mefnrpapi.api.model.NRPEndPointMap;
+import org.onosproject.mefnrpapi.api.model.NRPEndPointMapFormT;
+import org.onosproject.mefnrpapi.api.model.NRPEndPointMapFormU;
+import org.onosproject.mefnrpapi.api.model.NRPEndPointRole;
+import org.onosproject.mefnrpapi.api.model.NRPEvcEndpointConnAdaptSpec;
+import org.onosproject.mefnrpapi.api.model.NRPINNITerminationSpec;
+import org.onosproject.mefnrpapi.api.model.NRPIngressBwpPerCosName;
+import org.onosproject.mefnrpapi.api.model.NRPIvcEndpointConnAdaptSpec;
+import org.onosproject.mefnrpapi.api.model.NRPPhysicalPortReference;
+import org.onosproject.mefnrpapi.api.model.NRPTerminationSpec;
+import org.onosproject.mefnrpapi.api.model.NRPTransitCeFcSpec;
+import org.onosproject.mefnrpapi.api.model.NRPUNITerminationSpec;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.PortNumber;
+import org.onosproject.net.device.DeviceService;
+import org.slf4j.Logger;
+
+import com.google.common.annotations.Beta;
+
+/**
+ * Methods for translating between NRP swagger-generated Java classes and corresponding ONOS Java classes.
+ */
+@Beta
+public final class NrpApiTranslator {
+
+    private static DeviceService deviceService = AbstractShellCommand.get(DeviceService.class);
+
+    private static final Logger log = getLogger(NrpApiTranslator.class);
+
+    private NrpApiTranslator() {
+    }
+
+    public static ForwardingConstruct fromCarrierEthernetFwc(CarrierEthernetForwardingConstruct ceFwc) {
+        // TODO: Populate IDs of all intermediate objects
+
+        ForwardingConstruct nrpFwc = new ForwardingConstruct();
+
+        nrpFwc.setId(ceFwc.id());
+        nrpFwc.setAdminState(ForwardingConstruct.AdminStateEnum.valueOf(ceFwc.state().name()));
+
+        List<FcPort> fcPortList = new ArrayList<>();
+
+        ceFwc.ltpSet().forEach(ltp -> {
+            // Create FCPort
+            FcPort fcPort = new FcPort();
+            fcPort.setLtpRefList(Arrays.asList(fromCarrierEthernetLtp(ltp)));
+            // FIXME: Find out how to set role correctly
+            //fcPort.setRole(FcPort.RoleEnum.valueOf(ltp.role().name()));
+            fcPortList.add(fcPort);
+        });
+
+        nrpFwc.setFcPortList(fcPortList);
+
+        NRPCeFcSpec nrpCeFcSpec = new NRPCeFcSpec();
+
+        NRPEdgeCeFcSpec nrpEdgeCeFcSpec = new NRPEdgeCeFcSpec();
+
+        // TODO: What to add here?
+        nrpEdgeCeFcSpec.setNRPEvcEndpoint("");
+        // TODO: Populate with meaningful values
+        nrpEdgeCeFcSpec.setNrpCeVlanCosPreservation(true);
+        nrpEdgeCeFcSpec.setNrpCeVlanCosPreservation(true);
+
+        NRPTransitCeFcSpec nrpTransitCeFcSpec = new NRPTransitCeFcSpec();
+        // TODO: What to add here?
+        nrpTransitCeFcSpec.setNRPEvcEndpoint("");
+        // TODO: Populate with meaningful values
+        nrpTransitCeFcSpec.setNrpSVlanCosPreservation(true);
+        nrpTransitCeFcSpec.setNrpSVlanIdPreservation(true);
+
+        nrpCeFcSpec.setNrpEdgeCeFcSpec(nrpEdgeCeFcSpec);
+        nrpCeFcSpec.setNrpTransitCeFcSpec(nrpTransitCeFcSpec);
+
+        if (ceFwc.type().equals(CarrierEthernetForwardingConstruct.Type.POINT_TO_POINT)) {
+            nrpCeFcSpec.setNrpConnectionType(NRPCeFcSpec.NrpConnectionTypeEnum.POINTTOPOINT);
+        } else if (ceFwc.type().equals(CarrierEthernetForwardingConstruct.Type.MULTIPOINT_TO_MULTIPOINT)) {
+            nrpCeFcSpec.setNrpConnectionType(NRPCeFcSpec.NrpConnectionTypeEnum.MULTIPOINTTOMULTIPOINT);
+        } else if (ceFwc.type().equals(CarrierEthernetForwardingConstruct.Type.ROOT_MULTIPOINT)) {
+            nrpCeFcSpec.setNrpConnectionType(NRPCeFcSpec.NrpConnectionTypeEnum.ROOTEDMULTIPOINT);
+        } else {
+            return null;
+        }
+
+        nrpFwc.setNrpCeFcSpec(nrpCeFcSpec);
+
+        return nrpFwc;
+    }
+
+    public static CarrierEthernetForwardingConstruct toCarrierEthernetFwc(ForwardingConstruct nrpFwc) {
+
+        String fcId = nrpFwc.getId();
+
+        CarrierEthernetForwardingConstruct.Type fcType;
+
+        NRPCeFcSpec nrpCeFcSpec = nrpFwc.getNrpCeFcSpec();
+
+        if (nrpCeFcSpec.getNrpConnectionType().equals(NRPCeFcSpec.NrpConnectionTypeEnum.POINTTOPOINT)) {
+            fcType = CarrierEthernetVirtualConnection.Type.POINT_TO_POINT;
+        } else if (nrpCeFcSpec.getNrpConnectionType().equals(NrpConnectionTypeEnum.MULTIPOINTTOMULTIPOINT)) {
+            fcType = CarrierEthernetVirtualConnection.Type.MULTIPOINT_TO_MULTIPOINT;
+        } else if (nrpCeFcSpec.getNrpConnectionType().equals(NRPCeFcSpec.NrpConnectionTypeEnum.ROOTEDMULTIPOINT)) {
+            fcType = CarrierEthernetVirtualConnection.Type.ROOT_MULTIPOINT;
+        } else {
+            return null;
+        }
+
+        Set<CarrierEthernetLogicalTerminationPoint> ceLtpSet = new HashSet<>();
+
+        nrpFwc.getFcPortList().forEach(fcPort -> {
+            LogicalTerminationPoint nrpLtp = fcPort.getLtpRefList().get(0);
+            CarrierEthernetLogicalTerminationPoint ceLtp = toCarrierEthernetLtp(nrpLtp);
+            ceLtpSet.add(ceLtp);
+        });
+
+        return new CarrierEthernetForwardingConstruct(fcId, null, fcType, ceLtpSet, null);
+    }
+
+    public static LogicalTerminationPoint fromCarrierEthernetLtp(CarrierEthernetLogicalTerminationPoint ceLtp) {
+
+        // TODO: Return a list of LogicalTerminationPoint? (global LTP may include multiple service-specific ones)
+
+        LogicalTerminationPoint nrpLtp = new LogicalTerminationPoint();
+
+        // Set LTP id
+        nrpLtp.setId(ceLtp.id());
+
+        // Populate NRPPhysicalPortReference
+        NRPPhysicalPortReference nrpPortRef = new NRPPhysicalPortReference();
+        nrpPortRef.setHostname(ceLtp.cp().deviceId().toString());
+        nrpPortRef.setPort(ceLtp.cp().port().toString());
+        nrpPortRef.setVendor(deviceService.getDevice(ceLtp.cp().deviceId()).manufacturer());
+        nrpLtp.setPhysicalPortReference(nrpPortRef);
+
+        // Create LayerProtocol and LpSpec
+        LayerProtocol nrpLp = new LayerProtocol();
+        List<LayerProtocol> nrpLpList = new ArrayList<>();
+        // TODO: Populate the protocol name in a correct way
+        nrpLp.setLayerProtocolName("ETH");
+        LpSpec nrpLpSpec = new LpSpec();
+
+        NRPTerminationSpec nrpTerminationSpec = new NRPTerminationSpec();
+
+        ConnectionPointAndAdapterSpec connectionPointAndAdapterSpec = new ConnectionPointAndAdapterSpec();
+        CeConnPtAndAdaptSpec ceConnPtAndAdaptSpec = new CeConnPtAndAdaptSpec();
+        NRPConnAdaptSpec nrpConnAdaptSpec = new NRPConnAdaptSpec();
+
+        // Depending on the type of LTP, generate a different TerminationSpec/EndpointConnAdaptSpec
+        if (ceLtp.type().equals(CarrierEthernetNetworkInterface.Type.UNI)) {
+            // TODO: What to do for the terminationSpec?
+            NRPUNITerminationSpec nrpUniTerminationSpec = new NRPUNITerminationSpec();
+            nrpTerminationSpec.setNrpUniTerminationSpec(nrpUniTerminationSpec);
+
+            // Generate EndpointConnAdaptSpec
+            NRPEvcEndpointConnAdaptSpec nrpEvcEndpointConnAdaptSpec = new NRPEvcEndpointConnAdaptSpec();
+            CarrierEthernetUni ceUni = (CarrierEthernetUni) ceLtp.ni();
+            if (ceUni.ceVlanId() != null) {
+                NRPEndPointMap nrpEvcEndPointMap = new NRPEndPointMap();
+                List<NRPEndPointMap> nrpEndPointMapList = new ArrayList<>();
+                NRPEndPointMapFormU nrpEndPointMapFormU = new NRPEndPointMapFormU();
+                List<String> nrpCeVlanIdList = new ArrayList<>();
+                ceUni.ceVlanIdSet().forEach(ceVlanId -> nrpCeVlanIdList.add(ceVlanId.toString()));
+                nrpEndPointMapFormU.setNrpCevlanid(nrpCeVlanIdList);
+                nrpEvcEndPointMap.setNrpEndPointMapFormU(nrpEndPointMapFormU);
+                nrpEndPointMapList.add(nrpEvcEndPointMap);
+                nrpEvcEndpointConnAdaptSpec.setNrpEvcEndPointMap(nrpEndPointMapList);
+            }
+            // Set speed
+            nrpEvcEndpointConnAdaptSpec.setNrpSpeed(ceLtp.ni().capacity().toString());
+            // Set role
+            // FIXME: Need to go through all service UNIs to get their roles?
+            // FIXME: Or somehow store this info in the global UNIs?
+            /*NRPEndPointRole nrpEndPointRole = new NRPEndPointRole();
+            nrpEndPointRole.setRole(NRPEndPointRole.RoleEnum.valueOf(ceUni.role().name()));
+            nrpEvcEndpointConnAdaptSpec.setNrpEvcEndPointRole(nrpEndPointRole);*/
+            // Finalize nrpConnAdaptSpec
+            nrpConnAdaptSpec.setNrpEvcEndPointConnAdaptSpect(nrpEvcEndpointConnAdaptSpec);
+
+        } else if (ceLtp.type().equals(CarrierEthernetNetworkInterface.Type.INNI)) {
+            // TODO: What to do for the terminationSpec?
+            NRPINNITerminationSpec nrpInniTerminationSpec = new NRPINNITerminationSpec();
+            nrpTerminationSpec.setNrpInniTerminationSpec(nrpInniTerminationSpec);
+
+            // Generate EndpointConnAdaptSpec
+            NRPIvcEndpointConnAdaptSpec nrpIvcEndpointConnAdaptSpec = new NRPIvcEndpointConnAdaptSpec();
+            CarrierEthernetInni ceInni = (CarrierEthernetInni) ceLtp.ni();
+            if (ceInni.sVlanId() != null) {
+                NRPEndPointMap nrpIvcEndPointMap = new NRPEndPointMap();
+                List<NRPEndPointMap> nrpEndPointMapList = new ArrayList<>();
+                NRPEndPointMapFormT nrpEndPointMapFormT = new NRPEndPointMapFormT();
+                // TODO: Do this for the TPIDs as well
+                List<String> nrpStagList = new ArrayList<>();
+                ceInni.sVlanIdSet().forEach(sVlanId -> nrpStagList.add(sVlanId.toString()));
+                nrpEndPointMapFormT.setNrpSvlanid(nrpStagList);
+                nrpIvcEndPointMap.setNrpEndPointMapFormT(nrpEndPointMapFormT);
+                nrpEndPointMapList.add(nrpIvcEndPointMap);
+                nrpIvcEndpointConnAdaptSpec.setNrpIvcEndPointMap(nrpEndPointMapList);
+            }
+            // Set speed
+            nrpIvcEndpointConnAdaptSpec.setNrpSpeed(ceLtp.ni().capacity().toString());
+            // Set role
+            // FIXME: Need to go through all service INNIs to get their roles?
+            // FIXME: Or somehow store this info in the global UNIs?
+            /*NRPEndPointRole nrpEndPointRole = new NRPEndPointRole();
+            nrpEndPointRole.setRole(NRPEndPointRole.RoleEnum.valueOf(ceInni.role().name()));
+            nrpIvcEndpointConnAdaptSpec.setNrpIvcEndPointRole(nrpEndPointRole);*/
+            // Finalize nrpConnAdaptSpec
+            nrpConnAdaptSpec.setNrpIvcEndPointConnAdaptSpect(nrpIvcEndpointConnAdaptSpec);
+
+        } else {
+            // TODO: Populate this when API is ready
+            NRPENNITerminationSpec nrpEnniTerminationSpec = new NRPENNITerminationSpec();
+            nrpTerminationSpec.setNrpEnniTerminationSpec(nrpEnniTerminationSpec);
+        }
+
+        // Finalize terminationSpec
+        nrpLpSpec.setTerminationSpec(nrpTerminationSpec);
+
+        // Finalize ceConnPtAndAdaptSpec and connectionPointAndAdapterSpec
+        ceConnPtAndAdaptSpec.setConnectionPointAndAdapterSpec(nrpConnAdaptSpec);
+        connectionPointAndAdapterSpec.setConnectionPointAndAdapterSpec(ceConnPtAndAdaptSpec);
+
+        nrpLp.setNrpLpSpec(nrpLpSpec);
+
+        if (ceLtp.type().equals(CarrierEthernetNetworkInterface.Type.UNI)) {
+            // Apply BW profiles where needed (connectionPointAndAdapterSpec or terminationSpec)
+            if (ceLtp.type().equals(CarrierEthernetNetworkInterface.Type.UNI)) {
+                applyCeUniBwpToNrpLpSpec((CarrierEthernetUni) ceLtp.ni(), nrpLpSpec);
+            }
+        }
+
+        nrpLpList.add(nrpLp);
+        nrpLtp.setLpList(nrpLpList);
+
+        return nrpLtp;
+    }
+
+    public static CarrierEthernetLogicalTerminationPoint toCarrierEthernetLtp(LogicalTerminationPoint nrpLtp) {
+
+        // TODO: Check for null
+
+        // Set LTP id
+        String ceLtpCfgId = nrpLtp.getId();
+
+        // Set CE LTP connect point
+        DeviceId deviceId = DeviceId.deviceId(nrpLtp.getPhysicalPortReference().getHostname());
+        if (deviceService.getDevice(deviceId) == null) {
+            log.error("Invalid deviceId {}", deviceId);
+            return null;
+        }
+        PortNumber portNumber = PortNumber.portNumber(nrpLtp.getPhysicalPortReference().getPort());
+        if (deviceService.getPort(deviceId, portNumber) == null) {
+            log.error("Invalid port {} for device {}", portNumber, deviceId);
+            return null;
+        }
+        ConnectPoint ceLtpCp = new ConnectPoint(deviceId, portNumber);
+
+        // Get LayerProtocol and LpSpec
+        LayerProtocol nrpLp = nrpLtp.getLpList().get(0);
+        LpSpec lpSpec = nrpLp.getNrpLpSpec();
+
+        ConnectionPointAndAdapterSpec connectionPointAndAdapterSpec = lpSpec.getConnectionPointAndAdapterSpec();
+        CeConnPtAndAdaptSpec ceConnPtAndAdaptSpec = connectionPointAndAdapterSpec.getConnectionPointAndAdapterSpec();
+        NRPConnAdaptSpec nrpConnAdaptSpec = ceConnPtAndAdaptSpec.getConnectionPointAndAdapterSpec();
+
+        NRPTerminationSpec nrpTerminationSpec = lpSpec.getTerminationSpec();
+
+        // Depending on the type of LTP, get info from a different TerminationSpec/EndpointConnAdaptSpec
+        if (nrpTerminationSpec.getNrpUniTerminationSpec() != null) {
+
+            // Create a global UNI and then for each CE-VLAN ID add a new one to it
+            // TODO: What to do with the BW profiles?
+            CarrierEthernetUni ceGlobalUni = new CarrierEthernetUni(ceLtpCp, ceLtpCfgId, null, null, null);
+
+            // Get info from TerminationSpec
+            // TODO: What exactly should we get?
+
+            // Get info from EndpointConnAdaptSpec
+            NRPEvcEndpointConnAdaptSpec nrpEvcEndpointConnAdaptSpec =
+                    nrpConnAdaptSpec.getNrpEvcEndPointConnAdaptSpect();
+
+            // Get CE-VLAN IDs for each service UNI
+            List<NRPEndPointMap> nrpEndPointMapList = nrpEvcEndpointConnAdaptSpec.getNrpEvcEndPointMap();
+
+            CarrierEthernetLogicalTerminationPoint.Role ceLtpRole = null;
+
+            Iterator<NRPEndPointMap> it1 = nrpEndPointMapList.iterator();
+            while (it1.hasNext()) {
+                NRPEndPointMap nrpEndPointMap = it1.next();
+                NRPEndPointMapFormU nrpEndPointMapFormU = nrpEndPointMap.getNrpEndPointMapFormU();
+                List<String> ceVlanIdList = nrpEndPointMapFormU.getNrpCevlanid();
+                Iterator<String> it2 = ceVlanIdList.iterator();
+                VlanId ceVlanId = VlanId.NONE;
+                if (it2.hasNext()) {
+                    ceVlanId = VlanId.vlanId(it2.next());
+                }
+
+                // Get role
+                // TODO: How can we get a list of roles?
+                NRPEndPointRole nrpEndPointRole = nrpEvcEndpointConnAdaptSpec.getNrpEvcEndPointRole();
+                CarrierEthernetUni.Role ceUniRole =
+                        CarrierEthernetUni.Role.valueOf(nrpEndPointRole.getRole().name());
+                ceLtpRole = CarrierEthernetLogicalTerminationPoint.Role
+                        .valueOf(nrpEndPointRole.getRole().name());
+
+                // Create service UNI
+                CarrierEthernetUni ceServiceUni = new CarrierEthernetUni(ceLtpCp, ceLtpCfgId,
+                                                                         ceUniRole, ceVlanId, null);
+
+                // Add service UNI to globalUni
+                ceGlobalUni.addEcNi(ceServiceUni);
+            }
+
+            log.info("Created global UNI {}", ceGlobalUni);
+
+            // Get BW profiles from wherever needed (connectionPointAndAdapterSpec or terminationSpec)
+            // TODO: How can we get a list of BW profiles?
+            CarrierEthernetBandwidthProfile ceBwp = getCeBwpFromNrpLogicalTerminationPoint(nrpLtp);
+            if (ceBwp == null) {
+                log.error("No valid BWPs found for UNI with cfgId={}", ceLtpCfgId);
+                return null;
+            }
+            ceGlobalUni.addBandwidthProfile(ceBwp);
+
+            // Get speed
+            // FIXME: Do we really need this?
+            ceGlobalUni.setCapacity(Bandwidth.bps(Double.valueOf(nrpEvcEndpointConnAdaptSpec.getNrpSpeed())));
+
+            CarrierEthernetLogicalTerminationPoint ceLtp =
+                    new CarrierEthernetLogicalTerminationPoint(nrpLtp.getId(), ceGlobalUni);
+            ceLtp.setRole(ceLtpRole);
+            // Create global LTP and add global UNI to it
+            return ceLtp;
+
+        } else if (nrpTerminationSpec.getNrpInniTerminationSpec() != null) {
+
+            // Create a global INNI and then for each S-TAG add a new one to it
+            CarrierEthernetInni ceGlobalInni = new CarrierEthernetInni(ceLtpCp, ceLtpCfgId, null, null, null, null);
+
+            // Get info from TerminationSpec
+            // TODO: What exactly should we get?
+
+            // Get info from EndpointConnAdaptSpec
+            NRPIvcEndpointConnAdaptSpec nrpIvcEndpointConnAdaptSpec =
+                    nrpConnAdaptSpec.getNrpIvcEndPointConnAdaptSpect();
+
+            // Get CE-VLAN IDs for each service UNI
+            List<NRPEndPointMap> nrpEndPointMapList = nrpIvcEndpointConnAdaptSpec.getNrpIvcEndPointMap();
+
+            CarrierEthernetLogicalTerminationPoint.Role ceLtpRole = null;
+
+            Iterator<NRPEndPointMap> it1 = nrpEndPointMapList.iterator();
+            while (it1.hasNext()) {
+                NRPEndPointMap nrpEndPointMap = it1.next();
+                NRPEndPointMapFormT nrpEndPointMapFormT = nrpEndPointMap.getNrpEndPointMapFormT();
+                List<String> sVlanIdList = nrpEndPointMapFormT.getNrpSvlanid();
+                for (String sVlanId : sVlanIdList) {
+                    // FIXME: Get the TPIDs correctly
+                    String tpid = nrpEndPointMapFormT.getNrpTpid().get(0);
+
+                    // Get role
+                    // TODO: How can we get a list of roles?
+                    NRPEndPointRole nrpEndPointRole = nrpIvcEndpointConnAdaptSpec.getNrpIvcEndPointRole();
+                    CarrierEthernetInni.Role ceInniRole = CarrierEthernetInni.Role
+                            .valueOf(nrpEndPointRole.getRole().name());
+                    ceLtpRole = CarrierEthernetLogicalTerminationPoint.Role
+                            .valueOf(nrpEndPointRole.getRole().name());
+
+                    // Create service INNI
+                    CarrierEthernetInni ceServiceInni =
+                            new CarrierEthernetInni(ceLtpCp, ceLtpCfgId, ceInniRole,
+                                                    VlanId.vlanId(sVlanId), tpid, Bandwidth.bps((double) 0));
+
+                    // Add service INNI to global INNI
+                    ceGlobalInni.addEcNi(ceServiceInni);
+                }
+            }
+
+            // Get speed
+            // FIXME: Do we really need this?
+            ceGlobalInni.setCapacity(Bandwidth.bps(Double.valueOf(nrpIvcEndpointConnAdaptSpec.getNrpSpeed())));
+
+            CarrierEthernetLogicalTerminationPoint ceLtp =
+                    new CarrierEthernetLogicalTerminationPoint(nrpLtp.getId(), ceGlobalInni);
+            ceLtp.setRole(ceLtpRole);
+
+            // Create global LTP and add global INNI to it
+            return ceLtp;
+        } else if (nrpTerminationSpec.getNrpEnniTerminationSpec() != null) {
+            // TODO: Populate this when API is ready
+            return null;
+        }
+        return null;
+    }
+
+    private static CarrierEthernetBandwidthProfile getCeBwpFromNrpLogicalTerminationPoint(
+            LogicalTerminationPoint nrpLtp) {
+
+        String ceBwpId = null;
+        String ceBwpCfgId;
+        CarrierEthernetBandwidthProfile.Type ceBwpType;
+
+        NRPConnAdaptSpec nrpConnAdaptSpec = nrpLtp.getLpList().get(0).getNrpLpSpec()
+                .getConnectionPointAndAdapterSpec()
+                .getConnectionPointAndAdapterSpec()
+                .getConnectionPointAndAdapterSpec();
+        NRPBwpFlow ingressBwpPerEvc =
+                nrpConnAdaptSpec.getNrpIngressBwpFlow();
+        NRPIngressBwpPerCosName ingressBwpPerCos =
+                nrpConnAdaptSpec.getNrpIngressbwppercosname();
+        NRPTerminationSpec nrpTerminationSpec = nrpLtp.getLpList().get(0).getNrpLpSpec()
+                .getTerminationSpec();
+        NRPBwpFlow interfaceIngressBwp = nrpTerminationSpec.getNrpIngressBwProfile();
+
+        if (ingressBwpPerEvc != null) {
+            if (interfaceIngressBwp != null || ingressBwpPerCos != null) {
+                log.error("Only one BW profile can be set per UNI");
+                return null;
+            }
+            ceBwpCfgId = ingressBwpPerEvc.getBwpCfgIdentifier();
+            ceBwpType = CarrierEthernetBandwidthProfile.Type.EVC;
+            return new CarrierEthernetBandwidthProfile(ceBwpId, ceBwpCfgId, ceBwpType,
+                    ((ingressBwpPerEvc.getBwpCfgCir() == null) ?
+                            Bandwidth.bps(0) : Bandwidth.bps(ingressBwpPerEvc.getBwpCfgCir())),
+                    ((ingressBwpPerEvc.getBwpCfgEir() == null) ?
+                            Bandwidth.bps(0) : Bandwidth.bps(ingressBwpPerEvc.getBwpCfgEir())),
+                    ((ingressBwpPerEvc.getBwpCfgCbs() == null) ? 0L : (long) ingressBwpPerEvc.getBwpCfgCbs()),
+                    ((ingressBwpPerEvc.getBwpCfgEbs() == null) ? 0L : (long) ingressBwpPerEvc.getBwpCfgEbs()));
+        } else if (interfaceIngressBwp != null) {
+            if (ingressBwpPerCos != null) {
+                log.error("Only one BW profile can be set per UNI");
+                return null;
+            }
+            // Use the UNI connect point id
+            ceBwpId = nrpLtp.getPhysicalPortReference().getHostname() + "/" +
+                    nrpLtp.getPhysicalPortReference().getPort();
+            ceBwpCfgId = interfaceIngressBwp.getBwpCfgIdentifier();
+            ceBwpType = CarrierEthernetBandwidthProfile.Type.INTERFACE;
+            return new CarrierEthernetBandwidthProfile(ceBwpId, ceBwpCfgId, ceBwpType,
+                    ((interfaceIngressBwp.getBwpCfgCir() == null) ?
+                            Bandwidth.bps(0) : Bandwidth.bps(interfaceIngressBwp.getBwpCfgCir())),
+                    ((interfaceIngressBwp.getBwpCfgEir() == null) ?
+                            Bandwidth.bps(0) : Bandwidth.bps(interfaceIngressBwp.getBwpCfgEir())),
+                    ((interfaceIngressBwp.getBwpCfgCbs() == null) ? 0L : (long) interfaceIngressBwp.getBwpCfgCbs()),
+                    ((interfaceIngressBwp.getBwpCfgEbs() == null) ? 0L : (long) interfaceIngressBwp.getBwpCfgEbs()));
+        } else if (ingressBwpPerCos != null) {
+            ceBwpId = ingressBwpPerCos.getNrpCosName();
+            if (ceBwpId == null) {
+                log.error("CoS ID is required for COS BW profile");
+                return null;
+            }
+            ceBwpCfgId = ingressBwpPerCos.getNrpCosName();
+            ceBwpType = CarrierEthernetBandwidthProfile.Type.COS;
+            NRPBwpFlow ingressBwpPerCosBwp = ingressBwpPerCos.getNrpBwpflow();
+            return new CarrierEthernetBandwidthProfile(ceBwpId, ceBwpCfgId, ceBwpType,
+                    ((ingressBwpPerCosBwp.getBwpCfgCir() == null) ?
+                            Bandwidth.bps(0) : Bandwidth.bps(ingressBwpPerCosBwp.getBwpCfgCir())),
+                    ((ingressBwpPerCosBwp.getBwpCfgEir() == null) ?
+                            Bandwidth.bps(0) : Bandwidth.bps(ingressBwpPerCosBwp.getBwpCfgEir())),
+                    ((ingressBwpPerCosBwp.getBwpCfgCbs() == null) ? 0L : (long) ingressBwpPerCosBwp.getBwpCfgCbs()),
+                    ((ingressBwpPerCosBwp.getBwpCfgEbs() == null) ? 0L : (long) ingressBwpPerCosBwp.getBwpCfgEbs()));
+        } else {
+            log.error("Could not find valid BW profile for LTP {}", nrpLtp.getId());
+            return null;
+        }
+
+    }
+
+    private static void applyCeUniBwpToNrpLpSpec(CarrierEthernetUni ceUni, LpSpec nrpLpSpec) {
+
+        CarrierEthernetBandwidthProfile ceBwp = ceUni.bwp();
+
+        if (ceBwp != null) {
+            if (ceBwp.type().equals(CarrierEthernetBandwidthProfile.Type.EVC)) {
+                NRPConnAdaptSpec nrpConnAdaptSpec = nrpLpSpec
+                        .getConnectionPointAndAdapterSpec()
+                        .getConnectionPointAndAdapterSpec()
+                        .getConnectionPointAndAdapterSpec();
+                NRPBwpFlow nrpBwp =
+                        new NRPBwpFlow();
+                nrpBwp.setBwpCfgCir((int) ceBwp.cir().bps());
+                nrpBwp.setBwpCfgCbs((int) ceBwp.cbs());
+                nrpBwp.setBwpCfgEir((int) ceBwp.eir().bps());
+                nrpBwp.setBwpCfgEbs((int) ceBwp.ebs());
+                nrpConnAdaptSpec.setNrpIngressBwpFlow(nrpBwp);
+            } else if (ceBwp.type().equals(CarrierEthernetBandwidthProfile.Type.COS)) {
+                // TODO: Populate this at a later point
+            } else if (ceBwp.type().equals(CarrierEthernetBandwidthProfile.Type.INTERFACE)) {
+                NRPTerminationSpec nrpTerminationSpec = nrpLpSpec.getTerminationSpec();
+                NRPBwpFlow nrpBwp = new NRPBwpFlow();
+                nrpBwp.setBwpCfgCir((int) ceBwp.cir().bps());
+                nrpBwp.setBwpCfgCbs((int) ceBwp.cbs());
+                nrpBwp.setBwpCfgEir((int) ceBwp.eir().bps());
+                nrpBwp.setBwpCfgEbs((int) ceBwp.ebs());
+                nrpTerminationSpec.setNrpIngressBwProfile(nrpBwp);
+            } else {
+                log.error("Could not add BW profile {} from UNI {}", ceBwp.id(), ceUni.id());
+            }
+        }
+    }
+
+}
diff --git a/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/translate/package-info.java b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/translate/package-info.java
new file mode 100644
index 0000000..ca4f384
--- /dev/null
+++ b/mef-nrp-api/src/main/java/org/onosproject/mefnrpapi/translate/package-info.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2016-present 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.
+ */
+/**
+ * MEF NRP app utilities.
+ */
+package org.onosproject.mefnrpapi.translate;
diff --git a/mef-nrp-api/src/main/resources/README b/mef-nrp-api/src/main/resources/README
new file mode 100644
index 0000000..9b7068d
--- /dev/null
+++ b/mef-nrp-api/src/main/resources/README
@@ -0,0 +1,8 @@
+
+
+nrp.json:
+  MEF NRP API definition taken from https://swaggerhub.com/api/jtpugac/MEF_NRP/1.0
+  with some minor modifications:
+   - Fixing the paths for getting LogicalTerminationPoint by node id and lpSpec type
+   - Correcting (swapping) the method names for getAllLogicalTerminationPoint() and getLogicalTerminationPoint()
+
diff --git a/mef-nrp-api/src/main/resources/nrp.json b/mef-nrp-api/src/main/resources/nrp.json
new file mode 100644
index 0000000..c927fc6
--- /dev/null
+++ b/mef-nrp-api/src/main/resources/nrp.json
@@ -0,0 +1,1222 @@
+{
+  "swagger": "2.0",
+  "info": {
+    "description": "MEF Network Resource Provisioning API",
+    "version": "1.0",
+    "title": "MEF NRP API"
+  },
+  "basePath": "\/onos\/mef-nrp-api",
+  "schemes": [
+    "http"
+  ],
+  "produces": [
+    "application\/json"
+  ],
+  "paths": {
+    "\/ForwardingConstruct": {
+      "post": {
+        "tags": [
+          "ForwardingConstruct"
+        ],
+        "operationId": "createAndActivateForwardingConstruct",
+        "summary": "Create\/Create and Activate ForwardingConstruct with {id}",
+        "description": "Create, Create and Activate NRP Forwarding Construct. Use state variable for action. ",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "ForwardingConstruct",
+            "required": true,
+            "in": "body",
+            "description": "ForwardingConstruct",
+            "schema": {
+              "$ref": "#\/definitions\/ForwardingConstruct"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "NRP Forwarding Construct",
+            "schema": {
+              "$ref": "#\/definitions\/ForwardingConstruct"
+            }
+          },
+          "400": {
+            "description": "Error has occurred",
+            "schema": {
+              "$ref": "#\/definitions\/NRP_Error_Response"
+            }
+          }
+        }
+      }
+    },
+    "\/ForwardingConstruct\/{id}": {
+      "patch": {
+        "tags": [
+          "ForwardingConstruct"
+        ],
+        "operationId": "modifyForwardingConstruct",
+        "summary": "Change administrative state of Forwarding Construct",
+        "description": "Activate, Deactivate, Suspend or Resume an existing  ForwardingConstruct identified with {id}. Use adminState variable for action.",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "id",
+            "in": "path",
+            "required": true,
+            "description": "id of NRP Forwarding Construct",
+            "type": "string"
+          },
+          {
+            "name": "adminState",
+            "in": "query",
+            "description": "Administrative state of ForwardingConstruct",
+            "type": "string",
+            "enum": [
+              "active",
+              "inactive",
+              "suspended",
+              "terminated"
+            ],
+            "required": true
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "NRP Forwarding Construct",
+            "schema": {
+              "$ref": "#\/definitions\/ForwardingConstruct"
+            }
+          },
+          "400": {
+            "description": "Invalid ForwardingConstruct PATCH"
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "ForwardingConstruct"
+        ],
+        "operationId": "deleteForwardingConstruct",
+        "summary": "Delete NRP Forwarding Construct with {id}",
+        "description": "Delete NRP Forwarding Construct {id}",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "id",
+            "in": "path",
+            "required": true,
+            "description": "id of NRP Forwarding Construct",
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "Delete ForwardingConstruct uniquely identified by id",
+            "schema": {
+              "$ref": "#\/definitions\/ForwardingConstruct"
+            }
+          },
+          "400": {
+            "description": "Invalid ForwardingConstruct identifier"
+          }
+        }
+      },
+      "get": {
+        "tags": [
+          "ForwardingConstruct"
+        ],
+        "operationId": "getForwardingConstruct_ById",
+        "summary": "Gets ForwardingConstruct by id",
+        "description": "Gets NRP Forwarding Construct by id",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "id",
+            "in": "path",
+            "required": true,
+            "description": "id of NRP Forwarding Construct",
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "Get ForwardingConstruct with {id}",
+            "schema": {
+              "$ref": "#\/definitions\/ForwardingConstruct"
+            }
+          }
+        }
+      }
+    },
+    "\/ForwardingConstruct\/findByState\/{state}": {
+      "get": {
+        "tags": [
+          "ForwardingConstruct"
+        ],
+        "operationId": "findForwardingConstruct_ByState",
+        "summary": "Find ForwardingConstruct by state",
+        "description": "Finds NRP Forwarding Construct based on admininstrative state",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "state",
+            "in": "path",
+            "required": true,
+            "description": "State of NRP Forwarding Construct",
+            "type": "string"
+          },
+          {
+            "name": "adminState",
+            "in": "query",
+            "required": false,
+            "description": "",
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "ForwardingConstruct(s) by state",
+            "schema": {
+              "type": "array",
+              "items": {
+                "$ref": "#\/definitions\/ForwardingConstruct"
+              }
+            }
+          }
+        }
+      }
+    },
+    "\/LogicalTerminationPoint": {
+      "post": {
+        "tags": [
+          "LogicalTerminationPoint"
+        ],
+        "operationId": "createLogicalTerminationPoint",
+        "summary": "Create\/Create and Activate a LogicalTerminationPoint",
+        "description": "Create or Create and Activate a LogicalTerminationPoint",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "id",
+            "in": "body",
+            "required": true,
+            "schema": {
+              "$ref": "#\/definitions\/LogicalTerminationPoint"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "Logical Termination Point",
+            "schema": {
+              "$ref": "#\/definitions\/LogicalTerminationPoint"
+            }
+          }
+        }
+      },
+      "get": {
+        "tags": [
+          "LogicalTerminationPoint"
+        ],
+        "operationId": "getAllLogicalTerminationPoint",
+        "summary": "Get all LogicalTerminationPoint(s) managed by Domain Controller",
+        "description": "Get all LogicalTerminationPoints managed by a Domain Controller",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "fields",
+            "in": "query",
+            "required": false,
+            "description": "",
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "List of LogicalTerminationPoint",
+            "schema": {
+              "type": "array",
+              "items": {
+                "$ref": "#\/definitions\/LogicalTerminationPoint"
+              }
+            }
+          }
+        }
+      }
+    },
+    "\/LogicalTerminationPoint\/{id}": {
+      "delete": {
+        "tags": [
+          "LogicalTerminationPoint"
+        ],
+        "operationId": "deleteLogicalTerminationPoint",
+        "summary": "Delete LogicalTerminationPoint with {id}",
+        "description": "Delete LogicalTerminationPoint with {id}",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "id",
+            "in": "path",
+            "required": true,
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "204": {
+            "description": "Success"
+          }
+        }
+      },
+      "get": {
+        "tags": [
+          "LogicalTerminationPoint"
+        ],
+        "operationId": "getLogicalTerminationPoint",
+        "summary": "Get LogicalTerminationPoint with {id}",
+        "description": "Get LogicalTerminationPoint with {id}",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "id",
+            "in": "path",
+            "required": true,
+            "type": "string"
+          },
+          {
+            "name": "fields",
+            "in": "query",
+            "required": false,
+            "description": "",
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "LogicalTerminationPoint",
+            "schema": {
+              "$ref": "#\/definitions\/LogicalTerminationPoint"
+            }
+          }
+        }
+      },
+      "patch": {
+        "tags": [
+          "LogicalTerminationPoint"
+        ],
+        "operationId": "patchLogicalTerminationPoint",
+        "summary": "Modify LogicalTerminationPoint",
+        "description": "Modify LogicalTerminationPoint",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "id",
+            "in": "path",
+            "required": true,
+            "type": "string"
+          },
+          {
+            "name": "ltp",
+            "in": "body",
+            "required": true,
+            "schema": {
+              "$ref": "#\/definitions\/LogicalTerminationPoint"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "Success Individual",
+            "schema": {
+              "$ref": "#\/definitions\/LogicalTerminationPoint"
+            }
+          }
+        }
+      }
+    },
+    "\/LogicalTerminationPoint\/findByNode": {
+      "get": {
+        "tags": [
+          "LogicalTerminationPoint"
+        ],
+        "operationId": "getAllLogicalTerminationPointOnNode",
+        "summary": "Get all Logical Termination Points on a Node identified by the provided id",
+        "description": "Get all Logical Termination Points on a Node identified by the provided id",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "id",
+            "in": "query",
+            "required": true,
+            "type": "string"
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "LogicalTerminationPoint",
+            "schema": {
+              "$ref": "#\/definitions\/LogicalTerminationPoint"
+            }
+          }
+        }
+      }
+    },
+    "\/LogicalTerminationPoint\/findByLpSpec": {
+      "get": {
+        "tags": [
+          "LogicalTerminationPoint"
+        ],
+        "operationId": "getAllLtpsOnNodeOfLpspecType",
+        "summary": "Get all Logical Termination Points identified by the provided LpSpec type",
+        "description": "Get all Logical Termination Points identified by the provided LpSpec type",
+        "deprecated": false,
+        "parameters": [
+          {
+            "name": "type",
+            "in": "query",
+            "required": true,
+            "type": "string",
+            "enum": [
+              "NRP_UNI_TerminationSpec",
+              "NRP_INNI_TerminationSpec",
+              "NRP_ENNI_TerminationSpec",
+              "NRP_EvcEndpoint_ConnAdaptSpec",
+              "NRP_IvcEndpoint_ConnAdaptSpec",
+              "NRP_OvcEndpoint_ConnAdaptSpec"
+            ]
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "LogicalTerminationPoint",
+            "schema": {
+              "$ref": "#\/definitions\/LogicalTerminationPoint"
+            }
+          }
+        }
+      }
+    }
+  },
+  "definitions": {
+    "NRP_EvcEndpoint_ConnAdaptSpec": {
+      "type": "object",
+      "properties": {
+        "nrp_evcEndPointId": {
+          "type": "string"
+        },
+        "nrp_evcEndPointRole": {
+          "$ref": "#\/definitions\/NRP_EndPointRole"
+        },
+        "nrp_evcEndPointMap": {
+          "type": "array",
+          "items": {
+            "$ref": "#\/definitions\/NRP_EndPointMap"
+          }
+        },
+        "nrp_mtu": {
+          "type": "string"
+        },
+        "nrp_speed": {
+          "type": "string"
+        },
+        "nrp_testMegEnabled": {
+          "description": "Test MEF. MEF 10.3, Section 10.10.",
+          "type": "boolean"
+        },
+        "nrp_subscriberMegMipEnabled": {
+          "description": "Subscriber MEG MIP. MEF 10.3, Section 10.11.",
+          "type": "boolean"
+        }
+      }
+    },
+    "NRP_IvcEndpoint_ConnAdaptSpec": {
+      "type": "object",
+      "properties": {
+        "nrp_ivcEndPointId": {
+          "type": "string"
+        },
+        "nrp_ivcEndPointRole": {
+          "$ref": "#\/definitions\/NRP_EndPointRole"
+        },
+        "nrp_ivcEndPointMap": {
+          "type": "array",
+          "items": {
+            "$ref": "#\/definitions\/NRP_EndPointMap"
+          }
+        },
+        "nrp_mtu": {
+          "type": "string"
+        },
+        "nrp_speed": {
+          "type": "string"
+        },
+        "nrp_testMegEnabled": {
+          "description": "Test MEF. MEF 10.3, Section 10.10.",
+          "type": "boolean"
+        },
+        "nrp_subscriberMegMipEnabled": {
+          "description": "Subscriber MEG MIP. MEF 10.3, Section 10.11.",
+          "type": "boolean"
+        }
+      }
+    },
+    "ForwardingConstruct": {
+      "description": "Models potential for forwarding between two or more LTPs at a particular specific layerProtocol.",
+      "type": "object",
+      "properties": {
+        "id": {
+          "type": "string"
+        },
+        "adminState": {
+          "description": "Administrative state of Forwarding Construct",
+          "type": "string",
+          "enum": [
+            "active",
+            "inactive"
+          ]
+        },
+        "fcPortList": {
+          "type": "array",
+          "items": {
+            "$ref": "#\/definitions\/FcPort"
+          }
+        },
+        "nrpCeFcSpec": {
+          "$ref": "#\/definitions\/NRP_CeFcSpec"
+        }
+      }
+    },
+    "NRP_TerminationSpec": {
+      "description": "NRP Termination Specification ",
+      "type": "object",
+      "properties": {
+        "id": {
+          "type": "string"
+        },
+        "nrp_physicalLayer": {
+          "description": "Mapped from UNI, Reference MEF 10.3, Section 9.2",
+          "type": "string"
+        },
+        "nrp_syncMode": {
+          "description": "MEF 10.3, Section 9.3 Synchronous Mode Service Attribute",
+          "type": "string"
+        },
+        "nrp_numberOfLinks": {
+          "description": "MEF 10.3, Section 9.4 Number of Links Service Attribute",
+          "type": "integer"
+        },
+        "nrp_resiliency": {
+          "description": "MEF 10.3, Section 9.5 UNI Resiliency Service Attribute",
+          "type": "string"
+        },
+        "nrp_portConvsIdToAggLinkMap": {
+          "description": "The Port Conversion ID to Aggregation Link Map Attribute is applicable only when the EthernetServiceInterface resiliency attribute has the value of All Active. Its value is Port Conversation ID to Aggregation Link Map as defined in IEEE Std 802.1AX-2014.",
+          "type": "string"
+        },
+        "nrp_maxFrameSize": {
+          "description": "MEF 10.3, Section 9.7",
+          "type": "integer"
+        },
+        "nrp_linkOamEnabled": {
+          "description": "MEF 10.3, Section 9.16",
+          "type": "boolean"
+        },
+        "nrp_ingressBwProfile": {
+          "$ref": "#\/definitions\/NRP_BwpFlow"
+        },
+        "nrp_egressBwProfile": {
+          "$ref": "#\/definitions\/NRP_BwpFlow"
+        },
+        "nrp_uniTerminationSpec": {
+          "$ref": "#\/definitions\/NRP_UNI_TerminationSpec"
+        },
+        "nrp_inniTerminationSpec": {
+          "$ref": "#\/definitions\/NRP_INNI_TerminationSpec"
+        },
+        "nrp_enniTerminationSpec": {
+          "$ref": "#\/definitions\/NRP_ENNI_TerminationSpec"
+        }
+      }
+    },
+    "NRP_UNI_TerminationSpec": {
+      "description": "NRP UNI Termination Specification ",
+      "type": "object",
+      "properties": {
+        "id": {
+          "type": "string"
+        },
+        "nrp_uniCfgCeVidUntagged": {
+          "description": "CE-VLAN ID for Untagged and Priority Tagged Service Frames. MEF 10.3, Section 9.9",
+          "type": "integer"
+        },
+        "nrp_serviceprovideruniprofile": {
+          "$ref": "#\/definitions\/NRP_serviceProviderUniProfile"
+        },
+        "nrp_operatoruniprofile": {
+          "$ref": "#\/definitions\/NRP_OperatorUniProfile"
+        },
+        "nrp_L2cpAttributes": {
+          "$ref": "#\/definitions\/NRP_L2cpAttributes"
+        }
+      }
+    },
+    "NRP_L2cpAttributes": {
+      "description": "MEF NRP Layer 2 Control Protocols Processing.",
+      "type": "object",
+      "properties": {
+        "nrp_l2cpAddressSet": {
+          "type": "array",
+          "items": {
+            "$ref": "#\/definitions\/NRP_L2cpAddressSet"
+          }
+        },
+        "nrp_l2cpPeering": {
+          "type": "array",
+          "items": {
+            "$ref": "#\/definitions\/NRP_L2cpPeering"
+          }
+        }
+      }
+    },
+    "NRP_L2cpAddressSet": {
+      "description": "NRP Layer 2 Control Protocol Address Set",
+      "type": "object",
+      "properties": {
+        "l2cpDestinationAddress": {
+          "type": "string"
+        },
+        "assignment8021Q": {
+          "type": "string"
+        },
+        "filteredBy": {
+          "type": "object",
+          "properties": {
+            "CTA": {
+              "type": "boolean"
+            },
+            "CTB": {
+              "type": "boolean"
+            },
+            "CTB2": {
+              "type": "boolean"
+            }
+          }
+        }
+      }
+    },
+    "NRP_L2cpPeering": {
+      "description": "NRP Layer 2 Control Protocol Peering",
+      "type": "object",
+      "properties": {
+        "protocolToBePeered": {
+          "type": "string"
+        },
+        "protocolIdentifier": {
+          "type": "object",
+          "properties": {
+            "Ethertype": {
+              "type": "string"
+            },
+            "Subtypes": {
+              "type": "string"
+            }
+          }
+        },
+        "l2cpDestinationAddress": {
+          "type": "string"
+        },
+        "linkIdentifier": {
+          "type": "string"
+        }
+      }
+    },
+    "NRP_serviceProviderUniProfile": {
+      "description": "NRP Service Provider UNI Profile",
+      "type": "object",
+      "properties": {
+        "nrp_maxNumOfEvc": {
+          "description": "Maximum Number of EVCs - MEF 10.3, Section 9.11",
+          "type": "integer"
+        },
+        "nrp_bundlingEnabled": {
+          "description": "Bundling - MEF 10.3, Section 9.12",
+          "type": "boolean"
+        },
+        "nrp_allToOneBundlingEnabled": {
+          "description": "All to One Bundling - MEF 10.3, Section 9.13",
+          "type": "boolean"
+        },
+        "nrp_serviceMultiplexingEnabled": {
+          "description": "Service Multiplexing - MEF 10.3, Section 9.18",
+          "type": "boolean"
+        }
+      }
+    },
+    "NRP_OperatorUniProfile": {
+      "description": "NRP Operator UNI Profile - profile groups the UNI attributes (or their values) that are applicable to OVC (vs. applicable to EVC).",
+      "type": "object",
+      "properties": {
+        "nrp_operatorUniId": {
+          "description": "",
+          "type": "string"
+        },
+        "nrp_maxNumOfOvcEndPoint": {
+          "description": "",
+          "type": "integer"
+        },
+        "nrp_maxNumOfCeVlanIdPerOvcEndPoint": {
+          "description": "",
+          "type": "integer"
+        }
+      }
+    },
+    "NRP_INNI_TerminationSpec": {
+      "description": "NRP INNI Termination Specification ",
+      "type": "object",
+      "properties": {
+        "id": {
+          "type": "string"
+        }
+      }
+    },
+    "NRP_ENNI_TerminationSpec": {
+      "description": "NRP ENNI Termination Specification ",
+      "type": "object",
+      "properties": {
+        "id": {
+          "type": "string"
+        },
+        "nrp_": {
+          "description": "",
+          "type": "string"
+        }
+      }
+    },
+    "LayerProtocol": {
+      "description": "ONFv1.1 object used for controlling termination and monitoring functionality.",
+      "type": "object",
+      "properties": {
+        "layerProtocolName": {
+          "type": "string"
+        },
+        "nrp_lpSpec": {
+          "$ref": "#\/definitions\/LpSpec"
+        }
+      }
+    },
+    "NRP_CeFcSpec": {
+      "description": "NRP Customer Edge Forwarding Construct Specification ",
+      "type": "object",
+      "properties": {
+        "nrp_connectionType": {
+          "description": "Mapped from MEF 10.3, Section 8.1 EVC Type",
+          "type": "string",
+          "enum": [
+            "PointToPoint",
+            "MultipointToMultipoint",
+            "RootedMultipoint"
+          ]
+        },
+        "nrp_unicastFrameDelivery": {
+          "type": "string",
+          "enum": [
+            "Conditionally",
+            "Unconditionally"
+          ]
+        },
+        "nrp_multicastFrameDelivery": {
+          "type": "string",
+          "enum": [
+            "Conditionally",
+            "Unconditionally"
+          ]
+        },
+        "nrp_broadcastFrameDelivery": {
+          "type": "string",
+          "enum": [
+            "Conditionally",
+            "Unconditionally"
+          ]
+        },
+        "nrp_edgeCeFcSpec": {
+          "$ref": "#\/definitions\/NRP_EdgeCeFcSpec"
+        },
+        "nrp_transitCeFcSpec": {
+          "$ref": "#\/definitions\/NRP_TransitCeFcSpec"
+        }
+      }
+    },
+    "NRP_EdgeCeFcSpec": {
+      "description": "NRP Edge Customer Edge Forwarding Construct Specification ",
+      "type": "object",
+      "properties": {
+        "NRP_evcEndpoint": {
+          "type": "string"
+        },
+        "nrp_ceVlanIdPreservation": {
+          "type": "boolean"
+        },
+        "nrp_ceVlanCosPreservation": {
+          "type": "boolean"
+        }
+      }
+    },
+    "NRP_TransitCeFcSpec": {
+      "description": "NRP Transit Customer Edge Forwarding Construct Specification ",
+      "type": "object",
+      "properties": {
+        "NRP_evcEndpoint": {
+          "type": "string"
+        },
+        "nrp_sVlanIdPreservation": {
+          "type": "boolean"
+        },
+        "nrp_sVlanCosPreservation": {
+          "type": "boolean"
+        }
+      }
+    },
+    "LpSpec": {
+      "description": "ONFv1.1 Layer Protocol Specification",
+      "type": "object",
+      "properties": {
+        "terminationSpec": {
+          "$ref": "#\/definitions\/NRP_TerminationSpec"
+        },
+        "connectionPointAndAdapterSpec": {
+          "$ref": "#\/definitions\/ConnectionPointAndAdapterSpec"
+        }
+      }
+    },
+    "ConnectionPointAndAdapterSpec": {
+      "description": "ONFv1.1 ConnectionPointAndAdapterSpec",
+      "type": "object",
+      "properties": {
+        "connectionPointAndAdapterSpec": {
+          "$ref": "#\/definitions\/CeConnPtAndAdaptSpec"
+        }
+      }
+    },
+    "CeConnPtAndAdaptSpec": {
+      "description": "ONFv1.1 CeConnPtAndAdaptSpec",
+      "type": "object",
+      "properties": {
+        "connectionPointAndAdapterSpec": {
+          "$ref": "#\/definitions\/NRP_ConnAdaptSpec"
+        }
+      }
+    },
+    "NRP_ConnAdaptSpec": {
+      "description": "MEF NRP ConnectionPointAndAdapterSpec",
+      "type": "object",
+      "properties": {
+        "nrp_cosidentifier": {
+          "$ref": "#\/definitions\/NRP_DataFrameCosIdentifier"
+        },
+        "nrp_coloridentifier": {
+          "description": "NRP Color Identifier - mapped from MEF 10.3, Section 10.3, Color Identifier.",
+          "type": "object",
+          "properties": {
+
+          }
+        },
+        "nrp_eecIdentifier": {
+          "$ref": "#\/definitions\/NRP_EecIdentifier"
+        },
+        "nrp_ingressBwpFlow": {
+          "$ref": "#\/definitions\/NRP_BwpFlow"
+        },
+        "nrp_egressBwpFlow": {
+          "$ref": "#\/definitions\/NRP_BwpFlow"
+        },
+        "nrp_ingressbwppercosname": {
+          "$ref": "#\/definitions\/NRP_IngressBwpPerCosName"
+        },
+        "nrp_egressbwppereecname": {
+          "$ref": "#\/definitions\/NRP_EgressBwpPerEecCosName"
+        },
+        "nrp_sourceMacAddressLimit": {
+          "$ref": "#\/definitions\/NRP_SourceMacAddressLimit"
+        },
+        "nrpIvcEndPointConnAdaptSpect": {
+          "$ref": "#\/definitions\/NRP_IvcEndpoint_ConnAdaptSpec"
+        },
+        "nrpEvcEndPointConnAdaptSpect": {
+          "$ref": "#\/definitions\/NRP_EvcEndpoint_ConnAdaptSpec"
+        },
+        "nrpOvcEndPointConnAdaptSpect": {
+          "$ref": "#\/definitions\/NRP_OvcEndpoint_ConnAdaptSpec"
+        }
+      }
+    },
+    "NRP_DataFrameCosIdentifier": {
+      "description": "NRP CoS Identifier - mapped from MEF 10.3, Section 10.2, Class of Service Identifiers.",
+      "type": "object",
+      "properties": {
+        "nrp_endPointCosId": {
+          "type": "object",
+          "properties": {
+            "evcId": {
+              "type": "string"
+            },
+            "color": {
+              "type": "string"
+            }
+          }
+        },
+        "nrp_pcpCosId": {
+          "type": "object",
+          "properties": {
+            "cosId": {
+              "type": "string"
+            },
+            "classOfServiceName": {
+              "type": "string"
+            }
+          }
+        },
+        "nrp_dscpCosId": {
+          "type": "object",
+          "properties": {
+            "ipv4": {
+              "type": "string"
+            },
+            "ipv6": {
+              "type": "string"
+            },
+            "classOfServiceName": {
+              "type": "string"
+            }
+          }
+        },
+        "nrp_L2cpCosId": {
+          "type": "object",
+          "properties": {
+            "L2cpEvcGrpEntry": {
+              "type": "string"
+            },
+            "classOfServiceName": {
+              "type": "string"
+            }
+          }
+        },
+        "nrp_SoamCosId": {
+          "type": "object",
+          "properties": {
+            "classOfServiceName": {
+              "type": "string"
+            }
+          }
+        }
+      }
+    },
+    "NRP_EecIdentifier": {
+      "description": "Egress Equivalence Class Identifier - mapped from MEF 10.3, Section 10.4, Egress Equivalence Class Identifier Service Attribute.",
+      "type": "object",
+      "properties": {
+        "serviceaccesspointeecid": {
+          "type": "object",
+          "properties": {
+            "evc": {
+              "type": "string"
+            },
+            "egressEquivalenceClass": {
+              "type": "string"
+            }
+          }
+        },
+        "nrp_pcpeecid": {
+          "type": "object",
+          "properties": {
+            "cosId": {
+              "type": "string"
+            },
+            "egressEquivalenceClass": {
+              "type": "string"
+            }
+          }
+        },
+        "nrp_dscpeecid": {
+          "type": "object",
+          "properties": {
+            "ipv4": {
+              "type": "string"
+            },
+            "ipv6": {
+              "type": "string"
+            },
+            "egressEquivalenceClass": {
+              "type": "string"
+            }
+          }
+        },
+        "nrp_l2cpeecid": {
+          "type": "object",
+          "properties": {
+            "L2cpEvcGrpEntry": {
+              "type": "string"
+            },
+            "egressEquivalenceClass": {
+              "type": "string"
+            }
+          }
+        },
+        "nrp_soameecid": {
+          "type": "object",
+          "properties": {
+            "egressEquivalenceClass": {
+              "type": "string"
+            }
+          }
+        }
+      }
+    },
+    "NRP_SourceMacAddressLimit": {
+      "description": "NRP Source MAC Address Limit. Mapping from MEF 10.3, Section 10.9",
+      "type": "object",
+      "properties": {
+        "enabled": {
+          "type": "boolean"
+        },
+        "limit": {
+          "type": "integer"
+        },
+        "timeInterval": {
+          "type": "string"
+        }
+      }
+    },
+    "NRP_OvcEndpoint_ConnAdaptSpec": {
+      "description": "NRP OVC End Point Connection Adapter",
+      "type": "object",
+      "properties": {
+        "code": {
+          "type": "integer"
+        },
+        "message": {
+          "type": "string"
+        }
+      }
+    },
+    "FcPort": {
+      "description": "The association of the ForwardingConstruct to Logical Termination Points.",
+      "type": "object",
+      "properties": {
+        "role": {
+          "type": "string",
+          "enum": [
+            "Working",
+            "Protection",
+            "Protected",
+            "Symmetric",
+            "Hub",
+            "Spoke",
+            "Leaf",
+            "Root"
+          ]
+        },
+        "ltpRefList": {
+          "type": "array",
+          "items": {
+            "$ref": "#\/definitions\/LogicalTerminationPoint"
+          }
+        }
+      }
+    },
+    "LogicalTerminationPoint": {
+      "description": "ONF class encapsulates the termination and adaptation functions of one or more transport layers. ",
+      "type": "object",
+      "properties": {
+        "id": {
+          "type": "string"
+        },
+        "adminState": {
+          "description": "State of Logical Termination Point",
+          "type": "string",
+          "enum": [
+            "active",
+            "inactive"
+          ]
+        },
+        "physicalPortReference": {
+          "$ref": "#\/definitions\/NRP_PhysicalPortReference"
+        },
+        "lpList": {
+          "type": "array",
+          "items": {
+            "$ref": "#\/definitions\/LayerProtocol"
+          }
+        }
+      }
+    },
+    "NRP_PhysicalPortReference": {
+      "description": "ONF - One or more text labels for the unmodelled physical port associated with the LTP. In many cases there is no associated physical port.",
+      "type": "object",
+      "properties": {
+        "CLLI": {
+          "type": "string"
+        },
+        "Vendor": {
+          "type": "string"
+        },
+        "Hostname": {
+          "type": "string"
+        },
+        "Shelf": {
+          "type": "string"
+        },
+        "Slot": {
+          "type": "string"
+        },
+        "Subslot": {
+          "type": "string"
+        },
+        "Port": {
+          "type": "string"
+        },
+        "Rack": {
+          "type": "string"
+        },
+        "RemoteUnit": {
+          "type": "string"
+        },
+        "RemoteUnitSlot": {
+          "type": "string"
+        },
+        "RemoteUnitPort": {
+          "type": "string"
+        }
+      }
+    },
+    "NRP_BwpFlow": {
+      "description": "A set of parameters for service frames for traffic flow using Hierarchical Bandwidth Profile as defined in MEF 10.3.",
+      "type": "object",
+      "properties": {
+        "envelopeId": {
+          "type": "string"
+        },
+        "rank": {
+          "type": "string"
+        },
+        "bwpCfgEirMax": {
+          "type": "integer"
+        },
+        "bwpCfgIdentifier": {
+          "type": "string"
+        },
+        "bwpCfgCir": {
+          "type": "integer"
+        },
+        "bwpCfgCirMax": {
+          "type": "integer"
+        },
+        "bwpCfgCbs": {
+          "type": "integer"
+        },
+        "bwpCfgEir": {
+          "type": "integer"
+        },
+        "bwpCfgEbs": {
+          "type": "integer"
+        },
+        "bwpCfgCm": {
+          "type": "string"
+        },
+        "bwpCfgCf": {
+          "type": "string"
+        }
+      }
+    },
+    "NRP_IngressBwpPerCosName": {
+      "description": "NRP Ingress Bandwidth Profile Per Class of Service Identifier. MEF 10.3, Section 10.6.",
+      "type": "object",
+      "properties": {
+        "nrp_bwpflow": {
+          "$ref": "#\/definitions\/NRP_BwpFlow"
+        },
+        "nrp_cosName": {
+          "type": "string"
+        }
+      }
+    },
+    "NRP_EgressBwpPerEecCosName": {
+      "description": "NRP Egress Bandwidth Profile Per Class of Service Identifier. MEF 10.3, Section 10.8.",
+      "type": "object",
+      "properties": {
+        "nrp_bwpflow": {
+          "$ref": "#\/definitions\/NRP_BwpFlow"
+        },
+        "nrp_eecName": {
+          "type": "string"
+        }
+      }
+    },
+    "NRP_EndPointRole": {
+      "description": "NRP End Point Role.",
+      "type": "object",
+      "properties": {
+        "role": {
+          "type": "string",
+          "enum": [
+            "LEAF",
+            "ROOT",
+            "TRUNK"
+          ]
+        }
+      }
+    },
+    "NRP_EndPointMap": {
+      "description": "CE-VLAN IDs that maps to EVC\/OVC\/IVC.",
+      "type": "object",
+      "properties": {
+        "nrp_endPointMapFormU": {
+          "$ref": "#\/definitions\/NRP_EndPointMapFormU"
+        },
+        "nrp_endPointMapFormT": {
+          "$ref": "#\/definitions\/NRP_EndPointMapFormT"
+        }
+      }
+    },
+    "NRP_EndPointMapFormU": {
+      "description": "CE-VLAN IDs that maps to EVC Endpoint.",
+      "type": "object",
+      "properties": {
+        "nrp_cevlanid": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          }
+        }
+      }
+    },
+    "NRP_EndPointMapFormT": {
+      "description": "S-VLAN IDs that maps to IVC Endpoint.",
+      "type": "object",
+      "properties": {
+        "nrp_svlanid": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          }
+        },
+        "nrp_tpid": {
+          "type": "array",
+          "items": {
+            "type": "string"
+          }
+        }
+      }
+    },
+    "NRP_Error_Response": {
+      "description": "NRP Error addition information",
+      "type": "object",
+      "properties": {
+        "code": {
+          "type": "integer"
+        },
+        "message": {
+          "type": "string"
+        }
+      }
+    }
+  }
+}
diff --git a/mef-nrp-api/src/main/webapp/WEB-INF/web.xml b/mef-nrp-api/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..6304359
--- /dev/null
+++ b/mef-nrp-api/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2016 Open Networking Laboratory
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ 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.
+  -->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns="http://java.sun.com/xml/ns/javaee"
+         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+         id="ONOS" version="2.5">
+    <display-name>MEF NRP REST API v1.0</display-name>
+
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>Secured</web-resource-name>
+            <url-pattern>/*</url-pattern>
+        </web-resource-collection>
+        <auth-constraint>
+            <role-name>admin</role-name>
+        </auth-constraint>
+    </security-constraint>
+
+    <security-role>
+        <role-name>admin</role-name>
+    </security-role>
+
+    <login-config>
+        <auth-method>BASIC</auth-method>
+        <realm-name>karaf</realm-name>
+    </login-config>
+
+    <servlet>
+        <servlet-name>JAX-RS MEF NRP Service</servlet-name>
+        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
+        <init-param>
+            <param-name>javax.ws.rs.Application</param-name>
+            <!-- Change for MEF NRP API -->
+            <param-value>org.onosproject.mefnrpapi.MefNrpApiWebApplication</param-value>
+            <!-- End of change for MEF NRP API -->
+        </init-param>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <!-- Change for MEF NRP API -->
+    <servlet-mapping>
+        <servlet-name>JAX-RS MEF NRP Service</servlet-name>
+        <url-pattern>/*</url-pattern>
+    </servlet-mapping>
+    <!-- End of change for MEF NRP API -->
+</web-app>
diff --git a/mef-nrp-api/swaggergen/template/README b/mef-nrp-api/swaggergen/template/README
new file mode 100644
index 0000000..3f59280
--- /dev/null
+++ b/mef-nrp-api/swaggergen/template/README
@@ -0,0 +1,7 @@
+Workaround until swagger-code-gen 2.2.2 is released.
+
+Bug report:
+  https://github.com/swagger-api/swagger-codegen/issues/3509
+
+This directory and templateDirectory, additional-properties in pom.xml,
+can be removed after migrating to 2.2.2.
diff --git a/mef-nrp-api/swaggergen/template/enumClass.mustache b/mef-nrp-api/swaggergen/template/enumClass.mustache
new file mode 100644
index 0000000..c5c3143
--- /dev/null
+++ b/mef-nrp-api/swaggergen/template/enumClass.mustache
@@ -0,0 +1,44 @@
+  /**
+   * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}
+   */
+  public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} {
+    {{#gson}}
+        {{#allowableValues}}
+            {{#enumVars}}
+    @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}})
+    {{{name}}}({{{value}}}){{^-last}},
+    {{/-last}}{{#-last}};{{/-last}}
+            {{/enumVars}}
+        {{/allowableValues}}
+    {{/gson}}
+    {{^gson}}
+        {{#allowableValues}}
+            {{#enumVars}}
+    {{{name}}}({{{value}}}){{^-last}},
+    {{/-last}}{{#-last}};{{/-last}}
+            {{/enumVars}}
+        {{/allowableValues}}
+    {{/gson}}
+
+    private {{{datatype}}} value;
+
+    {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}({{{datatype}}} value) {
+      this.value = value;
+    }
+
+    @Override
+    @JsonValue
+    public String toString() {
+      return String.valueOf(value);
+    }
+
+    @JsonCreator
+    public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) {
+      for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) {
+        if (String.valueOf(b.value).equals(text)) {
+          return b;
+        }
+      }
+      return null;
+    }
+  }
diff --git a/mef-nrp-api/swaggergen/template/enumOuterClass.mustache b/mef-nrp-api/swaggergen/template/enumOuterClass.mustache
new file mode 100644
index 0000000..76c2cbf
--- /dev/null
+++ b/mef-nrp-api/swaggergen/template/enumOuterClass.mustache
@@ -0,0 +1,42 @@
+{{#jackson}}
+import com.fasterxml.jackson.annotation.JsonCreator;
+{{/jackson}}
+
+/**
+ * {{^description}}Gets or Sets {{{name}}}{{/description}}{{#description}}{{{description}}}{{/description}}
+ */
+public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} {
+  {{#gson}}
+  {{#allowableValues}}{{#enumVars}}
+  @SerializedName({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}})
+  {{{name}}}({{{value}}}){{^-last}},
+  {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}}
+  {{/gson}}
+  {{^gson}}
+  {{#allowableValues}}{{#enumVars}}
+  {{{name}}}({{{value}}}){{^-last}},
+  {{/-last}}{{#-last}};{{/-last}}{{/enumVars}}{{/allowableValues}}
+  {{/gson}}
+
+  private {{{dataType}}} value;
+
+  {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}({{{dataType}}} value) {
+    this.value = value;
+  }
+
+  @Override
+  @JsonValue
+  public String toString() {
+    return String.valueOf(value);
+  }
+
+  @JsonCreator
+  public static {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} fromValue(String text) {
+    for ({{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} b : {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}}.values()) {
+      if (String.valueOf(b.value).equals(text)) {
+        return b;
+      }
+    }
+    return null;
+  }
+}
diff --git a/mef-nrp-api/swaggergen/template/pojo.mustache b/mef-nrp-api/swaggergen/template/pojo.mustache
new file mode 100644
index 0000000..489dd2a
--- /dev/null
+++ b/mef-nrp-api/swaggergen/template/pojo.mustache
@@ -0,0 +1,150 @@
+/**
+ * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}{{/description}}
+ */{{#description}}
+@ApiModel(description = "{{{description}}}"){{/description}}
+{{>generatedAnnotation}}
+public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
+  {{#vars}}
+    {{#isEnum}}
+    {{^isContainer}}
+{{>enumClass}}
+    {{/isContainer}}
+    {{/isEnum}}
+    {{#items.isEnum}}
+      {{#items}}
+      {{^isContainer}}
+{{>enumClass}}
+      {{/isContainer}}
+      {{/items}}
+    {{/items.isEnum}}
+  {{#jackson}}
+  @JsonProperty("{{baseName}}")
+  {{/jackson}}
+  {{#gson}}
+  @SerializedName("{{baseName}}")
+  {{/gson}}
+  private {{{datatypeWithEnum}}} {{name}} = {{{defaultValue}}};
+
+  {{/vars}}
+  {{#vars}}
+  {{^isReadOnly}}
+  public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) {
+    this.{{name}} = {{name}};
+    return this;
+  }
+  {{#isListContainer}}
+
+  public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) {
+    this.{{name}}.add({{name}}Item);
+    return this;
+  }
+  {{/isListContainer}}
+  {{#isMapContainer}}
+
+  public {{classname}} put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) {
+    this.{{name}}.put(key, {{name}}Item);
+    return this;
+  }
+  {{/isMapContainer}}
+
+  {{/isReadOnly}}
+   /**
+  {{#description}}
+   * {{{description}}}
+  {{/description}}
+  {{^description}}
+   * Get {{name}}
+  {{/description}}
+  {{#minimum}}
+   * minimum: {{minimum}}
+  {{/minimum}}
+  {{#maximum}}
+   * maximum: {{maximum}}
+  {{/maximum}}
+   * @return {{name}}
+  **/
+ {{#vendorExtensions.extraAnnotation}}
+  {{vendorExtensions.extraAnnotation}}
+  {{/vendorExtensions.extraAnnotation}}
+  {{#jackson}}
+  @JsonProperty("{{baseName}}")
+  {{/jackson}}
+  @ApiModelProperty({{#example}}example = "{{example}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
+  public {{{datatypeWithEnum}}} {{getter}}() {
+    return {{name}};
+  }
+  {{^isReadOnly}}
+
+  public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {
+    this.{{name}} = {{name}};
+  }
+  {{/isReadOnly}}
+
+  {{/vars}}
+
+{{^supportJava6}}
+  @Override
+  public boolean equals(java.lang.Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }{{#hasVars}}
+    {{classname}} {{classVarName}} = ({{classname}}) o;
+    return {{#vars}}Objects.equals(this.{{name}}, {{classVarName}}.{{name}}){{#hasMore}} &&
+        {{/hasMore}}{{/vars}}{{#parent}} &&
+        super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}}
+    return true;{{/hasVars}}
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash({{#vars}}{{name}}{{#hasMore}}, {{/hasMore}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}});
+  }
+
+{{/supportJava6}}
+{{#supportJava6}}
+  @Override
+  public boolean equals(java.lang.Object o) {
+  if (this == o) {
+    return true;
+  }
+  if (o == null || getClass() != o.getClass()) {
+    return false;
+  }{{#hasVars}}
+    {{classname}} {{classVarName}} = ({{classname}}) o;
+    return {{#vars}}ObjectUtils.equals(this.{{name}}, {{classVarName}}.{{name}}){{#hasMore}} &&
+    {{/hasMore}}{{/vars}}{{#parent}} &&
+    super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}}
+    return true;{{/hasVars}}
+  }
+
+  @Override
+  public int hashCode() {
+    return ObjectUtils.hashCodeMulti({{#vars}}{{name}}{{#hasMore}}, {{/hasMore}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}});
+  }
+
+{{/supportJava6}}
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("class {{classname}} {\n");
+    {{#parent}}sb.append("    ").append(toIndentedString(super.toString())).append("\n");{{/parent}}
+    {{#vars}}sb.append("    {{name}}: ").append(toIndentedString({{name}})).append("\n");
+    {{/vars}}sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * Convert the given object to string with each line indented by 4 spaces
+   * (except the first line).
+   */
+  private String toIndentedString(java.lang.Object o) {
+    if (o == null) {
+      return "null";
+    }
+    return o.toString().replace("\n", "\n    ");
+  }
+}
diff --git a/pom.xml b/pom.xml
index 27c843b..c897fd8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,6 +44,7 @@
         <module>uiref</module>
         <module>ecord/co</module>
         <module>carrierethernet</module>
+        <module>mef-nrp-api</module>
         <module>icona</module>
     </modules>