diff --git a/sdnr/wt/devicemanager-onf14/feature/pom.xml b/sdnr/wt/devicemanager-onf14/feature/pom.xml
index c826fe9..0a75a6e 100644
--- a/sdnr/wt/devicemanager-onf14/feature/pom.xml
+++ b/sdnr/wt/devicemanager-onf14/feature/pom.xml
@@ -29,7 +29,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>2.1.0</version>
+        <version>2.1.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
diff --git a/sdnr/wt/devicemanager-onf14/installer/pom.xml b/sdnr/wt/devicemanager-onf14/installer/pom.xml
index a199f8d..ad906ab 100755
--- a/sdnr/wt/devicemanager-onf14/installer/pom.xml
+++ b/sdnr/wt/devicemanager-onf14/installer/pom.xml
@@ -29,7 +29,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>2.1.0</version>
+        <version>2.1.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
diff --git a/sdnr/wt/devicemanager-onf14/model/pom.xml b/sdnr/wt/devicemanager-onf14/model/pom.xml
index 4a9cba8..7a0593d 100644
--- a/sdnr/wt/devicemanager-onf14/model/pom.xml
+++ b/sdnr/wt/devicemanager-onf14/model/pom.xml
@@ -29,7 +29,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>2.1.0</version>
+        <version>2.1.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
diff --git a/sdnr/wt/devicemanager-onf14/pom.xml b/sdnr/wt/devicemanager-onf14/pom.xml
index 7b2801a..7dbffe3 100755
--- a/sdnr/wt/devicemanager-onf14/pom.xml
+++ b/sdnr/wt/devicemanager-onf14/pom.xml
@@ -29,7 +29,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>2.1.0</version>
+        <version>2.1.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
diff --git a/sdnr/wt/devicemanager-onf14/provider/pom.xml b/sdnr/wt/devicemanager-onf14/provider/pom.xml
index 749011b..c79dccf 100644
--- a/sdnr/wt/devicemanager-onf14/provider/pom.xml
+++ b/sdnr/wt/devicemanager-onf14/provider/pom.xml
@@ -29,7 +29,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>2.1.0</version>
+        <version>2.1.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
@@ -47,7 +47,6 @@
     </licenses>
 
     <properties>
-        <checkstyle.skip>true</checkstyle.skip> <!-- POM configuration -->
         <maven.javadoc.skip>true</maven.javadoc.skip>
         <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
         <buildtime>${maven.build.timestamp} UTC</buildtime>
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/DeviceManagerOnf14Impl.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/DeviceManagerOnf14Impl.java
index df34ce5..5c57054 100644
--- a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/DeviceManagerOnf14Impl.java
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/DeviceManagerOnf14Impl.java
@@ -51,7 +51,7 @@
 
         LOG.info("Session Initiated start {}", APPLICATION_NAME);
 
-        resOnf = netconfNetworkElementService.registerNetworkElementFactory(new Onf14NetworkElementFactory());
+        resOnf = netconfNetworkElementService.registerBindingNetworkElementFactory(new Onf14NetworkElementFactory());
 
 
         netconfNetworkElementService.writeToEventLog(APPLICATION_NAME, "startup", "done");
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14AirInterface.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14AirInterface.java
deleted file mode 100644
index ca00ae8..0000000
--- a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14AirInterface.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl;
-
-import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPE;
-import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPECRITICAL;
-import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPEMAJOR;
-import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPEMINOR;
-import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPENONALARMED;
-import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPEWARNING;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author alexs
- *
- */
-public class Onf14AirInterface {
-
-    private static final Logger log = LoggerFactory.getLogger(Onf14AirInterface.class);
-
-    public static org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType mapSeverity(
-            Class<? extends SEVERITYTYPE> severity) {
-
-        if (severity != null) {
-            if (severity.getTypeName() == SEVERITYTYPECRITICAL.class.getName()) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.Critical;
-            } else if (severity.getTypeName() == SEVERITYTYPEMAJOR.class.getName()) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.Major;
-            } else if (severity.getTypeName() == SEVERITYTYPEMINOR.class.getName()) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.Minor;
-            } else if (severity.getTypeName() == SEVERITYTYPEWARNING.class.getName()) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.Warning;
-            } else if (severity.getTypeName() == SEVERITYTYPENONALARMED.class.getName()) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.NonAlarmed;
-            }
-        }
-
-        return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.NonAlarmed;
-    }
-
-
-}
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14DomNetworkElement.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14DomNetworkElement.java
new file mode 100644
index 0000000..0a63b74
--- /dev/null
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14DomNetworkElement.java
@@ -0,0 +1,209 @@
+/*
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * 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.
+ * ============LICENSE_END==========================================================================
+ */
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl;
+
+import java.util.Optional;
+import org.eclipse.jdt.annotation.NonNull;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElement;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElementService;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider.Onf14ToInternalDataModel;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.equipment.Onf14DomEquipmentManager;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14DomInterfacePacManager;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.NotificationService;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfDomAccessor;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ControlConstruct;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.Equipment;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.NetworkElementConnectionBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.NetworkElementDeviceType;
+import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
+import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Representation of ONF Core model 1.4 device Top level element is "ControlConstruct" (replaces "NetworkElement" of
+ * older ONF Version)
+ * NOTE: This class is still under development due to unmet dependencies (especially the ones related to DOM notifications) in ODL. Once the dependencies are complete, this class will replace the ONF14NetworkElement   
+ */
+public class Onf14DomNetworkElement implements NetworkElement {
+
+    private static final Logger log = LoggerFactory.getLogger(Onf14DomNetworkElement.class);
+
+    //    protected static final InstanceIdentifier<ControlConstruct> CONTROLCONSTRUCT_IID =
+    //            InstanceIdentifier.builder(ControlConstruct.class).build();
+    protected static final YangInstanceIdentifier CONTROLCONSTRUCT_IID =
+            YangInstanceIdentifier.builder().node(ControlConstruct.QNAME).build();
+
+    private final NetconfDomAccessor netconfDomAccessor;
+    private final DataProvider databaseService;
+    private final @NonNull FaultService faultService;
+    private final @NonNull NotificationService notificationService;
+
+    private final Onf14ToInternalDataModel onf14Mapper;
+
+    private final @NonNull Onf14DomEquipmentManager equipmentManager;
+    private final @NonNull Onf14DomInterfacePacManager interfacePacManager;
+
+
+    public Onf14DomNetworkElement(NetconfDomAccessor netconfDomAccessor, DeviceManagerServiceProvider serviceProvider) {
+        log.info("Create {}", Onf14DomNetworkElement.class.getSimpleName());
+        this.netconfDomAccessor = netconfDomAccessor;
+        this.databaseService = serviceProvider.getDataProvider();
+        this.notificationService = serviceProvider.getNotificationService();
+        this.faultService = serviceProvider.getFaultService();
+        this.onf14Mapper = new Onf14ToInternalDataModel();
+        this.equipmentManager = new Onf14DomEquipmentManager(netconfDomAccessor, databaseService, onf14Mapper);
+        this.interfacePacManager = new Onf14DomInterfacePacManager(netconfDomAccessor, serviceProvider);
+    }
+
+    /**
+     * reading the inventory (CoreModel 1.4 Equipment Model) and adding it to the DB
+     */
+    public void initialReadFromNetworkElement() {
+
+        //Read complete device tree
+        Optional<ControlConstruct> oControlConstruct = readControlConstruct(netconfDomAccessor);
+
+        if (oControlConstruct.isPresent()) {
+            ControlConstruct controlConstruct = oControlConstruct.get();
+
+            equipmentManager.setEquipmentData(controlConstruct);
+
+            //-- Start For test purpose
+            for (UniversalId uuid : equipmentManager.getEquipmentUuidList()) {
+                log.info("Read data with id {}", uuid);
+                Optional<Equipment> res1 = equipmentManager.readEquipmentInstance(netconfDomAccessor, uuid);
+                log.info("Res1: {}", res1.isPresent() ? res1.get() : "No data1");
+
+                Optional<ControlConstruct> res2 = equipmentManager.readEquipmentList(netconfDomAccessor, uuid);
+                log.info("Res2: {}", res2.isPresent() ? res2.get() : "No data2");
+
+                equipmentManager.readTopLevelEquipment(netconfDomAccessor);
+                //Do it only once for test purpose
+                break;
+            }
+            //-- End For test purpose
+
+            // storing all the LTP UUIDs internally, for later usage, for air-interface and ethernet-container
+            interfacePacManager.readKeys(controlConstruct);
+
+            // Read all fault data
+            FaultData resultList = new FaultData();
+
+            int problems = faultService.removeAllCurrentProblemsOfNode(netconfDomAccessor.getNodeId());
+            log.debug("Removed all {} problems from database at registration", problems);
+
+            interfacePacManager.readAllAirInterfaceCurrentProblems(netconfDomAccessor, controlConstruct, resultList);
+            problems = resultList.size();
+            log.debug("NETCONF read air interface current problems completed. Got back {} problems.", problems);
+            /*
+            readAllEhernetContainerCurrentProblems(resultList);
+            problems = resultList.size() - problems;
+            log.debug("NETCONF read current problems completed. Got back {} problems.", resultList.size());
+
+            readAllWireInterfaceCurrentProblems(resultList);
+            problems = resultList.size();
+            log.debug("NETCONF read wire interface current problems completed. Got back {} problems.", problems);
+            */
+            faultService.initCurrentProblemStatus(netconfDomAccessor.getNodeId(), resultList);
+            log.debug("DB write current problems completed");
+        }
+    }
+
+    /**
+     * @param nNode set core-model-capability
+     */
+    public void setCoreModel(@NonNull NetconfNode nNode) {
+        NetworkElementConnectionBuilder eb = new NetworkElementConnectionBuilder();
+        String namespaceRevision;
+        QName QNAME_COREMODEL14 = QName.create("urn:onf:yang:core-model-1-4", "2019-11-27", "core-model-1-4").intern();
+
+        Capabilities availableCapabilities = Capabilities.getAvailableCapabilities(nNode);
+        namespaceRevision = availableCapabilities.getRevisionForNamespace(QNAME_COREMODEL14);
+
+        if (Capabilities.isNamespaceSupported(namespaceRevision)) {
+            eb.setCoreModelCapability(namespaceRevision);
+        } else {
+            eb.setCoreModelCapability("Unsupported");
+        }
+        databaseService.updateNetworkConnection22(eb.build(), netconfDomAccessor.getNodeId().getValue());
+    }
+
+    @Override
+    public void register() {
+        // Set core-model revision value in "core-model-capability" field
+        setCoreModel(netconfDomAccessor.getNetconfNode());
+        initialReadFromNetworkElement();
+
+        // Register netconf stream
+        //        airInterfaceNotificationListenerHandler =
+        //                netconfDomAccessor.doRegisterNotificationListener(airInterfaceNotificationListener);
+        //        etherneContainerNotificationListenerHandler =
+        //                netconfDomAccessor.doRegisterNotificationListener(ethernetContainerNotificationListener);
+        //        wireInterfaceNotificationListenerHandler =
+        //                netconfDomAccessor.doRegisterNotificationListener(wireInterfaceNotificationListener);
+        //        Optional<NetconfNotifications> notificationsSupport = netconfDomAccessor.getNotificationAccessor();
+        //        if (notificationsSupport.isPresent()) {
+        //            notificationsSupport.get().registerNotificationsStream(NetconfBindingAccessor.DefaultNotificationsStream);
+        //        }
+    }
+
+    @Override
+    public void deregister() {}
+
+
+    @Override
+    public NodeId getNodeId() {
+        return netconfDomAccessor.getNodeId();
+    }
+
+    @Override
+    public <L extends NetworkElementService> Optional<L> getService(Class<L> clazz) {
+        return Optional.empty();
+    }
+
+    @Override
+    public void warmstart() {}
+
+    @Override
+    public Optional<NetconfAccessor> getAcessor() {
+        return Optional.of(netconfDomAccessor);
+    }
+
+    @Override
+    public NetworkElementDeviceType getDeviceType() {
+        return NetworkElementDeviceType.Wireless;
+    }
+
+    private static Optional<ControlConstruct> readControlConstruct(NetconfDomAccessor netconfDomAccessor) {
+        return netconfDomAccessor.readData(LogicalDatastoreType.CONFIGURATION, CONTROLCONSTRUCT_IID, ControlConstruct.class);
+    }
+
+
+
+}
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14EthernetContainer.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14EthernetContainer.java
deleted file mode 100644
index 27d61be..0000000
--- a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14EthernetContainer.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl;
-
-import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPE;
-import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPECRITICAL;
-import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPEMAJOR;
-import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPEMINOR;
-import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPENONALARMED;
-import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPEWARNING;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author alexs
- *
- */
-public class Onf14EthernetContainer {
-
-    private static final Logger log = LoggerFactory.getLogger(Onf14EthernetContainer.class);
-
-    public static org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType mapSeverity(
-            Class<? extends SEVERITYTYPE> severity) {
-
-        if (severity != null) {
-            if (severity.getTypeName() == SEVERITYTYPECRITICAL.class.getName()) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.Critical;
-            } else if (severity.getTypeName() == SEVERITYTYPEMAJOR.class.getName()) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.Major;
-            } else if (severity.getTypeName() == SEVERITYTYPEMINOR.class.getName()) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.Minor;
-            } else if (severity.getTypeName() == SEVERITYTYPEWARNING.class.getName()) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.Warning;
-            } else if (severity.getTypeName() == SEVERITYTYPENONALARMED.class.getName()) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.NonAlarmed;
-            }
-        }
-
-        return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.NonAlarmed;
-    }
-
-
-}
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElement.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElement.java
index d2db231..a5599be 100644
--- a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElement.java
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElement.java
@@ -27,11 +27,20 @@
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElement;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElementService;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider.Onf14ToInternalDataModel;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14AirInterface;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14AirInterfaceNotificationListener;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14EthernetContainer;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14EthernetContainerNotificationListener;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14WireInterface;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14WireInterfaceNotificationListener;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData;
 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities;
 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfNotifications;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LAYERPROTOCOLNAMETYPEAIRLAYER;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.air._interface.lp.spec.AirInterfacePac;
