diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/config/TerminalDeviceConfig.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/config/TerminalDeviceConfig.java
new file mode 100644
index 0000000..5cc5301
--- /dev/null
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/config/TerminalDeviceConfig.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2018-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.odtn.config;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.config.BaseConfig;
+import org.onosproject.odtn.utils.tapi.TapiNepRef;
+
+import static org.onosproject.odtn.behaviour.OdtnDeviceDescriptionDiscovery.OdtnPortType.CLIENT;
+import static org.onosproject.odtn.behaviour.OdtnDeviceDescriptionDiscovery.OdtnPortType.LINE;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class TerminalDeviceConfig extends BaseConfig<ConnectPoint> {
+
+    protected final Logger log = LoggerFactory.getLogger(getClass());
+
+    /**
+     * {@value #CONFIG_KEY} : a netcfg ConfigKey for {@link TerminalDeviceConfig}.
+     */
+    public static final String CONFIG_KEY = "odtn-terminal-device";
+
+    private static final String CLIENT_PORT = "client";
+    private static final String ENABLE = "enable";
+
+    /**
+     * Create a TerminalDeviceConfig for ODTN.
+     */
+    public TerminalDeviceConfig() {
+        super();
+    }
+
+    /**
+     * Create a TerminalDeviceConfig for ODTN.
+     *
+     * @param cp ConnectPoint
+     */
+    public TerminalDeviceConfig(ConnectPoint cp) {
+        ObjectMapper mapper = new ObjectMapper();
+        init(cp, CONFIG_KEY, mapper.createObjectNode(), mapper, null);
+    }
+
+    @Override
+    public boolean isValid() {
+        return isConnectPoint(CLIENT_PORT, FieldPresence.MANDATORY) &&
+                isBoolean(ENABLE, FieldPresence.MANDATORY);
+    }
+
+    public ConnectPoint clientCp() {
+        String cp = get(CLIENT_PORT, "");
+        return ConnectPoint.deviceConnectPoint(cp);
+    }
+
+    public TerminalDeviceConfig clientCp(ConnectPoint cp) {
+        String val = String.format("%s/%d", cp.deviceId(), cp.port().toLong());
+        setOrClear(CLIENT_PORT, val);
+        return this;
+    }
+
+    public Boolean isEnabled() {
+        return get(ENABLE, false);
+    }
+
+    public TerminalDeviceConfig enable() {
+        setOrClear(ENABLE, true);
+        return this;
+    }
+
+    public TerminalDeviceConfig disable() {
+        setOrClear(ENABLE, false);
+        return this;
+    }
+
+    /**
+     * Factory method in order to emit NetCfg event from onos inner call.
+     *
+     * @param line   side NodeEdgePoint of connection
+     * @param client side NodeEdgePoint of connection
+     * @return Config object for NetCfg
+     */
+    public static TerminalDeviceConfig create(TapiNepRef line, TapiNepRef client) {
+
+        if (line.getPortType() != LINE) {
+            throw new IllegalArgumentException("Argument line must be a LINE type.");
+        }
+        if (client.getPortType() != CLIENT) {
+            throw new IllegalArgumentException("Argument client must be a CLIENT type.");
+        }
+
+        TerminalDeviceConfig self = new TerminalDeviceConfig(line.getConnectPoint());
+        self.clientCp(client.getConnectPoint());
+        self.enable();
+        return self;
+    }
+}
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/config/package-info.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/config/package-info.java
new file mode 100644
index 0000000..8db93f9
--- /dev/null
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/config/package-info.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2018-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 to place ODTN NetCfg Config classes.
+ */
+package org.onosproject.odtn.config;
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/DcsBasedTapiNepRef.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/DcsBasedTapiNepRef.java
deleted file mode 100644
index e5fcf2d..0000000
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/DcsBasedTapiNepRef.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2018-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.odtn.utils.tapi;
-
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.node.OwnedNodeEdgePoint;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topology.Node;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.Topology;
-
-/**
- * TAPI Nep reference class which has a factory method using DCS modelObject.
- */
-public final class DcsBasedTapiNepRef extends TapiNepRef {
-
-    private DcsBasedTapiNepRef(Topology topology, Node node, OwnedNodeEdgePoint nep) {
-        super(topology.uuid().toString(), node.uuid().toString(), nep.uuid().toString());
-    }
-
-    public static DcsBasedTapiNepRef create(Topology topology, Node node, OwnedNodeEdgePoint nep) {
-        return new DcsBasedTapiNepRef(topology, node, nep);
-    }
-
-}
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/DcsBasedTapiNodeRef.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/DcsBasedTapiNodeRef.java
deleted file mode 100644
index b6260a7..0000000
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/DcsBasedTapiNodeRef.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2018-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.odtn.utils.tapi;
-
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topology.Node;
-import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.Topology;
-
-/**
- * TAPI Node reference class which has a factory method using DCS modelObject.
- */
-public final class DcsBasedTapiNodeRef extends TapiNodeRef {
-
-    private DcsBasedTapiNodeRef(Topology topology, Node node) {
-        super(topology.uuid().toString(), node.uuid().toString());
-    }
-
-    public static DcsBasedTapiNodeRef create(Topology topology, Node node) {
-        return new DcsBasedTapiNodeRef(topology, node);
-    }
-}
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/DcsBasedTapiObjectRefFactory.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/DcsBasedTapiObjectRefFactory.java
new file mode 100644
index 0000000..e1d1889
--- /dev/null
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/DcsBasedTapiObjectRefFactory.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2018-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.odtn.utils.tapi;
+
+import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connection.ConnectionEndPoint;
+import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.node.OwnedNodeEdgePoint;
+import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topology.Node;
+import org.onosproject.yang.gen.v1.tapitopology.rev20180307.tapitopology.topologycontext.Topology;
+
+/**
+ * Util class to create TapiXXXRef class instances using classes auto-generated by onos-yang-tool compiler.
+ */
+public final class DcsBasedTapiObjectRefFactory {
+
+    private DcsBasedTapiObjectRefFactory() {
+    }
+
+    /**
+     * Factory method to create {@link TapiNodeRef}.
+     *
+     * @param topology ModelObject context/topology
+     * @param node     ModelObject context/topology/node
+     * @return node reference instance
+     */
+    public static TapiNodeRef create(Topology topology, Node node) {
+        return TapiNodeRef.create(topology.uuid().toString(), node.uuid().toString());
+    }
+
+    /**
+     * Factory method to create {@link TapiNepRef}.
+     *
+     * @param topology ModelObject context/topology
+     * @param node     ModelObject context/topology/node
+     * @param nep      ModelObject context/topology/node/ownedNodeEdgePoint
+     * @return nep reference instance
+     */
+    public static TapiNepRef create(Topology topology, Node node, OwnedNodeEdgePoint nep) {
+        return TapiNepRef.create(topology.uuid().toString(), node.uuid().toString(), nep.uuid().toString());
+    }
+
+    /**
+     * Factory method to create {@link TapiCepRef}.
+     *
+     * @param cep ModelObject context/connection/connectionEndPoint
+     * @return cep reference instance
+     */
+    public static TapiCepRef create(ConnectionEndPoint cep) {
+        return TapiCepRef.create(cep.topologyId().toString(), cep.nodeId().toString(),
+                cep.ownedNodeEdgePointId().toString(), cep.connectionEndPointId().toString());
+    }
+
+}
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiConnectionHandler.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiConnectionHandler.java
index b3d6f3e..6e3b729 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiConnectionHandler.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiConnectionHandler.java
@@ -100,6 +100,10 @@
         return this;
     }
 
