diff --git a/app-c/appc/appc-dg/.gitignore b/app-c/appc/appc-dg/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/app-c/appc/appc-dg/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/app-c/appc/appc-dg/.settings/org.eclipse.wst.common.project.facet.core.xml b/app-c/appc/appc-dg/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..f4ef8aa
--- /dev/null
+++ b/app-c/appc/appc-dg/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <installed facet="java" version="1.8"/>
+</faceted-project>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/.gitignore b/app-c/appc/appc-dg/appc-dg-shared/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/app-c/appc/appc-dg/appc-dg-shared/.settings/org.eclipse.wst.common.project.facet.core.xml b/app-c/appc/appc-dg/appc-dg-shared/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..f4ef8aa
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <installed facet="java" version="1.8"/>
+</faceted-project>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/README.txt b/app-c/appc/appc-dg/appc-dg-shared/README.txt
new file mode 100644
index 0000000..960d518
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/README.txt
@@ -0,0 +1 @@
+This project contains set of DG-ready reusable APP-C utility classes, such as utility for executing a command on remote machine via SSH and more.
\ No newline at end of file
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/.gitignore b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/.settings/org.eclipse.wst.common.project.facet.core.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..f4ef8aa
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <installed facet="java" version="1.8"/>
+</faceted-project>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/pom.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/pom.xml
new file mode 100644
index 0000000..a1bdfbf
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/pom.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.openecomp.appc</groupId>
+        <artifactId>appc-dg-shared</artifactId>
+        <version>1.0.0</version>
+    </parent>
+    <artifactId>appc-dg-aai</artifactId>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.openecomp.appc</groupId>
+            <artifactId>appc-common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.appc</groupId>
+            <artifactId>appc-dg-common</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.sdnc.core</groupId>
+            <artifactId>sli-common</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.sdnc.adaptors</groupId>
+            <artifactId>aai-service-provider</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-core</artifactId>
+            <scope>test</scope>
+
+        </dependency>
+        <dependency>
+            <groupId>org.powermock</groupId>
+            <artifactId>powermock-api-mockito</artifactId>
+            <version>1.6.2</version>
+            <scope>test</scope>
+
+        </dependency>
+        <dependency>
+            <groupId>org.powermock</groupId>
+            <artifactId>powermock-module-junit4</artifactId>
+            <version>1.6.2</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>appc-dg-aai</Bundle-SymbolicName>
+                        <Export-Package>org.openecomp.appc.dg.aai</Export-Package>
+                        <Private-Package>org.openecomp.appc.dg.aai.impl.*</Private-Package>
+                        <Import-Package>
+                            !org.apache.log,!org.apache.commons.logging,!groovy.lang,!javax.jms,!org.codehaus.commons.compiler,!org.codehaus.groovy.*,!org.codehaus.janino,!com.ibm.icu.*,!com.sun.faces.*,!org.jasypt.*,*
+                        </Import-Package>
+                        <Embed-Dependency>
+                            appc-common,eelf-core,logback-core,logback-classic;scope=compile|runtime;inline=false
+                        </Embed-Dependency>
+                        <Embed-Transitive>true</Embed-Transitive>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/AAIPlugin.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/AAIPlugin.java
new file mode 100644
index 0000000..e220182
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/AAIPlugin.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.aai;
+
+import java.util.Map;
+
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicJavaPlugin;
+
+
+public interface AAIPlugin extends SvcLogicJavaPlugin {
+    void postGenericVnfData(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+
+    void getGenericVnfData(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/AAIPluginImpl.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/AAIPluginImpl.java
new file mode 100644
index 0000000..6eae559
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/AAIPluginImpl.java
@@ -0,0 +1,122 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.aai.impl;
+
+import org.openecomp.appc.dg.aai.AAIPlugin;
+import org.openecomp.appc.dg.aai.impl.Constants;
+import org.openecomp.appc.exceptions.APPCException;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicResource;
+import org.openecomp.sdnc.sli.aai.AAIClient;
+import org.openecomp.sdnc.sli.aai.AAIService;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+public class AAIPluginImpl implements AAIPlugin {
+    private AAIClient aaiClient;
+    private static final EELFLogger logger = EELFManager.getInstance().getLogger(AAIPluginImpl.class);
+
+    public AAIPluginImpl() {
+        BundleContext bctx = FrameworkUtil.getBundle(this.getClass()).getBundleContext();
+        ServiceReference sref = bctx.getServiceReference(AAIService.class);
+        aaiClient = (AAIClient) bctx.getService(sref);
+    }
+
+    @Override
+    public void postGenericVnfData(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        String vnf_id = ctx.getAttribute(Constants.VNF_ID_PARAM_NAME);
+        String prefix = ctx.getAttribute(Constants.AAI_PREFIX_PARAM_NAME);
+
+        String key = "vnf-id = '" + vnf_id + "'";
+
+        Map<String, String> data = new HashMap<>();
+        for (Map.Entry<String, String> entry : params.entrySet()) {
+            String paramKey = entry.getKey();
+            int pos = paramKey.indexOf(Constants.AAI_INPUT_DATA);
+            if (pos == 0) {
+                data.put(paramKey.substring(Constants.AAI_INPUT_DATA.length()+1), entry.getValue());
+            }
+        }
+
+        try {
+            SvcLogicResource.QueryStatus response = aaiClient.update("generic-vnf", key, data, prefix, ctx);
+            if (SvcLogicResource.QueryStatus.NOT_FOUND.equals(response)) {
+                String errorMessage = String.format("VNF not found for vnf_id = %s", vnf_id);
+                ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, errorMessage);
+                throw new APPCException(errorMessage);
+            }
+            logger.info("AAIResponse: " + response.toString());
+            if (SvcLogicResource.QueryStatus.FAILURE.equals(response)) {
+                String errorMessage = String.format("Error Querying AAI with vnfID = %s", vnf_id);
+                ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, errorMessage);
+                throw new APPCException(errorMessage);
+            }
+        } catch (SvcLogicException e) {
+            String errorMessage = String.format("Error in postVnfdata %s", e);
+            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, errorMessage);
+            logger.error(errorMessage);
+            throw new APPCException(e);
+        }
+    }
+
+    @Override
+    public void getGenericVnfData(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        String vnf_id = ctx.getAttribute(Constants.VNF_ID_PARAM_NAME);
+        String prefix = ctx.getAttribute(Constants.AAI_PREFIX_PARAM_NAME);
+
+        String key = "vnf-id = '" + vnf_id + "'";
+        try {
+            SvcLogicResource.QueryStatus response = aaiClient.query("generic-vnf", false, null, key, prefix, null, ctx);
+            if (SvcLogicResource.QueryStatus.NOT_FOUND.equals(response)) {
+                String errorMessage = String.format("VNF not found for vnf_id = %s", vnf_id);
+                ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, errorMessage);
+                throw new APPCException(errorMessage);
+            } else if (SvcLogicResource.QueryStatus.FAILURE.equals(response)) {
+                String errorMessage = String.format("Error Querying AAI with vnfID = %s", vnf_id);
+                ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, errorMessage);
+                throw new APPCException(errorMessage);
+            }
+            String aaiEntitlementPoolUuid = ctx.getAttribute(Constants.AAI_ENTITLMENT_POOL_UUID_NAME);
+            if (null == aaiEntitlementPoolUuid) aaiEntitlementPoolUuid = "";
+            String aaiLicenseKeyGroupUuid = ctx.getAttribute(Constants.AAI_LICENSE_KEY_UUID_NAME);
+            if (null == aaiLicenseKeyGroupUuid) aaiLicenseKeyGroupUuid = "";
+
+            ctx.setAttribute(Constants.IS_RELEASE_ENTITLEMENT_REQUIRE, Boolean.toString(!aaiEntitlementPoolUuid.isEmpty()));
+            ctx.setAttribute(Constants.IS_RELEASE_LICENSE_REQUIRE, Boolean.toString(!aaiLicenseKeyGroupUuid.isEmpty()));
+
+            logger.info("AAIResponse: " + response.toString());
+        } catch (SvcLogicException e) {
+            String errorMessage = String.format("Error in getVnfdata %s", e);
+            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, errorMessage);
+            logger.error(errorMessage);
+            throw new APPCException(e);
+        }
+    }
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/Constants.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/Constants.java
new file mode 100644
index 0000000..3feab47
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/Constants.java
@@ -0,0 +1,112 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.aai.impl;
+
+
+public class Constants {
+    public final static String VNF_ID_PARAM_NAME = "aai.vnfID";
+    public static final String AAI_PREFIX_PARAM_NAME = "aai.prefix";
+    public static final String AAI_INPUT_DATA = "aai.input.data";
+    public static final String AAI_ERROR_MESSAGE = "org.openecomp.appc.dg.error";
+
+    public static final String CONFIGURE_PATH = "/restconf/config/opendaylight-inventory:nodes/node/";
+    public static final String CONNECT_PATH = "/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules";
+    public static final String CHECK_CONNECTION_PATH = "/restconf/operational/opendaylight-inventory:nodes/node/";
+    public static final String DISCONNECT_PATH = "/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules/module/odl-sal-netconf-connector-cfg:sal-netconf-connector/";
+
+    public static final String CONTROLLER_IP = "127.0.0.1";
+    public static final int CONTROLLER_PORT = 8181;
+    public static final String PROTOCOL = "http";
+
+    public static final String VF_LICENSE = "VF_LICENSE";
+
+    // tables and fields
+    public static final String NETCONF_SCHEMA = "sdnctl";
+    public static final String SDNCTL_SCHEMA = "sdnctl";
+    public static final String DEVICE_AUTHENTICATION_TABLE_NAME = "DEVICE_AUTHENTICATION";
+    public static final String CONFIGFILES_TABLE_NAME = "CONFIGFILES";
+    public static final String DEVICE_INTERFACE_LOG_TABLE_NAME = "DEVICE_INTERFACE_LOG";
+    public static final String FILE_CONTENT_TABLE_FIELD_NAME = "FILE_CONTENT";
+    public static final String FILE_NAME_TABLE_FIELD_NAME = "FILE_NAME";
+    public static final String USER_NAME_TABLE_FIELD_NAME = "USER_NAME";
+    public static final String PASSWORD_TABLE_FIELD_NAME = "PASSWORD";
+    public static final String PORT_NUMBER_TABLE_FIELD_NAME = "PORT_NUMBER";
+    public static final String VNF_TYPE_TABLE_FIELD_NAME = "VNF_TYPE";
+    public static final String SERVICE_INSTANCE_ID_FIELD_NAME = "SERVICE_INSTANCE_ID";
+    public static final String REQUEST_ID_FIELD_NAME = "REQUEST_ID";
+    public static final String CREATION_DATE_FIELD_NAME = "CREATION_DATE";
+    public static final String LOG_FIELD_NAME = "LOG";
+    public static final String ASDC_ARTIFACTS_TABLE_NAME = "ASDC_ARTIFACTS";
+
+    // input fields names
+    public static final String PAYLOAD = "payload";
+
+    // constants fo DG
+    public static final String VNF_TYPE_FIELD_NAME = "org.openecomp.appc.vftype";
+    public static final String VNF_VERSION_FIELD_NAME = "org.openecomp.appc.vfversion";
+    public static final String VNF_RESOURCE_VERSION_FIELD_NAME = "org.openecomp.appc.resource-version";
+    public static final String TARGET_VNF_TYPE = "target-vnf-type";
+    public static final String FILE_CONTENT_FIELD_NAME = "file-content";
+    public static final String CONNECTION_DETAILS_FIELD_NAME = "connection-details";
+    public static final String CONFIGURATION_FILE_FIELD_NAME = "configuration-file-name";
+    public static final String VNF_HOST_IP_ADDRESS_FIELD_NAME = "vnf-host-ip-address";
+    public static final String UPGRADE_VERSION = "upgrade-version";
+    public static final String DG_ERROR_FIELD_NAME = "org.openecomp.appc.dg.error";
+    public static final String DG_OUTPUT_STATUS_MESSAGE = "output.status.message";
+    public static final String RESOURCEKEY = "resourceKey";
+    public static final String REQ_ID_FIELD_NAME = "org.openecomp.appc.reqid";
+    public static final String API_VERSION_FIELD_NAME = "org.openecomp.appc.apiversion";
+    public static final String MODEL_ENTITLMENT_POOL_UUID_NAME = "model.entitlement.pool.uuid";
+    public static final String MODEL_LICENSE_KEY_UUID_NAME = "model.license.key.uuid";
+    public static final String ENTITLMENT_POOL_UUID_NAME = "entitlement.pool.uuid";
+    public static final String LICENSE_KEY_UUID_NAME = "license.key.uuid";
+    public static final String IS_ACQUIRE_LICENSE_REQUIRE ="is.acquire-license.require";
+    public static final String IS_RELEASE_LICENSE_REQUIRE ="is.release-license.require";
+
+    public static final String AAI_ENTITLMENT_POOL_UUID_NAME = "aai.input.data.entitlement-assignment-group-uuid";
+    public static final String AAI_LICENSE_KEY_UUID_NAME = "aai.input.data.license-assignment-group-uuid";
+    public static final String AAI_LICENSE_KEY_VALUE = "aai.input.data.license-key";
+    public static final String IS_AAI_ENTITLEMENT_UPDATE_REQUIRE = "is.aai-entitlement-update.require";
+    public static final String IS_AAI_LICENSE_UPDATE_REQUIRE = "is.aai-license-update.require";
+    public static final String IS_ACQUIRE_ENTITLEMENT_REQUIRE ="is.acquire-entitlement.require";
+    public static final String IS_RELEASE_ENTITLEMENT_REQUIRE ="is.release-entitlement.require";
+
+    public enum ASDC_ARTIFACTS_FIELDS {
+        SERVICE_UUID,
+        DISTRIBUTION_ID,
+        SERVICE_NAME,
+        SERVICE_DESCRIPTION,
+        RESOURCE_UUID,
+        RESOURCE_INSTANCE_NAME,
+        RESOURCE_NAME,
+        RESOURCE_VERSION,
+        RESOURCE_TYPE,
+        ARTIFACT_UUID,
+        ARTIFACT_TYPE,
+        ARTIFACT_VERSION,
+        ARTIFACT_DESCRIPTION,
+        INTERNAL_VERSION,
+        CREATION_DATE,
+        ARTIFACT_NAME,
+        ARTIFACT_CONTENT
+    }
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/resources/OSGI-INF/blueprint/blueprint.xml
new file mode 100644
index 0000000..260b218
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+  openECOMP : APP-C
+  ================================================================================
+  Copyright (C) 2017 AT&T 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=========================================================
+  -->
+
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+    <service id="aaiServicePlugin" interface="org.openecomp.appc.dg.aai.AAIPlugin">
+        <bean class="org.openecomp.appc.dg.aai.impl.AAIPluginImpl"/>
+    </service>
+
+</blueprint>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/test/java/org/openecomp/appc/dg/aai/impl/AAIClientMock.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/test/java/org/openecomp/appc/dg/aai/impl/AAIClientMock.java
new file mode 100644
index 0000000..fc4379d
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/test/java/org/openecomp/appc/dg/aai/impl/AAIClientMock.java
@@ -0,0 +1,544 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.aai.impl;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicResource;
+import org.openecomp.sdnc.sli.aai.AAIClient;
+import org.openecomp.sdnc.sli.aai.AAIServiceException;
+import org.openecomp.sdnc.sli.aai.data.*;
+import org.openecomp.sdnc.sli.aai.data.notify.NotifyEvent;
+import org.openecomp.sdnc.sli.aai.data.v1507.VServer;
+import org.openecomp.sdnc.sli.aai.update.Update;
+
+
+public class AAIClientMock implements AAIClient {
+
+    Map<String, String> mockAAI = new HashMap<>();
+
+    public void setMockAAI(Map<String, String> mockAAI) {
+        this.mockAAI = mockAAI;
+    }
+
+    @Override
+    public AAIResponse requestSdnZoneQuery(String s, String s1, String s2) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean postNetworkVceData(String s, Vce vce) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public Vce requestNetworkVceData(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean deleteNetworkVceData(String s, String s1) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public ServiceInstance requestServiceInterfaceData(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public ServiceInstance requestServiceInterfaceData(String s, String s1, String s2) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean postServiceInterfaceData(String s, String s1, String s2, ServiceInstance serviceInstance) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public SearchResults requestServiceInstanceURL(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public Vpe requestNetworkVpeData(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean postNetworkVpeData(String s, Vpe vpe) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean deleteNetworkVpeData(String s, String s1) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public Vserver requestVServerData(String s, String s1, String s2, String s3) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean postVServerData(String s, String s1, String s2, String s3, Vserver vserver) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean deleteVServerData(String s, String s1, String s2, String s3, String s4) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public URL requestVserverURLNodeQuery(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public String getTenantIdFromVserverUrl(URL url) {
+        return null;
+    }
+
+    @Override
+    public String getCloudOwnerFromVserverUrl(URL url) {
+        return null;
+    }
+
+    @Override
+    public String getCloudRegionFromVserverUrl(URL url) {
+        return null;
+    }
+
+    @Override
+    public String getVServerIdFromVserverUrl(URL url, String s) {
+        return null;
+    }
+
+    @Override
+    public Vserver requestVServerDataByURL(URL url) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public VplsPe requestNetworkVplsPeData(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean postNetworkVplsPeData(String s, VplsPe vplsPe) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean deleteNetworkVplsPeData(String s, String s1) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public Complex requestNetworkComplexData(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean postNetworkComplexData(String s, Complex complex) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean deleteNetworkComplexData(String s, String s1) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public CtagPool requestCtagPoolData(String s, String s1, String s2) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public VServer dataChangeRequestVServerData(URL url) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public CtagPool dataChangeRequestCtagPoolData(URL url) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public VplsPe dataChangeRequestVplsPeData(URL url) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public Vpe dataChangeRequestVpeData(URL url) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public DvsSwitch dataChangeRequestDvsSwitchData(URL url) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public PServer dataChangeRequestPServerData(URL url) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public OamNetwork dataChangeRequestOAMNetworkData(URL url) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public AvailabilityZone dataChangeRequestAvailabilityZoneData(URL url) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public Complex dataChangeRequestComplexData(URL url) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean dataChangeDeleteVServerData(URL url) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean dataChangeDeleteCtagPoolData(URL url) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean dataChangeDeleteVplsPeData(URL url) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean dataChangeDeleteVpeData(URL url) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean dataChangeDeleteDvsSwitchData(URL url) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean dataChangeDeleteOAMNetworkData(URL url) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean dataChangeDeleteAvailabilityZoneData(URL url) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean dataChangeDeleteComplexData(URL url) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public GenericVnf requestGenericVnfData(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean postGenericVnfData(String s, GenericVnf genericVnf) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean deleteGenericVnfData(String s, String s1) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public DvsSwitch requestDvsSwitchData(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean postDvsSwitchData(String s, DvsSwitch dvsSwitch) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean deleteDvsSwitchData(String s, String s1) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public PInterface requestPInterfaceData(String s, String s1) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean postPInterfaceData(String s, String s1, PInterface pInterface) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean deletePInterfaceData(String s, String s1, String s2) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public PhysicalLink requestPhysicalLinkData(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean postPhysicalLinkData(String s, PhysicalLink physicalLink) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean deletePhysicalLinkData(String s, String s1) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public PServer requestPServerData(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean postPServerData(String s, PServer pServer) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean deletePServerData(String s, String s1) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public L3Network requestL3NetworkData(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public L3Network requestL3NetworkQueryByName(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean postL3NetworkData(String s, L3Network l3Network) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean deleteL3NetworkData(String s, String s1) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public VpnBinding requestVpnBindingData(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean deleteVpnBindingData(String s, String s1) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public VnfImage requestVnfImageData(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public VnfImage requestVnfImageDataByVendorModel(String s, String s1) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public VnfImage requestVnfImageDataByVendorModelVersion(String s, String s1, String s2) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean sendNotify(NotifyEvent notifyEvent, String s, String s1) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public SitePairSet requestSitePairSetData(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean postSitePairSetData(String s, SitePairSet sitePairSet) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean deleteSitePairSetData(String s, String s1) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public Service requestServiceData(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean postServiceData(String s, Service service) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean deleteServiceData(String s, String s1) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public QueryResponse requestNodeQuery(String s, String s1, String s2) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public String requestDataByURL(URL url) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public GenericVnf requestGenericVnfeNodeQuery(String s) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public Tenant requestTenantData(String s, String s1, String s2) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public Tenant requestTenantDataByName(String s, String s1, String s2) throws AAIServiceException {
+        return null;
+    }
+
+    @Override
+    public boolean postTenantData(String s, String s1, String s2, Tenant tenant) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public boolean updateAnAIEntry(Update update) throws AAIServiceException {
+        return false;
+    }
+
+    @Override
+    public QueryStatus backup(Map<String, String> map, SvcLogicContext svcLogicContext) throws SvcLogicException {
+        return null;
+    }
+
+    @Override
+    public QueryStatus restore(Map<String, String> map, SvcLogicContext svcLogicContext) throws SvcLogicException {
+        return null;
+    }
+
+    @Override
+    public QueryStatus isAvailable(String s, String s1, String s2, SvcLogicContext svcLogicContext) throws SvcLogicException {
+        return null;
+    }
+
+    @Override
+    public QueryStatus exists(String s, String s1, String s2, SvcLogicContext svcLogicContext) throws SvcLogicException {
+        return null;
+    }
+
+    @Override
+    public QueryStatus query(String s, boolean b, String s1, String key, String prefix, String s4, SvcLogicContext ctx) throws SvcLogicException {
+        if (s.equals("generic-vnf") && key.equals("vnf-id = 'test_VNF'") && ctx != null) {
+            for (Map.Entry<String, String> entry : mockAAI.entrySet()) {
+                ctx.setAttribute(prefix + "." + entry.getKey(), entry.getValue());
+            }
+            return QueryStatus.SUCCESS;
+
+
+        } else if (key.equals("vnf-id = 'test_VNF1'")){
+            return QueryStatus.NOT_FOUND;
+        }
+        else if (key.equals("vnf-id = 'test_VNF3'")){
+            throw new SvcLogicException();
+        }
+        else {
+            return QueryStatus.FAILURE;
+        }
+
+
+    }
+
+    @Override
+    public QueryStatus reserve(String s, String s1, String s2, String s3, SvcLogicContext svcLogicContext) throws SvcLogicException {
+        return null;
+    }
+
+    @Override
+    public QueryStatus save(String s, boolean b, boolean b1, String s1, Map<String, String> map, String s2, SvcLogicContext svcLogicContext) throws SvcLogicException {
+        return null;
+    }
+
+    @Override
+    public QueryStatus release(String s, String s1, SvcLogicContext svcLogicContext) throws SvcLogicException {
+        return null;
+    }
+
+    @Override
+    public QueryStatus delete(String s, String s1, SvcLogicContext svcLogicContext) throws SvcLogicException {
+        return null;
+    }
+
+    @Override
+    public QueryStatus notify(String s, String s1, SvcLogicContext svcLogicContext) throws SvcLogicException {
+        return null;
+    }
+
+    @Override
+    public QueryStatus update(String s, String key, Map<String, String> data, String prefix, SvcLogicContext ctx) throws SvcLogicException {
+        if (s.equals("generic-vnf") && key.equals("vnf-id = 'test_VNF'") && ctx != null) {
+            for (Map.Entry<String, String> entry : data.entrySet()) {
+                mockAAI.put(entry.getKey(), entry.getValue());
+            }
+            return QueryStatus.SUCCESS;
+
+
+        } else if (key.equals("vnf-id = 'test_VNF1'")){
+            return QueryStatus.NOT_FOUND;
+        }
+        else if (key.equals("vnf-id = 'test_VNF3'")){
+            throw new SvcLogicException();
+        }
+        else {
+            return QueryStatus.FAILURE;
+        }
+
+    }
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/test/java/org/openecomp/appc/dg/aai/impl/AAIPluginImplTest.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/test/java/org/openecomp/appc/dg/aai/impl/AAIPluginImplTest.java
new file mode 100644
index 0000000..8d6fea0
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-aai/src/main/test/java/org/openecomp/appc/dg/aai/impl/AAIPluginImplTest.java
@@ -0,0 +1,260 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.aai.impl;
+
+import org.junit.*;
+import org.junit.runner.RunWith;
+import org.mockito.*;
+import org.openecomp.appc.dg.aai.Constants;
+import org.openecomp.appc.dg.aai.impl.AAIPluginImpl;
+import org.openecomp.appc.dg.common.dao.DAOService;
+import org.openecomp.appc.dg.common.impl.LicenseManagerImpl;
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicResource;
+import org.openecomp.sdnc.sli.aai.AAIClient;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+import java.lang.reflect.Field;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.junit.Assert.*;
+import static org.powermock.api.support.SuppressCode.suppressConstructor;
+
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({AAIPluginImpl.class, FrameworkUtil.class})
+public class AAIPluginImplTest {
+    private AAIPluginImpl aaiPlugin;
+    private AAIClientMock aaiClient;
+
+    private final BundleContext bundleContext= Mockito.mock(BundleContext.class);
+    private final Bundle bundleService=Mockito.mock(Bundle.class);
+    private final ServiceReference sref=Mockito.mock(ServiceReference.class);
+
+    String prefix = "aai.input.data";
+    String vnfId = "test_VNF";
+    String vnfId1 = "test_VNF1";
+    String vnfId2 = "test_VNF2";
+    String vnfId3 = "test_VNF3";
+
+    @Before
+    public void setUp() throws NoSuchFieldException, IllegalAccessException {
+        aaiClient = new AAIClientMock();
+        PowerMockito.mockStatic(FrameworkUtil.class);
+        PowerMockito.when(FrameworkUtil.getBundle(Matchers.any(Class.class))).thenReturn(bundleService);
+        PowerMockito.when(bundleService.getBundleContext()).thenReturn(bundleContext);
+        PowerMockito.when(bundleContext.getServiceReference(Matchers.any(Class.class))).thenReturn(sref);
+        PowerMockito.when(bundleContext.getService(sref)).thenReturn(aaiClient);
+        aaiPlugin = new AAIPluginImpl();
+
+
+    }
+
+
+
+
+    @Test
+    public void testPostGenericVnfData() throws Exception {
+        Map<String, String> params = new HashMap<>();
+        params.put(prefix+"."+"license-key-uuid", "123");
+        params.put(prefix+"."+"license-assignment-group-uuid", "1234");
+        params.put(prefix+"."+"data.license-key", "12345");
+
+        HashMap<String, String> mockAAI = new HashMap<>();
+        aaiClient.setMockAAI(mockAAI);
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("aai.vnfID", vnfId);
+        ctx.setAttribute("aai.prefix", prefix);
+
+        aaiPlugin.postGenericVnfData(params, ctx);
+
+        Assert.assertEquals("wrong license-key-uuid","123", mockAAI.get("license-key-uuid"));
+        Assert.assertEquals("wrong license-assignment-group-uuid","1234", mockAAI.get("license-assignment-group-uuid"));
+        Assert.assertEquals("wrong data.license-key","12345", mockAAI.get("data.license-key"));
+    }
+
+
+    @Test
+    public void testPostGenericVnfDataNegativeVnfNotFound() throws Exception {
+        Map<String, String> params = new HashMap<>();
+        params.put(prefix+"."+"license-key-uuid", "123");
+        params.put(prefix+"."+"license-assignment-group-uuid", "1234");
+        params.put(prefix+"."+"data.license-key", "12345");
+
+        HashMap<String, String> mockAAI = new HashMap<>();
+
+        aaiClient.setMockAAI(mockAAI);
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("aai.vnfID", vnfId1);
+        ctx.setAttribute("aai.prefix", prefix);
+
+        try {
+            aaiPlugin.postGenericVnfData(params, ctx);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+            Assert.assertNotNull(ctx.getAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE));
+        }
+
+    }
+
+
+    @Test
+    public void testPostGenericVnfDataNegativeFailure() throws Exception {
+        Map<String, String> params = new HashMap<>();
+        params.put(prefix+"."+"license-key-uuid", "123");
+        params.put(prefix+"."+"license-assignment-group-uuid", "1234");
+        params.put(prefix+"."+"data.license-key", "12345");
+
+        HashMap<String, String> mockAAI = new HashMap<>();
+
+        aaiClient.setMockAAI(mockAAI);
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("aai.vnfID", vnfId2);
+        ctx.setAttribute("aai.prefix", prefix);
+
+        try {
+            aaiPlugin.postGenericVnfData(params, ctx);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+            Assert.assertNotNull(ctx.getAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE));
+        }
+
+    }
+
+
+    @Test
+    public void testPostGenericVnfDataNegativeSvcLogicException() throws Exception {
+        Map<String, String> params = new HashMap<>();
+        params.put(prefix+"."+"license-key-uuid", "123");
+        params.put(prefix+"."+"license-assignment-group-uuid", "1234");
+        params.put(prefix+"."+"data.license-key", "12345");
+
+        HashMap<String, String> mockAAI = new HashMap<>();
+
+        aaiClient.setMockAAI(mockAAI);
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("aai.vnfID", vnfId3);
+        ctx.setAttribute("aai.prefix", prefix);
+
+        try {
+            aaiPlugin.postGenericVnfData(params, ctx);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+            Assert.assertNotNull(ctx.getAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE));
+        }
+
+    }
+
+    @Test
+    public void testGetGenericVnfData() throws Exception {
+        String vnfNameKey = "vnf-name";
+        String vnfType = "VSCP";
+        String vnfTypeKey = "vnf-type";
+        String provStatus = "Active";
+        String provStatusKey = "prov-status";
+        String orchestrationStatus = "Running";
+        String orchestrationStatusKey = "orchestration-status";
+
+        Map<String, String> params = new HashMap<>();
+        HashMap<String, String> mockAAI = new HashMap<>();
+        mockAAI.put(vnfNameKey,vnfId);
+        mockAAI.put(vnfTypeKey,vnfType);
+        mockAAI.put(provStatusKey, provStatus);
+        mockAAI.put(orchestrationStatusKey, orchestrationStatus);
+        aaiClient.setMockAAI(mockAAI);
+
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("aai.vnfID", vnfId);
+        ctx.setAttribute("aai.prefix", prefix);
+
+
+        aaiPlugin.getGenericVnfData(params, ctx);
+
+        Assert.assertEquals("wrong "+vnfNameKey,vnfId, ctx.getAttribute(prefix + "." + vnfNameKey));
+        Assert.assertEquals("wrong "+orchestrationStatusKey,orchestrationStatus, ctx.getAttribute(prefix + "." + orchestrationStatusKey));
+        Assert.assertEquals("wrong "+vnfTypeKey,vnfType, ctx.getAttribute(prefix + "." +  vnfTypeKey));
+        Assert.assertEquals("wrong "+provStatusKey,provStatus, ctx.getAttribute(prefix + "." + provStatusKey ));
+    }
+
+
+
+
+    @Test
+    public void testGetGenericVnfDataNegativeVnfNotFound() throws Exception {
+
+        Map<String, String> params = new HashMap<>();
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("aai.vnfID", vnfId1);
+        ctx.setAttribute("aai.prefix", prefix);
+
+
+        try {
+            aaiPlugin.getGenericVnfData(params, ctx);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+            Assert.assertNotNull(ctx.getAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE));
+        }
+    }
+
+
+    @Test
+    public void testGetGenericVnfDataNegativeFailure() throws Exception {
+
+        Map<String, String> params = new HashMap<>();
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("aai.vnfID", vnfId2);
+        ctx.setAttribute("aai.prefix", prefix);
+
+        try {
+            aaiPlugin.getGenericVnfData(params, ctx);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+            Assert.assertNotNull(ctx.getAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE));
+        }
+    }
+
+
+    @Test
+    public void testGetGenericVnfDataNegativeSvcLogicException() throws Exception {
+
+        Map<String, String> params = new HashMap<>();
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("aai.vnfID", vnfId3);
+        ctx.setAttribute("aai.prefix", prefix);
+
+        try {
+            aaiPlugin.getGenericVnfData(params, ctx);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+            Assert.assertNotNull(ctx.getAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE));
+        }
+    }
+
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/.gitignore b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/.settings/org.eclipse.wst.common.project.facet.core.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..f4ef8aa
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <installed facet="java" version="1.8"/>
+</faceted-project>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/pom.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/pom.xml
new file mode 100644
index 0000000..e41a3cb
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/pom.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.openecomp.appc</groupId>
+		<artifactId>appc-dg-shared</artifactId>
+		<version>1.0.0</version>
+	</parent>
+	<artifactId>appc-dg-common</artifactId>
+	<packaging>bundle</packaging>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-common</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-dmaap-adapter-bundle</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.sdnc.core</groupId>
+			<artifactId>sli-common</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.sdnc.core</groupId>
+			<artifactId>sli-provider</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.mockito</groupId>
+			<artifactId>mockito-core</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.powermock</groupId>
+			<artifactId>powermock-api-mockito</artifactId>
+			<version>1.6.2</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.powermock</groupId>
+			<artifactId>powermock-module-junit4</artifactId>
+			<version>1.6.2</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.powermock</groupId>
+			<artifactId>powermock-api-easymock</artifactId>
+			<version>1.6.2</version>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>appc-dg-common</Bundle-SymbolicName>
+						<Export-Package>org.openecomp.appc.dg.common,org.openecomp.appc.dg.common.objects,org.openecomp.appc.dg.common.utils</Export-Package>
+						<Private-Package>org.openecomp.appc.dg.common.impl.*</Private-Package>
+						<Import-Package>!org.apache.log,!org.apache.commons.logging,!groovy.lang,!javax.jms,!org.codehaus.commons.compiler,!org.codehaus.groovy.*,!org.codehaus.janino,!com.ibm.icu.*,!com.sun.faces.*,!org.jasypt.*,*</Import-Package>
+						<Embed-Dependency>appc-common,eelf-core,logback-core,logback-classic;scope=compile|runtime;inline=false</Embed-Dependency>
+						<Embed-Transitive>true</Embed-Transitive>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/DCAEReporterPlugin.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/DCAEReporterPlugin.java
new file mode 100644
index 0000000..a990380
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/DCAEReporterPlugin.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.common;
+
+import java.util.Map;
+
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicJavaPlugin;
+
+
+public interface DCAEReporterPlugin extends SvcLogicJavaPlugin {
+    void report(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+    void reportSuccess(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/JsonDgUtil.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/JsonDgUtil.java
new file mode 100644
index 0000000..2b3fbf7
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/JsonDgUtil.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.common;
+
+import java.util.Map;
+
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicJavaPlugin;
+
+
+public interface JsonDgUtil extends SvcLogicJavaPlugin {
+    void flatAndAddToContext(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/LegacyUtil.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/LegacyUtil.java
new file mode 100644
index 0000000..a356a15
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/LegacyUtil.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.common;
+
+import java.util.Map;
+
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicJavaPlugin;
+
+
+
+public interface LegacyUtil extends SvcLogicJavaPlugin {
+
+    void prepareRequest(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+
+    void convertPositiveResponse(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+
+    void convertNegativeResponse(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/impl/Constants.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/impl/Constants.java
new file mode 100644
index 0000000..92d23e3
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/impl/Constants.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.common.impl;
+
+
+
+class Constants {
+
+    public static final String DG_ERROR_FIELD_NAME = "org.openecomp.appc.dg.error";
+    public static final String DG_OUTPUT_STATUS_MESSAGE = "output.status.message";
+    public static final String API_VERSION_FIELD_NAME = "org.openecomp.appc.apiversion";
+    public static final String REQ_ID_FIELD_NAME = "org.openecomp.appc.reqid";
+    public static final String PAYLOAD = "payload";
+
+    enum LegacyAttributes {
+        Action("org.openecomp.appc.action"),
+        VMID("org.openecomp.appc.vmid"),
+        IdentityURL("org.openecomp.appc.identity.url"),
+        TenantID("org.openecomp.appc.tenant.id");
+
+        private String value;
+        LegacyAttributes(String value) {this.value = value;}
+        String getValue() {return value;}
+    };
+
+    enum LCMAttributes {
+        Action("input.action"),
+        Payload("input.payload"),
+        VMID("vm-id"),
+        IdentityURL("identity-url"),
+        TenantID("tenant.id");
+
+        private String value;
+        LCMAttributes(String value) {this.value = value;}
+        String getValue() {return value;}
+    };
+
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/impl/DCAEReporterPluginImpl.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/impl/DCAEReporterPluginImpl.java
new file mode 100644
index 0000000..4458de1
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/impl/DCAEReporterPluginImpl.java
@@ -0,0 +1,121 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.common.impl;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openecomp.appc.adapter.dmaap.EventSender;
+import org.openecomp.appc.adapter.dmaap.DmaapDestination;
+import org.openecomp.appc.adapter.dmaap.event.EventHeader;
+import org.openecomp.appc.adapter.dmaap.event.EventMessage;
+import org.openecomp.appc.adapter.dmaap.event.EventStatus;
+import org.openecomp.appc.dg.common.DCAEReporterPlugin;
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+
+import java.util.Map;
+
+public class DCAEReporterPluginImpl implements DCAEReporterPlugin {
+
+    private EventSender eventSender;
+
+    public DCAEReporterPluginImpl() {
+        BundleContext bctx = FrameworkUtil.getBundle(this.getClass()).getBundleContext();
+        ServiceReference sref = bctx.getServiceReference(EventSender.class);
+        eventSender = (EventSender) bctx.getService(sref);
+    }
+
+    @Override
+    public void report(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        Integer errorReportCode = 501;
+        boolean bwcMode = Boolean.parseBoolean(ctx.getAttribute("isBwcMode"));
+        String errorDescription,apiVersion,eventId ;
+        errorDescription = getErrorDescriptionAndAddToCtx(bwcMode,params,ctx);
+        if(!bwcMode){
+            apiVersion = ctx.getAttribute("input.common-header.api-ver");
+            eventId = ctx.getAttribute("input.common-header.request-id");
+        }else {
+            apiVersion = ctx.getAttribute(Constants.API_VERSION_FIELD_NAME);
+            eventId = ctx.getAttribute(Constants.REQ_ID_FIELD_NAME);
+        }
+
+        EventMessage eventMessage = new EventMessage(new EventHeader((new java.util.Date()).toString(), apiVersion, eventId), new EventStatus(errorReportCode, errorDescription));
+        eventSender.sendEvent(DmaapDestination.DCAE, eventMessage);
+    }
+
+    private String getErrorDescriptionAndAddToCtx(boolean bwcMode, Map<String, String> params, SvcLogicContext ctx) {
+        String errorDescription;
+        if(!bwcMode) {
+            errorDescription = params.get(Constants.DG_OUTPUT_STATUS_MESSAGE);
+            if(StringUtils.isEmpty(errorDescription)) {
+                errorDescription = ctx.getAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE);
+            }else {
+                addToContextIfNotContains(bwcMode,errorDescription,ctx);
+            }
+        }else{
+            errorDescription = params.get(Constants.DG_ERROR_FIELD_NAME);
+            if(StringUtils.isEmpty(errorDescription)) {
+                errorDescription = ctx.getAttribute("org.openecomp.appc.dg.error");
+            }else {
+                addToContextIfNotContains(bwcMode, errorDescription,ctx);
+            }
+        }
+
+        if(StringUtils.isEmpty(errorDescription)) {
+            errorDescription = "Unknown";
+        }
+        return errorDescription;
+    }
+
+    private void addToContextIfNotContains(boolean bwcMode, String errorDescription, SvcLogicContext ctx) {
+        String errorDescriptionFromCtx;
+        if(!StringUtils.isEmpty(errorDescription)) {
+            String outputStatusMessageProperty = bwcMode ? "org.openecomp.appc.dg.error" : Constants.DG_OUTPUT_STATUS_MESSAGE;
+            errorDescriptionFromCtx = ctx.getAttribute(outputStatusMessageProperty);
+            if(StringUtils.isEmpty(errorDescriptionFromCtx)){
+                ctx.setAttribute(outputStatusMessageProperty, errorDescription);
+            }else if  (!errorDescriptionFromCtx.contains(errorDescription)){
+                ctx.setAttribute(outputStatusMessageProperty, errorDescriptionFromCtx+ " | "+ errorDescription);
+            }
+        }
+    }
+
+
+    @Override
+    public void reportSuccess(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        Integer successReportCode = 500;
+        String successDescription, apiVersion, eventId;
+        successDescription = params.get(Constants.DG_OUTPUT_STATUS_MESSAGE);
+        apiVersion = ctx.getAttribute("input.common-header.api-ver");
+        eventId = ctx.getAttribute("input.common-header.request-id");
+        ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, successDescription);
+
+        if (null == successDescription) {
+            successDescription = "Success";
+        }
+        EventMessage eventMessage = new EventMessage(new EventHeader((new java.util.Date()).toString(), apiVersion, eventId), new EventStatus(successReportCode, successDescription));
+        eventSender.sendEvent(DmaapDestination.DCAE, eventMessage);
+    }
+
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/impl/JsonDgUtilImpl.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/impl/JsonDgUtilImpl.java
new file mode 100644
index 0000000..9519113
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/impl/JsonDgUtilImpl.java
@@ -0,0 +1,66 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.common.impl;
+
+import org.apache.commons.lang.ObjectUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.openecomp.appc.dg.common.JsonDgUtil;
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.appc.util.JsonUtil;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+
+import java.util.Map;
+
+
+public class JsonDgUtilImpl implements JsonDgUtil {
+    private static final EELFLogger logger = EELFManager.getInstance().getLogger(JsonDgUtilImpl.class);
+
+    @Override
+    public void flatAndAddToContext(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+
+        if (logger.isTraceEnabled()) {
+            logger.trace("Entering to flatAndAddToContext with params = "+ ObjectUtils.toString(params)+", SvcLogicContext = "+ObjectUtils.toString(ctx));
+        }
+        try {
+            String paramName = Constants.PAYLOAD;
+            String payload = params.get(paramName);
+            if (payload == "")
+                payload = ctx.getAttribute("input.payload");
+            if (!StringUtils.isEmpty(payload)) {
+                Map<String, String> flatMap = JsonUtil.convertJsonStringToFlatMap(payload);
+                if (flatMap != null && flatMap.size() > 0) {
+                    for (Map.Entry<String, String> entry : flatMap.entrySet()) {
+                        ctx.setAttribute(entry.getKey(), entry.getValue());
+                    }
+                }
+            } else {
+                logger.warn("input payload param value is empty (\"\") or null");
+            }
+        } catch (Exception e) {
+            logger.error(e.toString());
+            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, e.toString());
+            throw new APPCException(e);
+        }
+    }
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/impl/LegacyUtilImpl.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/impl/LegacyUtilImpl.java
new file mode 100644
index 0000000..6354b20
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/impl/LegacyUtilImpl.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.common.impl;
+
+import java.util.Map;
+
+import org.openecomp.appc.dg.common.LegacyUtil;
+import org.openecomp.appc.dg.common.utils.JSONUtil;
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+
+
+
+public class LegacyUtilImpl implements LegacyUtil {
+
+    @Override public void prepareRequest(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        ctx.setAttribute(Constants.LegacyAttributes.Action.getValue(), ctx.getAttribute(Constants.LCMAttributes.Action.getValue()).toLowerCase());
+
+        String payloadStr = ctx.getAttribute(Constants.LCMAttributes.Payload.getValue());
+        Map<String,String> payloads = JSONUtil.extractPlainValues(payloadStr,
+                        Constants.LCMAttributes.VMID.getValue(), Constants.LCMAttributes.IdentityURL.getValue(), Constants.LCMAttributes.TenantID.getValue());
+
+        ctx.setAttribute(Constants.LegacyAttributes.VMID.getValue(), payloads.get(Constants.LCMAttributes.VMID.getValue()));
+        ctx.setAttribute(Constants.LegacyAttributes.IdentityURL.getValue(), payloads.get(Constants.LCMAttributes.IdentityURL.getValue()));
+        ctx.setAttribute(Constants.LegacyAttributes.TenantID.getValue(), payloads.get(Constants.LCMAttributes.TenantID.getValue()));
+
+    }
+
+    @Override
+    public void convertPositiveResponse(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+    }
+
+    @Override
+    public void convertNegativeResponse(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+    }
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/objects/ConnectionDetails.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/objects/ConnectionDetails.java
new file mode 100644
index 0000000..d576555
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/objects/ConnectionDetails.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.common.objects;
+
+
+
+public class ConnectionDetails {
+
+    private String host;
+    private int port;
+    private String username;
+    private String password;
+
+    public String getHost() {
+        return host;
+    }
+
+    public void setHost(String host) {
+        this.host = host;
+    }
+
+    public int getPort() {
+        return port;
+    }
+
+    public void setPort(int port) {
+        this.port = port;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/utils/JAXBUtil.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/utils/JAXBUtil.java
new file mode 100644
index 0000000..a298e9c
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/utils/JAXBUtil.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.common.utils;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+
+
+public class JAXBUtil {
+
+    public static <T> T toObject(String xml, Class<T> type) throws JAXBException {
+
+        //create JAXB context
+        JAXBContext context = JAXBContext.newInstance(type);
+
+        //Create Unmarshaller using JAXB context
+        Unmarshaller unmarshaller = context.createUnmarshaller();
+
+        InputStream xmlInputStream = new ByteArrayInputStream(xml.getBytes());
+        BufferedReader reader = new BufferedReader(new InputStreamReader(xmlInputStream));
+
+        return type.cast(unmarshaller.unmarshal(reader));
+
+    }
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/utils/JSONUtil.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/utils/JSONUtil.java
new file mode 100644
index 0000000..fe71974
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/openecomp/appc/dg/common/utils/JSONUtil.java
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.common.utils;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.util.*;
+
+
+public class JSONUtil {
+
+    private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
+
+    public static <T> T fromJson(String json, Class<T> clazz) {
+
+        try {
+            return OBJECT_MAPPER.readValue(json, clazz);
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public static <T> T fromJson(Reader reader, Class<T> clazz) {
+
+        try {
+            return OBJECT_MAPPER.readValue(reader, clazz);
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public static String toJson(Object object) {
+
+        try {
+            return OBJECT_MAPPER.writeValueAsString(object);
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public static Map<String,String> extractPlainValues(String json, String ... names) {
+        if (null == names) return Collections.emptyMap();
+        Map<String,String> values = new HashMap<>();
+        try {
+            final JsonNode jsonNode = OBJECT_MAPPER.readTree(json);
+            for (String name : names) {
+                values.put(name, jsonNode.path(name).asText());
+            }
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+        return values;
+    }
+
+
+
+
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/resources/OSGI-INF/blueprint/blueprint.xml
new file mode 100644
index 0000000..53b5367
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+  openECOMP : APP-C
+  ================================================================================
+  Copyright (C) 2017 AT&T 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=========================================================
+  -->
+
+<!--
+    Starter Blueprint Camel Definition appc-aai-adapter-blueprint
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+		   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		   xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+	<bean id="JsonDgUtilBean" class="org.openecomp.appc.dg.common.impl.JsonDgUtilImpl"/>
+    <service id="JsonDgUtil" interface="org.openecomp.appc.dg.common.JsonDgUtil" ref="JsonDgUtilBean"/>
+
+    <reference id="eventSenderRef" availability="mandatory" activation="eager" interface="org.openecomp.appc.adapter.dmaap.EventSender" />
+
+	<bean id="DCAEReporterPluginBean" class="org.openecomp.appc.dg.common.impl.DCAEReporterPluginImpl" scope="singleton"/>
+	<service id="DCAEReporterPlugin" interface="org.openecomp.appc.dg.common.DCAEReporterPlugin" ref="DCAEReporterPluginBean"/>
+
+	<bean id="legacyUtilBean" class="org.openecomp.appc.dg.common.impl.LegacyUtilImpl" scope="singleton"/>
+	<service id="legacyUtil" interface="org.openecomp.appc.dg.common.LegacyUtil" ref="legacyUtilBean"/>
+
+</blueprint>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/resources/org/openecomp/appc/default.properties b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/resources/org/openecomp/appc/default.properties
new file mode 100644
index 0000000..d8451ee
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/resources/org/openecomp/appc/default.properties
@@ -0,0 +1,47 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : APP-C
+# ================================================================================
+# Copyright (C) 2017 AT&T 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=========================================================
+###
+
+org.openecomp.appc.bootstrap.file=appc.properties
+org.openecomp.appc.bootstrap.path=/opt/openecomp/appc/data/properties,${user.home},.
+
+org.openecomp.appc.netconf.db.url.netconfctl=jdbc:mysql://127.0.0.1:3306/test
+org.openecomp.appc.netconf.db.user.netconfctl=test
+org.openecomp.appc.netconf.db.pass.netconfctl=123456
+
+org.openecomp.appc.db.url.sdnctl=jdbc:mysql://127.0.0.1:3306/test
+org.openecomp.appc.db.user.sdnctl=test
+org.openecomp.appc.db.pass.sdnctl=123456
+
+org.openecomp.appc.netconf.db.url.sdnctl=jdbc:mysql://127.0.0.1:3306/test
+org.openecomp.appc.netconf.db.user.sdnctl=test
+org.openecomp.appc.netconf.db.pass.sdnctl=123456
+
+###																###
+### Properties commented out below provided in appc.properties  ###
+###																###
+#event.pool.members=<MY_DMAAP_URL>
+event.topic.write=APPC-TEST1
+event.client.key=VIlbtVl6YLhNUrtU
+event.client.secret=64AG2hF4pYeG2pq7CT6XwUOT
+#restconf.user=<RESTCONF_USER>
+#restconf.pass=<RESTCONF_PASSWORD>
+
+org.openecomp.appc.adapter.netconf.VNFOperationalStateValidatorImpl-CONFIG_FILE=VnfGetOperationalStates
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/resources/xsd/vf-license-model.xsd b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/resources/xsd/vf-license-model.xsd
new file mode 100644
index 0000000..9fb9796
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/main/resources/xsd/vf-license-model.xsd
@@ -0,0 +1,88 @@
+<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+  <xs:element name="vf-license-model">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element type="xs:string" name="vnf-id"/>
+        <xs:element type="xs:string" name="vendor-name"/>
+        <xs:element name="feature-group-list">
+          <xs:complexType>
+            <xs:sequence>
+              <xs:element name="feature-group">
+                <xs:complexType>
+                  <xs:sequence>
+                    <xs:element type="xs:string" name="feature-group-uuid"/>
+                    <xs:element type="xs:string" name="name"/>
+                    <xs:element type="xs:string" name="description"/>
+                    <xs:element type="xs:string" name="att-part-number"/>
+                    <xs:element name="entitlement-pool-list">
+                      <xs:complexType>
+                        <xs:sequence>
+                          <xs:element name="entitlement-pool">
+                            <xs:complexType>
+                              <xs:sequence>
+                                <xs:element type="xs:string" name="entitlement-pool-uuid"/>
+                                <xs:element type="xs:string" name="name"/>
+                                <xs:element type="xs:string" name="description"/>
+                                <xs:element type="xs:string" name="manufacturer-reference-number"/>
+                                <xs:element name="threshold-value">
+                                  <xs:complexType>
+                                    <xs:sequence>
+                                      <xs:element type="xs:byte" name="value"/>
+                                      <xs:element type="xs:string" name="unit"/>
+                                    </xs:sequence>
+                                  </xs:complexType>
+                                </xs:element>
+                                <xs:element name="entitlement-metric">
+                                  <xs:complexType>
+                                    <xs:sequence>
+                                      <xs:element type="xs:string" name="value"/>
+                                    </xs:sequence>
+                                  </xs:complexType>
+                                </xs:element>
+                                <xs:element type="xs:string" name="increments"/>
+                                <xs:element name="aggregation-function">
+                                  <xs:complexType>
+                                    <xs:sequence>
+                                      <xs:element type="xs:string" name="value"/>
+                                    </xs:sequence>
+                                  </xs:complexType>
+                                </xs:element>
+                                <xs:element name="time">
+                                  <xs:complexType>
+                                    <xs:sequence>
+                                      <xs:element type="xs:string" name="value"/>
+                                    </xs:sequence>
+                                  </xs:complexType>
+                                </xs:element>
+                              </xs:sequence>
+                            </xs:complexType>
+                          </xs:element>
+                        </xs:sequence>
+                      </xs:complexType>
+                    </xs:element>
+                    <xs:element name="license-key-group-list">
+                      <xs:complexType>
+                        <xs:sequence>
+                          <xs:element name="license-key-group">
+                            <xs:complexType>
+                              <xs:sequence>
+                                <xs:element type="xs:string" name="license-key-group-uuid"/>
+                                <xs:element type="xs:string" name="name"/>
+                                <xs:element type="xs:string" name="description"/>
+                                <xs:element type="xs:string" name="type"/>
+                              </xs:sequence>
+                            </xs:complexType>
+                          </xs:element>
+                        </xs:sequence>
+                      </xs:complexType>
+                    </xs:element>
+                  </xs:sequence>
+                </xs:complexType>
+              </xs:element>
+            </xs:sequence>
+          </xs:complexType>
+        </xs:element>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+</xs:schema>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/test/java/org/openecomp/appc/dg/common/impl/DCAEReporterPluginImplTest.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/test/java/org/openecomp/appc/dg/common/impl/DCAEReporterPluginImplTest.java
new file mode 100644
index 0000000..9b82900
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/test/java/org/openecomp/appc/dg/common/impl/DCAEReporterPluginImplTest.java
@@ -0,0 +1,154 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.common.impl;
+
+import org.junit.*;
+import org.junit.runner.RunWith;
+import org.mockito.*;
+import org.openecomp.appc.adapter.dmaap.EventSender;
+import org.openecomp.appc.adapter.dmaap.DmaapDestination;
+import org.openecomp.appc.adapter.dmaap.event.EventMessage;
+import org.openecomp.appc.dg.common.impl.Constants;
+import org.openecomp.appc.dg.common.impl.DCAEReporterPluginImpl;
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import java.util.HashMap;
+import java.util.Map;
+
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({DCAEReporterPluginImpl.class, FrameworkUtil.class})
+public class DCAEReporterPluginImplTest {
+    private SvcLogicContext ctx;
+    private Map<String, String> params;
+
+    private final BundleContext bundleContext=Mockito.mock(BundleContext.class);
+    private final Bundle bundleService=Mockito.mock(Bundle.class);
+    private final ServiceReference sref=Mockito.mock(ServiceReference.class);
+
+
+    private DCAEReporterPluginImpl dcaeReporterPlugin;
+    private EventSenderMock eventSender;
+
+    private String apiVer = "2.0.0";
+    private String requestId = "123";
+    private String error = "test-error";
+
+    @Before
+    public void setUp() throws NoSuchFieldException, IllegalAccessException {
+        eventSender = new EventSenderMock();
+        PowerMockito.mockStatic(FrameworkUtil.class);
+        PowerMockito.when(FrameworkUtil.getBundle(Matchers.any(Class.class))).thenReturn(bundleService);
+        PowerMockito.when(bundleService.getBundleContext()).thenReturn(bundleContext);
+        PowerMockito.when(bundleContext.getServiceReference(Matchers.any(Class.class))).thenReturn(sref);
+        PowerMockito.when(bundleContext.getService(sref)).thenReturn(eventSender);
+        dcaeReporterPlugin = new DCAEReporterPluginImpl();
+
+    }
+
+
+
+
+    @Test
+    public void testReportBwcTrue() throws Exception {
+
+        ctx = new SvcLogicContext();
+        params = new HashMap<>();
+        ctx.setAttribute("isBwcMode", "true");
+        params.put(Constants.DG_ERROR_FIELD_NAME, error);
+        ctx.setAttribute(Constants.API_VERSION_FIELD_NAME, apiVer);
+        ctx.setAttribute(Constants.REQ_ID_FIELD_NAME, requestId);
+
+            positiveAssert();
+    }
+
+    @Test
+    public void testReportErrorDescriptionNullBwcModeTrue() throws Exception {
+
+        ctx = new SvcLogicContext();
+        params = new HashMap<>();
+        ctx.setAttribute("isBwcMode", "true");
+        params.put(Constants.DG_ERROR_FIELD_NAME, null);
+        ctx.setAttribute(Constants.API_VERSION_FIELD_NAME, apiVer);
+        ctx.setAttribute(Constants.REQ_ID_FIELD_NAME, requestId);
+
+        errorReasonNullAssert();
+    }
+
+    @Test
+    public void testReportErrorDescriptionNullBwcModeFalse() throws Exception {
+
+        ctx = new SvcLogicContext();
+        params = new HashMap<>();
+        ctx.setAttribute("isBwcMode", "false");
+        params.put("output.status.message", null);
+        ctx.setAttribute("input.common-header.api-ver", apiVer);
+        ctx.setAttribute("input.common-header.request-id", requestId);
+
+        errorReasonNullAssert();
+    }
+
+
+    private void errorReasonNullAssert() throws APPCException {
+        dcaeReporterPlugin.report(params, ctx);
+        DmaapDestination destination = eventSender.getDestination();
+        EventMessage msg = eventSender.getMsg();
+        Assert.assertEquals("wrong API version", apiVer, msg.getEventHeader().getApiVer());
+        Assert.assertEquals("wrong requestId", requestId, msg.getEventHeader().getEventId());
+        Assert.assertEquals("wrong error message", "Unknown", msg.getEventStatus().getReason());
+        Assert.assertEquals("wrong destination", destination.name(), "DCAE");
+
+    }
+
+
+    private void positiveAssert() throws APPCException {
+        dcaeReporterPlugin.report(params, ctx);
+        DmaapDestination destination = eventSender.getDestination();
+        EventMessage msg = eventSender.getMsg();
+        Assert.assertEquals("wrong API version", apiVer, msg.getEventHeader().getApiVer());
+        Assert.assertEquals("wrong requestId", requestId, msg.getEventHeader().getEventId());
+        Assert.assertEquals("wrong error message", error, msg.getEventStatus().getReason());
+        Assert.assertEquals("wrong destination", destination.name(), "DCAE");
+
+    }
+
+
+    @Test
+            public void testReportBwcFalse() throws Exception {
+                ctx = new SvcLogicContext();
+                params = new HashMap<>();
+                ctx.setAttribute("isBwcMode", "false");
+                params.put("output.status.message", error);
+                ctx.setAttribute("input.common-header.api-ver", apiVer);
+                ctx.setAttribute("input.common-header.request-id", requestId);
+
+                positiveAssert();
+
+            }
+        }
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/test/java/org/openecomp/appc/dg/common/impl/EventSenderMock.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/test/java/org/openecomp/appc/dg/common/impl/EventSenderMock.java
new file mode 100644
index 0000000..0e6b165
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/test/java/org/openecomp/appc/dg/common/impl/EventSenderMock.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.common.impl;
+
+import java.util.Map;
+
+import org.openecomp.appc.adapter.dmaap.EventSender;
+import org.openecomp.appc.adapter.dmaap.DmaapDestination;
+import org.openecomp.appc.adapter.dmaap.event.EventMessage;
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+
+
+public class EventSenderMock implements EventSender {
+    EventMessage msg;
+    DmaapDestination destination;
+
+    @Override
+    public boolean sendEvent(DmaapDestination destination, EventMessage msg) {
+        if (destination != null && msg != null){
+            this.msg = msg;
+            this.destination = destination;
+            return true;
+        }
+        else{
+            return false;
+        }
+    }
+
+    @Override
+    public boolean sendEvent(DmaapDestination destination, Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        return false;
+    }
+
+    public EventMessage getMsg() {
+        return msg;
+    }
+
+    public DmaapDestination getDestination() {
+        return destination;
+    }
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/test/java/org/openecomp/appc/dg/common/impl/JsonDgUtilImplTest.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/test/java/org/openecomp/appc/dg/common/impl/JsonDgUtilImplTest.java
new file mode 100644
index 0000000..7053487
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-common/src/test/java/org/openecomp/appc/dg/common/impl/JsonDgUtilImplTest.java
@@ -0,0 +1,145 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.common.impl;
+
+import ch.qos.logback.core.Appender;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.appc.dg.common.impl.JsonDgUtilImpl;
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.mock;
+
+public class JsonDgUtilImplTest {
+
+    private final Appender appender = mock(Appender.class);
+
+
+    @Test
+    public void testFlatAndAddToContext() throws Exception {
+        JsonDgUtilImpl jsonDgUtil = new JsonDgUtilImpl();
+        String key = "payload";
+        String testValueKey = "test-key";
+        String testValueValue = "test-value";
+        String testValueKey2 = "test-key2";
+        String testValueValue2 = "test-value2";
+        String payload = "{\"" + testValueKey + "\": \"" + testValueValue + "\",\""+testValueKey2+"\": \""+testValueValue2+"\"}";
+
+        SvcLogicContext ctx = new SvcLogicContext();
+        Map<String, String> params = new HashMap<>();
+        params.put(key, payload);
+        jsonDgUtil.flatAndAddToContext(params, ctx);
+
+
+            Assert.assertEquals(ctx.getAttribute(testValueKey), testValueValue);
+            Assert.assertEquals(ctx.getAttribute(testValueKey2), testValueValue2);
+
+
+
+    }
+
+
+    @Test
+    public void testFlatAndAddToContextNegativeWrongPayload() throws Exception {
+        JsonDgUtilImpl jsonDgUtil = new JsonDgUtilImpl();
+        String key = "payload";
+        String testValueKey = "test-key";
+        String testValueValue = "test-value";
+        String testValueKey2 = "test-key2";
+        String testValueValue2 = "test-value2";
+        String payload = "{{\"" + testValueKey + "\": \"" + testValueValue + "\",\""+testValueKey2+"\": \""+testValueValue2+"\"}";
+
+        SvcLogicContext ctx = new SvcLogicContext();
+        Map<String, String> params = new HashMap<>();
+        params.put(key, payload);
+        try {
+            jsonDgUtil.flatAndAddToContext(params, ctx);
+
+        } catch (APPCException e) {
+            Assert.assertNull(ctx.getAttribute(testValueKey));
+            Assert.assertNull(ctx.getAttribute(testValueKey2));
+            Assert.assertNotNull(ctx.getAttribute("output.status.message"));
+        }
+
+
+    }
+
+
+    @Test
+    public void testFlatAndAddToContextPayloadFromContext() throws Exception {
+        JsonDgUtilImpl jsonDgUtil = new JsonDgUtilImpl();
+        String key = "payload";
+        String testValueKey = "test-key";
+        String testValueValue = "test-value";
+        String testValueKey2 = "test-key2";
+        String testValueValue2 = "test-value2";
+        String payload = "{\"" + testValueKey + "\": \"" + testValueValue + "\",\""+testValueKey2+"\": \""+testValueValue2+"\"}";
+
+        SvcLogicContext ctx = new SvcLogicContext();
+        Map<String, String> params = new HashMap<>();
+        params.put(key, "");
+        ctx.setAttribute("input.payload", payload);
+        jsonDgUtil.flatAndAddToContext(params, ctx);
+
+
+        Assert.assertEquals(ctx.getAttribute(testValueKey), testValueValue);
+        Assert.assertEquals(ctx.getAttribute(testValueKey2), testValueValue2);
+    }
+
+    @Test
+    public void testFlatAndAddToContextNegativeNullPayload() throws Exception {
+        JsonDgUtilImpl jsonDgUtil = new JsonDgUtilImpl();
+        String testValueKey = "test-key";
+        String testValueKey2 = "test-key2";
+        SvcLogicContext ctx = new SvcLogicContext();
+        Map<String, String> params = new HashMap<>();
+        jsonDgUtil.flatAndAddToContext(params, ctx);
+
+
+        Assert.assertNull(ctx.getAttribute(testValueKey));
+        Assert.assertNull(ctx.getAttribute(testValueKey2));
+    }
+
+
+    @Test
+    public void testFlatAndAddToContextNegativeEmptyPayload() throws Exception {
+
+        JsonDgUtilImpl jsonDgUtil = new JsonDgUtilImpl();
+        String key = "payload";
+        String testValueKey = "test-key";
+        String testValueKey2 = "test-key2";
+
+        SvcLogicContext ctx = new SvcLogicContext();
+        Map<String, String> params = new HashMap<>();
+        params.put(key, "");
+        jsonDgUtil.flatAndAddToContext(params, ctx);
+
+        Assert.assertNull(ctx.getAttribute(testValueKey));
+        Assert.assertNull(ctx.getAttribute(testValueKey2));
+    }
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/.gitignore b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/.settings/org.eclipse.wst.common.project.facet.core.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..f4ef8aa
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <installed facet="java" version="1.8"/>
+</faceted-project>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/pom.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/pom.xml
new file mode 100644
index 0000000..63cb725
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.openecomp.appc</groupId>
+		<artifactId>appc-dg-shared</artifactId>
+		<version>1.0.0</version>
+	</parent>
+	<artifactId>appc-dg-license-manager</artifactId>
+	<packaging>bundle</packaging>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-dg-common</artifactId>
+			<version>${project.version}</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-license-manager-api</artifactId>
+			<version>1.0.0</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.sdnc.core</groupId>
+			<artifactId>sli-common</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.sdnc.core</groupId>
+			<artifactId>sli-provider</artifactId>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>appc-dg-license-manager</Bundle-SymbolicName>
+						<Export-Package>org.openecomp.appc.dg.licmgr</Export-Package>
+						<Export-Service>org.openecomp.appc.dg.licmgr.LicenseManagerPlugin</Export-Service>
+						<Private-Package>org.openecomp.appc.dg.licmgr.impl</Private-Package>
+						<Import-Package>org.openecomp.appc.licmgr,org.openecomp.appc.licmgr.exception,org.openecomp.appc.licmgr.objects,!org.apache.log,!org.apache.commons.logging,!groovy.lang,!javax.jms,!org.codehaus.commons.compiler,!org.codehaus.groovy.*,!org.codehaus.janino,!com.ibm.icu.*,!com.sun.faces.*,!org.jasypt.*,*</Import-Package>
+						<Embed-Dependency>appc-license-manager-api,appc-common,eelf-core,logback-core,logback-classic;scope=compile|runtime;inline=false</Embed-Dependency>
+						<Embed-Transitive>true</Embed-Transitive>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/src/main/java/org/openecomp/appc/dg/licmgr/LicenseManagerPlugin.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/src/main/java/org/openecomp/appc/dg/licmgr/LicenseManagerPlugin.java
new file mode 100644
index 0000000..6ca6b6a
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/src/main/java/org/openecomp/appc/dg/licmgr/LicenseManagerPlugin.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.licmgr;
+
+import java.util.Map;
+
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicJavaPlugin;
+
+
+
+public interface LicenseManagerPlugin extends SvcLogicJavaPlugin {
+    /**
+     * Retrieves license model from APPC database and populate flags into svc context
+     * @param params map with parameters:
+     *               org.openecomp.appc.vftype - the vnf type / service type;
+     *               org.openecomp.appc.resource-version - the vnf version / service version
+     * @param ctx service logic context
+     *            1. supposed properties already in context:
+     *            aai.input.data.entitlement-assignment-group-uuid - entitlement-group-uuid asset tag already stored in AAI
+     *            aai.input.data.license-assignment-group-uuid - license-key-uuid asset tag already stored in AAI
+     *            2. properties and flags stored in context after bean execution:
+     *            model.entitlement.pool.uuid - entitlement-group-uuid from license model
+     *            model.license.key.uuid - license-key-uuid from license model
+     *            is.acquire-entitlement.require
+     *            is.release-entitlement.require
+     *            is.acquire-license.require
+     *            is.release-license.require
+     *
+     * @throws APPCException throws in case of any error
+     */
+    void retrieveLicenseModel(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/src/main/java/org/openecomp/appc/dg/licmgr/impl/LicenseManagerPluginImpl.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/src/main/java/org/openecomp/appc/dg/licmgr/impl/LicenseManagerPluginImpl.java
new file mode 100644
index 0000000..536a991
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/src/main/java/org/openecomp/appc/dg/licmgr/impl/LicenseManagerPluginImpl.java
@@ -0,0 +1,145 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.licmgr.impl;
+
+import java.util.Map;
+
+import org.openecomp.appc.dg.licmgr.LicenseManagerPlugin;
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.appc.licmgr.Constants;
+import org.openecomp.appc.licmgr.LicenseManager;
+import org.openecomp.appc.licmgr.exception.DataAccessException;
+import org.openecomp.appc.licmgr.objects.LicenseModel;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+
+
+
+public class LicenseManagerPluginImpl implements LicenseManagerPlugin {
+
+    private static EELFLogger logger = EELFManager.getInstance().getApplicationLogger();
+
+    // populated by blueprint framework
+    private LicenseManager licenseManager;
+
+    public void setLicenseManager(LicenseManager licenseManager) {
+        this.licenseManager = licenseManager;
+    }
+
+    /**
+     * Retrieves license model from APPC database and populate flags into svc context
+     * @param params map with parameters:
+     *               org.openecomp.appc.vftype - the vnf type / service type;
+     *               org.openecomp.appc.resource-version - the vnf version / service version
+     * @param ctx service logic context
+     *            1. supposed properties already in context:
+     *            aai.input.data.entitlement-assignment-group-uuid - entitlement-group-uuid asset tag already stored in AAI
+     *            aai.input.data.license-assignment-group-uuid - license-key-uuid asset tag already stored in AAI
+     *            2. properties and flags stored in context after bean execution:
+     *            model.entitlement.pool.uuid - entitlement-group-uuid from license model
+     *            model.license.key.uuid - license-key-uuid from license model
+     *            is.acquire-entitlement.require
+     *            is.release-entitlement.require
+     *            is.acquire-license.require
+     *            is.release-license.require
+     *            is.aai-entitlement-update.require
+     *            is.aai-license-update.require
+     *
+     * @throws APPCException throws in case of any error
+     */
+    @Override
+    public void retrieveLicenseModel(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+
+        try {
+
+            LicenseModel licenseModel = licenseManager.retrieveLicenseModel(params.get(Constants.VNF_TYPE_FIELD_NAME), params.get(Constants.VNF_RESOURCE_VERSION_FIELD_NAME));
+
+            String modelEntitlementPoolUuid = licenseModel.getEntitlementPoolUuid(); if (null == modelEntitlementPoolUuid) modelEntitlementPoolUuid = "";
+            String aaiEntitlementPoolUuid = ctx.getAttribute(Constants.AAI_ENTITLMENT_POOL_UUID_NAME); if (null == aaiEntitlementPoolUuid) aaiEntitlementPoolUuid = "";
+            boolean isAcquireEntitlementRequire = !modelEntitlementPoolUuid.isEmpty() && !modelEntitlementPoolUuid.equals(aaiEntitlementPoolUuid);
+            boolean isReleaseEntitlementRequire = !aaiEntitlementPoolUuid.isEmpty() && (isAcquireEntitlementRequire || modelEntitlementPoolUuid.isEmpty());
+            boolean isAAIEntitlementUpdateRequire = isAcquireEntitlementRequire || isReleaseEntitlementRequire;
+            ctx.setAttribute(Constants.MODEL_ENTITLMENT_POOL_UUID_NAME, modelEntitlementPoolUuid);
+            ctx.setAttribute(Constants.IS_ACQUIRE_ENTITLEMENT_REQUIRE, Boolean.toString(isAcquireEntitlementRequire));
+            ctx.setAttribute(Constants.IS_RELEASE_ENTITLEMENT_REQUIRE, Boolean.toString(isReleaseEntitlementRequire));
+            ctx.setAttribute(Constants.IS_AAI_ENTITLEMENT_UPDATE_REQUIRE, Boolean.toString(isAAIEntitlementUpdateRequire));
+
+
+            String modelLicenseKeyGroupUuid = licenseModel.getLicenseKeyGroupUuid(); if (null == modelLicenseKeyGroupUuid) modelLicenseKeyGroupUuid = "";
+            String aaiLicenseKeyGroupUuid = ctx.getAttribute(Constants.AAI_LICENSE_KEY_UUID_NAME); if (null == aaiLicenseKeyGroupUuid) aaiLicenseKeyGroupUuid = "";
+            String aaiLicenseKeyValue = ctx.getAttribute(Constants.AAI_LICENSE_KEY_VALUE); if (null == aaiLicenseKeyValue) aaiLicenseKeyValue = "";
+            boolean isAcquireLicenseRequire = !modelLicenseKeyGroupUuid.isEmpty() && !modelLicenseKeyGroupUuid.equals(aaiLicenseKeyGroupUuid);
+            boolean isReleaseLicenseRequire = !aaiLicenseKeyGroupUuid.isEmpty() && (isAcquireLicenseRequire || modelLicenseKeyGroupUuid.isEmpty());
+            boolean isAAILicenseUpdateRequire = isAcquireLicenseRequire || isReleaseLicenseRequire;
+            ctx.setAttribute(Constants.MODEL_LICENSE_KEY_UUID_NAME, modelLicenseKeyGroupUuid);
+            ctx.setAttribute(Constants.IS_ACQUIRE_LICENSE_REQUIRE, Boolean.toString(isAcquireLicenseRequire));
+            ctx.setAttribute(Constants.IS_RELEASE_LICENSE_REQUIRE, Boolean.toString(isReleaseLicenseRequire));
+            ctx.setAttribute(Constants.IS_AAI_LICENSE_UPDATE_REQUIRE, Boolean.toString(isAAILicenseUpdateRequire));
+
+            ctx.setAttribute("license-key", aaiLicenseKeyValue);
+
+        } catch (DataAccessException le) {
+            logger.error("Error " + le.getMessage());
+            ctx.setAttribute("output.status.message", le.getMessage());
+            throw new APPCException(le);
+        }
+
+    }
+
+
+
+    //////// code uses jaxb license model, should be fixed
+    /*
+    final VfLicenseModel.FeatureGroupList featureGroupList = licenseModel.getFeatureGroupList();
+    if (null != featureGroupList) {
+        final VfLicenseModel.FeatureGroupList.FeatureGroup featureGroup = featureGroupList.getFeatureGroup();
+        if (null != featureGroup) {
+            final VfLicenseModel.FeatureGroupList.FeatureGroup.EntitlementPoolList
+                            entitlementPoolList = featureGroup.getEntitlementPoolList();
+            if (null != entitlementPoolList) {
+                final VfLicenseModel.FeatureGroupList.FeatureGroup.EntitlementPoolList.EntitlementPool
+                                entitlementPool = entitlementPoolList.getEntitlementPool();
+                if (null != entitlementPool) {
+                    final String entitlementPoolUuid = entitlementPool.getEntitlementPoolUuid();
+                    // add entitlementPoolUuid into context
+                    ctx.setAttribute(Constants.MODEL_ENTITLMENT_POOL_UUID_NAME, entitlementPoolUuid);
+                }
+            }
+
+            final VfLicenseModel.FeatureGroupList.FeatureGroup.LicenseKeyGroupList
+                            licenseKeyGroupList = featureGroup.getLicenseKeyGroupList();
+            if (null != licenseKeyGroupList) {
+                final VfLicenseModel.FeatureGroupList.FeatureGroup.LicenseKeyGroupList.LicenseKeyGroup
+                                licenseKeyGroup = licenseKeyGroupList.getLicenseKeyGroup();
+                if (null != licenseKeyGroup) {
+                    final String licenseKeyGroupUuid = licenseKeyGroup.getLicenseKeyGroupUuid();
+                    // add licenseKeyGroupUuid into context
+                    ctx.setAttribute(Constants.MODEL_LICENSE_KEY_UUID_NAME, licenseKeyGroupUuid);
+                }
+            }
+        }
+    }
+    */
+
+
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/src/main/resources/OSGI-INF/blueprint/blueprint.xml
new file mode 100644
index 0000000..ab2df8b
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-license-manager/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+  openECOMP : APP-C
+  ================================================================================
+  Copyright (C) 2017 AT&T 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=========================================================
+  -->
+
+<!--
+    Starter Blueprint Camel Definition appc-aai-adapter-blueprint
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+		   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		   xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+
+	<reference id="LicenseManagerRef" availability="mandatory" activation="eager" interface="org.openecomp.appc.licmgr.LicenseManager" />
+
+	<bean id="LicenseManagerPluginBean" class="org.openecomp.appc.dg.licmgr.impl.LicenseManagerPluginImpl" scope="singleton">
+		<property name="licenseManager" ref="LicenseManagerRef" />
+	</bean>
+	<service id="LicenseManagerPlugin" interface="org.openecomp.appc.dg.licmgr.LicenseManagerPlugin" ref="LicenseManagerPluginBean"/>
+
+</blueprint>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/.gitignore b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/.settings/org.eclipse.wst.common.project.facet.core.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..f4ef8aa
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <installed facet="java" version="1.8"/>
+</faceted-project>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/pom.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/pom.xml
new file mode 100644
index 0000000..c9ec4d9
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/pom.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.openecomp.appc</groupId>
+		<artifactId>appc-dg-shared</artifactId>
+		<version>1.0.0</version>
+	</parent>
+	<artifactId>appc-dg-netconf</artifactId>
+	<packaging>bundle</packaging>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-common</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-netconf-adapter-bundle</artifactId>
+			<version>${project.version}</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-dg-common</artifactId>
+			<version>${project.version}</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.sdnc.core</groupId>
+			<artifactId>sli-common</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.sdnc.core</groupId>
+			<artifactId>sli-provider</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.mockito</groupId>
+			<artifactId>mockito-core</artifactId>
+			<scope>test</scope>
+
+		</dependency>
+		<dependency>
+			<groupId>org.powermock</groupId>
+			<artifactId>powermock-api-mockito</artifactId>
+			<version>1.6.2</version>
+			<scope>test</scope>
+
+		</dependency>
+		<dependency>
+			<groupId>org.powermock</groupId>
+			<artifactId>powermock-module-junit4</artifactId>
+			<version>1.6.2</version>
+			<scope>test</scope>
+		</dependency>
+
+
+
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>appc-dg-netconf</Bundle-SymbolicName>
+						<Export-Package>org.openecomp.appc.dg.netconf</Export-Package>
+						<Private-Package>org.openecomp.appc.dg.netconf.impl.*</Private-Package>
+						<Import-Package>!org.apache.log,!org.apache.commons.logging,!groovy.lang,!javax.jms,!org.codehaus.commons.compiler,!org.codehaus.groovy.*,!org.codehaus.janino,!com.ibm.icu.*,!com.sun.faces.*,!org.jasypt.*,*</Import-Package>
+						<Embed-Dependency>appc-common,eelf-core,logback-core,logback-classic;scope=compile|runtime;inline=false</Embed-Dependency>
+						<Embed-Transitive>true</Embed-Transitive>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/NetconfClientPlugin.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/NetconfClientPlugin.java
new file mode 100644
index 0000000..3b75f40
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/NetconfClientPlugin.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.netconf;
+
+import java.util.Map;
+
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicJavaPlugin;
+
+
+
+public interface NetconfClientPlugin extends SvcLogicJavaPlugin {
+    void configure(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+    void operationStateValidation(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+    void modifyConfiguration(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+    void backupConfiguration(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+    void getConfig(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+    void getRunningConfig(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/NetconfDBPlugin.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/NetconfDBPlugin.java
new file mode 100644
index 0000000..a48be94
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/NetconfDBPlugin.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.netconf;
+
+import java.util.Map;
+
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicJavaPlugin;
+
+
+
+public interface NetconfDBPlugin extends SvcLogicJavaPlugin {
+    void retrieveDSConfiguration(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+    void retrieveVMDSConfiguration(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+    void retrieveConfigFile(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+    void retrieveConnectionDetails(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfClientPluginImpl.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfClientPluginImpl.java
new file mode 100644
index 0000000..d063b5d
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfClientPluginImpl.java
@@ -0,0 +1,316 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.netconf.impl;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.lang.ObjectUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.openecomp.appc.adapter.netconf.*;
+import org.openecomp.appc.adapter.netconf.util.Constants;
+import org.openecomp.appc.dg.netconf.NetconfClientPlugin;
+import org.openecomp.appc.exceptions.APPCException;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+
+import java.io.IOException;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Map;
+
+
+
+public class NetconfClientPluginImpl implements NetconfClientPlugin {
+
+    private static final String NETCONF_CLIENT_FACTORY_NAME = "org.openecomp.appc.adapter.netconf.NetconfClientFactory";
+    private static ObjectMapper mapper = new ObjectMapper();
+    private static EELFLogger logger = EELFManager.getInstance().getApplicationLogger();
+
+    private NetconfDataAccessService dao;
+    private NetconfClientFactory clientFactory;
+
+    public NetconfClientPluginImpl() {
+        BundleContext bctx = FrameworkUtil.getBundle(this.getClass()).getBundleContext();
+        ServiceReference srefNetconfClientFactory = bctx.getServiceReference(NetconfClientFactory.class);
+        clientFactory = (NetconfClientFactory) bctx.getService(srefNetconfClientFactory);
+    }
+
+    public void setDao(NetconfDataAccessService dao) {
+        this.dao = dao;
+        this.dao.setSchema(Constants.NETCONF_SCHEMA);
+    }
+
+    public void configure(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+
+        try {
+            NetconfClient client = clientFactory.GetNetconfClient(NetconfClientType.SSH);
+            try {
+                NetconfConnectionDetails connectionDetails = mapper.readValue(params.get("connection-details"), NetconfConnectionDetails.class);
+                String netconfMessage = params.get("file-content");
+                client.connect(connectionDetails);
+                client.configure(netconfMessage);
+            } catch (IOException e) {
+                logger.error("Error " + e.getMessage());
+                throw new APPCException(e);
+            } finally {
+                client.disconnect();
+            }
+        } catch (Exception e) {
+            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, e.getMessage());
+            logger.error("Error " + e.getMessage());
+            throw e;
+        }
+    }
+
+    @Override
+    public void operationStateValidation(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        if (logger.isTraceEnabled()) {
+            logger.trace("Entering to operationStateValidation with params = "+ ObjectUtils.toString(params)+", SvcLogicContext = "+ObjectUtils.toString(ctx));
+        }
+        try{
+            String paramName = Constants.VNF_TYPE_FIELD_NAME;
+            String vfType = params.get(paramName);
+            validateMandatoryParam(paramName, vfType);
+            VnfType vnfType = VnfType.getVnfType(vfType);
+
+            paramName = Constants.VNF_HOST_IP_ADDRESS_FIELD_NAME;
+            String vnfHostIpAddress = params.get(paramName);
+            validateMandatoryParam(paramName, vnfHostIpAddress);
+
+            //get connectionDetails
+            String connectionDetailsStr = params.get(Constants.CONNECTION_DETAILS_FIELD_NAME);
+            NetconfConnectionDetails connectionDetails = null;
+            if(StringUtils.isEmpty(connectionDetailsStr)){
+                connectionDetails = retrieveConnectionDetails(vnfType);
+                connectionDetails.setHost(vnfHostIpAddress);
+                ctx.setAttribute(Constants.CONNECTION_DETAILS_FIELD_NAME, mapper.writeValueAsString(connectionDetails));
+            }else{
+                connectionDetails = mapper.readValue(connectionDetailsStr, NetconfConnectionDetails.class);
+            }
+            if(connectionDetails == null){
+                throw new IllegalStateException("missing connectionDetails for VnfType:"+vnfType.name());
+            }
+
+            //get operationsStateNetconfMessage
+            OperationalStateValidator operationalStateValidator = OperationalStateValidatorFactory.getOperationalStateValidator(vnfType);
+            String configurationFileName = operationalStateValidator.getConfigurationFileName();
+            String operationsStateNetconfMessage = null;
+            if(!StringUtils.isEmpty(configurationFileName)){
+                operationsStateNetconfMessage = retrieveConfigurationFileContent(configurationFileName);
+            }
+
+            //connect checK Opertaions state and dissconnect
+            NetconfClient client = clientFactory.GetNetconfClient(NetconfClientType.SSH);
+            try {
+                client.connect(connectionDetails);
+                String response = null;
+                if(!StringUtils.isEmpty(operationsStateNetconfMessage)) {
+                    response = client.exchangeMessage(operationsStateNetconfMessage);
+                }
+                operationalStateValidator.validateResponse(response);
+            } finally {
+                client.disconnect();
+            }
+        } catch (APPCException e) {
+            logger.error(e.getMessage());
+            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, e.toString());
+            throw e;
+        }
+        catch (Exception e) {
+            logger.error(e.toString());
+            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, e.toString());
+            throw new APPCException(e);
+        }
+    }
+
+    @Override
+    public void modifyConfiguration(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        this.configure(params, ctx);
+    }
+
+    @Override
+    public void backupConfiguration(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+
+        NetconfClient client = null;
+        try {
+            if (logger.isDebugEnabled()) {
+                logger.debug("Entered backup to DEVICE_INTERFACE_LOG");
+            }
+
+            client = clientFactory.GetNetconfClient(NetconfClientType.SSH);
+            //get connection details
+            NetconfConnectionDetails connectionDetails = mapper.readValue(params.get("connection-details"), NetconfConnectionDetails.class);
+            //connect the client and get configuration
+            client.connect(connectionDetails);
+            String configuration = client.getConfiguration();
+
+            //store configuration in database
+            dao.logDeviceInteraction(null,null,getCurrentDateTime(),configuration);
+
+        } catch (Exception e) {
+            logger.error("Error " + e.getMessage());
+            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, e.getMessage());
+            throw new APPCException(e);
+        } finally {
+            //disconnect the client
+            if(client != null) {
+                client.disconnect();
+            }
+        }
+    }
+
+    @Override
+    public void getConfig(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        NetconfClient client = null;
+        String confId=params.get("conf-id");
+        if(confId.equalsIgnoreCase("current")){
+            try {
+                if (logger.isDebugEnabled()) {
+                    logger.debug("Entered getConfig to DEVICE_INTERFACE_LOG");
+                }
+                //get netconf client to get configuration
+                BundleContext bctx = FrameworkUtil.getBundle(this.getClass()).getBundleContext();
+                ServiceReference sref = bctx.getServiceReference(NETCONF_CLIENT_FACTORY_NAME);
+                NetconfClientFactory clientFactory = (NetconfClientFactory) bctx.getService(sref);
+                client = clientFactory.GetNetconfClient(NetconfClientType.SSH);
+                //get connection details
+                NetconfConnectionDetails connectionDetails = mapper.readValue(params.get("connection-details"), NetconfConnectionDetails.class);
+                //connect the client and get configuration
+                client.connect(connectionDetails);
+                String configuration = client.getConfiguration();
+                if(configuration !=null){
+                    //  logger.info("*************************************Configuration Output*************************************");
+                    //  logger.info(configuration);
+                    String fullConfig = ctx.getAttribute("fullConfig");
+                    fullConfig = fullConfig==null?"":fullConfig;
+                    ctx.setAttribute("fullConfig",fullConfig + configuration);
+
+                    ctx.setAttribute("getConfig_Result","Success");
+                    String entityName=ctx.getAttribute("entity");//VM name
+                    if(entityName!=null){
+                        ctx.setAttribute(entityName+".Configuration",configuration);
+                    }
+                }else{
+                    ctx.setAttribute("getConfig_Result","failure");
+                }
+                //store configuration in database
+            /*NetconfJDBC dsImpl = new NetconfJDBCImpl();
+            dsImpl.logDeviceInteraction(null,null,getCurrentDateTime(),configuration);*/
+
+            } catch (Exception e) {
+                ctx.setAttribute("getConfig_Result","failure");
+                logger.error("Error " + e.getMessage());
+                ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, e.getMessage());
+                throw new APPCException(e);
+            } finally {
+                //disconnect the client
+                if(client != null) {
+                    client.disconnect();
+                }
+            }
+        }else{
+            logger.info("Current Conf id value is not supported");
+        }
+
+    }
+
+
+    @Override
+    public void getRunningConfig(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        NetconfClient client = null;
+        try {
+            logger.info("Entered getRunningConfig to DEVICE_INTERFACE_LOG");
+            //get netconf client to get configuration
+            BundleContext bctx = FrameworkUtil.getBundle(this.getClass()).getBundleContext();
+            ServiceReference sref = bctx.getServiceReference(NETCONF_CLIENT_FACTORY_NAME);
+            NetconfClientFactory clientFactory = (NetconfClientFactory) bctx.getService(sref);
+            client = clientFactory.GetNetconfClient(NetconfClientType.SSH);
+            //get connection details
+            NetconfConnectionDetails connectionDetails = new NetconfConnectionDetails();
+            connectionDetails.setHost(params.get("host-ip-address"));
+            connectionDetails.setUsername(params.get("user-name"));
+            connectionDetails.setPassword(params.get("password"));
+            connectionDetails.setPort(!("".equalsIgnoreCase(params.get("port-number")))?Integer.parseInt(params.get("port-number")):NetconfConnectionDetails.DEFAULT_PORT);
+            //connect the client and get configuration
+            client.connect(connectionDetails);
+            String configuration = client.getConfiguration();
+            if(configuration !=null){
+                //  logger.info("*************************************Configuration Output*************************************");
+                ctx.setAttribute("running-config", configuration);
+
+                ctx.setAttribute("getRunningConfig_Result","Success");
+            }else{
+                ctx.setAttribute("getRunningConfig_Result","failure");
+            }
+        } catch (Exception e) {
+            ctx.setAttribute("getRunningConfig_Result","failure");
+            logger.error("Error " + e.getMessage());
+            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, e.getMessage());
+            throw new APPCException(e);
+        } finally {
+            //disconnect the client
+            if(client != null) {
+                client.disconnect();
+            }
+        }
+    }
+
+    private String getCurrentDateTime() {
+
+        DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
+        Date date = new Date();
+        return dateFormat.format(date);
+    }
+
+    private int getPort(String s) {
+        int port = 830;
+        if((s != null) && !s.isEmpty()) {
+            port = Integer.parseInt(s);
+        }
+        return port;
+    }
+
+    void validateMandatoryParam(String paramName, String paramValue) {
+        if(StringUtils.isEmpty(paramValue)){
+            throw new IllegalArgumentException("input "+paramName+" param is empty");
+        }
+    }
+
+    public NetconfConnectionDetails retrieveConnectionDetails( VnfType vnfType) throws APPCException{
+
+        NetconfConnectionDetails connectionDetails = new NetconfConnectionDetails();
+        if (!dao.retrieveNetconfConnectionDetails(vnfType.getFamilyType().name(), connectionDetails)) {
+            logger.error("Missing configuration for " + vnfType.getFamilyType().name());
+            throw new APPCException("Missing configuration for " + vnfType.getFamilyType().name() + " in " + Constants.DEVICE_AUTHENTICATION_TABLE_NAME);
+        }
+        return connectionDetails;
+    }
+
+    public String retrieveConfigurationFileContent(String configFileName){
+        return dao.retrieveConfigFileName(configFileName);
+    }
+
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfDBPluginImpl.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfDBPluginImpl.java
new file mode 100644
index 0000000..6fdfcc1
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfDBPluginImpl.java
@@ -0,0 +1,122 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.netconf.impl;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.util.Map;
+
+import org.openecomp.appc.adapter.netconf.NetconfConnectionDetails;
+import org.openecomp.appc.adapter.netconf.NetconfDataAccessService;
+import org.openecomp.appc.adapter.netconf.exception.DataAccessException;
+import org.openecomp.appc.adapter.netconf.util.Constants;
+import org.openecomp.appc.dg.netconf.NetconfDBPlugin;
+import org.openecomp.appc.exceptions.APPCException;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+
+public class NetconfDBPluginImpl implements NetconfDBPlugin {
+
+    private static EELFLogger logger = EELFManager.getInstance().getApplicationLogger();
+    private static ObjectMapper mapper = new ObjectMapper();
+
+    // populated by blueprint framework
+    private NetconfDataAccessService daoService;
+
+    public void setDaoService(NetconfDataAccessService daoService) {
+        this.daoService = daoService;
+        this.daoService.setSchema(Constants.NETCONF_SCHEMA);
+    }
+
+    public NetconfDBPluginImpl() {
+    }
+
+    public void retrieveDSConfiguration(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+
+        try {
+            String fileContent = daoService.retrieveConfigFileName(params.get(Constants.CONFIGURATION_FILE_FIELD_NAME));
+            ctx.setAttribute(Constants.FILE_CONTENT_FIELD_NAME, fileContent);
+        } catch(DataAccessException e) {
+            logger.error("Error " + e.getMessage());
+            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, e.getMessage());
+            throw e;
+        }
+
+        getConnection(params, ctx);
+    }
+
+    @Override
+    public void retrieveVMDSConfiguration(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        logger.info("Setting entity value :" +params.get(Constants.RESOURCEKEY));
+        ctx.setAttribute("entity", params.get(Constants.RESOURCEKEY));
+        NetconfConnectionDetails connectionDetails = new NetconfConnectionDetails();
+        try {
+            if (!daoService.retrieveNetconfConnectionDetails(params.get(Constants.RESOURCEKEY), connectionDetails)) {
+                ctx.setAttribute("retrieveVMDSConfiguration_Result","failure");
+                logger.error("Missing configuration for " + params.get(Constants.VNF_TYPE_FIELD_NAME));
+                throw new APPCException("Missing configuration for " + params.get(Constants.VNF_TYPE_FIELD_NAME) + " in " + Constants.DEVICE_AUTHENTICATION_TABLE_NAME);
+            }
+            //            fileContent = dsImpl.retrieveConfigFileName(params.get(Constants.CONFIGURATION_FILE_FIELD_NAME));
+            //            ctx.setAttribute(Constants.FILE_CONTENT_FIELD_NAME, fileContent);
+            ctx.setAttribute(Constants.CONNECTION_DETAILS_FIELD_NAME, mapper.writeValueAsString(connectionDetails));
+            ctx.setAttribute("retrieveVMDSConfiguration_Result","success");
+        } catch(APPCException e) {
+            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, e.getMessage());
+            throw e;
+        } catch(DataAccessException | JsonProcessingException e) {
+            logger.error("Error " + e.getMessage());
+            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, e.getMessage());
+            throw new APPCException(e);
+        }
+    }
+
+    @Override
+    public void retrieveConfigFile(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        String fileContent = daoService.retrieveConfigFileName(params.get(Constants.CONFIGURATION_FILE_FIELD_NAME));
+        ctx.setAttribute(Constants.FILE_CONTENT_FIELD_NAME, fileContent);
+    }
+
+    public void retrieveConnectionDetails(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        getConnection(params, ctx);
+    }
+
+            private void getConnection(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+                NetconfConnectionDetails connectionDetails = new NetconfConnectionDetails();
+                try {
+                    if (!daoService.retrieveNetconfConnectionDetails(params.get(Constants.VNF_TYPE_FIELD_NAME), connectionDetails)) {
+                        logger.error("Missing configuration for " + params.get(Constants.VNF_TYPE_FIELD_NAME));
+                        throw new APPCException("Missing configuration for " + params.get(Constants.VNF_TYPE_FIELD_NAME) + " in " + Constants.DEVICE_AUTHENTICATION_TABLE_NAME);
+                    }
+                    connectionDetails.setHost(params.get(Constants.VNF_HOST_IP_ADDRESS_FIELD_NAME));
+                    ctx.setAttribute(Constants.CONNECTION_DETAILS_FIELD_NAME, mapper.writeValueAsString(connectionDetails));
+                } catch(APPCException e) {
+                    ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, e.getMessage());
+                    throw e;
+                } catch(DataAccessException | JsonProcessingException e) {
+                    logger.error("Error " + e.getMessage());
+            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, e.getMessage());
+            throw new APPCException(e);
+        }
+    }
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/resources/OSGI-INF/blueprint/blueprint.xml
new file mode 100644
index 0000000..0b58ce0
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+  openECOMP : APP-C
+  ================================================================================
+  Copyright (C) 2017 AT&T 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=========================================================
+  -->
+
+<!--
+    Starter Blueprint Camel Definition appc-aai-adapter-blueprint
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+		   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		   xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+	<reference id="DataAccessServiceRef" availability="mandatory" activation="eager" interface="org.openecomp.appc.adapter.netconf.NetconfDataAccessService" />
+
+
+	<bean id="NetconfDBPluginBean" class="org.openecomp.appc.dg.netconf.impl.NetconfDBPluginImpl" scope="singleton">
+		<property name="daoService" ref="DataAccessServiceRef" />
+	</bean>
+	<service id="NetconfDBPlugin" interface="org.openecomp.appc.dg.netconf.NetconfDBPlugin" ref="NetconfDBPluginBean"/>
+
+	<bean id="NetconfClientPluginBean" class="org.openecomp.appc.dg.netconf.impl.NetconfClientPluginImpl" scope="singleton">
+		<property name="dao" ref="DataAccessServiceRef" />
+	</bean>
+	<service id="NetconfClientPlugin" interface="org.openecomp.appc.dg.netconf.NetconfClientPlugin" ref="NetconfClientPluginBean"/>
+
+</blueprint>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/DAOServiceMock.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/DAOServiceMock.java
new file mode 100644
index 0000000..38d74c3
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/DAOServiceMock.java
@@ -0,0 +1,97 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.netconf.impl;
+
+import java.util.HashMap;
+
+import org.openecomp.appc.adapter.netconf.ConnectionDetails;
+import org.openecomp.appc.adapter.netconf.NetconfConnectionDetails;
+import org.openecomp.appc.adapter.netconf.NetconfDataAccessService;
+import org.openecomp.appc.adapter.netconf.exception.DataAccessException;
+import org.openecomp.sdnc.sli.resource.dblib.DbLibService;
+
+class DAOServiceMock implements NetconfDataAccessService {
+
+    private String configFile;
+    private ConnectionDetails connection;
+    private HashMap<String, String> backupConf;
+
+    @Override
+    public void setSchema(String schema) {
+    }
+
+    @Override
+    public void setDbLibService(DbLibService dbLibService) {
+    }
+
+    void setConfigFile(String configFile) {
+        this.configFile = configFile;
+    }
+
+    public HashMap<String, String> getBackupConf() {
+        return backupConf;
+    }
+
+    public void setConnection(ConnectionDetails connection) {
+        this.connection = connection;
+    }
+
+    @Override
+    public String retrieveConfigFileName(String xmlID) throws DataAccessException {
+        if (!xmlID.equals("wrong")) {
+            return configFile;
+        } else {
+            throw new DataAccessException();
+        }
+    }
+
+    @Override
+    public boolean retrieveConnectionDetails(String vnfType, ConnectionDetails connectionDetails) throws
+                    DataAccessException {
+        return false;
+    }
+
+    @Override
+    public boolean retrieveNetconfConnectionDetails(String vnfType, NetconfConnectionDetails connectionDetails) throws
+                    DataAccessException {
+        if (vnfType.equals("VNF")) {
+            connectionDetails.setHost(connection.getHost());
+            connectionDetails.setPassword(connection.getPassword());
+            connectionDetails.setPort(connection.getPort());
+            connectionDetails.setUsername(connection.getUsername());
+
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    @Override
+    public boolean logDeviceInteraction(String instanceId, String requestId, String creationDate, String logText) throws
+                    DataAccessException {
+        this.backupConf = new HashMap<>();
+        backupConf.put("creationDate", creationDate);
+        backupConf.put("logText", logText);
+        return true;
+    }
+
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/MockOperationalStateValidatorImpl.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/MockOperationalStateValidatorImpl.java
new file mode 100644
index 0000000..7109fe8
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/MockOperationalStateValidatorImpl.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.netconf.impl;
+
+import org.openecomp.appc.adapter.netconf.OperationalStateValidator;
+import org.openecomp.appc.adapter.netconf.VnfType;
+import org.openecomp.appc.exceptions.APPCException;
+
+
+public class MockOperationalStateValidatorImpl implements OperationalStateValidator {
+
+    private boolean validated;
+    private String configurationFileName;
+
+    public boolean isValidated() {
+        return validated;
+    }
+
+    @Override
+    public VnfType getVnfType() {
+        return null;
+    }
+
+    @Override
+    public String getConfigurationFileName() {
+        return configurationFileName;
+    }
+
+    @Override
+    public void validateResponse(String response) throws APPCException {
+        if (response.equals("wrong")) {
+            throw new APPCException();
+        } else {
+            this.validated = true;
+        }
+
+    }
+
+    public void setConfigurationFileName(String configurationFileName) {
+        this.configurationFileName = configurationFileName;
+    }
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/NetconfClientFactoryMock.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/NetconfClientFactoryMock.java
new file mode 100644
index 0000000..73dba9a
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/NetconfClientFactoryMock.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.netconf.impl;
+
+import org.openecomp.appc.adapter.netconf.NetconfClient;
+import org.openecomp.appc.adapter.netconf.NetconfClientFactory;
+import org.openecomp.appc.adapter.netconf.NetconfClientType;
+import org.openecomp.appc.adapter.netconf.jsch.NetconfClientJsch;
+import org.openecomp.appc.adapter.netconf.odlconnector.NetconfClientRestconfImpl;
+
+
+public class NetconfClientFactoryMock extends NetconfClientFactory {
+
+    private final NetconfClientJschMock jschClient = new NetconfClientJschMock();
+
+    @Override
+    public NetconfClient GetNetconfClient(NetconfClientType type){
+
+            return jschClient;
+
+    }
+}
+
+
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/NetconfClientJschMock.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/NetconfClientJschMock.java
new file mode 100644
index 0000000..5c01724
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/NetconfClientJschMock.java
@@ -0,0 +1,100 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.netconf.impl;
+
+import org.openecomp.appc.adapter.netconf.NetconfClient;
+import org.openecomp.appc.adapter.netconf.NetconfConnectionDetails;
+import org.openecomp.appc.exceptions.APPCException;
+
+
+public class NetconfClientJschMock implements NetconfClient {
+
+    private boolean connection;
+    private String lastMessage;
+    private String answer = "answer";
+    private String configuration;
+    private NetconfConnectionDetails lastConnectionDetails;
+
+    public boolean isConnection() {
+        return connection;
+    }
+
+    public String getLastMessage() {
+        return lastMessage;
+    }
+
+    public String getAnswer() {
+        return answer;
+    }
+
+    public String getConf() {
+        return configuration;
+    }
+
+    public void setConf(String configuration) {
+        this.configuration = configuration;
+    }
+
+    public void setAnswer(String answer) {
+        this.answer = answer;
+    }
+
+    public NetconfConnectionDetails getLastConnectionDetails() {
+        return lastConnectionDetails;
+    }
+
+    @Override
+    public void connect(NetconfConnectionDetails connectionDetails) throws APPCException {
+        this.connection = true;
+        this.lastConnectionDetails = connectionDetails;
+
+    }
+
+    @Override
+    public String exchangeMessage(String message) throws APPCException {
+        if (connection) {
+            this.lastMessage = message;
+            return answer;
+        } else return null;
+    }
+
+    @Override
+    public void configure(String configuration) throws APPCException {
+        if (connection) {
+            this.configuration = configuration;
+        }
+
+    }
+
+    @Override
+    public String getConfiguration() throws APPCException {
+        if (connection) {
+            return configuration;
+        } else return null;
+    }
+
+    @Override
+    public void disconnect() throws APPCException {
+        this.connection = false;
+
+    }
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/NetconfClientPluginImplTest.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/NetconfClientPluginImplTest.java
new file mode 100644
index 0000000..b3bb485
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/NetconfClientPluginImplTest.java
@@ -0,0 +1,678 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.netconf.impl;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Matchers;
+import org.mockito.Mockito;
+import org.openecomp.appc.adapter.netconf.*;
+import org.openecomp.appc.adapter.netconf.util.Constants;
+import org.openecomp.appc.dg.netconf.impl.NetconfClientPluginImpl;
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+import java.lang.reflect.Field;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.powermock.api.mockito.PowerMockito.when;
+
+
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({OperationalStateValidatorFactory.class, NetconfClientPluginImpl.class, FrameworkUtil.class, ObjectMapper.class})
+
+public class NetconfClientPluginImplTest {
+    private NetconfClientPluginImpl netconfClientPlugin;
+    private NetconfDataAccessService dao;
+    private NetconfClientFactory clientFactory;
+    private Map<String, String> params;
+
+    private final BundleContext bundleContext = Mockito.mock(BundleContext.class);
+    private final Bundle bundleService = Mockito.mock(Bundle.class);
+    private final ServiceReference sref1 = Mockito.mock(ServiceReference.class);
+    private final ServiceReference sref2 = Mockito.mock(ServiceReference.class);
+    private final ServiceReference sref3 = Mockito.mock(ServiceReference.class);
+    private static final String DG_OUTPUT_STATUS_MESSAGE = "output.status.message";
+
+
+    String host = "http://www.test.com";
+    String host1 = "http://www.test1.com";
+    String vnfType = "VNF";
+    int port = 8080;
+    String username = "test";
+    String password = "test";
+    String connectionDetails = "{\"host\":\"" + host + "\",\"port\":" + port + ",\"username\":\"" + username + "\",\"password\":\"" + password + "\",\"capabilities\":null,\"additionalProperties\":null}";
+    String fileContent = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+            "<rpc message-id=\"101\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n" +
+            "\t<get-config>\n" +
+            "\t\t<source>\n" +
+            "\t\t\t<running/>\n" +
+            "\t\t </source>\n" +
+            "\t</get-config>\n" +
+            "</rpc>'";
+    String operationalState = "<rpc message-id=\"101\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n" +
+            "       <get>\n" +
+            "              <filter>\n" +
+            "                     <ManagedElement xmlns=\"urn:org:openecomp:appc:Test\">\n" +
+            "                           <VnfFunction xmlns=\"urn:org:openecomop:appc:Test\">\n" +
+            "                                  <ProcessorManagement>\n" +
+            "                                         <MatedPair>\n" +
+            "                                                <operationalState/>\n" +
+            "                                                <PayloadProcessor>\n" +
+            "                                                       <operationalState/>\n" +
+            "                                                </PayloadProcessor>\n" +
+            "                                         </MatedPair>\n" +
+            "                                         <SystemController>\n" +
+            "                                                <operationalState/>\n" +
+            "                                         </SystemController>\n" +
+            "                                  </ProcessorManagement>\n" +
+            "                           </VnfFunction>\n" +
+            "                     </ManagedElement>\n" +
+            "              </filter>\n" +
+            "       </get>\n" +
+            "</rpc>\n";
+
+
+    @Before
+    public void setUp() throws NoSuchFieldException, IllegalAccessException {
+        clientFactory = new NetconfClientFactoryMock();
+
+    }
+
+
+    @Test
+    public void testConfigure() throws Exception {
+
+        shortInit();
+        SvcLogicContext ctx = new SvcLogicContext();
+
+        params = new HashMap<>();
+        params.put(Constants.CONNECTION_DETAILS_FIELD_NAME, connectionDetails);
+        params.put(Constants.FILE_CONTENT_FIELD_NAME, fileContent);
+
+        netconfClientPlugin.configure(params, ctx);
+
+        NetconfClientJschMock client = (NetconfClientJschMock) clientFactory.GetNetconfClient(NetconfClientType.SSH);
+
+        try {
+            Assert.assertEquals("wrong configuration", fileContent, client.getConf());
+            Assert.assertEquals("wrong host", host, client.getLastConnectionDetails().getHost());
+            Assert.assertEquals("wrong port", port, client.getLastConnectionDetails().getPort());
+            Assert.assertEquals("wrong username", username, client.getLastConnectionDetails().getUsername());
+            Assert.assertEquals("wrong password", password, client.getLastConnectionDetails().getPassword());
+            Assert.assertFalse(client.isConnection());
+        } catch (Exception e) {
+            Assert.fail("failed with because of " + e.getCause());
+        }
+
+
+    }
+
+
+    @Test
+    public void testConfigureNegativeIOException() throws Exception {
+        shortInit();
+        SvcLogicContext ctx = new SvcLogicContext();
+
+        params = new HashMap<>();
+        params.put(Constants.CONNECTION_DETAILS_FIELD_NAME, "{" + connectionDetails);
+        params.put(Constants.FILE_CONTENT_FIELD_NAME, fileContent);
+        NetconfClientJschMock client = (NetconfClientJschMock) clientFactory.GetNetconfClient(NetconfClientType.SSH);
+
+
+        try {
+            netconfClientPlugin.configure(params, ctx);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+            Assert.assertNull(client.getLastConnectionDetails());
+            Assert.assertNull(client.getConf());
+        }
+
+    }
+
+    @Test
+    public void testOperationStateValidation() throws Exception {
+        shortInit();
+        SvcLogicContext ctx = new SvcLogicContext();
+        DAOServiceMock daoServiceMock = (DAOServiceMock) dao;
+        daoServiceMock.setConfigFile(fileContent);
+
+        NetconfClientJschMock client = (NetconfClientJschMock) clientFactory.GetNetconfClient(NetconfClientType.SSH);
+        client.setAnswer(operationalState);
+
+
+        params = new HashMap<>();
+        params.put(Constants.VNF_TYPE_FIELD_NAME, vnfType);
+        params.put(Constants.VNF_HOST_IP_ADDRESS_FIELD_NAME, host1);
+        params.put(Constants.CONNECTION_DETAILS_FIELD_NAME, connectionDetails);
+        MockOperationalStateValidatorImpl validatorMock = new MockOperationalStateValidatorImpl();
+        validatorMock.setConfigurationFileName("VnfGetRunningConfig");
+
+        PowerMockito.mockStatic(OperationalStateValidatorFactory.class);
+        when(OperationalStateValidatorFactory.getOperationalStateValidator(Matchers.any(VnfType.class))).thenReturn(validatorMock);
+
+        netconfClientPlugin.operationStateValidation(params, ctx);
+
+        Assert.assertTrue("validation process failed", validatorMock.isValidated());
+        Assert.assertEquals(fileContent, client.getLastMessage());
+    }
+
+
+    @Test
+    public void testOperationStateValidationNegativeJsonProcessingNullIllegalStateException() throws Exception {
+        shortInit();
+        SvcLogicContext ctx = new SvcLogicContext();
+        DAOServiceMock daoServiceMock = (DAOServiceMock) dao;
+        daoServiceMock.setConfigFile(fileContent);
+
+        NetconfClientJschMock client = (NetconfClientJschMock) clientFactory.GetNetconfClient(NetconfClientType.SSH);
+        client.setAnswer(operationalState);
+
+        params = new HashMap<>();
+        params.put(Constants.VNF_TYPE_FIELD_NAME, vnfType);
+        params.put(Constants.VNF_HOST_IP_ADDRESS_FIELD_NAME, host1);
+        params.put(Constants.CONNECTION_DETAILS_FIELD_NAME, connectionDetails);
+        MockOperationalStateValidatorImpl validatorMock = new MockOperationalStateValidatorImpl();
+        validatorMock.setConfigurationFileName("VnfGetRunningConfig");
+
+        PowerMockito.mockStatic(OperationalStateValidatorFactory.class);
+        when(OperationalStateValidatorFactory.getOperationalStateValidator(Matchers.any(VnfType.class))).thenReturn(validatorMock);
+        substituteMapper(true);
+
+        try {
+            netconfClientPlugin.operationStateValidation(params, ctx);
+            substituteMapper(false);
+        } catch (APPCException e) {
+            substituteMapper(false);
+            Assert.assertNotNull(ctx.getAttribute(DG_OUTPUT_STATUS_MESSAGE));
+            Assert.assertFalse(validatorMock.isValidated());
+            Assert.assertNull(client.getLastMessage());
+        }
+    }
+
+    @Test
+    public void testOperationStateValidationNegativeConnectionDetailsAreNullNullPointerException() throws Exception {
+        shortInit();
+        SvcLogicContext ctx = new SvcLogicContext();
+        DAOServiceMock daoServiceMock = (DAOServiceMock) dao;
+        daoServiceMock.setConfigFile(fileContent);
+
+        NetconfClientJschMock client = (NetconfClientJschMock) clientFactory.GetNetconfClient(NetconfClientType.SSH);
+        client.setAnswer(operationalState);
+
+
+        params = new HashMap<>();
+        params.put(Constants.VNF_TYPE_FIELD_NAME, vnfType);
+        params.put(Constants.VNF_HOST_IP_ADDRESS_FIELD_NAME, host1);
+        params.put(Constants.CONNECTION_DETAILS_FIELD_NAME, null);
+        MockOperationalStateValidatorImpl validatorMock = new MockOperationalStateValidatorImpl();
+        validatorMock.setConfigurationFileName("VnfGetRunningConfig");
+
+        PowerMockito.mockStatic(OperationalStateValidatorFactory.class);
+        when(OperationalStateValidatorFactory.getOperationalStateValidator(Matchers.any(VnfType.class))).thenReturn(validatorMock);
+        ObjectMapper mapper = PowerMockito.mock(ObjectMapper.class);
+        final NetconfConnectionDetails netconfConnectionDetails = null;
+        when(mapper.readValue(Matchers.anyString(), Matchers.any(Class.class))).thenReturn(netconfConnectionDetails);
+
+
+        try {
+            netconfClientPlugin.operationStateValidation(params, ctx);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+            Assert.assertNotNull(ctx.getAttribute(DG_OUTPUT_STATUS_MESSAGE));
+            Assert.assertFalse("validation process failed", validatorMock.isValidated());
+
+        }
+    }
+
+
+    @Test
+    public void testOperationStateValidationNegativeAppcException() throws Exception {
+        shortInit();
+        SvcLogicContext ctx = new SvcLogicContext();
+        DAOServiceMock daoServiceMock = (DAOServiceMock) dao;
+        daoServiceMock.setConfigFile(fileContent);
+
+        NetconfClientJschMock client = (NetconfClientJschMock) clientFactory.GetNetconfClient(NetconfClientType.SSH);
+        client.setAnswer("wrong");
+
+
+        params = new HashMap<>();
+        params.put(Constants.VNF_TYPE_FIELD_NAME, vnfType);
+        params.put(Constants.VNF_HOST_IP_ADDRESS_FIELD_NAME, host1);
+        params.put(Constants.CONNECTION_DETAILS_FIELD_NAME, connectionDetails);
+        MockOperationalStateValidatorImpl validatorMock = new MockOperationalStateValidatorImpl();
+        validatorMock.setConfigurationFileName("VnfGetRunningConfig");
+
+        PowerMockito.mockStatic(OperationalStateValidatorFactory.class);
+        when(OperationalStateValidatorFactory.getOperationalStateValidator(Matchers.any(VnfType.class))).thenReturn(validatorMock);
+
+
+        try {
+            netconfClientPlugin.operationStateValidation(params, ctx);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+            Assert.assertNotNull(ctx.getAttribute(DG_OUTPUT_STATUS_MESSAGE));
+            Assert.assertFalse("validation process failed", validatorMock.isValidated());
+
+        }
+    }
+
+
+    @Test
+    public void testOperationStateValidatioConnectionDetailsInParamsAreEmpty() throws Exception {
+        shortInit();
+        SvcLogicContext ctx = new SvcLogicContext();
+        DAOServiceMock daoServiceMock = (DAOServiceMock) dao;
+        daoServiceMock.setConfigFile(fileContent);
+
+        NetconfClientJschMock client = (NetconfClientJschMock) clientFactory.GetNetconfClient(NetconfClientType.SSH);
+        client.setAnswer(operationalState);
+        ((DAOServiceMock) dao).setConnection(getConnectionDetails());
+
+
+        params = new HashMap<>();
+        params.put(Constants.VNF_TYPE_FIELD_NAME, vnfType);
+        params.put(Constants.VNF_HOST_IP_ADDRESS_FIELD_NAME, host1);
+        params.put(Constants.CONNECTION_DETAILS_FIELD_NAME, "");
+        MockOperationalStateValidatorImpl validatorMock = new MockOperationalStateValidatorImpl();
+        validatorMock.setConfigurationFileName("VnfGetRunningConfig");
+
+        PowerMockito.mockStatic(OperationalStateValidatorFactory.class);
+        when(OperationalStateValidatorFactory.getOperationalStateValidator(Matchers.any(VnfType.class))).thenReturn(validatorMock);
+
+        netconfClientPlugin.operationStateValidation(params, ctx);
+
+        Assert.assertTrue("validation process failed", validatorMock.isValidated());
+        Assert.assertEquals(fileContent, client.getLastMessage());
+    }
+
+    @Test
+    public void testOperationStateValidatioConnectionDetailsInParamsAreNull() throws Exception {
+        shortInit();
+        SvcLogicContext ctx = new SvcLogicContext();
+        DAOServiceMock daoServiceMock = (DAOServiceMock) dao;
+        daoServiceMock.setConfigFile(fileContent);
+
+        NetconfClientJschMock client = (NetconfClientJschMock) clientFactory.GetNetconfClient(NetconfClientType.SSH);
+        client.setAnswer(operationalState);
+        ((DAOServiceMock) dao).setConnection(getConnectionDetails());
+
+
+        params = new HashMap<>();
+        params.put(Constants.VNF_TYPE_FIELD_NAME, vnfType);
+        params.put(Constants.VNF_HOST_IP_ADDRESS_FIELD_NAME, host1);
+        params.put(Constants.CONNECTION_DETAILS_FIELD_NAME, null);
+        MockOperationalStateValidatorImpl validatorMock = new MockOperationalStateValidatorImpl();
+        validatorMock.setConfigurationFileName("VnfGetRunningConfig");
+
+        PowerMockito.mockStatic(OperationalStateValidatorFactory.class);
+        when(OperationalStateValidatorFactory.getOperationalStateValidator(Matchers.any(VnfType.class))).thenReturn(validatorMock);
+
+        netconfClientPlugin.operationStateValidation(params, ctx);
+
+        Assert.assertTrue("validation process failed", validatorMock.isValidated());
+        Assert.assertEquals(fileContent, client.getLastMessage());
+    }
+
+
+    @Test
+    public void testBackupConfiguration() throws Exception {
+        shortInit();
+        SvcLogicContext ctx = new SvcLogicContext();
+        params = new HashMap<>();
+        params.put(Constants.CONNECTION_DETAILS_FIELD_NAME, connectionDetails);
+        NetconfClientJschMock client = (NetconfClientJschMock) clientFactory.GetNetconfClient(NetconfClientType.SSH);
+        client.setConf(fileContent);
+        netconfClientPlugin.backupConfiguration(params, ctx);
+
+        DAOServiceMock mockdao = (DAOServiceMock) dao;
+        DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
+        Date date = new Date();
+        String creationDateExpected = dateFormat.format(date);
+        String creationDateActual = mockdao.getBackupConf().get("creationDate").substring(0, 10);
+
+
+        Assert.assertEquals("wrong configuration in db", fileContent, mockdao.getBackupConf().get("logText"));
+        Assert.assertEquals(creationDateExpected, creationDateActual);
+
+
+    }
+
+
+    @Test
+    public void testBackupConfigurationNegativeDgErrorFieldName() throws Exception {
+        shortInit();
+        SvcLogicContext ctx = new SvcLogicContext();
+        params = new HashMap<>();
+        params.put(Constants.CONNECTION_DETAILS_FIELD_NAME, "{" + connectionDetails);
+        NetconfClientJschMock client = (NetconfClientJschMock) clientFactory.GetNetconfClient(NetconfClientType.SSH);
+        client.setConf(fileContent);
+        try {
+            netconfClientPlugin.backupConfiguration(params, ctx);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+            Assert.assertNotNull(ctx.getAttribute(DG_OUTPUT_STATUS_MESSAGE));
+
+            DAOServiceMock mockdao = (DAOServiceMock) dao;
+            Assert.assertNull(mockdao.getBackupConf());
+        }
+
+    }
+
+    @Test
+    public void testGetConfig() throws Exception {
+        fullInit();
+        String entity = "123";
+
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("entity", entity);
+
+        params = new HashMap<>();
+        params.put("conf-id", "current");
+        params.put(Constants.CONNECTION_DETAILS_FIELD_NAME, connectionDetails);
+        NetconfClientJschMock client = (NetconfClientJschMock) clientFactory.GetNetconfClient(NetconfClientType.SSH);
+        client.setConf(fileContent);
+
+
+        netconfClientPlugin.getConfig(params, ctx);
+
+        Assert.assertEquals("Success", ctx.getAttribute("getConfig_Result"));
+        Assert.assertEquals(fileContent, ctx.getAttribute("fullConfig"));
+        Assert.assertNotNull(ctx.getAttribute(entity + ".Configuration"));
+        Assert.assertEquals(fileContent, ctx.getAttribute(entity + ".Configuration"));
+    }
+
+
+    @Test
+    public void testGetConfigNegativeConfigurationNull() throws Exception {
+        fullInit();
+        String entity = "123";
+
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("entity", entity);
+
+        params = new HashMap<>();
+        params.put("conf-id", "current");
+        params.put(Constants.CONNECTION_DETAILS_FIELD_NAME, connectionDetails);
+
+
+        netconfClientPlugin.getConfig(params, ctx);
+
+        Assert.assertEquals("failure", ctx.getAttribute("getConfig_Result"));
+        Assert.assertNull(ctx.getAttribute("fullConfig"));
+        Assert.assertNull(ctx.getAttribute(entity + ".Configuration"));
+        Assert.assertNull(ctx.getAttribute(entity + ".Configuration"));
+    }
+
+
+    @Test
+    public void testGetConfigNegativeNotSupportedConfId() throws Exception {
+        fullInit();
+        String entity = "123";
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("entity", entity);
+
+        params = new HashMap<>();
+        params.put("conf-id", "current1");
+        params.put(Constants.CONNECTION_DETAILS_FIELD_NAME, connectionDetails);
+
+
+        netconfClientPlugin.getConfig(params, ctx);
+
+        Assert.assertNull(ctx.getAttribute("getConfig_Result"));
+        Assert.assertNull(ctx.getAttribute("fullConfig"));
+        Assert.assertNull(ctx.getAttribute(entity + ".Configuration"));
+        Assert.assertNull(ctx.getAttribute(entity + ".Configuration"));
+    }
+
+    @Test
+    public void testGetConfigNegativeWronjJsonConnectionDetailsException() throws Exception {
+        fullInit();
+        String entity = "123";
+
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("entity", entity);
+
+        params = new HashMap<>();
+        params.put("conf-id", "current");
+        params.put(Constants.CONNECTION_DETAILS_FIELD_NAME, "{" + connectionDetails);
+
+
+        try {
+            netconfClientPlugin.getConfig(params, ctx);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+            Assert.assertEquals("failure", ctx.getAttribute("getConfig_Result"));
+            Assert.assertNull(ctx.getAttribute("fullConfig"));
+            Assert.assertNull(ctx.getAttribute(entity + ".Configuration"));
+            Assert.assertNull(ctx.getAttribute(entity + ".Configuration"));
+            Assert.assertNotNull(ctx.getAttribute(DG_OUTPUT_STATUS_MESSAGE));
+        }
+
+
+    }
+
+    @Test
+    public void testGetRunningConfig() throws Exception {
+        fullInit();
+        SvcLogicContext ctx = new SvcLogicContext();
+        params = new HashMap<>();
+        params.put("host-ip-address", host);
+        params.put("user-name", username);
+        params.put("password", password);
+        params.put("port-number", String.valueOf(port));
+
+        NetconfClientJschMock client = (NetconfClientJschMock) clientFactory.GetNetconfClient(NetconfClientType.SSH);
+        client.setConf(fileContent);
+
+        netconfClientPlugin.getRunningConfig(params, ctx);
+
+        Assert.assertEquals("Success", ctx.getAttribute("getRunningConfig_Result"));
+        Assert.assertEquals(fileContent, ctx.getAttribute("running-config"));
+        Assert.assertEquals("success", ctx.getStatus());
+    }
+
+    @Test
+    public void testGetRunningConfigWithoutPortNumberDgErrorFieldNameException() throws Exception {
+        fullInit();
+        SvcLogicContext ctx = new SvcLogicContext();
+        params = new HashMap<>();
+        params.put("host-ip-address", host);
+        params.put("user-name", username);
+        params.put("password", password);
+
+        NetconfClientJschMock client = (NetconfClientJschMock) clientFactory.GetNetconfClient(NetconfClientType.SSH);
+        client.setConf(fileContent);
+
+        try {
+            netconfClientPlugin.getRunningConfig(params, ctx);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+            Assert.assertEquals("failure", ctx.getAttribute("getRunningConfig_Result"));
+            Assert.assertNull(ctx.getAttribute("running-config"));
+            Assert.assertNotNull(ctx.getAttribute(DG_OUTPUT_STATUS_MESSAGE));
+        }
+
+
+    }
+
+    @Test
+    public void testGetRunningConfigNegativeConfigurationNull() throws Exception {
+        fullInit();
+        SvcLogicContext ctx = new SvcLogicContext();
+        params = new HashMap<>();
+        params.put("host-ip-address", host);
+        params.put("user-name", username);
+        params.put("password", password);
+        params.put("port-number", String.valueOf(port));
+
+        netconfClientPlugin.getRunningConfig(params, ctx);
+
+        Assert.assertEquals("failure", ctx.getAttribute("getRunningConfig_Result"));
+        Assert.assertNull(ctx.getAttribute("running-config"));
+    }
+
+    @Test
+    public void testValidateMandatoryParamNegativeEmptyParamValue() throws Exception {
+        shortInit();
+        String paramName = "test";
+        String paramValue = "";
+
+        try {
+            netconfClientPlugin.validateMandatoryParam(paramName, paramValue);
+            Assert.assertTrue(false);
+        } catch (Exception e) {
+            Assert.assertTrue(true);
+        }
+    }
+
+    @Test
+    public void testRetrieveConnectionDetails() throws Exception {
+        shortInit();
+        DAOServiceMock daoServiceMock = (DAOServiceMock) dao;
+        daoServiceMock.setConfigFile(fileContent);
+        ConnectionDetails connectionDetails1 = getConnectionDetails();
+        daoServiceMock.setConnection(connectionDetails1);
+
+        NetconfConnectionDetails connectionDetailsActual = netconfClientPlugin.retrieveConnectionDetails(VnfType.VNF);
+
+
+        Assert.assertEquals("wrong host", connectionDetails1.getHost(), connectionDetailsActual.getHost());
+        Assert.assertEquals("wrong password", connectionDetails1.getPassword(), connectionDetailsActual.getPassword());
+        Assert.assertEquals("wrong port", connectionDetails1.getPort(), connectionDetailsActual.getPort());
+        Assert.assertEquals("wrong usename", connectionDetails1.getUsername(), connectionDetailsActual.getUsername());
+    }
+
+
+    @Test
+    public void testRetrieveConnectionDetailsNegativeMissingConfiguration() throws Exception {
+        shortInit();
+        DAOServiceMock daoServiceMock = (DAOServiceMock) dao;
+        daoServiceMock.setConfigFile(fileContent);
+        ConnectionDetails connectionDetails1 = getConnectionDetails();
+        daoServiceMock.setConnection(connectionDetails1);
+
+        NetconfConnectionDetails connectionDetailsActual = null;
+        try {
+            connectionDetailsActual = netconfClientPlugin.retrieveConnectionDetails(VnfType.MOCK);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+            Assert.assertNull(connectionDetailsActual);
+        }
+
+
+    }
+
+    @Test
+    public void testRetrieveConfigurationFileContent() throws Exception {
+        shortInit();
+
+        DAOServiceMock daoServiceMock = (DAOServiceMock) dao;
+        daoServiceMock.setConfigFile(fileContent);
+
+        Assert.assertEquals("wrong config in a database", fileContent, netconfClientPlugin.retrieveConfigurationFileContent("VnfGetRunningConfig"));
+    }
+
+    private ConnectionDetails getConnectionDetails() {
+
+        ConnectionDetails connectionDetails = new ConnectionDetails();
+        connectionDetails.setPassword(password);
+        connectionDetails.setPort(port);
+        connectionDetails.setUsername(username);
+        connectionDetails.setHost(host);
+        return connectionDetails;
+    }
+
+
+    private void initDao() throws NoSuchFieldException, IllegalAccessException {
+        dao = new DAOServiceMock();
+        PowerMockito.mockStatic(FrameworkUtil.class);
+        when(FrameworkUtil.getBundle(Matchers.any(Class.class))).thenReturn(bundleService);
+        when(bundleService.getBundleContext()).thenReturn(bundleContext);
+        when(bundleContext.getServiceReference(NetconfDataAccessService.class)).thenReturn(sref1);
+        when(bundleContext.getService(sref1)).thenReturn(dao);
+
+
+    }
+
+    private void fullInit() throws NoSuchFieldException, IllegalAccessException {
+        initClientFactory();
+        initClientFactory2();
+        initDao();
+        netconfClientPlugin = new NetconfClientPluginImpl();
+        netconfClientPlugin.setDao(this.dao);
+    }
+
+    private void shortInit() throws NoSuchFieldException, IllegalAccessException {
+        initClientFactory();
+        initDao();
+        netconfClientPlugin = new NetconfClientPluginImpl();
+        netconfClientPlugin.setDao(this.dao);
+    }
+
+    private void initClientFactory() throws NoSuchFieldException, IllegalAccessException {
+
+        PowerMockito.mockStatic(FrameworkUtil.class);
+        when(FrameworkUtil.getBundle(Matchers.any(Class.class))).thenReturn(bundleService);
+        when(bundleService.getBundleContext()).thenReturn(bundleContext);
+        when(bundleContext.getServiceReference(NetconfClientFactory.class)).thenReturn(sref2);
+        when(bundleContext.getService(sref2)).thenReturn(clientFactory);
+
+    }
+
+    private void initClientFactory2() {
+        PowerMockito.mockStatic(FrameworkUtil.class);
+        when(FrameworkUtil.getBundle(Matchers.any(Class.class))).thenReturn(bundleService);
+        when(bundleService.getBundleContext()).thenReturn(bundleContext);
+        when(bundleContext.getServiceReference(Matchers.anyString())).thenReturn(sref3);
+        when(bundleContext.getService(sref3)).thenReturn(clientFactory);
+    }
+
+    private void substituteMapper(boolean command) throws NoSuchFieldException, IllegalAccessException {
+        ObjectMapper mapper = new ObjectMapperMock();
+        ObjectMapper mapper2 = new ObjectMapper();
+        Field field = NetconfClientPluginImpl.class.getDeclaredField("mapper");
+        field.setAccessible(true);
+        if (command) {
+            field.set(netconfClientPlugin, mapper);
+        } else {
+            field.set(netconfClientPlugin, mapper2);
+        }
+    }
+
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/NetconfDBPluginImplTest.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/NetconfDBPluginImplTest.java
new file mode 100644
index 0000000..a591648
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/NetconfDBPluginImplTest.java
@@ -0,0 +1,250 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.netconf.impl;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.*;
+import org.openecomp.appc.adapter.netconf.ConnectionDetails;
+import org.openecomp.appc.adapter.netconf.NetconfConnectionDetails;
+import org.openecomp.appc.adapter.netconf.NetconfDataAccessService;
+import org.openecomp.appc.adapter.netconf.exception.DataAccessException;
+import org.openecomp.appc.dg.netconf.impl.NetconfDBPluginImpl;
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.powermock.api.support.SuppressCode.suppressConstructor;
+
+public class NetconfDBPluginImplTest {
+    private NetconfDBPluginImpl netconfDBPlugin;
+    private NetconfDataAccessService daoService;
+    private DAOServiceMock daoMock;
+    private Map<String, String> params;
+    private static final String DG_OUTPUT_STATUS_MESSAGE = "output.status.message";
+    String host = "http://www.test.com";
+    String host1 = "http://www.test1.com";
+    int port = 8080;
+    String username = "test";
+    String password = "test";
+    String configContent = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
+            "<rpc message-id=\"101\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\n" +
+            "\t<get-config>\n" +
+            "\t\t<source>\n" +
+            "\t\t\t<running/>\n" +
+            "\t\t </source>\n" +
+            "\t</get-config>\n" +
+            "</rpc>'";
+
+
+    @Test
+    public void testRetrieveDSConfiguration() throws Exception {
+        init();
+        params = new HashMap<>();
+        params.put("org.openecomp.appc.vftype", "VNF");
+        params.put("configuration-file-name", "VnfGetRunningConfig");
+        SvcLogicContext ctx = new SvcLogicContext();
+        netconfDBPlugin.retrieveDSConfiguration(params, ctx);
+
+        Assert.assertEquals("lack of success of status", "success", ctx.getStatus());
+        Assert.assertEquals("wrong config file content", configContent, ctx.getAttribute("file-content"));
+    }
+
+
+    @Test
+    public void testRetrieveDSConfigurationNegativeErrorFieldNameDaoException() throws Exception {
+        init();
+        SvcLogicContext ctx = new SvcLogicContext();
+        params = new HashMap<>();
+        params.put("configuration-file-name", "wrong");
+
+        try {
+            netconfDBPlugin.retrieveDSConfiguration(params, ctx);
+        } catch (DataAccessException e) {
+            //Assert.assertNotNull(ctx.getAttribute("org.openecomp.appc.dg.error"));
+            Assert.assertNull(ctx.getAttribute("file-content"));
+        }
+
+
+    }
+
+    @Test
+    public void testRetrieveVMDSConfiguration() throws Exception {
+        init();
+        params = new HashMap<>();
+        params.put("resourceKey", "VNF");
+        SvcLogicContext ctx = new SvcLogicContext();
+        netconfDBPlugin.retrieveVMDSConfiguration(params, ctx);
+
+        Assert.assertEquals("lack of success of retrieveVMDSConfiguration_Result", "success", ctx.getAttribute("retrieveVMDSConfiguration_Result"));
+        Assert.assertEquals("wrong entity", "VNF", ctx.getAttribute("entity"));
+        assertConnectionDetails(ctx, host);
+    }
+
+    @Test
+    public void testRetrieveVMDSConfigurationNegativeMissingConfiguration() throws Exception {
+        init();
+        SvcLogicContext ctx = new SvcLogicContext();
+        params = new HashMap<>();
+        params.put("resourceKey", "MOCK");
+
+        try {
+            netconfDBPlugin.retrieveVMDSConfiguration(params, ctx);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+
+            Assert.assertEquals("failure", ctx.getAttribute("retrieveVMDSConfiguration_Result"));
+        }
+    }
+
+
+    @Test
+    public void testRetrieveVMDSConfigurationNegativeJsonProcessingException() throws Exception {
+
+        SvcLogicContext ctx = new SvcLogicContext();
+        params = new HashMap<>();
+        params.put("resourceKey", "VNF");
+
+        init();
+        substituteMapper(true);
+        try {
+            netconfDBPlugin.retrieveVMDSConfiguration(params, ctx);
+            substituteMapper(false);
+            Assert.assertTrue(false);
+
+        } catch (APPCException e) {
+            substituteMapper(false);
+            Assert.assertNotNull(ctx.getAttribute(DG_OUTPUT_STATUS_MESSAGE));
+
+        }
+
+    }
+
+    @Test
+    public void testRetrieveConfigFile() throws Exception {
+        init();
+        SvcLogicContext ctx = new SvcLogicContext();
+        params = new HashMap<>();
+        params.put("configuration-file-name", "VnfGetRunningConfig");
+        netconfDBPlugin.retrieveConfigFile(params, ctx);
+
+        Assert.assertEquals("lack of success of status", "success", ctx.getStatus());
+        Assert.assertEquals("wrong config file content", configContent, ctx.getAttribute("file-content"));
+    }
+
+    @Test
+    public void testRetrieveConnectionDetails() throws Exception {
+        init();
+        params = new HashMap<>();
+        params.put("org.openecomp.appc.vftype", "VNF");
+        params.put("vnf-host-ip-address", host1);
+        SvcLogicContext ctx = new SvcLogicContext();
+        netconfDBPlugin.retrieveConnectionDetails(params, ctx);
+
+        assertConnectionDetails(ctx, host1);
+    }
+
+    @Test
+    public void testRetrieveConnectionDetailsNegativeJsonProcessingException() throws Exception {
+        init();
+        params = new HashMap<>();
+        params.put("org.openecomp.appc.vftype", "MOCK");
+        params.put("vnf-host-ip-address", host1);
+        SvcLogicContext ctx = new SvcLogicContext();
+
+        try {
+            netconfDBPlugin.retrieveConnectionDetails(params, ctx);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+            Assert.assertNull(ctx.getAttribute("connection-details"));
+            Assert.assertNotNull(ctx.getAttribute(DG_OUTPUT_STATUS_MESSAGE));
+        }
+
+    }
+
+
+    @Test
+    public void testRetrieveConnectionDetailsNegativeMissingConfiguration() throws Exception {
+        init();
+        params = new HashMap<>();
+        params.put("org.openecomp.appc.vftype", "VNF");
+        params.put("vnf-host-ip-address", host1);
+        SvcLogicContext ctx = new SvcLogicContext();
+        substituteMapper(true);
+
+        try {
+            netconfDBPlugin.retrieveConnectionDetails(params, ctx);
+            substituteMapper(false);
+            Assert.assertTrue(false);
+        } catch (APPCException e) {
+            substituteMapper(false);
+            Assert.assertNull(ctx.getAttribute("connection-details"));
+            Assert.assertNotNull(ctx.getAttribute(DG_OUTPUT_STATUS_MESSAGE));
+        }
+
+    }
+
+    private void assertConnectionDetails(SvcLogicContext ctx, String host) throws IOException {
+        String sConnectionDetails = ctx.getAttribute("connection-details");
+        NetconfConnectionDetails connectionDetails = new ObjectMapper().readValue(sConnectionDetails, NetconfConnectionDetails.class);
+        Assert.assertEquals(host, connectionDetails.getHost());
+        Assert.assertEquals(port, connectionDetails.getPort());
+        Assert.assertEquals(username, connectionDetails.getUsername());
+        Assert.assertEquals(password, connectionDetails.getPassword());
+        Assert.assertNull(connectionDetails.getCapabilities());
+        Assert.assertNull(connectionDetails.getAdditionalProperties());
+    }
+
+    private void init() {
+        netconfDBPlugin = new NetconfDBPluginImpl();
+        daoService = new DAOServiceMock();
+        netconfDBPlugin.setDaoService(daoService);
+        daoMock = (DAOServiceMock) daoService;
+        daoMock.setConfigFile(configContent);
+        daoMock.setConnection(getConnectionDetails());
+
+    }
+
+    private ConnectionDetails getConnectionDetails() {
+        ConnectionDetails connectionDetails = new ConnectionDetails();
+        connectionDetails.setHost(host);
+        connectionDetails.setUsername(username);
+        connectionDetails.setPort(port);
+        connectionDetails.setPassword(password);
+        return connectionDetails;
+    }
+
+    private void substituteMapper(boolean command) throws NoSuchFieldException, IllegalAccessException {
+        ObjectMapper mapper = new ObjectMapperMock();
+        ObjectMapper mapper2 = new ObjectMapper();
+        Field field = NetconfDBPluginImpl.class.getDeclaredField("mapper");
+        field.setAccessible(true);
+        if (command) {
+            field.set(netconfDBPlugin, mapper);
+        } else {
+            field.set(netconfDBPlugin, mapper2);
+        }
+    }
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/ObjectMapperMock.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/ObjectMapperMock.java
new file mode 100644
index 0000000..6a7da63
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/ObjectMapperMock.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.netconf.impl;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.io.IOException;
+
+
+public class ObjectMapperMock extends ObjectMapper {
+
+    @Override
+    public String writeValueAsString(Object var1) throws JsonProcessingException {
+        throw new JsonProcessingException("") {
+        };
+
+    }
+
+    @Override
+    public <T> T readValue(String var1, Class<T> var2) throws IOException, JsonParseException, JsonMappingException {
+        return null;
+    }
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/OperationStateValidatorFactoryMock.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/OperationStateValidatorFactoryMock.java
new file mode 100644
index 0000000..1dea8eb
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-netconf/src/test/java/org/openecomp/appc/dg/netconf/impl/OperationStateValidatorFactoryMock.java
@@ -0,0 +1,47 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.netconf.impl;
+
+import org.apache.commons.lang3.NotImplementedException;
+import org.openecomp.appc.adapter.netconf.*;
+
+
+public class OperationStateValidatorFactoryMock extends OperationalStateValidatorFactory {
+    public static OperationalStateValidator getOperationalStateValidator(String vnfType) {
+        VnfType vnfTypeEnum = null;
+        try {
+            vnfTypeEnum = VnfType.getVnfType(vnfType);
+        } catch (IllegalArgumentException e) {
+            throw new IllegalArgumentException("Illegal value in vnfType. vnfType=" + vnfType, e);
+        }
+        return getOperationalStateValidator(vnfTypeEnum);
+    }
+
+    public static OperationalStateValidator getOperationalStateValidator(VnfType vnfType) {
+
+        return new MockOperationalStateValidatorImpl();
+
+
+    }
+
+
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-features/.gitignore b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-features/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-features/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-features/pom.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-features/pom.xml
new file mode 100644
index 0000000..edaecc2
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-features/pom.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.openecomp.appc</groupId>
+		<artifactId>appc-dg-shared</artifactId>
+		<version>1.0.0</version>
+	</parent>
+	<artifactId>appc-dg-shared-features</artifactId>
+	<packaging>jar</packaging>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-dg-ssh</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-dg-netconf</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-dg-aai</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-dg-license-manager</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-dg-common</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<resources>
+			<resource>
+				<filtering>true</filtering>
+				<directory>src/main/resources</directory>
+			</resource>
+		</resources>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-resources-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>filter</id>
+						<goals>
+							<goal>resources</goal>
+						</goals>
+						<phase>generate-resources</phase>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>build-helper-maven-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-artifacts</id>
+						<goals>
+							<goal>attach-artifact</goal>
+						</goals>
+						<phase>package</phase>
+						<configuration>
+							<artifacts>
+								<artifact>
+									<file>${project.build.directory}/classes/${features.file}</file>
+									<type>xml</type>
+									<classifier>features</classifier>
+								</artifact>
+							</artifacts>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+</project>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-features/src/main/resources/features.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-features/src/main/resources/features.xml
new file mode 100644
index 0000000..3271f7a
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-features/src/main/resources/features.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+  openECOMP : APP-C
+  ================================================================================
+  Copyright (C) 2017 AT&T 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=========================================================
+  -->
+
+
+<features name="appc-dg-shared-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
+		  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		  xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
+	<repository>mvn:org.openecomp.appc/appc-ssh-adapter-features/${project.version}/xml/features</repository>
+	<repository>mvn:org.openecomp.appc/appc-netconf-adapter-features/${project.version}/xml/features</repository>
+	<feature name='appc-dg-shared' description="appc-dg-shared" version='${project.version}'>
+		<feature version='${project.version}'>appc-ssh-adapter</feature>
+		<feature version='${project.version}'>appc-netconf-adapter</feature>
+		<bundle>mvn:org.openecomp.appc/appc-dg-common/${project.version}</bundle>
+		<bundle>mvn:org.openecomp.appc/appc-dg-ssh/${project.version}</bundle>
+		<bundle start-level="85" start="true">mvn:org.openecomp.appc/appc-dg-netconf/${project.version}</bundle>
+		<bundle>mvn:org.openecomp.appc/appc-dg-license-manager/${project.version}</bundle>
+		<bundle start-level="85" start="true">mvn:org.openecomp.appc/appc-dg-aai/${project.version}</bundle>
+	</feature>
+</features>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/.gitignore b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/pom.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/pom.xml
new file mode 100644
index 0000000..0a00e4a
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/pom.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.openecomp.appc</groupId>
+		<artifactId>appc-dg-shared</artifactId>
+		<version>1.0.0</version>
+	</parent>
+	<artifactId>appc-dg-shared-installer</artifactId>
+	<name>APPC DG Shared - Karaf Installer</name>
+	<packaging>pom</packaging>
+
+	<properties>
+		<application.name>appc-dg-shared</application.name>
+		<features.boot>appc-dg-shared</features.boot>
+		<features.repositories>mvn:org.openecomp.appc/appc-dg-shared-features/${project.version}/xml/features</features.repositories>
+	</properties>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-dg-shared-features</artifactId>
+			<version>${project.version}</version>
+			<classifier>features</classifier>
+			<type>xml</type>
+		</dependency>
+
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-ssh-adapter-features</artifactId>
+			<version>${project.version}</version>
+			<classifier>features</classifier>
+			<type>xml</type>
+		</dependency>
+
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-netconf-adapter-features</artifactId>
+			<version>${project.version}</version>
+			<classifier>features</classifier>
+			<type>xml</type>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-assembly-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>mavne-repo-zip</id>
+						<goals>
+							<goal>single</goal>
+						</goals>
+						<phase>package</phase>
+						<configuration>
+							<appendAssemblyId>false</appendAssemblyId>
+							<attach>false</attach>
+							<finalName>stage/${application.name}-${project.version}</finalName>
+							<descriptors>
+								<descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
+							</descriptors>
+						</configuration>
+					</execution>
+					<execution>
+						<id>installer-zip</id>
+						<goals>
+							<goal>single</goal>
+						</goals>
+						<phase>package</phase>
+						<configuration>
+							<appendAssemblyId>false</appendAssemblyId>
+							<attach>true</attach>
+							<finalName>${application.name}-${project.version}</finalName>
+							<descriptors>
+								<descriptor>src/assembly/assemble_installer_zip.xml</descriptor>
+							</descriptors>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>copy-dependencies</id>
+						<goals>
+							<goal>copy-dependencies</goal>
+						</goals>
+						<phase>prepare-package</phase>
+						<configuration>
+							<outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
+							<overWriteReleases>false</overWriteReleases>
+							<overWriteSnapshots>true</overWriteSnapshots>
+							<overWriteIfNewer>true</overWriteIfNewer>
+							<useRepositoryLayout>true</useRepositoryLayout>
+							<addParentPoms>false</addParentPoms>
+							<copyPom>false</copyPom>
+							<excludeGroupIds>org.opendaylight</excludeGroupIds>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-resources-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>copy-version</id>
+						<goals>
+							<goal>copy-resources</goal>
+						</goals>
+						<!-- here the phase you need -->
+						<phase>validate</phase>
+						<configuration>
+							<outputDirectory>${basedir}/target/stage</outputDirectory>
+							<resources>
+								<resource>
+									<directory>src/main/resources/scripts</directory>
+									<includes>
+										<include>install-feature.sh</include>
+									</includes>
+									<filtering>true</filtering>
+								</resource>
+							</resources>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+</project>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/src/assembly/assemble_installer_zip.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/src/assembly/assemble_installer_zip.xml
new file mode 100644
index 0000000..9fbaad8
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/src/assembly/assemble_installer_zip.xml
@@ -0,0 +1,59 @@
+<!--
+  ============LICENSE_START=======================================================
+  openECOMP : APP-C
+  ================================================================================
+  Copyright (C) 2017 AT&T 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=========================================================
+  -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+	xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+	<id>adapter</id>
+	<formats>
+		<format>zip</format>
+	</formats>
+
+	<!--  we want "system" and related files right at the root level
+		  as this file is suppose to be unzip on top of a karaf
+		  distro. -->
+	<includeBaseDirectory>false</includeBaseDirectory>
+
+	<fileSets>
+		<fileSet>
+			<directory>target/stage/</directory>
+			<outputDirectory>${application.name}</outputDirectory>
+			<fileMode>755</fileMode>
+			<includes>
+				<include>*.sh</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>target/stage/</directory>
+			<outputDirectory>${application.name}</outputDirectory>
+			<fileMode>644</fileMode>
+			<excludes>
+				<exclude>*.sh</exclude>
+			</excludes>
+		</fileSet>
+	</fileSets>
+
+
+
+</assembly>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/src/assembly/assemble_mvnrepo_zip.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/src/assembly/assemble_mvnrepo_zip.xml
new file mode 100644
index 0000000..1ac5a82
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/src/assembly/assemble_mvnrepo_zip.xml
@@ -0,0 +1,47 @@
+<!--
+  ============LICENSE_START=======================================================
+  openECOMP : APP-C
+  ================================================================================
+  Copyright (C) 2017 AT&T 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=========================================================
+  -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+	xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+	<id>adapter</id>
+	<formats>
+		<format>zip</format>
+	</formats>
+
+	<!--  we want "system" and related files right at the root level
+		  as this file is suppose to be unzip on top of a karaf
+		  distro. -->
+	<includeBaseDirectory>false</includeBaseDirectory>
+
+	<fileSets>
+		<fileSet>
+			<directory>target/assembly/</directory>
+			<outputDirectory>.</outputDirectory>
+			<excludes>
+			</excludes>
+		</fileSet>
+	</fileSets>
+
+</assembly>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/src/main/resources/etc/org.apache.cxf.osgi.cfg b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/src/main/resources/etc/org.apache.cxf.osgi.cfg
new file mode 100644
index 0000000..7ea1088
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/src/main/resources/etc/org.apache.cxf.osgi.cfg
@@ -0,0 +1 @@
+org.apache.cxf.servlet.context=/actions
\ No newline at end of file
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/src/main/resources/scripts/install-feature.sh b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/src/main/resources/scripts/install-feature.sh
new file mode 100644
index 0000000..1d769fa
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-shared-installer/src/main/resources/scripts/install-feature.sh
@@ -0,0 +1,40 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : APP-C
+# ================================================================================
+# Copyright (C) 2017 AT&T 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=========================================================
+###
+
+#!/bin/bash
+
+ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client}
+ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-"-u karaf"}
+INSTALLERDIR=$(dirname $0)
+
+REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip
+
+if [ -f ${REPOZIP} ]
+then
+	unzip -n -d ${ODL_HOME} ${REPOZIP}
+else
+	echo "ERROR : repo zip ($REPOZIP) not found"
+	exit 1
+fi
+
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories}
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/.gitignore b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/.settings/org.eclipse.wst.common.project.facet.core.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..f4ef8aa
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <installed facet="java" version="1.8"/>
+</faceted-project>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/pom.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/pom.xml
new file mode 100644
index 0000000..8a43155
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/pom.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.openecomp.appc</groupId>
+		<artifactId>appc-dg-shared</artifactId>
+		<version>1.0.0</version>
+	</parent>
+	<artifactId>appc-dg-ssh</artifactId>
+	<packaging>bundle</packaging>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-common</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-ssh-adapter-api</artifactId>
+			<version>${project.version}</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-dg-common</artifactId>
+			<version>${project.version}</version>
+			<scope>provided</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.openecomp.sdnc.core</groupId>
+			<artifactId>sli-common</artifactId>
+			<scope>compile</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.openecomp.appc</groupId>
+			<artifactId>appc-ssh-adapter-tests</artifactId>
+			<version>${project.version}</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>appc-dg-ssh</Bundle-SymbolicName>
+						<Export-Package>org.openecomp.appc.dg.ssh</Export-Package>
+						<Private-Package>org.openecomp.appc.dg.ssh.impl.*</Private-Package>
+						<Import-Package>!org.apache.log,!org.apache.commons.logging,!groovy.lang,!javax.jms,!org.codehaus.commons.compiler,!org.codehaus.groovy.*,!org.codehaus.janino,!com.ibm.icu.*,!com.sun.faces.*,!org.jasypt.*,*</Import-Package>
+						<Embed-Dependency>appc-common,eelf-core,logback-core,logback-classic;scope=compile|runtime;inline=false</Embed-Dependency>
+						<Embed-Transitive>true</Embed-Transitive>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/SshDBPlugin.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/SshDBPlugin.java
new file mode 100644
index 0000000..71569bc
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/SshDBPlugin.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.ssh;
+
+import java.util.Map;
+
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicJavaPlugin;
+
+public interface SshDBPlugin extends SvcLogicJavaPlugin {
+    void retrieveConnectionDetails(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/SshService.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/SshService.java
new file mode 100644
index 0000000..0d2927e
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/SshService.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.ssh;
+
+import java.util.Map;
+
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicJavaPlugin;
+
+/**
+ * Set of common methods that can be called from DG.
+ */
+public interface SshService extends SvcLogicJavaPlugin {
+
+	/**
+	 * Input parameter for SHH connection details
+	 */
+	String PARAM_IN_connection_details = "connection_details";
+
+	/**
+	 * Input parameter for SSH command to be executed.
+	 */
+	String PARAM_IN_command = "command";
+
+	/*
+	String PARAM_IN_host = "host";
+	String PARAM_IN_port = "port";
+	String PARAM_IN_username = "username";
+	String PARAM_IN_password = "password";
+	*/
+
+	/**
+	 * Input parameter for SSH command timeout
+	 */
+	String PARAM_IN_timeout = "timeout";
+
+	/**
+	 * Output parameter - SSH command execution status.
+	 */
+	String PARAM_OUT_status = "status";
+
+	/**
+	 * Output parameter - content of SSH command stdout.
+	 */
+	String PARAM_OUT_stdout = "stdout";
+
+	/**
+	 * Output parameter - content of SSH command stderr.
+	 */
+	String PARAM_OUT_stderr = "stderr";
+
+	/**
+	 * Default SSH connection port.
+	 */
+	int DEF_port = 22;
+
+	/**
+	 * Default SSH command timeout
+	 */
+	long DEF_timeout = 120000;
+
+	/**
+	 * Default success status.
+	 */
+	int DEF_SUCCESS_STATUS = 0;
+
+	/**
+	 * Execute remote command over SSH.
+	 *
+	 * @param params contains list of input parameters required for the implementation
+	 * @param ctx SLI service logic context
+	 * @throws APPCException
+	 */
+	void exec(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+
+	/**
+	 * Execute remote command over SSH and check return status assuming that success status is 0.
+	 * If non-zero status is returned - fail the execution by throwing exception with content written
+	 * by command to stderr.
+	 *
+	 * @param params contains list of input parameters required for the implementation
+	 * @param ctx SLI service logic context
+	 * @throws APPCException
+	 */
+	void execWithStatusCheck(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/impl/SshDBPluginImpl.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/impl/SshDBPluginImpl.java
new file mode 100644
index 0000000..382d418
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/impl/SshDBPluginImpl.java
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.ssh.impl;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.util.Map;
+
+import org.openecomp.appc.adapter.ssh.Constants;
+import org.openecomp.appc.adapter.ssh.SshConnectionDetails;
+import org.openecomp.appc.adapter.ssh.SshDataAccessException;
+import org.openecomp.appc.adapter.ssh.SshDataAccessService;
+import org.openecomp.appc.dg.ssh.SshDBPlugin;
+import org.openecomp.appc.exceptions.APPCException;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+
+public class SshDBPluginImpl implements SshDBPlugin {
+
+    private static EELFLogger logger = EELFManager.getInstance().getApplicationLogger();
+    private static ObjectMapper mapper = new ObjectMapper();
+
+    private SshDataAccessService dataAccessService;
+
+    public void setDataAccessService(SshDataAccessService dataAccessService) {
+        this.dataAccessService = dataAccessService;
+    }
+
+    public void retrieveConnectionDetails(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        SshConnectionDetails connectionDetails = new SshConnectionDetails();
+        String vnfType = ctx.getAttribute("aai.prefix")+"."+"vnf-type";
+        try {
+            if (!dataAccessService.retrieveConnectionDetails(ctx.getAttribute(vnfType), connectionDetails)) {
+                logger.error("Missing configuration for " + params.get(vnfType));
+                throw new APPCException("Missing configuration for " + params.get(vnfType) + " in " + Constants.DEVICE_AUTHENTICATION_TABLE_NAME);
+            }
+            connectionDetails.setHost(params.get(Constants.VNF_HOST_IP_ADDRESS_FIELD_NAME));
+            ctx.setAttribute(Constants.CONNECTION_DETAILS_FIELD_NAME, mapper.writeValueAsString(connectionDetails));
+        } catch(APPCException e) {
+            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, e.getMessage());
+            throw e;
+        } catch(SshDataAccessException e) {
+            logger.error("Error " + e.getMessage());
+            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, e.getMessage());
+            throw e;
+        } catch (JsonProcessingException e) {
+            logger.error("Error " + e.getMessage());
+            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, e.getMessage());
+            throw new APPCException(e);
+        }
+    }
+
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/impl/SshServiceImpl.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/impl/SshServiceImpl.java
new file mode 100644
index 0000000..5066f0a
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/impl/SshServiceImpl.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.ssh.impl;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Map;
+
+import org.openecomp.appc.adapter.ssh.SshAdapter;
+import org.openecomp.appc.adapter.ssh.SshConnection;
+import org.openecomp.appc.adapter.ssh.SshConnectionDetails;
+import org.openecomp.appc.dg.ssh.SshService;
+import org.openecomp.appc.exceptions.APPCException;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+
+
+public class SshServiceImpl implements SshService {
+
+	private static final EELFLogger logger = EELFManager.getInstance().getApplicationLogger();
+	private static final ObjectMapper mapper = new ObjectMapper();
+
+	private SshAdapter sshAdapter;
+
+	public void setSshAdapter(SshAdapter sshAdapter) {
+		this.sshAdapter = sshAdapter;
+	}
+
+	@Override
+	public void exec(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+		SshConnectionDetails connectionDetails = resolveConnectionDetails(params.get(PARAM_IN_connection_details));
+		String command = params.get(PARAM_IN_command);
+		logger.debug("=> Connecting to SSH server...");
+		SshConnection sshConnection = sshAdapter.getConnection(connectionDetails.getHost(), connectionDetails.getPort(), connectionDetails.getUsername(), connectionDetails.getPassword());
+		sshConnection.connect();
+		try {
+			logger.debug("=> Connected to SSH server...");
+			logger.debug("=> Running SSH command...");
+			long timeout = DEF_timeout;
+			String stimeout = params.get(PARAM_IN_timeout);
+			if ((stimeout != null && !stimeout.isEmpty())) {
+				timeout = Long.parseLong(stimeout);
+			}
+			sshConnection.setExecTimeout(timeout);
+			ByteArrayOutputStream stdout = new ByteArrayOutputStream();
+			ByteArrayOutputStream stderr = new ByteArrayOutputStream();
+			int status = sshConnection.execCommand(command, stdout, stderr);
+			String stdoutRes = stdout.toString();
+			String stderrRes = stderr.toString();
+			logger.debug("=> executed SSH command");
+			ctx.setAttribute(PARAM_OUT_status, String.format("%01d", status));
+			ctx.setAttribute(PARAM_OUT_stdout, stdoutRes);
+			ctx.setAttribute(PARAM_OUT_stderr, stderrRes);
+		} finally {
+			sshConnection.disconnect();
+		}
+	}
+
+	private SshConnectionDetails resolveConnectionDetails(String connectionDetailsStr) throws APPCException {
+		SshConnectionDetails connectionDetails = null;
+		try {
+			connectionDetails = mapper.readValue(connectionDetailsStr, SshConnectionDetails.class);
+			if (0 == connectionDetails.getPort()) connectionDetails.setPort(DEF_port);
+		} catch (IOException e) {
+			throw new APPCException(e);
+		}
+		return connectionDetails;
+	}
+
+	@Override
+	public void execWithStatusCheck(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+		exec(params, ctx);
+		int status = Integer.parseInt(ctx.getAttribute(PARAM_OUT_status));
+		if(status != DEF_SUCCESS_STATUS) {
+			StringBuilder errmsg = new StringBuilder();
+			errmsg.append("SSH command returned error status [").append(status).append(']');
+			String stderr = ctx.getAttribute(PARAM_OUT_stderr);
+			if((stderr != null) && !stderr.isEmpty()) {
+				errmsg.append(". Error: [").append(stderr).append(']');
+			}
+			throw new APPCException(errmsg.toString());
+		}
+	}
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/resources/OSGI-INF/blueprint/blueprint.xml
new file mode 100644
index 0000000..11ab240
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+  openECOMP : APP-C
+  ================================================================================
+  Copyright (C) 2017 AT&T 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=========================================================
+  -->
+
+<!--
+    Starter Blueprint Camel Definition appc-aai-adapter-blueprint
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+		   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		   xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+	<reference id="sshAdapterRef" availability="mandatory" activation="eager" interface="org.openecomp.appc.adapter.ssh.SshAdapter" />
+	<bean id="sshServiceBean" class="org.openecomp.appc.dg.ssh.impl.SshServiceImpl" scope="singleton">
+		<property name="sshAdapter" ref="sshAdapterRef" />
+	</bean>
+	<service id="sshService" interface="org.openecomp.appc.dg.ssh.SshService" ref="sshServiceBean"/>
+
+	<reference id="sshDAServiceRef" availability="mandatory" activation="eager" interface="org.openecomp.appc.adapter.ssh.SshDataAccessService" />
+	<bean id="sshDBPluginBean" class="org.openecomp.appc.dg.ssh.impl.SshDBPluginImpl" scope="singleton">
+		<property name="dataAccessService" ref="sshDAServiceRef" />
+	</bean>
+	<service id="sshDBPlugin" interface="org.openecomp.appc.dg.ssh.SshDBPlugin" ref="sshDBPluginBean"/>
+
+</blueprint>
diff --git a/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/test/java/org/openecomp/appc/dg/ssh/impl/SshServiceImplTest.java b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/test/java/org/openecomp/appc/dg/ssh/impl/SshServiceImplTest.java
new file mode 100644
index 0000000..a00d211
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/appc-dg-ssh/src/test/java/org/openecomp/appc/dg/ssh/impl/SshServiceImplTest.java
@@ -0,0 +1,170 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T 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.openecomp.appc.dg.ssh.impl;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.hamcrest.CoreMatchers;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.openecomp.appc.adapter.ssh.SshAdapterMock;
+import org.openecomp.appc.adapter.ssh.SshConnectionDetails;
+import org.openecomp.appc.adapter.ssh.SshConnectionMock;
+import org.openecomp.appc.dg.ssh.SshService;
+import org.openecomp.appc.dg.ssh.impl.SshServiceImpl;
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+public class SshServiceImplTest {
+
+	private static final ObjectMapper mapper = new ObjectMapper();
+
+	@Rule
+	public ExpectedException thrown = ExpectedException.none();
+
+	@Test
+	public void testExec() throws APPCException, JsonProcessingException {
+		String host = "testhost";
+		String username = "testuser";
+		String password = "testpassword";
+		String command = "cat keystonerc_Test";
+
+		SshServiceImpl sshService = new SshServiceImpl();
+		SshAdapterMock sshAdapterMock = new SshAdapterMock();
+		sshService.setSshAdapter(sshAdapterMock);
+
+		System.out.println("=> Executing SSH command [" + command + "]...");
+
+		Map<String, String> params = new HashMap<>();
+		params.put(SshService.PARAM_IN_connection_details, createConnectionDetails(host,username,password));
+		params.put(SshService.PARAM_IN_command, command);
+		SvcLogicContext svcLogicContext = new SvcLogicContext(new Properties());
+		sshService.exec(params, svcLogicContext);
+		int status = Integer.parseInt(svcLogicContext.getAttribute(SshService.PARAM_OUT_status));
+		String stdout = svcLogicContext.getAttribute(SshService.PARAM_OUT_stdout);
+		String stderr = svcLogicContext.getAttribute(SshService.PARAM_OUT_stderr);
+		System.out.println("=> SSH command [" + command + "] status is [" + status + "]. stdout is [" + stdout + "]. stderr is [" + stderr + "]");
+
+		List<SshConnectionMock> connectionMocks = sshAdapterMock.getConnectionMocks();
+		Assert.assertEquals(1, connectionMocks.size());
+		SshConnectionMock connectionMock = connectionMocks.get(0);
+		Assert.assertNotNull(connectionMock);
+		Assert.assertEquals(host, connectionMock.getHost());
+		Assert.assertEquals(SshService.DEF_port, connectionMock.getPort());
+		Assert.assertEquals(username, connectionMock.getUsername());
+		Assert.assertEquals(password, connectionMock.getPassword());
+		Assert.assertEquals(1, connectionMock.getConnectCallCount());
+		Assert.assertEquals(1, connectionMock.getDisconnectCallCount());
+		List<String> executedCommands = connectionMock.getExecutedCommands();
+		Assert.assertEquals(1, executedCommands.size());
+		String executedCommand = executedCommands.get(0);
+		Assert.assertEquals(command, executedCommand);
+	}
+
+	@Test
+	public void testExecWithStatusCheck() throws APPCException, JsonProcessingException {
+		String host = "testhost";
+		String username = "testuser";
+		String password = "testpassword";
+		String command = "cat keystonerc_Test";
+
+		SshServiceImpl sshService = new SshServiceImpl();
+		SshAdapterMock sshAdapterMock = new SshAdapterMock();
+		sshService.setSshAdapter(sshAdapterMock);
+
+		System.out.println("=> Executing SSH command [" + command + "]...");
+		Map<String, String> params = new HashMap<>();
+		params.put(SshService.PARAM_IN_connection_details, createConnectionDetails(host,username,password));
+		params.put(SshService.PARAM_IN_command, command);
+		SvcLogicContext svcLogicContext = new SvcLogicContext(new Properties());
+		sshService.execWithStatusCheck(params, svcLogicContext);
+		int status = Integer.parseInt(svcLogicContext.getAttribute(SshService.PARAM_OUT_status));
+		String stdout = svcLogicContext.getAttribute(SshService.PARAM_OUT_stdout);
+		String stderr = svcLogicContext.getAttribute(SshService.PARAM_OUT_stderr);
+		System.out.println("=> SSH command [" + command + "] status is [" + status + "]. stdout is [" + stdout + "]. stderr is [" + stderr + "]");
+
+		List<SshConnectionMock> connectionMocks = sshAdapterMock.getConnectionMocks();
+		Assert.assertEquals(1, connectionMocks.size());
+		SshConnectionMock connectionMock = connectionMocks.get(0);
+		Assert.assertNotNull(connectionMock);
+		Assert.assertEquals(host, connectionMock.getHost());
+		Assert.assertEquals(SshService.DEF_port, connectionMock.getPort());
+		Assert.assertEquals(username, connectionMock.getUsername());
+		Assert.assertEquals(password, connectionMock.getPassword());
+		Assert.assertEquals(1, connectionMock.getConnectCallCount());
+		Assert.assertEquals(1, connectionMock.getDisconnectCallCount());
+		List<String> executedCommands = connectionMock.getExecutedCommands();
+		Assert.assertEquals(1, executedCommands.size());
+		String executedCommand = executedCommands.get(0);
+		Assert.assertEquals(command, executedCommand);
+	}
+
+	/**
+	 * Checks that execWithStatusCheck() throws appropriate exception if execution status != 0.
+	 *
+	 * @throws APPCException
+	 * @throws JsonProcessingException
+	 */
+	@Test
+	public void testExecWithStatusCheckFail() throws APPCException, JsonProcessingException {
+		String host = "testhost";
+		String username = "testuser";
+		String password = "testpassword";
+		String command = "cat keystonerc_Test";
+
+		int expectedStatus = 2;
+		String expectedErr = "Test failure";
+
+		SshServiceImpl sshService = new SshServiceImpl();
+		SshAdapterMock sshAdapterMock = new SshAdapterMock();
+		sshAdapterMock.setReturnStatus(expectedStatus);
+		sshAdapterMock.setReturnStderr(expectedErr);
+		sshService.setSshAdapter(sshAdapterMock);
+
+		thrown.expect(APPCException.class);
+		thrown.expectMessage(CoreMatchers.containsString(expectedErr));
+
+		System.out.println("=> Executing SSH command [" + command + "]...");
+		Map<String, String> params = new HashMap<>();
+		params.put(SshService.PARAM_IN_connection_details, createConnectionDetails(host,username,password));
+		params.put(SshService.PARAM_IN_command, command);
+		SvcLogicContext svcLogicContext = new SvcLogicContext(new Properties());
+		// should fail, no need to perform further assertions
+		sshService.execWithStatusCheck(params, svcLogicContext);
+	}
+
+	private String createConnectionDetails(String host, String username, String password) throws JsonProcessingException {
+		SshConnectionDetails connDetails = new SshConnectionDetails();
+		connDetails.setHost(host);
+		connDetails.setUsername(username);
+		connDetails.setPassword(password);
+		return mapper.writeValueAsString(connDetails);
+	}
+
+}
diff --git a/app-c/appc/appc-dg/appc-dg-shared/pom.xml b/app-c/appc/appc-dg/appc-dg-shared/pom.xml
new file mode 100644
index 0000000..f2058bf
--- /dev/null
+++ b/app-c/appc/appc-dg/appc-dg-shared/pom.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.openecomp.appc</groupId>
+		<artifactId>appc-dg</artifactId>
+		<version>1.0.0</version>
+	</parent>
+	<artifactId>appc-dg-shared</artifactId>
+	<packaging>pom</packaging>
+
+	<modules>
+		<module>appc-dg-common</module>
+		<module>appc-dg-ssh</module>
+		<module>appc-dg-aai</module>
+		<module>appc-dg-netconf</module>
+		<module>appc-dg-license-manager</module>
+		<module>appc-dg-shared-features</module>
+		<module>appc-dg-shared-installer</module>
+	</modules>
+</project>
diff --git a/app-c/appc/appc-dg/pom.xml b/app-c/appc/appc-dg/pom.xml
new file mode 100644
index 0000000..f0748db
--- /dev/null
+++ b/app-c/appc/appc-dg/pom.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<parent>
+		<artifactId>appc</artifactId>
+		<groupId>org.openecomp.appc</groupId>
+		<version>1.0.0</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>appc-dg</artifactId>
+	<packaging>pom</packaging>
+
+	<modules>
+		<module>appc-dg-shared</module>
+	</modules>
+</project>
