diff --git a/apps/fpcagent/BUCK b/apps/fpcagent/BUCK
index c57ddf9..a3d15fb 100644
--- a/apps/fpcagent/BUCK
+++ b/apps/fpcagent/BUCK
@@ -4,8 +4,8 @@
     '//lib:KRYO',
     '//models/fpcagent:onos-models-fpcagent',
     '//models/common:onos-models-common',
-    '//apps/config:onos-apps-config',
     '//lib:onos-yang-model',
+    '//apps/config:onos-apps-config',
     '//core/api:onos-api',
     '//lib:javax.ws.rs-api',
     '//utils/rest:onlab-rest',
@@ -41,11 +41,6 @@
 osgi_jar_with_tests(
     deps = COMPILE_DEPS,
     test_deps = TEST_DEPS,
-    web_context = '/onos/fpcagent',
-    api_title = 'FPC Agent REST API',
-    api_package = 'org.onosproject.fpcagent.rest',
-    api_version = '1.0',
-    api_description = 'FPC Agent REST API',
 )
 
 onos_app(
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/Configure.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/Configure.java
deleted file mode 100644
index d6b277a..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/Configure.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.onosproject.fpcagent;
-
-import org.onosproject.yang.gen.v1.fpc.rev20150105.FpcService;
-import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.IetfDmmFpcagentService;
-
-public interface Configure extends IetfDmmFpcagentService, FpcService {
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcManager.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcManager.java
index 31ca0f0..6b4e016 100644
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcManager.java
+++ b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcManager.java
@@ -18,34 +18,38 @@
 
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
-import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.felix.scr.annotations.*;
 import org.onlab.packet.Ip4Address;
 import org.onlab.packet.Ip4Prefix;
+import org.onosproject.config.DynamicConfigService;
 import org.onosproject.core.ApplicationId;
 import org.onosproject.core.CoreService;
-import org.onosproject.fpcagent.dto.configure.Context;
-import org.onosproject.fpcagent.dto.dpn.AddDpn;
 import org.onosproject.fpcagent.helpers.ConfigHelper;
 import org.onosproject.fpcagent.helpers.DpnApi;
 import org.onosproject.fpcagent.workers.ZMQSBPublisherManager;
 import org.onosproject.fpcagent.workers.ZMQSBSubscriberManager;
 import org.onosproject.net.config.*;
 import org.onosproject.net.config.basics.SubjectFactories;
-import org.onosproject.yang.gen.v1.fpc.rev20150105.fpc.deregisterclient.DeregisterClientInput;
-import org.onosproject.yang.gen.v1.fpc.rev20150105.fpc.registerclient.RegisterClientInput;
-import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.configure.ConfigureInput;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.IetfDmmFpcagentOpParam;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.IetfDmmFpcagentService;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.DefaultTenants;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.Result;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.configure.DefaultConfigureInput;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.configure.DefaultConfigureOutput;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.configuredpn.DefaultConfigureDpnInput;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.configuredpn.DefaultConfigureDpnOutput;
 import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.instructions.instructions.instrtype.Instr3GppMob;
 import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.opheader.OpTypeEnum;
 import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.opinput.opbody.CreateOrUpdate;
 import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.opinput.opbody.DeleteOrQuery;
 import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.payload.Contexts;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.result.ResultEnum;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.resultbody.resulttype.DefaultCommonSuccess;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.ietfdmmfpcagent.resultbodydpn.resulttype.DefaultEmptyCase;
 import org.onosproject.yang.gen.v1.ietfdmmfpcbase.rev20160803.ietfdmmfpcbase.mobilityinfo.mobprofileparameters.ThreegppTunnel;
 import org.onosproject.yang.gen.v1.ietfdmmthreegpp.rev20160803.ietfdmmthreegpp.threegppinstr.Bits;
-import org.onosproject.yang.model.RpcInput;
-import org.onosproject.yang.model.RpcOutput;
-import org.onosproject.yang.model.RpcRegistry;
+import org.onosproject.yang.model.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -61,7 +65,7 @@
  */
 @Component(immediate = true)
 @Service
-public class FpcManager implements Configure, FpcService {
+public class FpcManager implements IetfDmmFpcagentService, FpcService {
     static final Logger log = LoggerFactory.getLogger(FpcManager.class);
 
     private static final String FPC_APP_ID = "org.onosproject.fpcagent";
@@ -69,13 +73,19 @@
     private final InternalNetworkConfigListener configListener =
             new InternalNetworkConfigListener();
 
+    /* Services */
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
     protected TenantService tenantService;
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    ModelConverter modelConverter;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    DynamicConfigService dynamicConfigService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
     private RpcRegistry rpcRegistry;
 
-    /* Services */
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
     private NetworkConfigRegistry registry;
 
@@ -85,18 +95,12 @@
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
     private CoreService coreService;
 
-//    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
-//    protected ModelConverter modelConverter;
-//
-//    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
-//    protected DynamicConfigService dynamicConfigService;
-
     /* Variables */
     private ApplicationId appId;
     private FpcConfig fpcConfig;
+    private IetfDmmFpcagentOpParam fpcData;
 
     private HashMap<String, ArrayList<Contexts>> sessionContextsMap = Maps.newHashMap();
-    private HashMap<String, ArrayList<Context>> sessionContextsRestMap = Maps.newHashMap();
     private HashMap<String, String> nodeNetworkMap = Maps.newHashMap();
 
     /* Config */
@@ -115,10 +119,28 @@
         configService.addListener(configListener);
         registry.registerConfigFactory(fpcConfigConfigFactory);
 
+        fpcData = new IetfDmmFpcagentOpParam();
+
         rpcRegistry.registerRpcService(this);
 
         tenantService.addTenant(getFpcIdentity.apply("default"));
 
+        DefaultTenants defaultTenants = new DefaultTenants();
+        fpcData.tenants(defaultTenants);
+        defaultTenants.addToTenant(tenantService.getTenant(getFpcIdentity.apply("default")).get());
+
+        ResourceData dataNode = modelConverter.createDataNode(
+                DefaultModelObjectData.builder()
+                        .addModelObject(defaultTenants)
+                        .build()
+        );
+
+
+        log.info("resourceData {} ", dataNode.dataNodes().size());
+        dataNode.dataNodes().forEach(
+                node -> dynamicConfigService.createNode(dataNode.resourceId(), node)
+        );
+
         log.info("FPC Agent Started");
     }
 
@@ -136,8 +158,7 @@
         log.info("FPC Agent Stopped");
     }
 
-    public void init() {
-
+    private void init() {
         fpcConfig.getConfig().ifPresent(
                 helper -> {
                     ZMQSBSubscriberManager.createInstance(
@@ -165,6 +186,295 @@
         return fpcConfig != null ? fpcConfig.getConfig() : Optional.empty();
     }
 
+    @Override
+    public RpcOutput configureDpn(RpcInput rpcInput) {
+        log.info("RPC configure {}", rpcInput);
+
+        DefaultConfigureDpnOutput defaultConfigureDpnOutput = new DefaultConfigureDpnOutput();
+        defaultConfigureDpnOutput.result(Result.of(ResultEnum.OK));
+        defaultConfigureDpnOutput.resultType(new DefaultEmptyCase());
+
+        try {
+            ResourceData data = DefaultResourceData.builder()
+                    .addDataNode(rpcInput.data())
+                    .resourceId(
+                            ResourceId.builder()
+                                    .addBranchPointSchema("configureDpn", "urn:ietf:params:xml:ns:yang:fpcagent")
+                                    .build())
+                    .build();
+
+            ModelObjectData model = modelConverter.createModel(data);
+            model.modelObjects().parallelStream().forEach(
+                    modelObject -> {
+                        DefaultConfigureDpnInput input = (DefaultConfigureDpnInput) modelObject;
+                        String dpnId = input.inputDpnId().fpcIdentity().union().string();
+                        switch (input.operation().enumeration()) {
+                            case ADD:
+                                log.info("Adding DPN {}", dpnId);
+                                nodeNetworkMap.put(dpnId, dpnId + "/" + dpnId);
+                                break;
+                            case REMOVE:
+                                log.info("Removing DPN {}", dpnId);
+                                nodeNetworkMap.remove(dpnId);
+                                break;
+                        }
+                    });
+        } catch (Exception e) {
+            log.error(ExceptionUtils.getFullStackTrace(e));
+        }
+
+        ResourceData dataNode = modelConverter.createDataNode(
+                DefaultModelObjectData.builder().addModelObject(defaultConfigureDpnOutput).build()
+        );
+        return new RpcOutput(RpcOutput.Status.RPC_SUCCESS, dataNode.dataNodes().get(0));
+    }
+
+    @Override
+    public RpcOutput configure(RpcInput rpcInput) {
+        log.info("RPC configure {}", rpcInput);
+
+        DefaultConfigureOutput configureOutput = new DefaultConfigureOutput();
+        configureOutput.result(Result.of(ResultEnum.OK));
+        configureOutput.resultType(new DefaultCommonSuccess());
+
+        try {
+            ResourceData data = DefaultResourceData.builder()
+                    .addDataNode(rpcInput.data())
+                    .resourceId(
+                            ResourceId.builder()
+                                    .addBranchPointSchema("configure", "urn:ietf:params:xml:ns:yang:fpcagent")
+                                    .build())
+                    .build();
+
+            ModelObjectData model = modelConverter.createModel(data);
+            model.modelObjects().parallelStream().forEach(
+                    modelObject -> {
+                        DefaultConfigureInput input = (DefaultConfigureInput) modelObject;
+                        configureOutput.opId(input.opId());
+                        switch (input.opType()) {
+                            case CREATE:
+                            case UPDATE:
+                                if (input.opBody() instanceof CreateOrUpdate) {
+                                    log.info("Create Or Update");
+                                    CreateOrUpdate createOrUpdate = (CreateOrUpdate) input.opBody();
+                                    createOrUpdate.contexts().forEach(
+                                            context -> {
+                                                log.info("Context {}", context);
+                                                String key = context.contextId().fpcIdentity().union().string();
+                                                sessionContextsMap.computeIfAbsent(key, k -> new ArrayList<>()).add(context);
+                                                context.dpns().forEach(
+                                                        dpn -> {
+                                                            if (context.instructions().instrType() instanceof Instr3GppMob) {
+                                                                log.info("3GPP Instructions");
+                                                                Instr3GppMob instr3GppMob = (Instr3GppMob) context.instructions().instrType();
+                                                                String commands = Bits.toString(instr3GppMob.instr3GppMob().bits());
+
+                                                                Ip4Address ulLocalAddress = Ip4Address.valueOf(context.ul().tunnelLocalAddress().toString()),
+                                                                        dlRemoteAddress = Ip4Address.valueOf(context.dl().tunnelRemoteAddress().toString()),
+                                                                        dlLocalAddress = Ip4Address.valueOf(context.dl().tunnelLocalAddress().toString());
+
+                                                                long s1u_sgw_gtpu_teid, s1u_enb_gtpu_teid,
+                                                                        clientId = input.clientId().fpcIdentity().union().int64(),
+                                                                        contextId = context.contextId().fpcIdentity().union().int64();
+
+                                                                BigInteger opId = input.opId().uint64(),
+                                                                        imsi = context.imsi().uint64();
+
+                                                                short ebi = context.ebi().uint8(),
+                                                                        lbi = context.lbi().uint8();
+
+                                                                Short dpnTopic = DpnApi.getTopicFromNode(nodeNetworkMap.get(dpn.dpnId().fpcIdentity().union().string()));
+
+                                                                if (context.ul().mobilityTunnelParameters().mobprofileParameters() instanceof ThreegppTunnel) {
+                                                                    s1u_sgw_gtpu_teid = ((ThreegppTunnel) context.ul().mobilityTunnelParameters().mobprofileParameters()).tunnelIdentifier();
+                                                                } else {
+                                                                    return;
+                                                                }
+                                                                if (context.dl().mobilityTunnelParameters().mobprofileParameters() instanceof ThreegppTunnel) {
+                                                                    s1u_enb_gtpu_teid = ((ThreegppTunnel) context.dl().mobilityTunnelParameters().mobprofileParameters()).tunnelIdentifier();
+                                                                } else {
+                                                                    return;
+                                                                }
+
+                                                                if (input.opType().equals(OpTypeEnum.CREATE)) {
+                                                                    if (commands.contains("session")) {
+                                                                        log.info("CREATE session");
+                                                                        DpnApi.create_session(
+                                                                                dpnTopic,
+                                                                                imsi,
+                                                                                Ip4Prefix.valueOf(context.delegatingIpPrefixes().get(0).toString()).address(),
+                                                                                ebi,
+                                                                                ulLocalAddress,
+                                                                                s1u_sgw_gtpu_teid,
+                                                                                clientId,
+                                                                                opId,
+                                                                                contextId
+                                                                        );
+
+                                                                        if (commands.contains("downlink")) {
+                                                                            log.info("CREATE session downlink");
+                                                                            DpnApi.modify_bearer_dl(
+                                                                                    dpnTopic,
+                                                                                    s1u_sgw_gtpu_teid,
+                                                                                    dlRemoteAddress,
+                                                                                    s1u_enb_gtpu_teid,
+                                                                                    clientId,
+                                                                                    opId
+                                                                            );
+                                                                        }
+                                                                    } else if (commands.contains("indirect-forward")) {
+                                                                        // TODO - Modify API for Indirect Forwarding to/from another SGW
+                                                                    } else if (commands.contains("uplink")) {
+                                                                        log.info("CREATE uplink");
+                                                                        DpnApi.create_bearer_ul(
+                                                                                dpnTopic,
+                                                                                imsi,
+                                                                                lbi,
+                                                                                ebi,
+                                                                                ulLocalAddress,
+                                                                                s1u_sgw_gtpu_teid
+                                                                        );
+                                                                    }
+                                                                } else {
+                                                                    if (commands.contains("downlink")) {
+                                                                        log.info("UPDATE downlink");
+                                                                        if (context.dl().lifetime() >= 0L) {
+                                                                            DpnApi.modify_bearer_dl(
+                                                                                    dpnTopic,
+                                                                                    dlRemoteAddress,
+                                                                                    s1u_enb_gtpu_teid,
+                                                                                    dlLocalAddress,
+                                                                                    clientId,
+                                                                                    opId,
+                                                                                    contextId
+                                                                            );
+                                                                        } else {
+                                                                            DpnApi.delete_bearer(
+                                                                                    dpnTopic,
+                                                                                    s1u_enb_gtpu_teid
+                                                                            );
+                                                                        }
+                                                                    }
+                                                                    if (commands.contains("uplink")) {
+                                                                        log.info("UPDATE uplink");
+                                                                        if (context.ul().lifetime() >= 0L) {
+                                                                            DpnApi.modify_bearer_ul(
+                                                                                    dpnTopic,
+                                                                                    ulLocalAddress,
+                                                                                    s1u_enb_gtpu_teid,
+                                                                                    s1u_sgw_gtpu_teid
+                                                                            );
+                                                                        } else {
+                                                                            DpnApi.delete_bearer(
+                                                                                    dpnTopic,
+                                                                                    s1u_sgw_gtpu_teid
+                                                                            );
+                                                                        }
+                                                                    }
+                                                                }
+                                                            }
+                                                        }
+                                                );
+                                            }
+                                    );
+                                }
+                                break;
+                            case QUERY:
+                                break;
+                            case DELETE:
+                                if (input.opBody() instanceof DeleteOrQuery) {
+                                    DeleteOrQuery deleteOrQuery = (DeleteOrQuery) input.opBody();
+                                    log.info("Delete Or Query");
+
+                                    deleteOrQuery.targets().forEach(
+                                            target -> {
+                                                log.info("target {}", target);
+                                                String targetStr = target.target().union().string();
+                                                sessionContextsMap.getOrDefault(targetStr, Lists.newArrayList()).parallelStream().forEach(
+                                                        context -> {
+                                                            log.info("context {}", context);
+                                                            context.dpns().forEach(
+                                                                    dpn -> {
+                                                                        log.info("DPN {}", dpn);
+                                                                        Long teid;
+                                                                        if (context.ul().mobilityTunnelParameters().mobprofileParameters() instanceof ThreegppTunnel) {
+                                                                            teid = ((ThreegppTunnel) context.ul().mobilityTunnelParameters().mobprofileParameters()).tunnelIdentifier();
+                                                                        } else {
+                                                                            return;
+                                                                        }
+
+                                                                        Short dpnTopic = DpnApi.getTopicFromNode(nodeNetworkMap.get(dpn.dpnId().fpcIdentity().union().string()));
+
+                                                                        if (targetStr.endsWith("ul") || targetStr.endsWith("dl")) {
+                                                                            log.info("DELETE Bearer");
+                                                                            DpnApi.delete_bearer(
+                                                                                    dpnTopic,
+                                                                                    teid
+                                                                            );
+                                                                        } else {
+                                                                            log.info("DELETE session");
+                                                                            DpnApi.delete_session(
+                                                                                    dpnTopic,
+                                                                                    context.lbi().uint8(),
+                                                                                    teid,
+                                                                                    input.clientId().fpcIdentity().union().int64(),
+                                                                                    input.opId().uint64(),
+                                                                                    context.contextId().fpcIdentity().union().int64()
+                                                                            );
+                                                                        }
+                                                                    }
+                                                            );
+                                                        }
+                                                );
+                                            }
+                                    );
+                                }
+                                break;
+                        }
+                    }
+            );
+
+
+        } catch (Exception e) {
+            log.error(ExceptionUtils.getFullStackTrace(e));
+        }
+
+        ResourceData dataNode = modelConverter.createDataNode(
+                DefaultModelObjectData.builder().addModelObject(configureOutput).build()
+        );
+        return new RpcOutput(RpcOutput.Status.RPC_SUCCESS, dataNode.dataNodes().get(0));
+    }
+
+    @Override
+    public RpcOutput configureBundles(RpcInput rpcInput) {
+        return null;
+    }
+
+    @Override
+    public RpcOutput eventRegister(RpcInput rpcInput) {
+        return null;
+    }
+
+    @Override
+    public RpcOutput eventDeregister(RpcInput rpcInput) {
+        return null;
+    }
+
+    @Override
+    public RpcOutput probe(RpcInput rpcInput) {
+        return null;
+    }
+
+//    @Override
+//    public void registerClient(RegisterClientInput input) {
+//        tenantService.registerClient(input.clientId(), input.tenantId());
+//    }
+//
+//    @Override
+//    public void deregisterClient(DeregisterClientInput input) {
+//        tenantService.deregisterClient(input.clientId());
+//    }
+
     private class InternalNetworkConfigListener implements NetworkConfigListener {
 
         @Override
@@ -196,371 +506,4 @@
         }
 
     }
-
-    @Override
-    public RpcOutput configureDpn(RpcInput rpcInput) {
-        return null;
-    }
-
-    @Override
-    public RpcOutput configure(RpcInput rpcInput) {
-        ConfigureInput input = (ConfigureInput) rpcInput;
-        switch (input.opType()) {
-            case CREATE:
-            case UPDATE:
-                if (input.opBody() instanceof CreateOrUpdate) {
-                    CreateOrUpdate createOrUpdate = (CreateOrUpdate) input.opBody();
-                    createOrUpdate.contexts().forEach(
-                            context -> {
-                                String key = context.contextId().fpcIdentity().union().string();
-                                sessionContextsMap.computeIfAbsent(key, k -> new ArrayList<>())
-                                        .add(context);
-                                context.dpns().forEach(
-                                        dpn -> {
-                                            if (input.instructions().instrType() instanceof Instr3GppMob) {
-
-                                                Instr3GppMob instr3GppMob = (Instr3GppMob) input.instructions().instrType();
-                                                String commands = Bits.toString(instr3GppMob.instr3GppMob().bits());
-
-                                                Ip4Address ulLocalAddress = Ip4Address.valueOf(context.ul().tunnelLocalAddress().toString()),
-                                                        dlRemoteAddress = Ip4Address.valueOf(context.dl().tunnelRemoteAddress().toString()),
-                                                        dlLocalAddress = Ip4Address.valueOf(context.dl().tunnelLocalAddress().toString());
-
-                                                long s1u_sgw_gtpu_teid, s1u_enb_gtpu_teid,
-                                                        clientId = input.clientId().fpcIdentity().union().int64(),
-                                                        contextId = context.contextId().fpcIdentity().union().int64();
-
-                                                BigInteger opId = input.opId().uint64(),
-                                                        imsi = context.imsi().uint64();
-
-                                                short ebi = context.ebi().uint8(),
-                                                        lbi = context.lbi().uint8();
-
-                                                Short dpnTopic = DpnApi.getTopicFromNode(nodeNetworkMap.get(dpn.dpnId().fpcIdentity().union().string()));
-
-                                                if (context.ul().mobilityTunnelParameters().mobprofileParameters() instanceof ThreegppTunnel) {
-                                                    s1u_sgw_gtpu_teid = ((ThreegppTunnel) context.ul().mobilityTunnelParameters().mobprofileParameters()).tunnelIdentifier();
-                                                } else {
-                                                    return;
-                                                }
-                                                if (context.dl().mobilityTunnelParameters().mobprofileParameters() instanceof ThreegppTunnel) {
-                                                    s1u_enb_gtpu_teid = ((ThreegppTunnel) context.dl().mobilityTunnelParameters().mobprofileParameters()).tunnelIdentifier();
-                                                } else {
-                                                    return;
-                                                }
-
-                                                if (input.opType().equals(OpTypeEnum.CREATE)) {
-                                                    if (commands.contains("session")) {
-                                                        DpnApi.create_session(
-                                                                dpnTopic,
-                                                                imsi,
-                                                                Ip4Prefix.valueOf(context.delegatingIpPrefixes().get(0).toString()).address(),
-                                                                ebi,
-                                                                ulLocalAddress,
-                                                                s1u_sgw_gtpu_teid,
-                                                                clientId,
-                                                                opId,
-                                                                contextId
-                                                        );
-
-
-                                                        if (commands.contains("downlink")) {
-                                                            DpnApi.modify_bearer_dl(
-                                                                    dpnTopic,
-                                                                    s1u_sgw_gtpu_teid,
-                                                                    dlRemoteAddress,
-                                                                    s1u_enb_gtpu_teid,
-                                                                    clientId,
-                                                                    opId
-                                                            );
-                                                        }
-                                                    } else if (commands.contains("indirect-forward")) {
-                                                        // TODO - Modify API for Indirect Forwarding to/from another SGW
-                                                    } else if (commands.contains("uplink")) {
-                                                        DpnApi.create_bearer_ul(
-                                                                dpnTopic,
-                                                                imsi,
-                                                                lbi,
-                                                                ebi,
-                                                                ulLocalAddress,
-                                                                s1u_sgw_gtpu_teid
-                                                        );
-                                                    }
-                                                } else {
-                                                    if (commands.contains("downlink")) {
-                                                        if (context.dl().lifetime() >= 0L) {
-                                                            DpnApi.modify_bearer_dl(
-                                                                    dpnTopic,
-                                                                    dlRemoteAddress,
-                                                                    s1u_enb_gtpu_teid,
-                                                                    dlLocalAddress,
-                                                                    clientId,
-                                                                    opId,
-                                                                    contextId
-                                                            );
-                                                        } else {
-                                                            DpnApi.delete_bearer(
-                                                                    dpnTopic,
-                                                                    s1u_enb_gtpu_teid
-                                                            );
-                                                        }
-                                                    }
-                                                    if (commands.contains("uplink")) {
-                                                        if (context.ul().lifetime() >= 0L) {
-                                                            DpnApi.modify_bearer_ul(
-                                                                    dpnTopic,
-                                                                    ulLocalAddress,
-                                                                    s1u_enb_gtpu_teid,
-                                                                    s1u_sgw_gtpu_teid
-                                                            );
-                                                        } else {
-                                                            DpnApi.delete_bearer(
-                                                                    dpnTopic,
-                                                                    s1u_sgw_gtpu_teid
-                                                            );
-                                                        }
-                                                    }
-                                                }
-                                            }
-                                        }
-                                );
-                            }
-                    );
-                }
-                break;
-            case QUERY:
-                break;
-            case DELETE:
-                if (input.opBody() instanceof DeleteOrQuery) {
-                    DeleteOrQuery deleteOrQuery = (DeleteOrQuery) input.opBody();
-
-                    deleteOrQuery.targets().forEach(
-                            target -> {
-                                String targetStr = target.target().union().string();
-                                sessionContextsMap.getOrDefault(targetStr, Lists.newArrayList()).parallelStream().forEach(
-                                        context -> context.dpns().forEach(
-                                                dpn -> {
-                                                    Long teid;
-                                                    if (context.ul().mobilityTunnelParameters().mobprofileParameters() instanceof ThreegppTunnel) {
-                                                        teid = ((ThreegppTunnel) context.ul().mobilityTunnelParameters().mobprofileParameters()).tunnelIdentifier();
-                                                    } else {
-                                                        return;
-                                                    }
-
-                                                    Short dpnTopic = DpnApi.getTopicFromNode(nodeNetworkMap.get(dpn.dpnId().fpcIdentity().union().string()));
-
-                                                    if (targetStr.endsWith("ul") || targetStr.endsWith("dl")) {
-                                                        DpnApi.delete_bearer(
-                                                                dpnTopic,
-                                                                teid
-                                                        );
-                                                    } else {
-                                                        DpnApi.delete_session(
-                                                                dpnTopic,
-                                                                context.lbi().uint8(),
-                                                                teid,
-                                                                input.clientId().fpcIdentity().union().int64(),
-                                                                input.opId().uint64(),
-                                                                context.contextId().fpcIdentity().union().int64()
-                                                        );
-                                                    }
-                                                }
-                                        )
-                                );
-                            }
-                    );
-                }
-                break;
-        }
-
-        return null;
-    }
-
-    @Override
-    public RpcOutput configureBundles(RpcInput rpcInput) {
-        return null;
-    }
-
-    @Override
-    public RpcOutput eventRegister(RpcInput rpcInput) {
-        return null;
-    }
-
-    @Override
-    public RpcOutput eventDeregister(RpcInput rpcInput) {
-        return null;
-    }
-
-    @Override
-    public RpcOutput probe(RpcInput rpcInput) {
-        return null;
-    }
-
-    @Override
-    public RpcOutput registerClient(RpcInput rpcInput) {
-        return null;
-    }
-
-    @Override
-    public RpcOutput deregisterClient(RpcInput rpcInput) {
-        return null;
-    }
-
-    @Override
-    public void configure(org.onosproject.fpcagent.dto.configure.Configure configure) {
-        org.onosproject.fpcagent.dto.configure.ConfigureInput configureInput = configure.getConfigureInput();
-        if (configureInput.getOp_type().equals("create") || configureInput.getOp_type().equals("update")) {
-
-            configureInput.getContexts().forEach(
-                    context -> {
-                        String key = String.valueOf(context.getContext_id());
-                        sessionContextsRestMap.computeIfAbsent(key, k -> new ArrayList<>()).add(context);
-                        context.getDpns().forEach(dpn -> {
-                                    try {
-                                        String commands = context.getInstructions().getInstr_3gpp_mob();
-
-                                        Ip4Address ulLocalAddress = Ip4Address.valueOf(context.getUl().getTunnel_local_address()),
-                                                dlRemoteAddress = Ip4Address.valueOf(context.getDl().getTunnel_remote_address());
-
-                                        long s1u_sgw_gtpu_teid, s1u_enb_gtpu_teid,
-                                                clientId = Long.parseLong(configureInput.getClient_id()),
-                                                contextId = context.getContext_id();
-
-                                        BigInteger opId = BigInteger.valueOf(Long.parseLong(configureInput.getOp_id())),
-                                                imsi = BigInteger.valueOf(Long.parseLong(context.getImsi()));
-
-                                        short ebi = Short.parseShort(context.getEbi()),
-                                                lbi = Short.parseShort(context.getLbi());
-
-                                        Short dpnTopic = DpnApi.getTopicFromNode(nodeNetworkMap.get(dpn.getDpn_id()));
-
-
-                                        s1u_sgw_gtpu_teid = Long.parseLong(context.getUl().getMobility_tunnel_parameters().getTunnel_identifier());
-                                        s1u_enb_gtpu_teid = Long.parseLong(context.getDl().getMobility_tunnel_parameters().getTunnel_identifier());
-
-                                        if (configureInput.getOp_type().equals("create")) {
-                                            if (commands.contains("session")) {
-                                                DpnApi.create_session(
-                                                        dpnTopic,
-                                                        imsi,
-                                                        Ip4Prefix.valueOf(context.getDelegating_ip_prefixes().get(0)).address(),
-                                                        ebi,
-                                                        ulLocalAddress,
-                                                        s1u_sgw_gtpu_teid,
-                                                        clientId,
-                                                        opId,
-                                                        contextId
-                                                );
-
-
-                                                if (commands.contains("downlink")) {
-                                                    DpnApi.modify_bearer_dl(
-                                                            dpnTopic,
-                                                            s1u_sgw_gtpu_teid,
-                                                            dlRemoteAddress,
-                                                            s1u_enb_gtpu_teid,
-                                                            clientId,
-                                                            opId
-                                                    );
-                                                }
-                                            } else if (commands.contains("indirect-forward")) {
-                                                // TODO - Modify API for Indirect Forwarding to/from another SGW
-                                            } else if (commands.contains("uplink")) {
-                                                DpnApi.create_bearer_ul(
-                                                        dpnTopic,
-                                                        imsi,
-                                                        lbi,
-                                                        ebi,
-                                                        ulLocalAddress,
-                                                        s1u_sgw_gtpu_teid
-                                                );
-                                            }
-                                        } else {
-                                            if (commands.contains("downlink")) {
-                                                DpnApi.delete_bearer(
-                                                        dpnTopic,
-                                                        s1u_enb_gtpu_teid
-                                                );
-                                            }
-                                            if (commands.contains("uplink")) {
-                                                DpnApi.delete_bearer(
-                                                        dpnTopic,
-                                                        s1u_sgw_gtpu_teid
-                                                );
-                                            }
-                                        }
-                                    } catch (Exception e) {
-                                        log.error(ExceptionUtils.getFullStackTrace(e));
-                                    }
-                                }
-                        );
-                    }
-            );
-
-        } else if (configureInput.getOp_type().equals("delete") || configureInput.getOp_type().equals("query")) {
-            configureInput.getTargets().forEach(
-                    target -> {
-                        String targetStr = target.getTarget();
-                        String s = StringUtils.substringBetween(targetStr, "contexts/", "/");
-                        if (s == null) {
-                            s = StringUtils.substringAfter(targetStr, "contexts/");
-                        }
-                        sessionContextsRestMap.getOrDefault(s, Lists.newArrayList()).forEach(
-                                context -> context.getDpns().forEach(
-                                        dpn -> {
-                                            Long teid = Long.valueOf(context.getUl().getMobility_tunnel_parameters().getTunnel_identifier());
-                                            Short dpnTopic = DpnApi.getTopicFromNode(nodeNetworkMap.get(dpn.getDpn_id()));
-
-                                            if (targetStr.endsWith("ul") || targetStr.endsWith("dl")) {
-                                                DpnApi.delete_bearer(
-                                                        dpnTopic,
-                                                        teid
-                                                );
-                                            } else {
-                                                DpnApi.delete_session(
-                                                        dpnTopic,
-                                                        Short.valueOf(context.getLbi()),
-                                                        teid,
-                                                        Long.valueOf(configureInput.getClient_id()),
-                                                        BigInteger.valueOf(Long.parseLong(configureInput.getOp_id())),
-                                                        Long.valueOf(context.getContext_id())
-                                                );
-                                            }
-                                        }
-                                )
-                        );
-                    }
-            );
-        }
-    }
-
-    @Override
-    public void registerClient(RegisterClientInput input) {
-        tenantService.registerClient(input.clientId(), input.tenantId());
-    }
-
-    @Override
-    public void deregisterClient(DeregisterClientInput input) {
-        tenantService.deregisterClient(input.clientId());
-    }
-
-    @Override
-    public void addDpn(AddDpn addDpn) {
-        addDpn.getDpns().forEach(
-                dpn -> {
-                    try {
-                        log.info("Addind DPN {}", dpn.getDpn_id());
-                        nodeNetworkMap.put(dpn.getDpn_id(), dpn.getNode_id() + "/" + dpn.getNetwork_id());
-                    } catch (Exception e) {
-                        log.error(ExceptionUtils.getFullStackTrace(e));
-                    }
-                }
-        );
-    }
-
-    @Override
-    public void deleteDpn(String dpn) {
-        log.info("Removing DPN {}", dpn);
-        nodeNetworkMap.remove(dpn);
-    }
 }
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcService.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcService.java
index 9ff298a..5e4e152 100644
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcService.java
+++ b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/FpcService.java
@@ -1,24 +1,10 @@
 package org.onosproject.fpcagent;
 
-import org.onosproject.fpcagent.dto.configure.Configure;
-import org.onosproject.fpcagent.dto.dpn.AddDpn;
 import org.onosproject.fpcagent.helpers.ConfigHelper;
-import org.onosproject.yang.gen.v1.fpc.rev20150105.fpc.deregisterclient.DeregisterClientInput;
-import org.onosproject.yang.gen.v1.fpc.rev20150105.fpc.registerclient.RegisterClientInput;
 
 import java.util.Optional;
 
 public interface FpcService {
 
     Optional<ConfigHelper> getConfig();
-
-    void configure(Configure configure);
-
-    void registerClient(RegisterClientInput input);
-
-    void deregisterClient(DeregisterClientInput input);
-
-    void addDpn(AddDpn addDpn);
-
-    void deleteDpn(String dpn);
 }
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/client/BindClient.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/client/BindClient.java
deleted file mode 100755
index 5817772..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/client/BindClient.java
+++ /dev/null
@@ -1,128 +0,0 @@
-
-package org.onosproject.fpcagent.dto.client;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-import org.onosproject.fpcagent.dto.configure.ConfigureInput;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-    "client-id",
-    "tenant-id",
-    "supported-features",
-    "endpoint-uri"
-})
-public class BindClient {
-
-    @JsonProperty("client-id")
-    private String client_id;
-    @JsonProperty("tenant-id")
-    private String tenant_id;
-    @JsonProperty("supported-features")
-    private List<String> supported_features = null;
-    @JsonProperty("endpoint-uri")
-    private String endpoint_uri;
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    /**
-     * No args constructor for use in serialization
-     * 
-     */
-    public BindClient() {
-    }
-
-    /**
-     * 
-     * @param endpoint_uri
-     * @param supported_features
-     * @param tenant_id
-     * @param client_id
-     */
-    public BindClient(String client_id, String tenant_id, List<String> supported_features, String endpoint_uri) {
-        super();
-        this.client_id = client_id;
-        this.tenant_id = tenant_id;
-        this.supported_features = supported_features;
-        this.endpoint_uri = endpoint_uri;
-    }
-
-    @JsonProperty("client-id")
-    public String getClient_id() {
-        return client_id;
-    }
-
-    @JsonProperty("client-id")
-    public void setClient_id(String client_id) {
-        this.client_id = client_id;
-    }
-
-    @JsonProperty("tenant-id")
-    public String getTenant_id() {
-        return tenant_id;
-    }
-
-    @JsonProperty("tenant-id")
-    public void setTenant_id(String tenant_id) {
-        this.tenant_id = tenant_id;
-    }
-
-    @JsonProperty("supported-features")
-    public List<String> getSupported_features() {
-        return supported_features;
-    }
-
-    @JsonProperty("supported-features")
-    public void setSupported_features(List<String> supported_features) {
-        this.supported_features = supported_features;
-    }
-
-    @JsonProperty("endpoint-uri")
-    public String getEndpoint_uri() {
-        return endpoint_uri;
-    }
-
-    @JsonProperty("endpoint-uri")
-    public void setEndpoint_uri(String endpoint_uri) {
-        this.endpoint_uri = endpoint_uri;
-    }
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("client_id", client_id).append("tenant_id", tenant_id).append("supported_features", supported_features).append("endpoint_uri", endpoint_uri).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(additionalProperties).append(endpoint_uri).append(supported_features).append(tenant_id).append(client_id).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof ConfigureInput) == false) {
-            return false;
-        }
-        BindClient rhs = ((BindClient) other);
-        return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).append(endpoint_uri, rhs.endpoint_uri).append(supported_features, rhs.supported_features).append(tenant_id, rhs.tenant_id).append(client_id, rhs.client_id).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Configure.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Configure.java
deleted file mode 100755
index b79600f..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Configure.java
+++ /dev/null
@@ -1,81 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-    "input"
-})
-public class Configure {
-
-    @JsonProperty("input")
-    private ConfigureInput configureInput;
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    /**
-     * No args constructor for use in serialization
-     * 
-     */
-    public Configure() {
-    }
-
-    /**
-     * 
-     * @param configureInput
-     */
-    public Configure(ConfigureInput configureInput) {
-        super();
-        this.configureInput = configureInput;
-    }
-
-    @JsonProperty("input")
-    public ConfigureInput getConfigureInput() {
-        return configureInput;
-    }
-
-    @JsonProperty("input")
-    public void setConfigureInput(ConfigureInput configureInput) {
-        this.configureInput = configureInput;
-    }
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("input", configureInput).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(configureInput).append(additionalProperties).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof Configure) == false) {
-            return false;
-        }
-        Configure rhs = ((Configure) other);
-        return new EqualsBuilder().append(configureInput, rhs.configureInput).append(additionalProperties, rhs.additionalProperties).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/ConfigureInput.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/ConfigureInput.java
deleted file mode 100755
index 919052d..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/ConfigureInput.java
+++ /dev/null
@@ -1,162 +0,0 @@
-package org.onosproject.fpcagent.dto.configure;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-        "op-id",
-        "targets",
-        "contexts",
-        "client-id",
-        "session-state",
-        "admin-state",
-        "op-type",
-        "op-ref-scope"
-})
-public class ConfigureInput {
-
-    @JsonProperty("op-id")
-    private String op_id;
-    @JsonProperty("targets")
-    private List<Target> targets = null;
-    @JsonProperty("contexts")
-    private List<Context> contexts = null;
-    @JsonProperty("client-id")
-    private String client_id;
-    @JsonProperty("session-state")
-    private String session_state;
-    @JsonProperty("admin-state")
-    private String admin_state;
-    @JsonProperty("op-type")
-    private String op_type;
-    @JsonProperty("op-ref-scope")
-    private String op_ref_scope;
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    /**
-     * No args constructor for use in serialization
-     */
-    public ConfigureInput() {
-    }
-
-    @JsonProperty("op-id")
-    public String getOp_id() {
-        return op_id;
-    }
-
-    @JsonProperty("op-id")
-    public void setOp_id(String op_id) {
-        this.op_id = op_id;
-    }
-
-    @JsonProperty("targets")
-    public List<Target> getTargets() {
-        return targets;
-    }
-
-    @JsonProperty("targets")
-    public void setTargets(List<Target> targets) {
-        this.targets = targets;
-    }
-
-    @JsonProperty("contexts")
-    public List<Context> getContexts() {
-        return contexts;
-    }
-
-    @JsonProperty("contexts")
-    public void setContexts(List<Context> contexts) {
-        this.contexts = contexts;
-    }
-
-    @JsonProperty("client-id")
-    public String getClient_id() {
-        return client_id;
-    }
-
-    @JsonProperty("client-id")
-    public void setClient_id(String client_id) {
-        this.client_id = client_id;
-    }
-
-    @JsonProperty("session-state")
-    public String getSession_state() {
-        return session_state;
-    }
-
-    @JsonProperty("session-state")
-    public void setSession_state(String session_state) {
-        this.session_state = session_state;
-    }
-
-    @JsonProperty("admin-state")
-    public String getAdmin_state() {
-        return admin_state;
-    }
-
-    @JsonProperty("admin-state")
-    public void setAdmin_state(String admin_state) {
-        this.admin_state = admin_state;
-    }
-
-    @JsonProperty("op-type")
-    public String getOp_type() {
-        return op_type;
-    }
-
-    @JsonProperty("op-type")
-    public void setOp_type(String op_type) {
-        this.op_type = op_type;
-    }
-
-    @JsonProperty("op-ref-scope")
-    public String getOp_ref_scope() {
-        return op_ref_scope;
-    }
-
-    @JsonProperty("op-ref-scope")
-    public void setOp_ref_scope(String op_ref_scope) {
-        this.op_ref_scope = op_ref_scope;
-    }
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("op_id", op_id).append("targets", targets).append("contexts", contexts).append("client_id", client_id).append("session_state", session_state).append("admin_state", admin_state).append("op_type", op_type).append("op_ref_scope", op_ref_scope).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(session_state).append(op_id).append(additionalProperties).append(admin_state).append(op_type).append(op_ref_scope).append(contexts).append(client_id).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof ConfigureInput) == false) {
-            return false;
-        }
-        ConfigureInput rhs = ((ConfigureInput) other);
-        return new EqualsBuilder().append(session_state, rhs.session_state).append(op_id, rhs.op_id).append(additionalProperties, rhs.additionalProperties).append(admin_state, rhs.admin_state).append(op_type, rhs.op_type).append(op_ref_scope, rhs.op_ref_scope).append(contexts, rhs.contexts).append(client_id, rhs.client_id).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Context.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Context.java
deleted file mode 100755
index 2dfaafa..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Context.java
+++ /dev/null
@@ -1,217 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-    "instructions",
-    "context-id",
-    "dpn-group",
-    "delegating-ip-prefixes",
-    "ul",
-    "dl",
-    "dpns",
-    "imsi",
-    "ebi",
-    "lbi"
-})
-public class Context {
-
-    @JsonProperty("instructions")
-    private Instructions instructions;
-    @JsonProperty("context-id")
-    private Integer context_id;
-    @JsonProperty("dpn-group")
-    private String dpn_group;
-    @JsonProperty("delegating-ip-prefixes")
-    private List<String> delegating_ip_prefixes = null;
-    @JsonProperty("ul")
-    private Ul ul;
-    @JsonProperty("dl")
-    private Dl dl;
-    @JsonProperty("dpns")
-    private List<Dpn> dpns = null;
-    @JsonProperty("imsi")
-    private String imsi;
-    @JsonProperty("ebi")
-    private String ebi;
-    @JsonProperty("lbi")
-    private String lbi;
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    /**
-     * No args constructor for use in serialization
-     * 
-     */
-    public Context() {
-    }
-
-    /**
-     * 
-     * @param lbi
-     * @param dpns
-     * @param ul
-     * @param dpn_group
-     * @param context_id
-     * @param instructions
-     * @param dl
-     * @param delegating_ip_prefixes
-     * @param imsi
-     * @param ebi
-     */
-    public Context(Instructions instructions, Integer context_id, String dpn_group, List<String> delegating_ip_prefixes, Ul ul, Dl dl, List<Dpn> dpns, String imsi, String ebi, String lbi) {
-        super();
-        this.instructions = instructions;
-        this.context_id = context_id;
-        this.dpn_group = dpn_group;
-        this.delegating_ip_prefixes = delegating_ip_prefixes;
-        this.ul = ul;
-        this.dl = dl;
-        this.dpns = dpns;
-        this.imsi = imsi;
-        this.ebi = ebi;
-        this.lbi = lbi;
-    }
-
-    @JsonProperty("instructions")
-    public Instructions getInstructions() {
-        return instructions;
-    }
-
-    @JsonProperty("instructions")
-    public void setInstructions(Instructions instructions) {
-        this.instructions = instructions;
-    }
-
-    @JsonProperty("context-id")
-    public Integer getContext_id() {
-        return context_id;
-    }
-
-    @JsonProperty("context-id")
-    public void setContext_id(Integer context_id) {
-        this.context_id = context_id;
-    }
-
-    @JsonProperty("dpn-group")
-    public String getDpn_group() {
-        return dpn_group;
-    }
-
-    @JsonProperty("dpn-group")
-    public void setDpn_group(String dpn_group) {
-        this.dpn_group = dpn_group;
-    }
-
-    @JsonProperty("delegating-ip-prefixes")
-    public List<String> getDelegating_ip_prefixes() {
-        return delegating_ip_prefixes;
-    }
-
-    @JsonProperty("delegating-ip-prefixes")
-    public void setDelegating_ip_prefixes(List<String> delegating_ip_prefixes) {
-        this.delegating_ip_prefixes = delegating_ip_prefixes;
-    }
-
-    @JsonProperty("ul")
-    public Ul getUl() {
-        return ul;
-    }
-
-    @JsonProperty("ul")
-    public void setUl(Ul ul) {
-        this.ul = ul;
-    }
-
-    @JsonProperty("dl")
-    public Dl getDl() {
-        return dl;
-    }
-
-    @JsonProperty("dl")
-    public void setDl(Dl dl) {
-        this.dl = dl;
-    }
-
-    @JsonProperty("dpns")
-    public List<Dpn> getDpns() {
-        return dpns;
-    }
-
-    @JsonProperty("dpns")
-    public void setDpns(List<Dpn> dpns) {
-        this.dpns = dpns;
-    }
-
-    @JsonProperty("imsi")
-    public String getImsi() {
-        return imsi;
-    }
-
-    @JsonProperty("imsi")
-    public void setImsi(String imsi) {
-        this.imsi = imsi;
-    }
-
-    @JsonProperty("ebi")
-    public String getEbi() {
-        return ebi;
-    }
-
-    @JsonProperty("ebi")
-    public void setEbi(String ebi) {
-        this.ebi = ebi;
-    }
-
-    @JsonProperty("lbi")
-    public String getLbi() {
-        return lbi;
-    }
-
-    @JsonProperty("lbi")
-    public void setLbi(String lbi) {
-        this.lbi = lbi;
-    }
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("instructions", instructions).append("context_id", context_id).append("dpn_group", dpn_group).append("delegating_ip_prefixes", delegating_ip_prefixes).append("ul", ul).append("dl", dl).append("dpns", dpns).append("imsi", imsi).append("ebi", ebi).append("lbi", lbi).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(lbi).append(dpns).append(ul).append(dpn_group).append(context_id).append(instructions).append(additionalProperties).append(dl).append(delegating_ip_prefixes).append(imsi).append(ebi).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof Context) == false) {
-            return false;
-        }
-        Context rhs = ((Context) other);
-        return new EqualsBuilder().append(lbi, rhs.lbi).append(dpns, rhs.dpns).append(ul, rhs.ul).append(dpn_group, rhs.dpn_group).append(context_id, rhs.context_id).append(instructions, rhs.instructions).append(additionalProperties, rhs.additionalProperties).append(dl, rhs.dl).append(delegating_ip_prefixes, rhs.delegating_ip_prefixes).append(imsi, rhs.imsi).append(ebi, rhs.ebi).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dl.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dl.java
deleted file mode 100755
index f372a5b..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dl.java
+++ /dev/null
@@ -1,130 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import java.util.HashMap;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-    "tunnel-local-address",
-    "tunnel-remote-address",
-    "mobility-tunnel-parameters",
-    "dpn-parameters"
-})
-public class Dl {
-
-    @JsonProperty("tunnel-local-address")
-    private String tunnel_local_address;
-    @JsonProperty("tunnel-remote-address")
-    private String tunnel_remote_address;
-    @JsonProperty("mobility-tunnel-parameters")
-    private Mobility_tunnel_parameters_ mobility_tunnel_parameters;
-    @JsonProperty("dpn-parameters")
-    private Dpn_parameters_ dpn_parameters;
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    /**
-     * No args constructor for use in serialization
-     * 
-     */
-    public Dl() {
-    }
-
-    /**
-     * 
-     * @param tunnel_remote_address
-     * @param dpn_parameters
-     * @param tunnel_local_address
-     * @param mobility_tunnel_parameters
-     */
-    public Dl(String tunnel_local_address, String tunnel_remote_address, Mobility_tunnel_parameters_ mobility_tunnel_parameters, Dpn_parameters_ dpn_parameters) {
-        super();
-        this.tunnel_local_address = tunnel_local_address;
-        this.tunnel_remote_address = tunnel_remote_address;
-        this.mobility_tunnel_parameters = mobility_tunnel_parameters;
-        this.dpn_parameters = dpn_parameters;
-    }
-
-    @JsonProperty("tunnel-local-address")
-    public String getTunnel_local_address() {
-        return tunnel_local_address;
-    }
-
-    @JsonProperty("tunnel-local-address")
-    public void setTunnel_local_address(String tunnel_local_address) {
-        this.tunnel_local_address = tunnel_local_address;
-    }
-
-    @JsonProperty("tunnel-remote-address")
-    public String getTunnel_remote_address() {
-        return tunnel_remote_address;
-    }
-
-    @JsonProperty("tunnel-remote-address")
-    public void setTunnel_remote_address(String tunnel_remote_address) {
-        this.tunnel_remote_address = tunnel_remote_address;
-    }
-
-    @JsonProperty("mobility-tunnel-parameters")
-    public Mobility_tunnel_parameters_ getMobility_tunnel_parameters() {
-        return mobility_tunnel_parameters;
-    }
-
-    @JsonProperty("mobility-tunnel-parameters")
-    public void setMobility_tunnel_parameters(Mobility_tunnel_parameters_ mobility_tunnel_parameters) {
-        this.mobility_tunnel_parameters = mobility_tunnel_parameters;
-    }
-
-    @JsonProperty("dpn-parameters")
-    public Dpn_parameters_ getDpn_parameters() {
-        return dpn_parameters;
-    }
-
-    @JsonProperty("dpn-parameters")
-    public void setDpn_parameters(Dpn_parameters_ dpn_parameters) {
-        this.dpn_parameters = dpn_parameters;
-    }
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("tunnel_local_address", tunnel_local_address).append("tunnel_remote_address", tunnel_remote_address).append("mobility_tunnel_parameters", mobility_tunnel_parameters).append("dpn_parameters", dpn_parameters).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(tunnel_remote_address).append(dpn_parameters).append(additionalProperties).append(tunnel_local_address).append(mobility_tunnel_parameters).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof Dl) == false) {
-            return false;
-        }
-        Dl rhs = ((Dl) other);
-        return new EqualsBuilder().append(tunnel_remote_address, rhs.tunnel_remote_address).append(dpn_parameters, rhs.dpn_parameters).append(additionalProperties, rhs.additionalProperties).append(tunnel_local_address, rhs.tunnel_local_address).append(mobility_tunnel_parameters, rhs.mobility_tunnel_parameters).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn.java
deleted file mode 100755
index 795da24..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn.java
+++ /dev/null
@@ -1,111 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-    "dpn-id",
-    "direction",
-    "dpn-parameters"
-})
-public class Dpn {
-
-    @JsonProperty("dpn-id")
-    private String dpn_id;
-    @JsonProperty("direction")
-    private String direction;
-    @JsonProperty("dpn-parameters")
-    private Dpn_parameters__ dpn_parameters;
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    /**
-     * No args constructor for use in serialization
-     * 
-     */
-    public Dpn() {
-    }
-
-    /**
-     * 
-     * @param dpn_parameters
-     * @param direction
-     * @param dpn_id
-     */
-    public Dpn(String dpn_id, String direction, Dpn_parameters__ dpn_parameters) {
-        super();
-        this.dpn_id = dpn_id;
-        this.direction = direction;
-        this.dpn_parameters = dpn_parameters;
-    }
-
-    @JsonProperty("dpn-id")
-    public String getDpn_id() {
-        return dpn_id;
-    }
-
-    @JsonProperty("dpn-id")
-    public void setDpn_id(String dpn_id) {
-        this.dpn_id = dpn_id;
-    }
-
-    @JsonProperty("direction")
-    public String getDirection() {
-        return direction;
-    }
-
-    @JsonProperty("direction")
-    public void setDirection(String direction) {
-        this.direction = direction;
-    }
-
-    @JsonProperty("dpn-parameters")
-    public Dpn_parameters__ getDpn_parameters() {
-        return dpn_parameters;
-    }
-
-    @JsonProperty("dpn-parameters")
-    public void setDpn_parameters(Dpn_parameters__ dpn_parameters) {
-        this.dpn_parameters = dpn_parameters;
-    }
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("dpn_id", dpn_id).append("direction", direction).append("dpn_parameters", dpn_parameters).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(dpn_parameters).append(additionalProperties).append(direction).append(dpn_id).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof Dpn) == false) {
-            return false;
-        }
-        Dpn rhs = ((Dpn) other);
-        return new EqualsBuilder().append(dpn_parameters, rhs.dpn_parameters).append(additionalProperties, rhs.additionalProperties).append(direction, rhs.direction).append(dpn_id, rhs.dpn_id).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters.java
deleted file mode 100755
index e8fea8d..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters.java
+++ /dev/null
@@ -1,56 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import java.util.HashMap;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-
-})
-public class Dpn_parameters {
-
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(additionalProperties).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof Dpn_parameters) == false) {
-            return false;
-        }
-        Dpn_parameters rhs = ((Dpn_parameters) other);
-        return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters_.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters_.java
deleted file mode 100755
index 0e00c6f..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters_.java
+++ /dev/null
@@ -1,56 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import java.util.HashMap;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-
-})
-public class Dpn_parameters_ {
-
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(additionalProperties).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof Dpn_parameters_) == false) {
-            return false;
-        }
-        Dpn_parameters_ rhs = ((Dpn_parameters_) other);
-        return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters__.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters__.java
deleted file mode 100755
index 009e5e8..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Dpn_parameters__.java
+++ /dev/null
@@ -1,53 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-
-})
-public class Dpn_parameters__ {
-
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(additionalProperties).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof Dpn_parameters__) == false) {
-            return false;
-        }
-        Dpn_parameters__ rhs = ((Dpn_parameters__) other);
-        return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Instructions.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Instructions.java
deleted file mode 100755
index 043755d..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Instructions.java
+++ /dev/null
@@ -1,85 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import java.util.HashMap;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-    "instr-3gpp-mob"
-})
-public class Instructions {
-
-    @JsonProperty("instr-3gpp-mob")
-    private String instr_3gpp_mob;
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    /**
-     * No args constructor for use in serialization
-     * 
-     */
-    public Instructions() {
-    }
-
-    /**
-     * 
-     * @param instr_3gpp_mob
-     */
-    public Instructions(String instr_3gpp_mob) {
-        super();
-        this.instr_3gpp_mob = instr_3gpp_mob;
-    }
-
-    @JsonProperty("instr-3gpp-mob")
-    public String getInstr_3gpp_mob() {
-        return instr_3gpp_mob;
-    }
-
-    @JsonProperty("instr-3gpp-mob")
-    public void setInstr_3gpp_mob(String instr_3gpp_mob) {
-        this.instr_3gpp_mob = instr_3gpp_mob;
-    }
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("instr_3gpp_mob", instr_3gpp_mob).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(additionalProperties).append(instr_3gpp_mob).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof Instructions) == false) {
-            return false;
-        }
-        Instructions rhs = ((Instructions) other);
-        return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).append(instr_3gpp_mob, rhs.instr_3gpp_mob).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Mobility_tunnel_parameters.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Mobility_tunnel_parameters.java
deleted file mode 100755
index d58f547..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Mobility_tunnel_parameters.java
+++ /dev/null
@@ -1,96 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-    "tunnel-type",
-    "tunnel-identifier"
-})
-public class Mobility_tunnel_parameters {
-
-    @JsonProperty("tunnel-type")
-    private String tunnel_type;
-    @JsonProperty("tunnel-identifier")
-    private String tunnel_identifier;
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    /**
-     * No args constructor for use in serialization
-     * 
-     */
-    public Mobility_tunnel_parameters() {
-    }
-
-    /**
-     * 
-     * @param tunnel_type
-     * @param tunnel_identifier
-     */
-    public Mobility_tunnel_parameters(String tunnel_type, String tunnel_identifier) {
-        super();
-        this.tunnel_type = tunnel_type;
-        this.tunnel_identifier = tunnel_identifier;
-    }
-
-    @JsonProperty("tunnel-type")
-    public String getTunnel_type() {
-        return tunnel_type;
-    }
-
-    @JsonProperty("tunnel-type")
-    public void setTunnel_type(String tunnel_type) {
-        this.tunnel_type = tunnel_type;
-    }
-
-    @JsonProperty("tunnel-identifier")
-    public String getTunnel_identifier() {
-        return tunnel_identifier;
-    }
-
-    @JsonProperty("tunnel-identifier")
-    public void setTunnel_identifier(String tunnel_identifier) {
-        this.tunnel_identifier = tunnel_identifier;
-    }
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("tunnel_type", tunnel_type).append("tunnel_identifier", tunnel_identifier).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(additionalProperties).append(tunnel_type).append(tunnel_identifier).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof Mobility_tunnel_parameters) == false) {
-            return false;
-        }
-        Mobility_tunnel_parameters rhs = ((Mobility_tunnel_parameters) other);
-        return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).append(tunnel_type, rhs.tunnel_type).append(tunnel_identifier, rhs.tunnel_identifier).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Mobility_tunnel_parameters_.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Mobility_tunnel_parameters_.java
deleted file mode 100755
index deb615c..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Mobility_tunnel_parameters_.java
+++ /dev/null
@@ -1,100 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import java.util.HashMap;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-    "tunnel-type",
-    "tunnel-identifier"
-})
-public class Mobility_tunnel_parameters_ {
-
-    @JsonProperty("tunnel-type")
-    private String tunnel_type;
-    @JsonProperty("tunnel-identifier")
-    private String tunnel_identifier;
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    /**
-     * No args constructor for use in serialization
-     * 
-     */
-    public Mobility_tunnel_parameters_() {
-    }
-
-    /**
-     * 
-     * @param tunnel_type
-     * @param tunnel_identifier
-     */
-    public Mobility_tunnel_parameters_(String tunnel_type, String tunnel_identifier) {
-        super();
-        this.tunnel_type = tunnel_type;
-        this.tunnel_identifier = tunnel_identifier;
-    }
-
-    @JsonProperty("tunnel-type")
-    public String getTunnel_type() {
-        return tunnel_type;
-    }
-
-    @JsonProperty("tunnel-type")
-    public void setTunnel_type(String tunnel_type) {
-        this.tunnel_type = tunnel_type;
-    }
-
-    @JsonProperty("tunnel-identifier")
-    public String getTunnel_identifier() {
-        return tunnel_identifier;
-    }
-
-    @JsonProperty("tunnel-identifier")
-    public void setTunnel_identifier(String tunnel_identifier) {
-        this.tunnel_identifier = tunnel_identifier;
-    }
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("tunnel_type", tunnel_type).append("tunnel_identifier", tunnel_identifier).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(additionalProperties).append(tunnel_type).append(tunnel_identifier).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof Mobility_tunnel_parameters_) == false) {
-            return false;
-        }
-        Mobility_tunnel_parameters_ rhs = ((Mobility_tunnel_parameters_) other);
-        return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).append(tunnel_type, rhs.tunnel_type).append(tunnel_identifier, rhs.tunnel_identifier).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Target.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Target.java
deleted file mode 100755
index db67e91..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Target.java
+++ /dev/null
@@ -1,81 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-    "target"
-})
-public class Target {
-
-    @JsonProperty("target")
-    private String target;
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    /**
-     * No args constructor for use in serialization
-     * 
-     */
-    public Target() {
-    }
-
-    /**
-     * 
-     * @param target
-     */
-    public Target(String target) {
-        super();
-        this.target = target;
-    }
-
-    @JsonProperty("target")
-    public String getTarget() {
-        return target;
-    }
-
-    @JsonProperty("target")
-    public void setTarget(String target) {
-        this.target = target;
-    }
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("target", target).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(additionalProperties).append(target).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof Target) == false) {
-            return false;
-        }
-        Target rhs = ((Target) other);
-        return new EqualsBuilder().append(additionalProperties, rhs.additionalProperties).append(target, rhs.target).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Ul.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Ul.java
deleted file mode 100755
index 8f2090e..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/configure/Ul.java
+++ /dev/null
@@ -1,130 +0,0 @@
-
-package org.onosproject.fpcagent.dto.configure;
-
-import java.util.HashMap;
-import java.util.Map;
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-    "tunnel-local-address",
-    "tunnel-remote-address",
-    "mobility-tunnel-parameters",
-    "dpn-parameters"
-})
-public class Ul {
-
-    @JsonProperty("tunnel-local-address")
-    private String tunnel_local_address;
-    @JsonProperty("tunnel-remote-address")
-    private String tunnel_remote_address;
-    @JsonProperty("mobility-tunnel-parameters")
-    private Mobility_tunnel_parameters mobility_tunnel_parameters;
-    @JsonProperty("dpn-parameters")
-    private Dpn_parameters dpn_parameters;
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    /**
-     * No args constructor for use in serialization
-     * 
-     */
-    public Ul() {
-    }
-
-    /**
-     * 
-     * @param tunnel_remote_address
-     * @param dpn_parameters
-     * @param tunnel_local_address
-     * @param mobility_tunnel_parameters
-     */
-    public Ul(String tunnel_local_address, String tunnel_remote_address, Mobility_tunnel_parameters mobility_tunnel_parameters, Dpn_parameters dpn_parameters) {
-        super();
-        this.tunnel_local_address = tunnel_local_address;
-        this.tunnel_remote_address = tunnel_remote_address;
-        this.mobility_tunnel_parameters = mobility_tunnel_parameters;
-        this.dpn_parameters = dpn_parameters;
-    }
-
-    @JsonProperty("tunnel-local-address")
-    public String getTunnel_local_address() {
-        return tunnel_local_address;
-    }
-
-    @JsonProperty("tunnel-local-address")
-    public void setTunnel_local_address(String tunnel_local_address) {
-        this.tunnel_local_address = tunnel_local_address;
-    }
-
-    @JsonProperty("tunnel-remote-address")
-    public String getTunnel_remote_address() {
-        return tunnel_remote_address;
-    }
-
-    @JsonProperty("tunnel-remote-address")
-    public void setTunnel_remote_address(String tunnel_remote_address) {
-        this.tunnel_remote_address = tunnel_remote_address;
-    }
-
-    @JsonProperty("mobility-tunnel-parameters")
-    public Mobility_tunnel_parameters getMobility_tunnel_parameters() {
-        return mobility_tunnel_parameters;
-    }
-
-    @JsonProperty("mobility-tunnel-parameters")
-    public void setMobility_tunnel_parameters(Mobility_tunnel_parameters mobility_tunnel_parameters) {
-        this.mobility_tunnel_parameters = mobility_tunnel_parameters;
-    }
-
-    @JsonProperty("dpn-parameters")
-    public Dpn_parameters getDpn_parameters() {
-        return dpn_parameters;
-    }
-
-    @JsonProperty("dpn-parameters")
-    public void setDpn_parameters(Dpn_parameters dpn_parameters) {
-        this.dpn_parameters = dpn_parameters;
-    }
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("tunnel_local_address", tunnel_local_address).append("tunnel_remote_address", tunnel_remote_address).append("mobility_tunnel_parameters", mobility_tunnel_parameters).append("dpn_parameters", dpn_parameters).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(tunnel_remote_address).append(dpn_parameters).append(additionalProperties).append(tunnel_local_address).append(mobility_tunnel_parameters).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof Ul) == false) {
-            return false;
-        }
-        Ul rhs = ((Ul) other);
-        return new EqualsBuilder().append(tunnel_remote_address, rhs.tunnel_remote_address).append(dpn_parameters, rhs.dpn_parameters).append(additionalProperties, rhs.additionalProperties).append(tunnel_local_address, rhs.tunnel_local_address).append(mobility_tunnel_parameters, rhs.mobility_tunnel_parameters).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/dpn/AddDpn.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/dpn/AddDpn.java
deleted file mode 100755
index 3c166ad..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/dpn/AddDpn.java
+++ /dev/null
@@ -1,82 +0,0 @@
-
-package org.onosproject.fpcagent.dto.dpn;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-    "dpns"
-})
-public class AddDpn {
-
-    @JsonProperty("dpns")
-    private List<Dpn> dpns = null;
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    /**
-     * No args constructor for use in serialization
-     * 
-     */
-    public AddDpn() {
-    }
-
-    /**
-     * 
-     * @param dpns
-     */
-    public AddDpn(List<Dpn> dpns) {
-        super();
-        this.dpns = dpns;
-    }
-
-    @JsonProperty("dpns")
-    public List<Dpn> getDpns() {
-        return dpns;
-    }
-
-    @JsonProperty("dpns")
-    public void setDpns(List<Dpn> dpns) {
-        this.dpns = dpns;
-    }
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("dpns", dpns).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(dpns).append(additionalProperties).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof AddDpn) == false) {
-            return false;
-        }
-        AddDpn rhs = ((AddDpn) other);
-        return new EqualsBuilder().append(dpns, rhs.dpns).append(additionalProperties, rhs.additionalProperties).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/dpn/Dpn.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/dpn/Dpn.java
deleted file mode 100755
index f71df67..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/dto/dpn/Dpn.java
+++ /dev/null
@@ -1,142 +0,0 @@
-
-package org.onosproject.fpcagent.dto.dpn;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-    "dpn-id",
-    "dpn-name",
-    "dpn-groups",
-    "node-id",
-    "network-id"
-})
-public class Dpn {
-
-    @JsonProperty("dpn-id")
-    private String dpn_id;
-    @JsonProperty("dpn-name")
-    private String dpn_name;
-    @JsonProperty("dpn-groups")
-    private List<String> dpn_groups = null;
-    @JsonProperty("node-id")
-    private String node_id;
-    @JsonProperty("network-id")
-    private String network_id;
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
-
-    /**
-     * No args constructor for use in serialization
-     * 
-     */
-    public Dpn() {
-    }
-
-    /**
-     * 
-     * @param dpn_name
-     * @param network_id
-     * @param dpn_groups
-     * @param dpn_id
-     * @param node_id
-     */
-    public Dpn(String dpn_id, String dpn_name, List<String> dpn_groups, String node_id, String network_id) {
-        super();
-        this.dpn_id = dpn_id;
-        this.dpn_name = dpn_name;
-        this.dpn_groups = dpn_groups;
-        this.node_id = node_id;
-        this.network_id = network_id;
-    }
-
-    @JsonProperty("dpn-id")
-    public String getDpn_id() {
-        return dpn_id;
-    }
-
-    @JsonProperty("dpn-id")
-    public void setDpn_id(String dpn_id) {
-        this.dpn_id = dpn_id;
-    }
-
-    @JsonProperty("dpn-name")
-    public String getDpn_name() {
-        return dpn_name;
-    }
-
-    @JsonProperty("dpn-name")
-    public void setDpn_name(String dpn_name) {
-        this.dpn_name = dpn_name;
-    }
-
-    @JsonProperty("dpn-groups")
-    public List<String> getDpn_groups() {
-        return dpn_groups;
-    }
-
-    @JsonProperty("dpn-groups")
-    public void setDpn_groups(List<String> dpn_groups) {
-        this.dpn_groups = dpn_groups;
-    }
-
-    @JsonProperty("node-id")
-    public String getNode_id() {
-        return node_id;
-    }
-
-    @JsonProperty("node-id")
-    public void setNode_id(String node_id) {
-        this.node_id = node_id;
-    }
-
-    @JsonProperty("network-id")
-    public String getNetwork_id() {
-        return network_id;
-    }
-
-    @JsonProperty("network-id")
-    public void setNetwork_id(String network_id) {
-        this.network_id = network_id;
-    }
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("dpn_id", dpn_id).append("dpn_name", dpn_name).append("dpn_groups", dpn_groups).append("node_id", node_id).append("network_id", network_id).append("additionalProperties", additionalProperties).toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(dpn_name).append(network_id).append(dpn_groups).append(additionalProperties).append(dpn_id).append(node_id).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if ((other instanceof Dpn) == false) {
-            return false;
-        }
-        Dpn rhs = ((Dpn) other);
-        return new EqualsBuilder().append(dpn_name, rhs.dpn_name).append(network_id, rhs.network_id).append(dpn_groups, rhs.dpn_groups).append(additionalProperties, rhs.additionalProperties).append(dpn_id, rhs.dpn_id).append(node_id, rhs.node_id).isEquals();
-    }
-
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/helpers/DpnApi.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/helpers/DpnApi.java
index f50a985..4ea7b39 100644
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/helpers/DpnApi.java
+++ b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/helpers/DpnApi.java
@@ -84,6 +84,7 @@
             BigInteger opIdentifier,
             Long sessionId
     ) {
+        // TODO: check if subscriber is open.
         ByteBuffer bb = ByteBuffer.allocate(41)
                 .put(toUint8(dpn))
                 .put(CREATE_SESSION_TYPE)
@@ -425,6 +426,7 @@
      * @return - ZMQ Topic
      */
     public static Short getTopicFromNode(String Key) {
+        if (Key == null) return 1;
         Short aShort = topicToNodeMap.get(Key);
         return aShort != null ? aShort : (short) 1;
     }
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/rest/AppWebApplication.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/rest/AppWebApplication.java
deleted file mode 100644
index d4e68fc..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/rest/AppWebApplication.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.onosproject.fpcagent.rest;
-
-import org.onlab.rest.AbstractWebApplication;
-
-import java.util.Set;
-
-/**
- * Sample REST API web application.
- */
-public class AppWebApplication extends AbstractWebApplication {
-    @Override
-    public Set<Class<?>> getClasses() {
-        return getClasses(AppWebResource.class);
-    }
-}
diff --git a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/rest/AppWebResource.java b/apps/fpcagent/src/main/java/org/onosproject/fpcagent/rest/AppWebResource.java
deleted file mode 100644
index 12de2ed..0000000
--- a/apps/fpcagent/src/main/java/org/onosproject/fpcagent/rest/AppWebResource.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package org.onosproject.fpcagent.rest;
-
-import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.commons.lang.exception.ExceptionUtils;
-import org.onosproject.core.ApplicationId;
-import org.onosproject.core.CoreService;
-import org.onosproject.fpcagent.FpcService;
-import org.onosproject.fpcagent.dto.configure.Configure;
-import org.onosproject.fpcagent.dto.dpn.AddDpn;
-import org.onosproject.rest.AbstractWebResource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import java.io.IOException;
-import java.io.InputStream;
-
-@Path("/")
-public class AppWebResource extends AbstractWebResource {
-    private static final Logger log = LoggerFactory.getLogger(AppWebResource.class);
-
-    protected CoreService coreService = get(CoreService.class);
-    private FpcService fpcService;
-
-    public AppWebResource() {
-        ApplicationId appId = coreService.getAppId("org.onosproject.fpcagent");
-        fpcService = get(FpcService.class);
-    }
-
-    @POST
-    @Path("configure")
-    @Consumes(MediaType.APPLICATION_JSON)
-    public Response configure(InputStream stream) {
-        try {
-            ObjectNode node = (ObjectNode) mapper().readTree(stream);
-            Configure configure = mapper().readValue(node.toString(), Configure.class);
-            fpcService.configure(configure);
-        } catch (IOException e) {
-            log.error(ExceptionUtils.getFullStackTrace(e));
-        }
-        return Response.ok().build();
-    }
-
-    @POST
-    @Path("dpns/add_dpn")
-    @Consumes(MediaType.APPLICATION_JSON)
-    public Response addDpn(InputStream stream) {
-        try {
-            ObjectNode node = (ObjectNode) mapper().readTree(stream);
-            AddDpn dpns = mapper().readValue(node.toString(), AddDpn.class);
-            fpcService.addDpn(dpns);
-        } catch (IOException e) {
-            log.error(ExceptionUtils.getFullStackTrace(e));
-        }
-        return Response.ok().build();
-    }
-
-    @DELETE
-    @Path("dpns/{dpn}")
-    public Response deleteDpn(@PathParam("dpn") String dpn) {
-        if (dpn != null) {
-            fpcService.deleteDpn(dpn);
-            return Response.ok().build();
-        }
-        return Response.ok().build();
-    }
-
-    @POST
-    @Path("register_client")
-    @Consumes(MediaType.APPLICATION_JSON)
-    public Response registerClient(InputStream stream) {
-
-        return Response.ok().build();
-    }
-}
diff --git a/apps/fpcagent/src/main/webapp/WEB-INF/web.xml b/apps/fpcagent/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 92d9960..0000000
--- a/apps/fpcagent/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ 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.
-  -->
-<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>FPC Agent REST API</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 Service</servlet-name>
-        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
-        <init-param>
-            <param-name>javax.ws.rs.Application</param-name>
-            <param-value>org.onosproject.fpcagent.rest.AppWebApplication</param-value>
-        </init-param>
-        <load-on-startup>1</load-on-startup>
-    </servlet>
-
-    <servlet-mapping>
-        <servlet-name>JAX-RS Service</servlet-name>
-        <url-pattern>/*</url-pattern>
-    </servlet-mapping>
-</web-app>
\ No newline at end of file
diff --git a/models/fpcagent/BUCK b/models/fpcagent/BUCK
index 2615870..70f780a 100644
--- a/models/fpcagent/BUCK
+++ b/models/fpcagent/BUCK
@@ -1,4 +1,5 @@
 COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
     '//models/common:onos-models-common',
 ]
 
@@ -9,6 +10,7 @@
 yang_model(
     app_name = 'org.onosproject.models.fpcagent',
     title = 'FPC Agent YANG Models',
+    custom_registrator = True,
     deps = COMPILE_DEPS,
     required_apps = APPS,
 )
diff --git a/models/fpcagent/pom.xml b/models/fpcagent/pom.xml
new file mode 100644
index 0000000..a82844e
--- /dev/null
+++ b/models/fpcagent/pom.xml
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2017-present Open Networking Foundation
+  ~
+  ~ 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-models</artifactId>
+        <version>1.13.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>onos-models-fpcagent</artifactId>
+    <packaging>bundle</packaging>
+
+    <properties>
+        <onos.app.name>org.onosproject.models.fpcagent</onos.app.name>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-yang-model</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-models-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.onosproject</groupId>
+            <artifactId>onos-apps-yang</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions combine.children="append">
+                        <Include-Resource>yang/resources/YangMetaData.ser=target/classes/yang/resources/YangMetaData.ser</Include-Resource>
+                    </instructions>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.onosproject</groupId>
+                <artifactId>onos-yang-compiler-maven-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>org.onosproject</groupId>
+                <artifactId>onos-maven-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>3.0.0</version>
+                <executions>
+                  <execution>
+                    <id>add-source</id>
+                    <phase>generate-sources</phase>
+                    <goals>
+                      <goal>add-source</goal>
+                    </goals>
+                    <configuration>
+                      <sources>
+                        <source>${project.build.directory}/generated-sources</source>
+                      </sources>
+                    </configuration>
+                  </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-clean-plugin</artifactId>
+                <version>3.0.0</version>
+                <executions>
+                    <execution>
+                        <id>onos-yang-plugin-workaround</id>
+                        <!-- yang plugin cannot handle non-clean compilation -->
+                        <phase>initialize</phase>
+                        <goals>
+                            <goal>clean</goal>
+                        </goals>
+                        <configuration>
+                            <excludeDefaultDirectories>true</excludeDefaultDirectories>
+                            <filesets>
+                                <fileset>
+                                    <directory>target/generated-sources</directory>
+                                </fileset>
+                            </filesets>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+
+        </plugins>
+
+        <pluginManagement>
+            <plugins>
+                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+                <plugin>
+                    <groupId>org.eclipse.m2e</groupId>
+                    <artifactId>lifecycle-mapping</artifactId>
+                    <version>1.0.0</version>
+                    <configuration>
+                        <lifecycleMappingMetadata>
+                            <pluginExecutions>
+                                <pluginExecution>
+                                    <pluginExecutionFilter>
+                                        <groupId>
+                                            org.apache.maven.plugins
+                                        </groupId>
+                                        <artifactId>
+                                            maven-clean-plugin
+                                        </artifactId>
+                                        <versionRange>
+                                            [3.0.0,)
+                                        </versionRange>
+                                        <goals>
+                                            <goal>clean</goal>
+                                        </goals>
+                                    </pluginExecutionFilter>
+                                    <action>
+                                        <ignore></ignore>
+                                    </action>
+                                </pluginExecution>
+                            </pluginExecutions>
+                        </lifecycleMappingMetadata>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+
+</project>
diff --git a/models/fpcagent/src/main/java/org.onosproject.models.fpcagent/FpcAgentModelRegistrator.java b/models/fpcagent/src/main/java/org.onosproject.models.fpcagent/FpcAgentModelRegistrator.java
new file mode 100644
index 0000000..64ea413
--- /dev/null
+++ b/models/fpcagent/src/main/java/org.onosproject.models.fpcagent/FpcAgentModelRegistrator.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.models.fpcagent;
+
+import com.google.common.collect.ImmutableMap;
+import org.apache.felix.scr.annotations.Component;
+import org.onosproject.yang.AbstractYangModelRegistrator;
+import org.onosproject.yang.gen.v1.fpc.rev20150105.FpcService;
+import org.onosproject.yang.gen.v1.fpcconfig.rev20160927.FpcConfig;
+import org.onosproject.yang.gen.v1.ietfdmmfpcagent.rev20160803.IetfDmmFpcagent;
+import org.onosproject.yang.gen.v1.ietfdmmfpcbase.rev20160803.IetfDmmFpcbase;
+import org.onosproject.yang.gen.v1.ietfdmmfpcpmip.rev20160119.IetfDmmFpcPmip;
+import org.onosproject.yang.gen.v1.ietfdmmfpcpolicyext.rev20160803.IetfDmmFpcPolicyext;
+import org.onosproject.yang.gen.v1.ietfdmmthreegpp.rev20160803.IetfDmmThreegpp;
+import org.onosproject.yang.gen.v1.ietfpmipqos.rev20160210.IetfPmipQos;
+import org.onosproject.yang.gen.v1.ietftrafficselectortypes.rev20160114.IetfTrafficSelectorTypes;
+import org.onosproject.yang.model.DefaultYangModuleId;
+import org.onosproject.yang.model.YangModuleId;
+import org.onosproject.yang.runtime.AppModuleInfo;
+import org.onosproject.yang.runtime.DefaultAppModuleInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Component(immediate = true)
+public class FpcAgentModelRegistrator extends AbstractYangModelRegistrator {
+    static final Logger log = LoggerFactory.getLogger(FpcAgentModelRegistrator.class);
+
+    public FpcAgentModelRegistrator() {
+        super(FpcAgentModelRegistrator.class, getAppInfo());
+    }
+
+    private static Map<YangModuleId, AppModuleInfo> getAppInfo() {
+        Map<YangModuleId, AppModuleInfo> appInfo = new HashMap<>();
+        appInfo.put(new DefaultYangModuleId("ietf-dmm-fpcagent", "2016-08-03"),
+                new DefaultAppModuleInfo(IetfDmmFpcagent.class, null));
+        appInfo.put(new DefaultYangModuleId("ietf-dmm-fpcbase", "2016-08-03"),
+                new DefaultAppModuleInfo(IetfDmmFpcbase.class, null));
+        appInfo.put(new DefaultYangModuleId("fpc", "2015-01-05"),
+                new DefaultAppModuleInfo(FpcService.class, null));
+        appInfo.put(new DefaultYangModuleId("fpc-config", "2016-09-27"),
+                new DefaultAppModuleInfo(FpcConfig.class, null));
+        appInfo.put(new DefaultYangModuleId("ietf-dmm-fpc-pmip", "2016-01-19"),
+                new DefaultAppModuleInfo(IetfDmmFpcPmip.class, null));
+        appInfo.put(new DefaultYangModuleId("ietf-dmm-fpc-policyext", "2016-08-03"),
+                new DefaultAppModuleInfo(IetfDmmFpcPolicyext.class, null));
+        appInfo.put(new DefaultYangModuleId("ietf-dmm-threegpp", "2016-08-03"),
+                new DefaultAppModuleInfo(IetfDmmThreegpp.class, null));
+        appInfo.put(new DefaultYangModuleId("ietf-pmip-qos", "2016-02-10"),
+                new DefaultAppModuleInfo(IetfPmipQos.class, null));
+        appInfo.put(new DefaultYangModuleId("ietf-traffic-selector-types", "2016-01-14"),
+                new DefaultAppModuleInfo(IetfTrafficSelectorTypes.class, null));
+
+        return ImmutableMap.copyOf(appInfo);
+    }
+}
diff --git a/models/fpcagent/src/main/java/org.onosproject.models.fpcagent/package-info.java b/models/fpcagent/src/main/java/org.onosproject.models.fpcagent/package-info.java
new file mode 100644
index 0000000..3a46d78
--- /dev/null
+++ b/models/fpcagent/src/main/java/org.onosproject.models.fpcagent/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * 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.
+ */
+
+/**
+ * FPC Agent YANG models.
+ */
+package org.onosproject.models.fpcagent;
\ No newline at end of file
diff --git a/models/fpcagent/src/main/yang/ietf-dmm-fpcagent.yang b/models/fpcagent/src/main/yang/ietf-dmm-fpcagent.yang
index 1b1ddd6..1e5a7fc 100644
--- a/models/fpcagent/src/main/yang/ietf-dmm-fpcagent.yang
+++ b/models/fpcagent/src/main/yang/ietf-dmm-fpcagent.yang
@@ -415,8 +415,7 @@
 
     grouping result-body-dpn {
       leaf result {
-        type result;
-      }
+        type result;      }
       choice result-type {
         case err {
           leaf error-type-id {
diff --git a/modules.defs b/modules.defs
new file mode 100644
index 0000000..ad0e561
--- /dev/null
+++ b/modules.defs
@@ -0,0 +1,275 @@
+UTILS = [
+    '//utils/osgi:onlab-osgi',
+    '//utils/junit:onlab-junit',
+    '//utils/misc:onlab-misc',
+    '//utils/rest:onlab-rest',
+    '//tools/build/conf:onos-build-conf',
+]
+
+API = [
+    '//core/api:onos-api',
+    '//incubator/api:onos-incubator-api',
+]
+
+CORE = UTILS + API + [
+    '//core/net:onos-core-net',
+    '//core/common:onos-core-common',
+    '//core/store/primitives:onos-core-primitives',
+    '//core/store/serializers:onos-core-serializers',
+    '//core/store/dist:onos-core-dist',
+    '//core/security:onos-security',
+    '//core/store/persistence:onos-core-persistence',
+
+    '//incubator/net:onos-incubator-net',
+    '//incubator/store:onos-incubator-store',
+    '//incubator/rpc:onos-incubator-rpc',
+
+    '//cli:onos-cli',
+
+    '//protocols/rest/api:onos-protocols-rest-api',
+    '//protocols/rest/ctl:onos-protocols-rest-ctl',
+    '//protocols/bgp/bgpio:onos-protocols-bgp-bgpio',
+    '//protocols/bgp/api:onos-protocols-bgp-api',
+    '//protocols/bgp/ctl:onos-protocols-bgp-ctl',
+    '//protocols/netconf/api:onos-protocols-netconf-api',
+    '//protocols/netconf/ctl:onos-protocols-netconf-ctl',
+    '//protocols/openflow/api:onos-protocols-openflow-api',
+    '//protocols/openflow/ctl:onos-protocols-openflow-ctl',
+    '//protocols/ospf/api:onos-protocols-ospf-api',
+    '//protocols/ospf/protocol:onos-protocols-ospf-protocol',
+    '//protocols/ospf/ctl:onos-protocols-ospf-ctl',
+    '//protocols/ovsdb/rfc:onos-protocols-ovsdb-rfc',
+    '//protocols/ovsdb/api:onos-protocols-ovsdb-api',
+    '//protocols/ovsdb/ctl:onos-protocols-ovsdb-ctl',
+    '//protocols/pcep/pcepio:onos-protocols-pcep-pcepio',
+    '//protocols/pcep/server/api:onos-protocols-pcep-server-api',
+    '//protocols/pcep/server/ctl:onos-protocols-pcep-server-ctl',
+    '//protocols/snmp/api:onos-protocols-snmp-api',
+    '//protocols/snmp/ctl:onos-protocols-snmp-ctl',
+    '//protocols/isis/api:onos-protocols-isis-api',
+    '//protocols/isis/ctl:onos-protocols-isis-ctl',
+    '//protocols/isis/isisio:onos-protocols-isis-isisio',
+    '//protocols/lisp/api:onos-protocols-lisp-api',
+    '//protocols/lisp/ctl:onos-protocols-lisp-ctl',
+    '//protocols/lisp/msg:onos-protocols-lisp-msg',
+    '//protocols/tl1/api:onos-protocols-tl1-api',
+    '//protocols/tl1/ctl:onos-protocols-tl1-ctl',
+    '//protocols/restconf/client/api:onos-protocols-restconf-client-api',
+    '//protocols/restconf/client/ctl:onos-protocols-restconf-client-ctl',
+
+    '//drivers/utilities:onos-drivers-utilities',
+
+    '//providers/netconf/device:onos-providers-netconf-device',
+    '//providers/openflow/device:onos-providers-openflow-device',
+    '//providers/openflow/packet:onos-providers-openflow-packet',
+    '//providers/openflow/flow:onos-providers-openflow-flow',
+    '//providers/openflow/group:onos-providers-openflow-group',
+    '//providers/openflow/meter:onos-providers-openflow-meter',
+    '//providers/ovsdb/device:onos-providers-ovsdb-device',
+    '//providers/ovsdb/tunnel:onos-providers-ovsdb-tunnel',
+    '//providers/rest/device:onos-providers-rest-device',
+    '//providers/snmp/device:onos-providers-snmp-device',
+    '//providers/isis/cfg:onos-providers-isis-cfg',
+    '//providers/isis/topology:onos-providers-isis-topology',
+    '//providers/lisp/device:onos-providers-lisp-device',
+    '//providers/tl1/device:onos-providers-tl1-device',
+    '//providers/general/device:onos-providers-general-device',
+    '//providers/p4runtime/packet:onos-providers-p4runtime-packet',
+
+    '//web/api:onos-rest',
+    '//web/gui:onos-gui',
+
+    '//incubator/protobuf/models:onos-incubator-protobuf-models',
+    '//incubator/protobuf/services/nb:onos-incubator-protobuf-services-nb',
+]
+
+ONOS_DRIVERS = [
+    # Drivers
+    '//drivers/default:onos-drivers-default-oar',
+    '//drivers/arista:onos-drivers-arista-oar',
+    # TODO ONOS-5554 excluding from the build
+    #'//drivers/bti:onos-drivers-bti-oar',
+    '//drivers/ciena:onos-drivers-ciena-oar',
+    '//drivers/cisco/netconf:onos-drivers-cisco-netconf-oar',
+    '//drivers/cisco/rest:onos-drivers-cisco-rest-oar',
+    '//drivers/corsa:onos-drivers-corsa-oar',
+    '//drivers/fujitsu:onos-drivers-fujitsu-oar',
+    '//drivers/lumentum:onos-drivers-lumentum-oar',
+    '//drivers/netconf:onos-drivers-netconf-oar',
+    '//drivers/optical:onos-drivers-optical-oar',
+    '//drivers/ovsdb:onos-drivers-ovsdb-oar',
+    '//drivers/juniper:onos-drivers-juniper-oar',
+    '//drivers/lisp:onos-drivers-lisp-oar',
+    '//drivers/flowspec:onos-drivers-flowspec-oar',
+    '//drivers/huawei:onos-drivers-huawei-oar',
+    '//drivers/microsemi:onos-drivers-microsemi-oar',
+    '//drivers/oplink:onos-drivers-oplink-oar',
+    '//drivers/bmv2:onos-drivers-bmv2-oar',
+    '//drivers/barefoot:onos-drivers-barefoot-oar',
+    '//drivers/hp:onos-drivers-hp-oar',
+    '//drivers/p4runtime:onos-drivers-p4runtime-oar',
+    '//drivers/polatis/netconf:onos-drivers-polatis-netconf-oar',
+]
+
+ONOS_PROVIDERS = [
+    # Providers
+    '//providers/bgp:onos-providers-bgp-oar',
+    '//providers/bgpcep:onos-providers-bgpcep-oar',
+    '//providers/host:onos-providers-host-oar',
+    '//providers/lldp:onos-providers-lldp-oar',
+    '//providers/netcfghost:onos-providers-netcfghost-oar',
+    '//providers/netcfglinks:onos-providers-netcfglinks-oar',
+    '//providers/netconf:onos-providers-netconf-oar',
+    '//providers/openflow/message:onos-providers-openflow-message-oar',
+    '//providers/ovsdb:onos-providers-ovsdb-oar',
+    '//providers/ovsdb/host:onos-providers-ovsdb-host-oar',
+    '//providers/ovsdb/base:onos-providers-ovsdb-base-oar',
+    '//providers/pcep:onos-providers-pcep-oar',
+    '//providers/null:onos-providers-null-oar',
+    '//providers/openflow/base:onos-providers-openflow-base-oar',
+    '//providers/openflow/app:onos-providers-openflow-app-oar',
+    '//providers/rest:onos-providers-rest-oar',
+    '//providers/isis:onos-providers-isis-oar',
+    '//providers/snmp:onos-providers-snmp-oar',
+    '//providers/link:onos-providers-link-oar',
+    '//providers/lisp:onos-providers-lisp-oar',
+    '//providers/tl1:onos-providers-tl1-oar',
+    '//providers/general:onos-providers-general-oar',
+    '//providers/p4runtime:onos-providers-p4runtime-oar',
+#    '//providers/ietfte:onos-providers-ietfte-oar',
+]
+
+ONOS_APPS = [
+    # Apps
+    '//apps/dhcp:onos-apps-dhcp-oar',
+    '//apps/dhcprelay:onos-apps-dhcprelay-oar',
+    '//apps/fwd:onos-apps-fwd-oar',
+    '//apps/packet-stats:onos-apps-packet-stats-oar',
+    '//apps/acl:onos-apps-acl-oar',
+    '//apps/bgprouter:onos-apps-bgprouter-oar',
+    '//apps/cip:onos-apps-cip-oar',
+    '//apps/drivermatrix:onos-apps-drivermatrix-oar',
+    '//apps/events:onos-apps-events-oar',
+    '//apps/proxyarp:onos-apps-proxyarp-oar',
+    '//apps/segmentrouting:onos-apps-segmentrouting-oar',
+    '//apps/gangliametrics:onos-apps-gangliametrics-oar',
+    '//apps/graphitemetrics:onos-apps-graphitemetrics-oar',
+    '//apps/flowanalyzer:onos-apps-flowanalyzer-oar',
+    '//apps/intentsync:onos-apps-intentsync-oar',
+    '//apps/influxdbmetrics:onos-apps-influxdbmetrics-oar',
+    '//apps/metrics:onos-apps-metrics-oar',
+    '//apps/mfwd:onos-apps-mfwd-oar',
+    '//apps/mlb:onos-apps-mlb-oar',
+    '//apps/openstacknetworking:onos-apps-openstacknetworking-oar',
+    '//apps/mobility:onos-apps-mobility-oar',
+    '//apps/newoptical:onos-apps-newoptical-oar',
+    '//apps/optical-model:onos-apps-optical-model-oar',
+    '//apps/optical-rest:onos-apps-optical-rest-oar',
+    '//apps/pathpainter:onos-apps-pathpainter-oar',
+    '//apps/pcep-api:onos-apps-pcep-api-oar',
+    '//apps/pim:onos-apps-pim-oar',
+    '//apps/linkprops:onos-apps-linkprops-oar',
+    '//apps/reactive-routing:onos-apps-reactive-routing-oar',
+    '//apps/roadm:onos-apps-roadm-oar',
+    '//apps/sdnip:onos-apps-sdnip-oar',
+    '//apps/test/demo:onos-apps-test-demo-oar',
+    '//apps/test/distributed-primitives:onos-apps-test-distributed-primitives-oar',
+    '//apps/test/election:onos-apps-test-election-oar',
+    '//apps/test/flow-perf:onos-apps-test-flow-perf-oar',
+    '//apps/test/intent-perf:onos-apps-test-intent-perf-oar',
+    '//apps/test/loadtest:onos-apps-test-loadtest-oar',
+    '//apps/test/netcfg-monitor:onos-apps-test-netcfg-monitor-oar',
+    '//apps/test/messaging-perf:onos-apps-test-messaging-perf-oar',
+    '//apps/test/primitive-perf:onos-apps-test-primitive-perf-oar',
+    '//apps/test/transaction-perf:onos-apps-test-transaction-perf-oar',
+    '//apps/virtualbng:onos-apps-virtualbng-oar',
+    '//apps/vpls:onos-apps-vpls-oar',
+    '//apps/vrouter:onos-apps-vrouter-oar',
+    '//apps/routing/fibinstaller:onos-apps-routing-fibinstaller-oar',
+    '//apps/routing/cpr:onos-apps-routing-cpr-oar',
+    '//apps/routing/fpm:onos-apps-routing-fpm-oar',
+    '//apps/vtn:onos-apps-vtn-oar',
+    '//apps/faultmanagement:onos-apps-faultmanagement-oar',
+    '//apps/openstacknode:onos-apps-openstacknode-oar',
+    '//apps/cpman/app:onos-apps-cpman-app-oar',
+    '//apps/scalablegateway:onos-apps-scalablegateway-oar',
+    '//apps/castor:onos-apps-castor-oar',
+#    '//apps/yms:onos-apps-yms-oar',
+    '//apps/ofagent:onos-apps-ofagent-oar',
+    '//apps/mappingmanagement:onos-apps-mappingmanagement-oar',
+    '//apps/config:onos-apps-config-oar',
+    '//apps/configsync:onos-apps-configsync-oar',
+    '//apps/configsync-netconf:onos-apps-configsync-netconf-oar',
+    '//apps/netconf/client:onos-apps-netconf-client-oar',
+    '//apps/tetopology:onos-apps-tetopology-oar',
+    '//apps/tetunnel:onos-apps-tetunnel-oar',
+#    '//apps/tenbi/yangmodel:onos-apps-tenbi-yangmodel-feature',
+#    '//apps/tenbi:onos-apps-tenbi-oar',
+    '//protocols/restconf/server:onos-protocols-restconf-server-oar',
+    '//apps/restconf:onos-apps-restconf-oar',
+    '//apps/flowspec-api:onos-apps-flowspec-api-oar',
+    '//apps/yang:onos-apps-yang-oar',
+    '//apps/yang-gui:onos-apps-yang-gui-oar',
+    '//apps/cord-support:onos-apps-cord-support-oar',
+    '//apps/network-troubleshoot:onos-apps-network-troubleshoot-oar',
+    '//apps/l3vpn:onos-apps-l3vpn-oar',
+    '//apps/openroadm:onos-apps-openroadm-oar',
+    '//apps/artemis:onos-apps-artemis-oar',
+    '//apps/pi-demo/ecmp:onos-apps-pi-demo-ecmp-oar',
+    '//apps/gluon:onos-apps-gluon-oar',
+    '//apps/evpnopenflow:onos-apps-evpnopenflow-oar',
+    '//apps/route-service:onos-apps-route-service-oar',
+    '//apps/evpn-route-service:onos-apps-evpn-route-service-oar',
+    '//incubator/protobuf/registry:onos-incubator-protobuf-registry-oar',
+    '//incubator/protobuf/services/nb:onos-incubator-protobuf-services-nb-oar',
+    '//apps/openstacknetworkingui:onos-apps-openstacknetworkingui-oar',
+    '//apps/p4-tutorial/pipeconf:onos-apps-p4-tutorial-pipeconf-oar',
+    '//apps/p4-tutorial/icmpdropper:onos-apps-p4-tutorial-icmpdropper-oar',
+    '//apps/cfm:onos-apps-cfm-oar',
+    '//apps/routeradvertisement:onos-apps-routeradvertisement-oar',
+    '//apps/powermanagement:onos-apps-powermanagement-oar',
+    '//apps/t3:onos-apps-t3-oar',
+    '//apps/fpcagent:onos-apps-fpcagent-oar',
+]
+
+PROTOCOL_APPS = [
+    '//protocols/grpc:onos-protocols-grpc-oar',
+    '//protocols/p4runtime:onos-protocols-p4runtime-oar',
+]
+
+MODELS = [
+    '//models/common:onos-models-common-oar',
+    '//models/huawei:onos-models-huawei-oar',
+    '//models/openconfig:onos-models-openconfig-oar',
+    '//models/openroadm:onos-models-openroadm-oar',
+    '//models/tapi:onos-models-tapi-oar',
+    '//models/l3vpn:onos-models-l3vpn-oar',
+    '//models/microsemi:onos-models-microsemi-oar',
+    '//models/polatis:onos-models-polatis-oar',
+    '//models/fpcagent:onos-models-fpcagent-oar',
+]
+
+PIPELINES = [
+    '//pipelines/basic:onos-pipelines-basic-oar',
+    '//pipelines/fabric:onos-pipelines-fabric-oar',
+]
+
+APP_JARS = [
+    '//apps/cpman/api:onos-apps-cpman-api',
+    '//apps/routing-api:onos-apps-routing-api',
+    '//apps/dhcp/api:onos-apps-dhcp-api',
+    '//apps/dhcp/app:onos-apps-dhcp-app',
+    '//apps/dhcprelay:onos-apps-dhcprelay',
+    '//apps/fwd:onos-apps-fwd',
+    '//apps/iptopology-api:onos-apps-iptopology-api',
+    '//apps/routing/common:onos-apps-routing-common',
+    '//apps/vtn/vtnrsc:onos-apps-vtn-vtnrsc',
+    '//apps/vtn/sfcmgr:onos-apps-vtn-sfcmgr',
+    '//apps/vtn/vtnmgr:onos-apps-vtn-vtnmgr',
+    '//apps/vtn/vtnweb:onos-apps-vtn-vtnweb',
+#   '//apps/p4runtime-test:onos-apps-p4runtime-test',
+]
+
+APPS = ONOS_DRIVERS + ONOS_PROVIDERS + ONOS_APPS + MODELS + PIPELINES \
+        + PROTOCOL_APPS
+
diff --git a/scripts/addDPN.sh b/scripts/addDPN.sh
new file mode 100644
index 0000000..00f0609
--- /dev/null
+++ b/scripts/addDPN.sh
@@ -0,0 +1,13 @@
+curl -i --header "Content-type: application/json" --request POST -u onos:rocks --data '{
+    "dpns": [
+        {
+            "dpn-id": "dpn1",
+            "dpn-name": "site1-anchor1",
+            "dpn-groups": [
+                "foo"
+            ],
+        "node-id": "node1",
+        "network-id": "network1"
+        }
+    ]
+}' http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant=default/fpc-topology
\ No newline at end of file
diff --git a/scripts/createRPC.sh b/scripts/createRPC.sh
new file mode 100644
index 0000000..dc2fb9e
--- /dev/null
+++ b/scripts/createRPC.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+curl -X POST --header 'Content-Type: application/json' -u onos:rocks --header 'Accept: application/json' -d '{
+    "input": {
+        "admin-state": "enabled",
+        "client-id": "1",
+        "contexts": [
+            {
+                "context-id": 202374885,
+                "delegating-ip-prefixes": [
+                    "192.168.1.5/32"
+                ],
+                "dl": {
+                    "dpn-parameters": {},
+                    "mobility-tunnel-parameters": {
+                        "tunnel-identifier": "2222",
+                        "tunnel-type": "gtpv1"
+                    },
+                    "tunnel-local-address": "192.168.1.1",
+                    "tunnel-remote-address": "10.1.1.1"
+                },
+                "dpn-group": "foo",
+                "dpns": [
+                    {
+                        "direction": "uplink",
+                        "dpn-id": "1",
+                        "dpn-parameters": {}
+                    }
+                ],
+                "ebi": "5",
+                "imsi": "9135551234",
+                "instructions": {
+                    "instr-3gpp-mob": "session uplink"
+                },
+                "lbi": "5",
+                "ul": {
+                    "dpn-parameters": {},
+                    "mobility-tunnel-parameters": {
+                        "tunnel-identifier": "1111",
+                        "tunnel-type": "gtpv1"
+                    },
+                    "tunnel-local-address": "192.168.1.1",
+                    "tunnel-remote-address": "10.1.1.1"
+                }
+            }
+        ],
+        "op-id": "1",
+        "op-ref-scope": "op",
+        "op-type": "create",
+        "session-state": "complete"
+    }
+}' 'http://localhost:8181/onos/restconf/operations/ietf-dmm-fpcagent:configure'
diff --git a/scripts/deleteDPN.sh b/scripts/deleteDPN.sh
new file mode 100644
index 0000000..570da07
--- /dev/null
+++ b/scripts/deleteDPN.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+curl -X DELETE -u onos:rocks 'http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants/tenant=default/fpc-topology/dpns=dpn1'
\ No newline at end of file
diff --git a/scripts/deleteRPC.sh b/scripts/deleteRPC.sh
new file mode 100644
index 0000000..d2f49ce
--- /dev/null
+++ b/scripts/deleteRPC.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+curl -X POST --header 'Content-Type: application/json' -u onos:rocks --header 'Accept: application/json' -d '{
+    "input": {
+        "op-id": "3",
+        "targets": [
+            {
+                "target": "/ietf-dmm-fpcagent:tenants/tenant/default/fpc-mobility/contexts/202374885"
+            }
+        ],
+        "client-id": "1",
+        "session-state": "complete",
+        "admin-state": "enabled",
+        "op-type": "delete",
+        "op-ref-scope": "none"
+    }
+}' 'http://localhost:8181/onos/restconf/operations/ietf-dmm-fpcagent:configure'
diff --git a/scripts/getTenants.sh b/scripts/getTenants.sh
new file mode 100644
index 0000000..bf4b6e1
--- /dev/null
+++ b/scripts/getTenants.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+curl -u onos:rocks http://localhost:8181/onos/restconf/data/ietf-dmm-fpcagent:tenants
\ No newline at end of file