+    public List<ConnectionEndPoint> getCeps() {
+        return obj.connectionEndPoint();
+    }
+
     public List<TapiConnectionHandler> getLowerConnections() {
 
         try {
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNepRef.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNepRef.java
index af4d299..95b3e05 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNepRef.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNepRef.java
@@ -42,7 +42,7 @@
  * TAPI reference class should be used in ODTN ServiceApplication
  * in order to make independent ServiceApplication implementation from DCS.
  */
-public class TapiNepRef {
+public final class TapiNepRef {
 
     protected final Logger log = getLogger(getClass());
 
diff --git a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNodeRef.java b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNodeRef.java
index 8db2005..71cd256 100644
--- a/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNodeRef.java
+++ b/apps/odtn/api/src/main/java/org/onosproject/odtn/utils/tapi/TapiNodeRef.java
@@ -34,7 +34,7 @@
  * TAPI reference class should be used in ODTN ServiceApplication
  * in order to make independent ServiceApplication implementation from DCS.
  */
-public class TapiNodeRef {
+public final class TapiNodeRef {
 
     protected final Logger log = getLogger(getClass());
 
@@ -42,7 +42,7 @@
     private final UUID nodeId;
     private DeviceId deviceId;
 
-    TapiNodeRef(String topologyId, String nodeId) {
+    private TapiNodeRef(String topologyId, String nodeId) {
         this.topologyId = UUID.fromString(topologyId);
         this.nodeId = UUID.fromString(nodeId);
     }
