diff --git a/apps/netconf/BUCK b/apps/netconf/BUCK
index c619118..f4cc35c 100644
--- a/apps/netconf/BUCK
+++ b/apps/netconf/BUCK
@@ -1,5 +1,6 @@
 BUNDLES = [
   '//apps/netconf/client:onos-apps-netconf-client',
+  '//apps/netconf/storeadapter:onos-apps-netconf-storeadapter',
 ]
 
 onos_app (
diff --git a/apps/netconf/storeadapter/BUCK b/apps/netconf/storeadapter/BUCK
new file mode 100644
index 0000000..b58c1d8
--- /dev/null
+++ b/apps/netconf/storeadapter/BUCK
@@ -0,0 +1,26 @@
+COMPILE_DEPS = [
+    '//lib:CORE_DEPS',
+    '//lib:onos-yang-model',
+    '//lib:onos-yang-runtime',
+    '//apps/config:onos-apps-config',
+]
+
+osgi_jar_with_tests (
+  deps = COMPILE_DEPS,
+)
+
+BUNDLES = [
+  '//apps/netconf/client:onos-apps-netconf-client',
+  '//apps/netconf/storeadapter:onos-apps-netconf-storeadapter',
+]
+
+onos_app (
+  app_name = 'org.onosproject.netconf',
+  title = 'NETCONF Application Module',
+  category = 'Utility',
+  url = 'http://onosproject.org',
+  description = """This application provides an interface for monitoring and modifying datastores
+                   of NETCONF devices using Yang data. It uses the YangRuntime to serialize outbound
+                   messages from Yang into NETCONF and deserialize received messages.""",
+  included_bundles = BUNDLES,
+)
diff --git a/apps/netconf/storeadapter/src/main/java/org/onosproject/netconf/storeadapter/NetConfListener.java b/apps/netconf/storeadapter/src/main/java/org/onosproject/netconf/storeadapter/NetConfListener.java
new file mode 100644
index 0000000..a268c35
--- /dev/null
+++ b/apps/netconf/storeadapter/src/main/java/org/onosproject/netconf/storeadapter/NetConfListener.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.netconf.storeadapter;
+
+import com.google.common.annotations.Beta;
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.onosproject.config.DynamicConfigEvent;
+import org.onosproject.config.DynamicConfigListener;
+import org.onosproject.config.DynamicConfigService;
+import org.onosproject.config.Filter;
+import org.onosproject.yang.model.DataNode;
+import org.onosproject.yang.model.ResourceId;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Beta
+@Component(immediate = true)
+public class NetConfListener implements DynamicConfigListener {
+
+    private static final Logger log = LoggerFactory.getLogger(NetConfListener.class);
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected DynamicConfigService cfgServcie;
+    public static final String DEVNMSPACE = "namespace1";
+
+    private ResourceId resId = new ResourceId.Builder()
+            .addBranchPointSchema("device", DEVNMSPACE )
+            .build();
+    @Activate
+    protected void activate() {
+        cfgServcie.addListener(this);
+        log.info("NetConfListener Started");
+    }
+
+    @Deactivate
+    protected void deactivate() {
+        cfgServcie.removeListener(this);
+        log.info("NetConfListener Stopped");
+    }
+
+    public boolean isRelevant(DynamicConfigEvent event) {
+        if (event.subject().equals(resId)) {
+            log.info("isRelevant {} = {}", resId, event.subject());
+                return true;
+            } else {
+            log.info("isRelevant {} != {}", resId, event.subject());
+            return false;
+        }
+    }
+
+    public void event(DynamicConfigEvent event) {
+        if (!isRelevant(event)) {
+            log.info("event is not relevanyt!!!! {} != {}", resId, event.subject());
+            return;
+        }
+        switch (event.type()) {
+            case NODE_ADDED:
+                log.info("NetConfListener: RXD NODE_ADDED event");
+                Filter filt = new Filter();
+                DataNode node = cfgServcie.readNode(event.subject(), filt);
+                //call netconf passive
+                break;
+            case NODE_UPDATED:
+                log.info("NetConfListener: RXD NODE_UPDATED event");
+                break;
+            case NODE_REPLACED:
+                log.info("NetConfListener: RXD NODE_REPLACED event");
+                break;
+            case NODE_DELETED:
+                log.info("NetConfListener: RXD NODE_DELETED event");
+                break;
+            case UNKNOWN_OPRN:
+            default:
+                log.warn("NetConfListener: unknown event: {}", event.type());
+                break;
+        }
+    }
+}
\ No newline at end of file