@@ -76,7 +85,7 @@
 
     private static final int EQUIPMENTROOTLEVEL = 0;
 
-    private final NetconfAccessor netconfAccessor;
+    private final NetconfBindingAccessor netconfAccessor;
     private final DataProvider databaseService;
     private final Onf14ToInternalDataModel onf14Mapper;
     private final @NonNull FaultService faultService;
@@ -86,27 +95,30 @@
 
     // air interface related members
     private final List<TechnologySpecificPacKeys> airInterfaceList = new ArrayList<TechnologySpecificPacKeys>();
+    @SuppressWarnings("unused")
     private ListenerRegistration<NotificationListener> airInterfaceNotificationListenerHandler;
     private @NonNull final Onf14AirInterfaceNotificationListener airInterfaceNotificationListener;
 
     // ethernet container related members
     private final List<TechnologySpecificPacKeys> ethernetContainerList = new ArrayList<TechnologySpecificPacKeys>();
+    @SuppressWarnings("unused")
     private ListenerRegistration<NotificationListener> etherneContainerNotificationListenerHandler;
     private @NonNull final Onf14EthernetContainerNotificationListener ethernetContainerNotificationListener;
 
     // wire interface related members
     private final List<TechnologySpecificPacKeys> wireInterfaceList = new ArrayList<TechnologySpecificPacKeys>();
+    @SuppressWarnings("unused")
     private ListenerRegistration<NotificationListener> wireInterfaceNotificationListenerHandler;
     private @NonNull final Onf14WireInterfaceNotificationListener wireInterfaceNotificationListener;
 
-    Onf14NetworkElement(NetconfAccessor netconfAccess, DeviceManagerServiceProvider serviceProvider) {
+    Onf14NetworkElement(NetconfBindingAccessor netconfAccess, DeviceManagerServiceProvider serviceProvider) {
         log.info("Create {}", Onf14NetworkElement.class.getSimpleName());
         this.netconfAccessor = netconfAccess;
         this.databaseService = serviceProvider.getDataProvider();
         this.faultService = serviceProvider.getFaultService();
         this.onf14Mapper = new Onf14ToInternalDataModel();
         this.airInterfaceNotificationListenerHandler = null;
-        airInterfaceNotificationListener = new Onf14AirInterfaceNotificationListener(netconfAccess, serviceProvider);
+        this.airInterfaceNotificationListener = new Onf14AirInterfaceNotificationListener(netconfAccess, serviceProvider);
         this.etherneContainerNotificationListenerHandler = null;
         ethernetContainerNotificationListener =
                 new Onf14EthernetContainerNotificationListener(netconfAccess, serviceProvider);
@@ -211,7 +223,10 @@
                 netconfAccessor.doRegisterNotificationListener(ethernetContainerNotificationListener);
         wireInterfaceNotificationListenerHandler =
                 netconfAccessor.doRegisterNotificationListener(wireInterfaceNotificationListener);
-        netconfAccessor.registerNotificationsStream(NetconfAccessor.DefaultNotificationsStream);
+        Optional<NetconfNotifications> notificationsSupport = netconfAccessor.getNotificationAccessor();
+        if (notificationsSupport.isPresent()) {
+            notificationsSupport.get().registerNotificationsStream(NetconfBindingAccessor.DefaultNotificationsStream);
+        }
     }
 
     @Override
@@ -459,12 +474,12 @@
         }
     }
 
-    private Optional<ControlConstruct> readControlConstruct(NetconfAccessor netconfAccessor) {
+    private Optional<ControlConstruct> readControlConstruct(NetconfBindingAccessor netconfAccessor) {
         return Optional.ofNullable(netconfAccessor.getTransactionUtils().readData(netconfAccessor.getDataBroker(),
                 LogicalDatastoreType.CONFIGURATION, CONTROLCONSTRUCT_IID));
     }
 
-    private @Nullable Equipment readEquipmentInstance(NetconfAccessor accessData, UniversalId equipmentUuid) {
+    private @Nullable Equipment readEquipmentInstance(NetconfBindingAccessor accessData, UniversalId equipmentUuid) {
 
         final Class<?> clazzPac = Equipment.class;
 
@@ -497,10 +512,12 @@
             return localId;
         }
 
+        @SuppressWarnings("unused")
         public void setLtpUuid(UniversalId uuid) {
             this.ltpUuid = uuid;
         }
 
+        @SuppressWarnings("unused")
         public void setLocalId(String lId) {
             this.localId = lId;
         }
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElementFactory.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElementFactory.java
index 5505cec..5141002 100644
--- a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElementFactory.java
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElementFactory.java
@@ -23,21 +23,25 @@
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElement;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ControlConstruct;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class Onf14NetworkElementFactory implements NetworkElementFactory {
 
-    private static final Logger log = LoggerFactory.getLogger(Onf14NetworkElementFactory.class);
+	private static final Logger log = LoggerFactory.getLogger(Onf14NetworkElementFactory.class);
 
-    @Override
-    public Optional<NetworkElement> create(NetconfAccessor acessor, DeviceManagerServiceProvider serviceProvider) {
-        if (acessor.getCapabilites().isSupportingNamespace(ControlConstruct.QNAME)) {
-            log.info("Create device {} ", Onf14NetworkElement.class.getName());
-            return Optional.of(new Onf14NetworkElement(acessor, serviceProvider));
-        } else {
-            return Optional.empty();
-        }
-    }
+	@Override
+	public Optional<NetworkElement> create(NetconfAccessor accessor, DeviceManagerServiceProvider serviceProvider) {
+		if (accessor.getCapabilites().isSupportingNamespace(ControlConstruct.QNAME)) {
+			log.info("Create device {} ", Onf14NetworkElement.class.getName());
+			Optional<NetconfBindingAccessor> bindingAccessor = accessor.getNetconfBindingAccessor();
+			if (bindingAccessor.isPresent()) {
+				return Optional.of(new Onf14NetworkElement(bindingAccessor.get(), serviceProvider));
+			}
+		}
+		return Optional.empty();
+
+	}
 }
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14WireInterface.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14WireInterface.java
deleted file mode 100644
index 4446c20..0000000
--- a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14WireInterface.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl;
-
-import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPE;
-import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPECRITICAL;
-import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEMAJOR;
-import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEMINOR;
-import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPENONALARMED;
-import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEWARNING;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author alexs
- *
- */
-public class Onf14WireInterface {
-
-    private static final Logger log = LoggerFactory.getLogger(Onf14WireInterface.class);
-
-    public static org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType mapSeverity(
-            Class<? extends SEVERITYTYPE> severity) {
-
-        if (severity != null) {
-            if (severity.getTypeName() == SEVERITYTYPECRITICAL.class.getName()) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.Critical;
-            } else if (severity.getTypeName() == SEVERITYTYPEMAJOR.class.getName()) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.Major;
-            } else if (severity.getTypeName() == SEVERITYTYPEMINOR.class.getName()) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.Minor;
-            } else if (severity.getTypeName() == SEVERITYTYPEWARNING.class.getName()) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.Warning;
-            } else if (severity.getTypeName() == SEVERITYTYPENONALARMED.class.getName()) {
-                return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.NonAlarmed;
-            }
-        }
-
-        return org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType.NonAlarmed;
-    }
-
-
-}
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/dataprovider/InternalDataModelSeverity.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/dataprovider/InternalDataModelSeverity.java
new file mode 100644
index 0000000..97395f4
--- /dev/null
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/dataprovider/InternalDataModelSeverity.java
@@ -0,0 +1,55 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
+ * All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ *
+ */
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider;
+
+import java.util.Map;
+import org.eclipse.jdt.annotation.Nullable;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPECRITICAL;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEMAJOR;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEMINOR;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEWARNING;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType;
+import org.opendaylight.yangtools.yang.binding.BaseIdentity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class InternalDataModelSeverity {
+
+    @SuppressWarnings("unused")
+    private static final Logger LOG = LoggerFactory.getLogger(InternalDataModelSeverity.class);
+
+    private static final Map<String, SeverityType> SEVERITYMAP = Map.of(
+            SEVERITYTYPEMAJOR.class.getSimpleName(), SeverityType.Major,
+            SEVERITYTYPECRITICAL.class.getSimpleName(), SeverityType.Critical,
+            SEVERITYTYPEMINOR.class.getSimpleName(), SeverityType.Minor,
+            SEVERITYTYPEWARNING.class.getSimpleName(), SeverityType.Warning);
+
+    public static SeverityType mapSeverity(@Nullable Class<? extends BaseIdentity> severity) {
+        SeverityType res = null;
+        if (severity != null) {
+            String severityName = severity.getSimpleName();
+            res = severityName != null ? SEVERITYMAP.get(severity.getSimpleName()) : null;
+        }
+        return res == null ? SeverityType.NonAlarmed : res;
+    }
+
+}
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14ToInternalDataModel.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/dataprovider/Onf14ToInternalDataModel.java
similarity index 91%
rename from sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14ToInternalDataModel.java
rename to sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/dataprovider/Onf14ToInternalDataModel.java
index 52b159c..36eaf2f 100644
--- a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14ToInternalDataModel.java
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/dataprovider/Onf14ToInternalDataModel.java
@@ -15,7 +15,7 @@
  * the License.
  * ============LICENSE_END==========================================================================
  */
-package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl;
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -34,6 +34,7 @@
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Inventory;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.InventoryBuilder;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
+import org.opendaylight.yangtools.yang.common.Uint32;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -43,7 +44,7 @@
  */
 public class Onf14ToInternalDataModel {
 
-    private static final Logger log = LoggerFactory.getLogger(Onf14ToInternalDataModel.class);
+    private static final Logger LOG = LoggerFactory.getLogger(Onf14ToInternalDataModel.class);
 
     public Inventory getInternalEquipment(NodeId nodeId, Equipment currentEq, Equipment parentEq, long treeLevel) {
 
@@ -56,7 +57,7 @@
             // General
             inventoryBuilder.setNodeId(nodeId.getValue());
 
-            inventoryBuilder.setTreeLevel(treeLevel);
+            inventoryBuilder.setTreeLevel(Uint32.valueOf(treeLevel));
             inventoryBuilder.setUuid(currentEq.getUuid().getValue());
 
             if (parentEq != null) {
@@ -88,7 +89,7 @@
                     inventoryBuilder.setManufacturerName(manProp.getManufacturerName());
                     inventoryBuilder.setManufacturerIdentifier(manProp.getManufacturerIdentifier());
                 } else {
-                    log.debug("manufacturer-properties is not present in Equipment with uuid={}",
+                    LOG.debug("manufacturer-properties is not present in Equipment with uuid={}",
                             currentEq.getUuid().getValue());
                 }
 
@@ -99,7 +100,7 @@
                     inventoryBuilder.setSerial(eqInstance.getSerialNumber());
                     inventoryBuilder.setDate(eqInstance.getManufactureDate().getValue());
                 } else {
-                    log.debug("equipment-instance is not present in Equipment with uuid={}",
+                    LOG.debug("equipment-instance is not present in Equipment with uuid={}",
                             currentEq.getUuid().getValue());
                 }
 
@@ -113,15 +114,15 @@
                     inventoryBuilder.setModelIdentifier(eqType.getModelIdentifier());
                     inventoryBuilder.setTypeName(eqType.getTypeName());
                 } else {
-                    log.debug("equipment-type is not present in Equipment with uuid={}",
+                    LOG.debug("equipment-type is not present in Equipment with uuid={}",
                             currentEq.getUuid().getValue());
                 }
             } else {
-                log.debug("manufactured-thing is not present in Equipment with uuid={}",
+                LOG.debug("manufactured-thing is not present in Equipment with uuid={}",
                         currentEq.getUuid().getValue());
             }
         } else {
-            log.debug("actual-equipment is not present in Equipment with uuid={}", currentEq.getUuid().getValue());
+            LOG.debug("actual-equipment is not present in Equipment with uuid={}", currentEq.getUuid().getValue());
         }
 
         return inventoryBuilder.build();
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/equipment/Onf14DomEquipmentManager.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/equipment/Onf14DomEquipmentManager.java
new file mode 100644
index 0000000..72ffdf6
--- /dev/null
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/equipment/Onf14DomEquipmentManager.java
@@ -0,0 +1,231 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
+ * All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ *
+ */
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.equipment;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.onap.ccsdk.features.sdnr.wt.common.YangHelper;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider.Onf14ToInternalDataModel;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfDomAccessor;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ControlConstruct;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.Equipment;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.EquipmentKey;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.equipment.ContainedHolder;
+import org.opendaylight.yangtools.util.UnmodifiableCollection;
+import org.opendaylight.yangtools.yang.binding.CodeHelpers;
+import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.InstanceIdentifierBuilder;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
+import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Onf14DomEquipmentManager {
+
+
+    // constants
+    private static final Logger log = LoggerFactory.getLogger(Onf14DomEquipmentManager.class);
+    private static final int EQUIPMENTROOTLEVEL = 0;
+    // end of constants
+
+    // variables
+    private final NetconfDomAccessor netconfDomAccessor;
+    private final DataProvider databaseService;
+    private final Onf14ToInternalDataModel onf14Mapper;
+    // for storing the Equipment UUIDs that are inserted in the DB
+    private final List<UniversalId> equipmentUuidList = new ArrayList<>();
+    // end of variables
+
+    // constructors
+    public Onf14DomEquipmentManager(NetconfDomAccessor netconfDomAccessor, DataProvider databaseService,
+            Onf14ToInternalDataModel onf14Mapper) {
+        super();
+        this.netconfDomAccessor = Objects.requireNonNull(netconfDomAccessor);
+        this.databaseService = Objects.requireNonNull(databaseService);
+        this.onf14Mapper = Objects.requireNonNull(onf14Mapper);
+    }
+    // end of constructors
+
+    // getters and setters
+    public List<UniversalId> getEquipmentUuidList() {
+        return equipmentUuidList;
+    }
+    // end of getters and setters
+
+    // private methods
+    private void addEquipmentToDb(Equipment currentEq, Equipment parentEq, long treeLevel,
+            Map<EquipmentKey, Equipment> equipmentMap, EquipmentKey equipmentKey) {
+        if (currentEq == null) {
+            log.info("Ignore empty equipment with key {}", equipmentKey);
+            return;
+        }
+
+        // if the Equipment UUID is already in the list, it was already processed
+        // needed for solving possible circular dependencies
+        if (equipmentUuidList.contains(currentEq.getUuid())) {
+            log.debug("Not adding equipment with uuid {} because it was aleady added...",
+                    currentEq.getUuid().getValue());
+            return;
+        }
+
+        // we add this to our internal list, such that we avoid circular dependencies
+        equipmentUuidList.add(currentEq.getUuid());
+        log.debug("Adding equipment with uuid {} to the database...", currentEq.getUuid().getValue());
+
+        // we add our current equipment to the database
+        databaseService.writeInventory(
+                onf14Mapper.getInternalEquipment(netconfDomAccessor.getNodeId(), currentEq, parentEq, treeLevel));
+
+        // we iterate the kids of our current equipment and add them to the database recursively
+        // the actual reference is here: /core-model:control-construct/equipment/contained-holder/occupying-fru
+        for (ContainedHolder holder : YangHelper.getCollection(currentEq.nonnullContainedHolder())) {
+            @Nullable
+            UniversalId occupyingFru = holder.getOccupyingFru();
+            if (occupyingFru != null) {
+                equipmentKey = new EquipmentKey(occupyingFru);
+                addEquipmentToDb(equipmentMap.get(equipmentKey), currentEq, treeLevel + 1, equipmentMap, equipmentKey);
+            }
+        }
+    }
+    // end of private methods
+
+    // public methods
+    /**
+     * Set all equipment data from controlConstruct into database and into this manager.
+     *
+     * @param controlConstruct with complete device data
+     */
+    public void setEquipmentData(ControlConstruct controlConstruct) {
+        Objects.requireNonNull(controlConstruct);
+
+        // the top-level-equipment list contains the root objects of the Equipment Model
+        log.debug("Getting list of topLevelEquipment for mountpoint {}", netconfDomAccessor.getNodeId());
+        // adding all root Equipment objects to the DB
+        for (UniversalId uuid : CodeHelpers.nonnull(controlConstruct.getTopLevelEquipment())) {
+            log.debug("Got back topLevelEquipment with uuid {}", uuid.getValue());
+            EquipmentKey equipmentKey = new EquipmentKey(uuid);
+
+            // adding all root Equipment objects to the DB
+            Map<EquipmentKey, Equipment> equipmentMap = controlConstruct.nonnullEquipment();
+            // recursively adding the root equipment and all its children into the DB
+            addEquipmentToDb(equipmentMap.get(equipmentKey), null, EQUIPMENTROOTLEVEL, equipmentMap, equipmentKey);
+        }
+    }
+
+    /**
+     * Read one equipment from device
+     *
+     * @param accessData to access device
+     * @param equipmentUuid uuid of equipment to be read
+     * @return Optional Equipment
+     */
+    public Optional<Equipment> readEquipmentInstance(NetconfDomAccessor accessData, UniversalId equipmentUuid) {
+
+        final Class<?> clazzPac = Equipment.class;
+
+        log.info("DBRead Get equipment for class {} from mountpoint {} for uuid {}", clazzPac.getSimpleName(),
+                accessData.getNodeId().getValue(), equipmentUuid.getValue());
+
+        InstanceIdentifierBuilder equipmentIIDBuilder =
+                YangInstanceIdentifier.builder().node(ControlConstruct.QNAME).node(Equipment.QNAME).nodeWithKey(
+                        Equipment.QNAME, QName.create(Equipment.QNAME, "uuid").intern(), equipmentUuid.getValue());
+
+        return accessData.readData(LogicalDatastoreType.CONFIGURATION, equipmentIIDBuilder.build(), Equipment.class);
+    }
+
+    /**
+     * Read one equipment list from device
+     *
+     * @param accessData to access device
+     * @param equipmentUuid uuid of equipment to be read
+     * @return Optional Equipment
+     */
+    public Optional<ControlConstruct> readEquipmentList(NetconfDomAccessor accessData, UniversalId equipmentUuid) {
+
+        log.info("DBRead Get equipment-list for mountpoint {} for uuid {}", accessData.getNodeId().getValue(),
+                equipmentUuid.getValue());
+
+        YangInstanceIdentifier equipmentIIDBuilder = YangInstanceIdentifier.builder()
+        		.node(ControlConstruct.QNAME)
+        		.node(Equipment.QNAME)
+        		.node(NodeIdentifierWithPredicates.of(Equipment.QNAME))
+        		.build();
+
+        return accessData.readData(LogicalDatastoreType.CONFIGURATION, equipmentIIDBuilder,
+                ControlConstruct.class);
+    }
+
+    /**
+     * Read one equipment list from device
+     *
+     * @param accessData to access device
+     * @param equipmentUuid uuid of equipment to be read
+     * @return Optional Equipment
+     */
+    public void readTopLevelEquipment(NetconfDomAccessor accessData) {
+
+        log.info("DBRead Get top-level-equipment for mountpoint {}", accessData.getNodeId().getValue());
+
+        InstanceIdentifierBuilder equipmentIIDBuilder = YangInstanceIdentifier.builder().node(ControlConstruct.QNAME)
+                .node(QName.create(ControlConstruct.QNAME, "top-level-equipment"));
+
+        Optional<NormalizedNode<?, ?>> oData =
+                accessData.readDataNode(LogicalDatastoreType.CONFIGURATION, equipmentIIDBuilder.build());
+        NormalizedNode<?, ?> data = oData.get();
+        Object value = data.getValue();
+        log.info("DataNode: {} {}", data.getNodeType(), data.getIdentifier());
+        if (value != null) {
+            log.info("DataNode value: {} {}", value.getClass().getName(), value);
+            if (value instanceof UnmodifiableCollection) {
+                @SuppressWarnings("unchecked")
+                UnmodifiableCollection<LeafSetEntryNode<String>> topLevelEquipmentCollection = (UnmodifiableCollection<LeafSetEntryNode<String>>) value;
+                @NonNull
+                Iterator<LeafSetEntryNode<String>> it = topLevelEquipmentCollection.iterator();
+                while (it.hasNext()) {
+                    LeafSetEntryNode<String> topLevelEquipmentUuid = it.next();
+                    if (topLevelEquipmentUuid != null) {
+                        log.info("LeafSetEntryNode: {} {} {}", topLevelEquipmentUuid.getValue(), topLevelEquipmentUuid.getNodeType() ,topLevelEquipmentUuid.getValue().getClass().getName());
+                    }
+                }
+            }
+        }
+    }
+    // end of public methods
+
+    // static methods
+    // end of static methods
+
+    // private classes
+    // end of private classes
+}
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterface.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterface.java
new file mode 100644
index 0000000..2d0d3c5
--- /dev/null
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterface.java
@@ -0,0 +1,39 @@
+/*
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * 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.
+ * ============LICENSE_END==========================================================================
+ */
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces;
+
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider.InternalDataModelSeverity;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPE;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author alexs
+ *
+ */
+public class Onf14AirInterface {
+
+    @SuppressWarnings("unused")
+    private static final Logger LOG = LoggerFactory.getLogger(Onf14AirInterface.class);
+
+    public static SeverityType mapSeverity(
+            Class<? extends SEVERITYTYPE> severity) {
+        return InternalDataModelSeverity.mapSeverity(severity);
+    }
+}
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14AirInterfaceNotificationListener.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterfaceNotificationListener.java
similarity index 99%
rename from sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14AirInterfaceNotificationListener.java
rename to sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterfaceNotificationListener.java
index dc37949..c729767 100644
--- a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14AirInterfaceNotificationListener.java
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterfaceNotificationListener.java
@@ -19,7 +19,7 @@
  * ============LICENSE_END=========================================================
  *
  */
-package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl;
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces;
 
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14DomInterfacePacManager.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14DomInterfacePacManager.java
new file mode 100644
index 0000000..f4e697a
--- /dev/null
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14DomInterfacePacManager.java
@@ -0,0 +1,356 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
+ * All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ *
+ */
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.onap.ccsdk.features.sdnr.wt.common.YangHelper;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.equipment.Onf14DomEquipmentManager;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.util.Debug;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfDomAccessor;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LAYERPROTOCOLNAMETYPEAIRLAYER;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LayerProtocol1;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.air._interface.lp.spec.AirInterfacePac;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.air._interface.pac.AirInterfaceCurrentProblems;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ControlConstruct;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.LAYERPROTOCOLNAMETYPE;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.LogicalTerminationPoint;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.LogicalTerminationPointKey;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.logical.termination.point.LayerProtocol;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.logical.termination.point.LayerProtocolKey;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.LAYERPROTOCOLNAMETYPEETHERNETCONTAINERLAYER;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.LAYERPROTOCOLNAMETYPEWIRELAYER;
+import org.opendaylight.yangtools.concepts.ListenerRegistration;
+import org.opendaylight.yangtools.yang.binding.NotificationListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Onf14DomInterfacePacManager {
+
+    // constants
+    private static final Logger log = LoggerFactory.getLogger(Onf14DomEquipmentManager.class);
+    // end of constants
+
+    // variables
+    private final NetconfDomAccessor netconfDomAccessor;
+    private final @NonNull DeviceManagerServiceProvider serviceProvider;
+
+    // air interface related members
+    private final List<TechnologySpecificPacKeys> airInterfaceList = new ArrayList<TechnologySpecificPacKeys>();
+    @SuppressWarnings("unused")
+    private ListenerRegistration<NotificationListener> airInterfaceNotificationListenerHandler;
+    private @NonNull final Onf14AirInterfaceNotificationListener airInterfaceNotificationListener;
+
+    // ethernet container related members
+    private final List<TechnologySpecificPacKeys> ethernetContainerList = new ArrayList<TechnologySpecificPacKeys>();
+    @SuppressWarnings("unused")
+    private ListenerRegistration<NotificationListener> etherneContainerNotificationListenerHandler;
+    private @NonNull final Onf14EthernetContainerNotificationListener ethernetContainerNotificationListener;
+
+    // wire interface related members
+    private final List<TechnologySpecificPacKeys> wireInterfaceList = new ArrayList<TechnologySpecificPacKeys>();
+    @SuppressWarnings("unused")
+    private ListenerRegistration<NotificationListener> wireInterfaceNotificationListenerHandler;
+    private @NonNull final Onf14WireInterfaceNotificationListener wireInterfaceNotificationListener;
+    // end of variables
+
+    // constructors
+    public Onf14DomInterfacePacManager(@NonNull NetconfDomAccessor netconfDomAccessor,
+            @NonNull DeviceManagerServiceProvider serviceProvider) {
+
+        this.netconfDomAccessor = Objects.requireNonNull(netconfDomAccessor);
+        this.serviceProvider = Objects.requireNonNull(serviceProvider);
+
+        this.airInterfaceNotificationListenerHandler = null;
+        this.airInterfaceNotificationListener =
+                new Onf14AirInterfaceNotificationListener(netconfDomAccessor, serviceProvider);
+        this.etherneContainerNotificationListenerHandler = null;
+        ethernetContainerNotificationListener =
+                new Onf14EthernetContainerNotificationListener(netconfDomAccessor, serviceProvider);
+        this.wireInterfaceNotificationListenerHandler = null;
+        wireInterfaceNotificationListener =
+                new Onf14WireInterfaceNotificationListener(netconfDomAccessor, serviceProvider);
+    }
+    // end of constructors
+
+    // getters and setters
+    // end of getters and setters
+
+    // private methods
+    // end of private methods
+
+    // public methods
+    public void readAllAirInterfaceCurrentProblems(NetconfDomAccessor netconfDomAccessor,
+            ControlConstruct controlConstruct, FaultData resultList) {
+
+        int idxStart; // Start index for debug messages
+
+        for (TechnologySpecificPacKeys key : airInterfaceList) {
+            idxStart = resultList.size();
+
+            readAirInterfaceCurrentProblemForLtp(netconfDomAccessor, controlConstruct, key.getLtpUuid(),
+                    key.getLocalId(), resultList);
+            Debug.debugResultList(key.getLtpUuid().getValue(), resultList, idxStart);
+        }
+    }
+
+    /*
+    public void readAllEhernetContainerCurrentProblems(FaultData resultList) {
+
+        int idxStart; // Start index for debug messages
+
+        for (TechnologySpecificPacKeys key : ethernetContainerList) {
+            idxStart = resultList.size();
+
+            readEthernetConainerCurrentProblemForLtp(key.getLtpUuid(), key.getLocalId(), resultList);
+            debugResultList(key.getLtpUuid().getValue(), resultList, idxStart);
+        }
+    }
+
+    public void readAllWireInterfaceCurrentProblems(FaultData resultList) {
+
+        int idxStart; // Start index for debug messages
+
+        for (TechnologySpecificPacKeys key : wireInterfaceList) {
+            idxStart = resultList.size();
+
+            readWireInterfaceCurrentProblemForLtp(key.getLtpUuid(), key.getLocalId(), resultList);
+            debugResultList(key.getLtpUuid().getValue(), resultList, idxStart);
+        }
+    }*/
+    public void readKeys(ControlConstruct controlConstruct) {
+
+        @NonNull
+        Collection<LogicalTerminationPoint> ltpList =
+                YangHelper.getCollection(controlConstruct.nonnullLogicalTerminationPoint());
+        log.debug("Iterating the LTP list for node {}", netconfDomAccessor.getNodeId().getValue());
+
+        // iterating all the Logical Termination Point list
+        for (LogicalTerminationPoint ltp : ltpList) {
+            @NonNull
+            List<LayerProtocol> lpList = YangHelper.getList(ltp.nonnullLayerProtocol());
+            // the Layer Protocol list should contain only one item, since we have an 1:1 relationship between the LTP and the LP
+            if (lpList.size() != 1) {
+                log.debug("Layer protocol has no 1:1 relationship with the LTP.");
+                return;
+            }
+            // accessing the LP, which should be only 1
+            LayerProtocol lp = lpList.get(0);
+            @Nullable
+            Class<? extends LAYERPROTOCOLNAMETYPE> layerProtocolName = lp.getLayerProtocolName();
+            if (layerProtocolName != null) {
+                // if the LTP has an airInterface technology extension, the layer protocol name is air-layer
+                if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEAIRLAYER.class.getName()) {
+                    TechnologySpecificPacKeys airInterfaceKey =
+                            new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId());
+                    airInterfaceList.add(airInterfaceKey);
+                    log.debug("Adding Ltp with uuid {} and local-id {} to the air-interface list",
+                            ltp.getUuid().getValue(), lp.getLocalId());
+                }
+                // if the LTP has an ethernetContainier technology extension, the layer protocol name is ethernet-container-layer
+                else if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEETHERNETCONTAINERLAYER.class
+                        .getName()) {
+                    TechnologySpecificPacKeys ethernetContainerKey =
+                            new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId());
+                    ethernetContainerList.add(ethernetContainerKey);
+                    log.debug("Adding Ltp with uuid {} and local-id {} to the ethernet-contatinier list",
+                            ltp.getUuid().getValue(), lp.getLocalId());
+                } else if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEWIRELAYER.class.getName()) {
+                    TechnologySpecificPacKeys wireInterfaceKey =
+                            new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId());
+                    wireInterfaceList.add(wireInterfaceKey);
+                    log.debug("Adding Ltp with uuid {} and local-id {} to the wire-interface list",
+                            ltp.getUuid().getValue(), lp.getLocalId());
+                }
+            }
+        }
+    }
+
+    private static void readAirInterfaceCurrentProblemForLtp(NetconfDomAccessor netconfDomAccessor,
+            ControlConstruct controlConstruct, UniversalId ltpUuid, String localId, FaultData resultList) {
+
+        final Class<AirInterfacePac> clazzPac = AirInterfacePac.class;
+
+        log.info("DBRead Get current problems for class {} from mountpoint {} for LTP uuid {} and local-id {}",
+                clazzPac.getSimpleName(), netconfDomAccessor.getNodeId().getValue(), ltpUuid.getValue(), localId);
+
+        // constructing the IID needs the augmentation exposed byy the air-interface-2-0 model
+        //        InstanceIdentifier<AirInterfaceCurrentProblems> airInterfaceCurrentProblem_IID = InstanceIdentifier
+        //                .builder(ControlConstruct.class)
+        //                .child(LogicalTerminationPoint.class, new LogicalTerminationPointKey(ltpUuid))
+        //                .child(LayerProtocol.class, new LayerProtocolKey(localId))
+        //                .augmentation(
+        //                        org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LayerProtocol1.class)
+        //                .child(AirInterfacePac.class)
+        //                .child(AirInterfaceCurrentProblems.class).build();
+        /*
+        final YangInstanceIdentifier airInterfaceCurrentProblem_IID =
+                YangInstanceIdentifier.builder().node(ControlConstruct.QNAME)
+                        .nodeWithKey(LogicalTerminationPoint.QNAME,
+                                QName.create(LogicalTerminationPoint.QNAME, "logical-termination-point-key").intern(),
+                                ltpUuid.getValue())
+                        .nodeWithKey(LayerProtocol.QNAME,
+                                QName.create(LayerProtocol.QNAME, "layer-protocol-key").intern(), localId)
+                        //.node(org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LayerProtocol1.QNAME)
+                        .node(AirInterfacePac.QNAME).node(AirInterfaceCurrentProblems.QNAME).build();
+
+        // reading all the current-problems list for this specific LTP and LP
+        AirInterfaceCurrentProblems problems =
+                 netconfDomAccessor.readData(LogicalDatastoreType.OPERATIONAL, airInterfaceCurrentProblem_IID);
+         */
+
+        @NonNull
+        Map<LogicalTerminationPointKey, LogicalTerminationPoint> ltpMap =
+                controlConstruct.nonnullLogicalTerminationPoint();
+        LogicalTerminationPoint ltp = ltpMap.get(new LogicalTerminationPointKey(ltpUuid));
+        if (ltp != null) {
+            @NonNull
+            Map<LayerProtocolKey, LayerProtocol> lpMap = ltp.nonnullLayerProtocol();
+            LayerProtocol lp = lpMap.get(new LayerProtocolKey(localId));
+            @Nullable
+            LayerProtocol1 lp1 = lp.augmentation(
+                    org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LayerProtocol1.class);
+            if (lp1 != null) {
+                @Nullable
+                AirInterfacePac airInterfacePack = lp1.getAirInterfacePac();
+                if (airInterfacePack != null) {
+                    @Nullable
+                    AirInterfaceCurrentProblems cp = airInterfacePack.getAirInterfaceCurrentProblems();
+                    if (cp == null) {
+                        log.debug("DBRead Id {} no AirInterfaceCurrentProblems", ltpUuid);
+                    } else {
+                        for (org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.air._interface.current.problems.CurrentProblemList problem : YangHelper
+                                .getCollection(cp.nonnullCurrentProblemList())) {
+                            resultList.add(netconfDomAccessor.getNodeId(), (int) problem.getSequenceNumber(),
+                                    problem.getTimestamp(), ltpUuid.getValue(), problem.getProblemName(),
+                                    Onf14AirInterface.mapSeverity(problem.getProblemSeverity()));
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    /*
+    private void readEthernetConainerCurrentProblemForLtp(UniversalId ltpUuid, String localId, FaultData resultList) {
+
+        final Class<EthernetContainerPac> clazzPac = EthernetContainerPac.class;
+
+        log.info("DBRead Get current problems for class {} from mountpoint {} for LTP uuid {} and local-id {}",
+                clazzPac.getSimpleName(), netconfDomAccessor.getNodeId().getValue(), ltpUuid.getValue(), localId);
+
+        // constructing the IID needs the augmentation exposed by the ethernet-container-2-0 model
+        //        InstanceIdentifier<EthernetContainerCurrentProblems> etherneContainerCurrentProblem_IID = InstanceIdentifier
+        //                .builder(ControlConstruct.class)
+        //                .child(LogicalTerminationPoint.class, new LogicalTerminationPointKey(ltpUuid))
+        //                .child(LayerProtocol.class, new LayerProtocolKey(localId))
+        //                .augmentation(
+        //                        org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.LayerProtocol1.class)
+        //                .child(EthernetContainerPac.class).child(EthernetContainerCurrentProblems.class).build();
+        final YangInstanceIdentifier etherneContainerCurrentProblem_IID =
+                YangInstanceIdentifier.builder().node(ControlConstruct.QNAME)
+                        .nodeWithKey(LogicalTerminationPoint.QNAME,
+                                QName.create(LogicalTerminationPoint.QNAME, "logical-termination-point-key").intern(),
+                                ltpUuid.getValue())
+                        .nodeWithKey(LayerProtocol.QNAME,
+                                QName.create(LayerProtocol.QNAME, "layer-protocol-key").intern(), localId)
+                        //.node(org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.LayerProtocol1.QNAME)
+                        .node(EthernetContainerPac.QNAME).node(EthernetContainerCurrentProblems.QNAME).build();
+
+        // reading all the current-problems list for this specific LTP and LP
+        EthernetContainerCurrentProblems problems =
+                netconfDomAccessor.readData(LogicalDatastoreType.OPERATIONAL, etherneContainerCurrentProblem_IID);
+
+        if (problems == null) {
+            log.debug("DBRead Id {} no EthernetContainerCurrentProblems", ltpUuid);
+        } else if (problems.getCurrentProblemList() == null) {
+            log.debug("DBRead Id {} empty CurrentProblemList", ltpUuid);
+        } else {
+            for (org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.ethernet.container.current.problems.CurrentProblemList problem : YangHelper
+                    .getCollection(problems.nonnullCurrentProblemList())) {
+                resultList.add(netconfDomAccessor.getNodeId(), (int) problem.getSequenceNumber(),
+                        problem.getTimestamp(), ltpUuid.getValue(), problem.getProblemName(),
+                        Onf14EthernetContainer.mapSeverity(problem.getProblemSeverity()));
+            }
+        }
+    }
+
+    private void readWireInterfaceCurrentProblemForLtp(UniversalId ltpUuid, String localId, FaultData resultList) {
+
+        final Class<WireInterfacePac> clazzPac = WireInterfacePac.class;
+
+        log.info("DBRead Get current problems for class {} from mountpoint {} for LTP uuid {} and local-id {}",
+                clazzPac.getSimpleName(), netconfDomAccessor.getNodeId().getValue(), ltpUuid.getValue(), localId);
+
+        // constructing the IID needs the augmentation exposed by the wire-interface-2-0 model
+        //        InstanceIdentifier<WireInterfaceCurrentProblems> wireInterfaceCurrentProblem_IID = InstanceIdentifier
+        //                .builder(ControlConstruct.class)
+        //                .child(LogicalTerminationPoint.class, new LogicalTerminationPointKey(ltpUuid))
+        //                .child(LayerProtocol.class, new LayerProtocolKey(localId))
+        //                .augmentation(
+        //                        org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.LayerProtocol1.class)
+        //                .child(WireInterfacePac.class).child(WireInterfaceCurrentProblems.class).build();
+        final YangInstanceIdentifier wireInterfaceCurrentProblem_IID =
+                YangInstanceIdentifier.builder().node(ControlConstruct.QNAME)
+                        .nodeWithKey(LogicalTerminationPoint.QNAME,
+                                QName.create(LogicalTerminationPoint.QNAME, "logical-termination-point-key").intern(),
+                                ltpUuid.getValue())
+                        .nodeWithKey(LayerProtocol.QNAME,
+                                QName.create(LayerProtocol.QNAME, "layer-protocol-key").intern(), localId)
+                        //.node(org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.LayerProtocol1.QNAME)
+                        .node(WireInterfacePac.QNAME).node(WireInterfaceCurrentProblems.QNAME).build();
+
+        // reading all the current-problems list for this specific LTP and LP
+        WireInterfaceCurrentProblems problems =
+                netconfDomAccessor.readData(LogicalDatastoreType.OPERATIONAL, wireInterfaceCurrentProblem_IID);
+
+        if (problems == null) {
+            log.debug("DBRead Id {} no WireInterfaceCurrentProblems", ltpUuid);
+        } else if (problems.getCurrentProblemList() == null) {
+            log.debug("DBRead Id {} empty CurrentProblemList", ltpUuid);
+        } else {
+            for (org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.wire._interface.current.problems.CurrentProblemList problem : YangHelper
+                    .getCollection(problems.nonnullCurrentProblemList())) {
+                resultList.add(netconfDomAccessor.getNodeId(), (int) problem.getSequenceNumber(),
+                        problem.getTimestamp(), ltpUuid.getValue(), problem.getProblemName(),
+                        Onf14WireInterface.mapSeverity(problem.getProblemSeverity()));
+            }
+        }
+    }
+    */
+
+    // end of public methods
+
+    // static methods
+    // end of static methods
+
+    // private classes
+    // end of private classes
+}
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainer.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainer.java
new file mode 100644
index 0000000..f976995
--- /dev/null
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainer.java
@@ -0,0 +1,40 @@
+/*
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * 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.
+ * ============LICENSE_END==========================================================================
+ */
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces;
+
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider.InternalDataModelSeverity;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPE;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author alexs
+ *
+ */
+public class Onf14EthernetContainer {
+
+    @SuppressWarnings("unused")
+    private static final Logger LOG = LoggerFactory.getLogger(Onf14EthernetContainer.class);
+
+    public static SeverityType mapSeverity(
+            Class<? extends SEVERITYTYPE> severity) {
+        return InternalDataModelSeverity.mapSeverity(severity);
+    }
+
+}
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14EthernetContainerNotificationListener.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainerNotificationListener.java
similarity index 99%
rename from sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14EthernetContainerNotificationListener.java
rename to sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainerNotificationListener.java
index f68d6f3..7cc3c9b 100644
--- a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14EthernetContainerNotificationListener.java
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainerNotificationListener.java
@@ -19,7 +19,7 @@
  * ============LICENSE_END=========================================================
  *
  */
-package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl;
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces;
 
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterface.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterface.java
new file mode 100644
index 0000000..acb262f
--- /dev/null
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterface.java
@@ -0,0 +1,40 @@
+/*
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * 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.
+ * ============LICENSE_END==========================================================================
+ */
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider.InternalDataModelSeverity;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPE;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author alexs
+ *
+ */
+public class Onf14WireInterface {
+
+    @SuppressWarnings("unused")
+    private static final Logger LOG = LoggerFactory.getLogger(Onf14WireInterface.class);
+
+    public static SeverityType mapSeverity(@Nullable Class<? extends SEVERITYTYPE> severity) {
+        return InternalDataModelSeverity.mapSeverity(severity);
+    }
+
+}
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14WireInterfaceNotificationListener.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterfaceNotificationListener.java
similarity index 99%
rename from sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14WireInterfaceNotificationListener.java
rename to sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterfaceNotificationListener.java
index 1d4d5d8..0db482a 100644
--- a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14WireInterfaceNotificationListener.java
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterfaceNotificationListener.java
@@ -19,7 +19,7 @@
  * ============LICENSE_END=========================================================
  *
  */
-package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl;
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces;
 
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/TechnologySpecificPacKeys.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/TechnologySpecificPacKeys.java
new file mode 100644
index 0000000..552ba66
--- /dev/null
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/TechnologySpecificPacKeys.java
@@ -0,0 +1,54 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
+ * All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ *
+ */
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces;
+
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId;
+
+/**
+ * Defining a structure that can map the LP local-id and its corresponding LTP uuid
+ */
+class TechnologySpecificPacKeys {
+
+    private UniversalId ltpUuid;
+    private String localId;
+
+    public TechnologySpecificPacKeys(UniversalId uuid, String lId) {
+        this.ltpUuid = uuid;
+        this.localId = lId;
+    }
+
+    public UniversalId getLtpUuid() {
+        return ltpUuid;
+    }
+
+    public String getLocalId() {
+        return localId;
+    }
+
+    public void setLtpUuid(UniversalId uuid) {
+        this.ltpUuid = uuid;
+    }
+
+    public void setLocalId(String lId) {
+        this.localId = lId;
+    }
+}
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/util/Debug.java b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/util/Debug.java
new file mode 100644
index 0000000..efa3cf1
--- /dev/null
+++ b/sdnr/wt/devicemanager-onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/util/Debug.java
@@ -0,0 +1,72 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
+ * All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ *
+ */
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.util;
+
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Debug {
+
+    // constants
+    private static final Logger log = LoggerFactory.getLogger(Debug.class);
+    // end of constants
+
+    // variables
+    // end of variables
+
+    // constructors
+    // end of constructors
+
+    // getters and setters
+    // end of getters and setters
+
+    // private methods
+    // end of private methods
+
+    // public methods
+    /**
+     * LOG the newly added problems of the interface pac
+     *
+     * @param idxStart
+     * @param uuid
+     * @param resultList
+     */
+    public static void debugResultList(String uuid, FaultData resultList, int idxStart) {
+        StringBuilder sb = new StringBuilder();
+        int idx = 0;
+        for (int t = idxStart; t < resultList.size(); t++) {
+            sb.append(idx++);
+            sb.append(":{");
+            sb.append(resultList.get(t));
+            sb.append('}');
+        }
+        log.debug("Found problems {} {}", uuid, sb);
+    }
+    // end of public methods
+
+    // static methods
+    // end of static methods
+
+    // private classes
+    // end of private classes
+}
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestDeviceManagerOnf14Impl.java b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestDeviceManagerOnf14Impl.java
index 8dbfa2f..4b69e42 100644
--- a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestDeviceManagerOnf14Impl.java
+++ b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestDeviceManagerOnf14Impl.java
@@ -43,7 +43,6 @@
             devMgrOnf14.setNetconfNetworkElementService(netconfElemService);
             devMgrOnf14.init();
         } catch (Exception e) {
-            // TODO Auto-generated catch block
             e.printStackTrace();
         }
     }
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14AirInterfaceNotificationListener.java b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14AirInterfaceNotificationListener.java
index 7dbbc22..d03d50c 100644
--- a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14AirInterfaceNotificationListener.java
+++ b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14AirInterfaceNotificationListener.java
@@ -23,12 +23,11 @@
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
-import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.Onf14AirInterfaceNotificationListener;
-import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.test.mock.NetconfAccessorMock;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14AirInterfaceNotificationListener;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.NotificationService;
-import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.AttributeValueChangedNotification;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.ObjectCreationNotification;
@@ -44,7 +43,7 @@
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
 
 public class TestOnf14AirInterfaceNotificationListener extends Mockito {
-    private NetconfAccessor accessor;
+    private NetconfBindingAccessor accessor;
     private NodeId nodeId;
     private DeviceManagerServiceProvider serviceProvider;
     private FaultService faultService;
@@ -58,7 +57,7 @@
 
     @Before
     public void init() {
-        accessor = mock(NetconfAccessorMock.class);
+        accessor = mock(NetconfBindingAccessor.class);
         nodeId = mock(NodeId.class);
         serviceProvider = mock(DeviceManagerServiceProvider.class);
         faultService = mock(FaultService.class);
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14EthernetContainerNotificationListener.java b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14EthernetContainerNotificationListener.java
index dedcf79..f6f7d90 100644
--- a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14EthernetContainerNotificationListener.java
+++ b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14EthernetContainerNotificationListener.java
@@ -23,12 +23,11 @@
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
-import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.Onf14EthernetContainerNotificationListener;
-import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.test.mock.NetconfAccessorMock;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14EthernetContainerNotificationListener;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.NotificationService;
-import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.AttributeValueChangedNotification;
@@ -44,7 +43,7 @@
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
 
 public class TestOnf14EthernetContainerNotificationListener extends Mockito {
-    private NetconfAccessor accessor;
+    private NetconfBindingAccessor accessor;
     private NodeId nodeId;
     private DeviceManagerServiceProvider serviceProvider;
     private FaultService faultService;
@@ -58,7 +57,7 @@
 
     @Before
     public void init() {
-        accessor = mock(NetconfAccessorMock.class);
+        accessor = mock(NetconfBindingAccessor.class);
         nodeId = mock(NodeId.class);
         serviceProvider = mock(DeviceManagerServiceProvider.class);
         faultService = mock(FaultService.class);
@@ -71,23 +70,23 @@
         attrValChangedNotif = mock(AttributeValueChangedNotification.class);
 
         when(accessor.getNodeId()).thenReturn(nodeId);
-        when(problemNotif.getCounter()).thenReturn(new Long(10));
+        when(problemNotif.getCounter()).thenReturn(10L);
         when(problemNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z"));
         when(problemNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-0abc-abcd-0123456789AB"));
         when(problemNotif.getProblem()).thenReturn("modulationIsDownShifted");
 
         when(attrValChangedNotif.getAttributeName()).thenReturn("12345678-0123-2345-abcd-0123456789AB");
-        when(attrValChangedNotif.getCounter()).thenReturn(new Long(20));
+        when(attrValChangedNotif.getCounter()).thenReturn(20L);
         when(attrValChangedNotif.getNewValue()).thenReturn("new-value");
         when(attrValChangedNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-1234-abcd-0123456789AB"));
         when(attrValChangedNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z"));
 
         when(creationNotif.getObjectType()).thenReturn("air-interface-name");
-        when(creationNotif.getCounter()).thenReturn(new Long(20));
+        when(creationNotif.getCounter()).thenReturn(20L);
         when(creationNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-1234-abcd-0123456789AB"));
         when(creationNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z"));
 
-        when(deletionNotif.getCounter()).thenReturn(new Long(20));
+        when(deletionNotif.getCounter()).thenReturn(20L);
         when(deletionNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-1234-abcd-0123456789AB"));
         when(deletionNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z"));
 
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14NetworkElement.java b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14NetworkElement.java
index d87e6d2..7a5658a 100644
--- a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14NetworkElement.java
+++ b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14NetworkElement.java
@@ -28,35 +28,36 @@
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElement;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.Onf14NetworkElementFactory;
-import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.test.mock.NetconfAccessorMock;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService;
 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfDomAccessor;
 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils;
-import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
+import org.opendaylight.mdsal.dom.api.DOMDataBroker;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ControlConstruct;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 
 public class TestOnf14NetworkElement extends Mockito {
 
-    static NetconfAccessorMock accessor;
+    private static String NODEIDSTRING = "nSky";
+
+    static NetconfDomAccessor accessor;
     static DeviceManagerServiceProvider serviceProvider;
     static Capabilities capabilities;
-    QName qCapability;
     static DataProvider dataProvider;
     static FaultService faultService;
-    static DataBroker dataBroker;
+    static DOMDataBroker dataBroker;
     static TransactionUtils transactionUtils;
     static ControlConstruct controlConstruct;
 
     @Before
     public void init() {
         capabilities = mock(Capabilities.class);
-        accessor = mock(NetconfAccessorMock.class);
+        accessor = mock(NetconfDomAccessor.class);
         serviceProvider = mock(DeviceManagerServiceProvider.class);
 
         NodeId nNodeId = new NodeId("nSky");
@@ -69,17 +70,16 @@
         faultService = mock(FaultService.class);
         when(serviceProvider.getFaultService()).thenReturn(faultService);
 
-        dataBroker = mock(DataBroker.class);
+        dataBroker = mock(DOMDataBroker.class);
         when(accessor.getDataBroker()).thenReturn(dataBroker);
 
         controlConstruct = mock(ControlConstruct.class);
-        transactionUtils = mock(TransactionUtils.class);
-        when(accessor.getTransactionUtils()).thenReturn(transactionUtils);
 
-        InstanceIdentifier<ControlConstruct> CONTROLCONSTRUCT_IID =
-                InstanceIdentifier.builder(ControlConstruct.class).build();
-        when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.CONFIGURATION,
-                CONTROLCONSTRUCT_IID)).thenReturn(controlConstruct);
+        YangInstanceIdentifier CONTROLCONSTRUCT_IID =
+                YangInstanceIdentifier.builder().node(ControlConstruct.QNAME).build();
+
+        when(accessor.readData(LogicalDatastoreType.CONFIGURATION, CONTROLCONSTRUCT_IID, ControlConstruct.class))
+                .thenReturn(Optional.of(controlConstruct));
 
         List<UniversalId> topLevelEqList = null;
         UniversalId uuid = new UniversalId("0Aabcdef-0abc-0cfD-0abC-0123456789AB");
@@ -91,10 +91,21 @@
     @Test
     public void testGeneric() {
         Optional<NetworkElement> onfNe;
+        NodeId nodeId = new NodeId(NODEIDSTRING);
+        NetconfBindingAccessor bindingAccessor = mock(NetconfBindingAccessor.class);
+        when(bindingAccessor.getTransactionUtils()).thenReturn(mock(TransactionUtils.class));
+        when(bindingAccessor.getNodeId()).thenReturn(nodeId);
+
+        NetconfDomAccessor domAccessor = mock(NetconfDomAccessor.class);
+        when(domAccessor.getNodeId()).thenReturn(nodeId);
+
         when(accessor.getCapabilites().isSupportingNamespace(ControlConstruct.QNAME)).thenReturn(true);
+        when(accessor.getNetconfBindingAccessor()).thenReturn(Optional.of(bindingAccessor));
+        when(accessor.getNetconfDomAccessor()).thenReturn(Optional.of(domAccessor));
+
         Onf14NetworkElementFactory factory = new Onf14NetworkElementFactory();
         onfNe = factory.create(accessor, serviceProvider);
-        assertTrue(factory.create(accessor, serviceProvider).isPresent());
+        assertTrue(onfNe.isPresent());
 
         onfNe.get().register();
         onfNe.get().deregister();
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14NetworkElementFactory.java b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14NetworkElementFactory.java
index 59e57da..4087607 100644
--- a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14NetworkElementFactory.java
+++ b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14NetworkElementFactory.java
@@ -19,20 +19,22 @@
 
 import static org.junit.Assert.assertTrue;
 import java.io.IOException;
+import java.util.Optional;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.mockito.Mockito;
+import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.Onf14NetworkElementFactory;
-import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.test.mock.NetconfAccessorMock;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities;
-import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfDomAccessor;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ControlConstruct;
 import org.opendaylight.yangtools.yang.common.QName;
 
 public class TestOnf14NetworkElementFactory extends Mockito {
 
-    static NetconfAccessor accessor;
+    static NetconfBindingAccessor accessor;
     static DeviceManagerServiceProvider serviceProvider;
     static Capabilities capabilities;
     QName qCapability;
@@ -40,16 +42,18 @@
     @BeforeClass
     public static void init() throws InterruptedException, IOException {
         capabilities = mock(Capabilities.class);
-        accessor = mock(NetconfAccessorMock.class);
+        accessor = mock(NetconfBindingAccessor.class);
         serviceProvider = mock(DeviceManagerServiceProvider.class);
 
         when(accessor.getCapabilites()).thenReturn(capabilities);
-        when(serviceProvider.getDataProvider()).thenReturn(null);
+        when(serviceProvider.getDataProvider()).thenReturn(mock(DataProvider.class));
     }
 
     @Test
     public void testCreateOnf14Component() throws Exception {
         when(accessor.getCapabilites().isSupportingNamespace(ControlConstruct.QNAME)).thenReturn(true);
+        when(accessor.getNetconfBindingAccessor()).thenReturn(Optional.of(mock(NetconfBindingAccessor.class)));
+        when(accessor.getNetconfDomAccessor()).thenReturn(Optional.of(mock(NetconfDomAccessor.class)));
         Onf14NetworkElementFactory factory = new Onf14NetworkElementFactory();
         assertTrue((factory.create(accessor, serviceProvider)).isPresent());
     }
@@ -58,7 +62,7 @@
     public void testCreateNone() throws Exception {
         when(accessor.getCapabilites().isSupportingNamespace(ControlConstruct.QNAME)).thenReturn(false);
         Onf14NetworkElementFactory factory = new Onf14NetworkElementFactory();
-        assertTrue(!(factory.create(accessor, serviceProvider).isPresent()));
+        assertTrue(factory.create(accessor, serviceProvider).isEmpty());
     }
 }
 
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14ToInternalDataModel2.java b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14ToInternalDataModel2.java
index ca36f79..b0b00d9 100644
--- a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14ToInternalDataModel2.java
+++ b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14ToInternalDataModel2.java
@@ -18,17 +18,19 @@
 package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14;
 
 import static org.junit.Assert.assertEquals;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.jdt.annotation.NonNull;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.mockito.Mockito;
-import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.Onf14ToInternalDataModel;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider.Onf14ToInternalDataModel;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.Equipment;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.equipment.ActualEquipment;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.equipment.ContainedHolder;
+import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.equipment.ContainedHolderKey;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.equipment.detail.ManufacturedThing;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.manufactured.thing.EquipmentInstance;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.manufactured.thing.EquipmentType;
@@ -65,8 +67,8 @@
         when(currentEq.getUuid()).thenReturn(new UniversalId("0Aabcdef-0abc-0cfD-0abC-0123456789AB"));
         when(parentEq.getUuid()).thenReturn(new UniversalId("0Aabcdef-0123-0abc-abcd-0123456789AB"));
 
-        List<ContainedHolder> containedHolderList = new ArrayList<ContainedHolder>();
-        containedHolderList.add(holder);
+        @NonNull Map<ContainedHolderKey, ContainedHolder> containedHolderList = new HashMap<>();
+        containedHolderList.put(holder.key(),holder);
         when(currentEq.nonnullContainedHolder()).thenReturn(containedHolderList);
 
     }
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14WireInterfaceNotificationListener.java b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14WireInterfaceNotificationListener.java
index 267e9a8..e1b13f1 100644
--- a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14WireInterfaceNotificationListener.java
+++ b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14WireInterfaceNotificationListener.java
@@ -23,12 +23,11 @@
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
-import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.Onf14WireInterfaceNotificationListener;
-import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.test.mock.NetconfAccessorMock;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14WireInterfaceNotificationListener;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService;
 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.NotificationService;
-import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId;
 import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.AttributeValueChangedNotification;
@@ -44,7 +43,7 @@
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
 
 public class TestOnf14WireInterfaceNotificationListener extends Mockito {
-    private NetconfAccessor accessor;
+    private NetconfBindingAccessor accessor;
     private NodeId nodeId;
     private DeviceManagerServiceProvider serviceProvider;
     private FaultService faultService;
@@ -58,7 +57,7 @@
 
     @Before
     public void init() {
-        accessor = mock(NetconfAccessorMock.class);
+        accessor = mock(NetconfBindingAccessor.class);
         nodeId = mock(NodeId.class);
         serviceProvider = mock(DeviceManagerServiceProvider.class);
         faultService = mock(FaultService.class);
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestSeverity.java b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestSeverity.java
new file mode 100644
index 0000000..686942a
--- /dev/null
+++ b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestSeverity.java
@@ -0,0 +1,80 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP : ccsdk features
+ * ================================================================================
+ * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
+ * All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ *
+ */
+package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14;
+
+import static org.junit.Assert.assertTrue;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14AirInterface;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14WireInterface;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType;
+
+public class TestSeverity extends Mockito {
+
+    @Test
+    public void test1_1() {
+        assertTrue(Onf14WireInterface.mapSeverity(
+                org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPECRITICAL.class)
+                .equals(SeverityType.Critical));
+    }
+
+    @Test
+    public void test1_2() {
+        assertTrue(Onf14WireInterface.mapSeverity(
+                org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEWARNING.class)
+                .equals(SeverityType.Warning));
+    }
+
+    @Test
+    public void test1_3() {
+        assertTrue(Onf14WireInterface.mapSeverity(
+                org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEMINOR.class)
+                .equals(SeverityType.Minor));
+    }
+
+    @Test
+    public void test1_4() {
+        assertTrue(Onf14WireInterface.mapSeverity(
+                org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEMAJOR.class)
+                .equals(SeverityType.Major));
+    }
+
+    public void test2_1() {
+        assertTrue(Onf14AirInterface.mapSeverity(
+                org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPECRITICAL.class)
+                .equals(SeverityType.Critical));
+    }
+
+    @Test
+    public void test2_2() {
+        assertTrue(Onf14AirInterface.mapSeverity(
+                org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPEMINOR.class)
+                .equals(SeverityType.Minor));
+    }
+
+    @Test
+    public void test2_3() {
+        assertTrue(Onf14AirInterface.mapSeverity(null).equals(SeverityType.NonAlarmed));
+    }
+
+
+}
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/test/mock/NetconfAccessorMock.java b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/test/mock/NetconfAccessorMock.java
deleted file mode 100644
index 8324854..0000000
--- a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/test/mock/NetconfAccessorMock.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.test.mock;
-
-import com.google.common.util.concurrent.ListenableFuture;
-import java.util.List;
-import org.eclipse.jdt.annotation.NonNull;
-import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities;
-import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
-import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils;
-import org.opendaylight.mdsal.binding.api.DataBroker;
-import org.opendaylight.mdsal.binding.api.MountPoint;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.CreateSubscriptionOutput;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.streams.Stream;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.binding.NotificationListener;
-import org.opendaylight.yangtools.yang.common.RpcResult;
-
-/**
- */
-public class NetconfAccessorMock implements NetconfAccessor {
-
-    private final NodeId nNodeId;
-    private final NetconfNode netconfNode;
-    private final MountPoint mountpoint;
-    private final DataBroker netconfNodeDataBroker;
-
-    public NetconfAccessorMock(NodeId nNodeId, NetconfNode netconfNode, MountPoint mountpoint,
-            DataBroker netconfNodeDataBroker) {
-        this.nNodeId = nNodeId;
-        this.netconfNode = netconfNode;
-        this.mountpoint = mountpoint;
-        this.netconfNodeDataBroker = netconfNodeDataBroker;
-    }
-
-    @Override
-    public NodeId getNodeId() {
-        return nNodeId;
-    }
-
-    @Override
-    public NetconfNode getNetconfNode() {
-        return netconfNode;
-    }
-
-    @Override
-    public Capabilities getCapabilites() {
-        return null;
-    }
-
-    @Override
-    public DataBroker getDataBroker() {
-        return netconfNodeDataBroker;
-    }
-
-    @Override
-    public MountPoint getMountpoint() {
-        return mountpoint;
-    }
-
-    @Override
-    public TransactionUtils getTransactionUtils() {
-        return null;
-    }
-
-    @Override
-    public <T extends NotificationListener> ListenerRegistration<NotificationListener> doRegisterNotificationListener(
-            @NonNull T listener) {
-        return null;
-    }
-
-    @Override
-    public ListenableFuture<RpcResult<CreateSubscriptionOutput>> registerNotificationsStream(String streamName) {
-        return null;
-    }
-
-    @Override
-    public void registerNotificationsStream(List<Stream> streamList) {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public boolean isNCNotificationsSupported() {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    @Override
-    public List<Stream> getNotificationStreams() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-}
diff --git a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/test/mock/TransactionUtilsMock.java b/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/test/mock/TransactionUtilsMock.java
deleted file mode 100644
index 9546ae9..0000000
--- a/sdnr/wt/devicemanager-onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/test/mock/TransactionUtilsMock.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * ============LICENSE_START========================================================================
- * ONAP : ccsdk feature sdnr wt
- * =================================================================================================
- * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved.
- * =================================================================================================
- * 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.
- * ============LICENSE_END==========================================================================
- */
-package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.test.mock;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
-import org.eclipse.jdt.annotation.Nullable;
-import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils;
-import org.opendaylight.mdsal.binding.api.DataBroker;
-import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.yangtools.yang.binding.DataObject;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-
-public class TransactionUtilsMock implements TransactionUtils {
-
-    @Override
-    public <T extends DataObject> @Nullable T readData(DataBroker dataBroker, LogicalDatastoreType dataStoreType,
-            InstanceIdentifier<T> iid) {
-        return null;
-    }
-
-    @Override
-    public <T extends DataObject> @Nullable T readDataOptionalWithStatus(DataBroker dataBroker,
-            LogicalDatastoreType dataStoreType, InstanceIdentifier<T> iid, AtomicBoolean noErrorIndication,
-            AtomicReference<String> statusIndicator) {
-        return null;
-    }
-
-}
