diff --git a/appc-dg/appc-dg-shared/appc-dg-aai/pom.xml b/appc-dg/appc-dg-shared/appc-dg-aai/pom.xml
index 8143867..db5dcf3 100644
--- a/appc-dg/appc-dg-shared/appc-dg-aai/pom.xml
+++ b/appc-dg/appc-dg-shared/appc-dg-aai/pom.xml
@@ -30,6 +30,11 @@
             <groupId>org.openecomp.sdnc.adaptors</groupId>
             <artifactId>aai-service-provider</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.openecomp.appc</groupId>
+            <artifactId>appc-dg-dependency-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
 
         <dependency>
             <groupId>junit</groupId>
@@ -56,6 +61,11 @@
             <version>1.6.2</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.openecomp.appc</groupId>
+            <artifactId>appc-dg-domain-model-lib</artifactId>
+            <version>${project.version}</version>
+        </dependency>
 
     </dependencies>
 
@@ -69,12 +79,12 @@
                     <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>
+                        <Private-Package>org.openecomp.appc.dg.aai.exception,org.openecomp.appc.dg.aai.objects,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.*,*;resolution:=optional
+                            *;resolution:=optional
                         </Import-Package>
                         <Embed-Dependency>
-                            appc-common,eelf-core,logback-core,logback-classic;scope=compile|runtime;inline=false
+                            appc-dg-domain-model-lib;scope=compile|runtime;inline=false
                         </Embed-Dependency>
                         <Embed-Transitive>true</Embed-Transitive>
                     </instructions>
diff --git a/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/AAIPlugin.java b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/AAIPlugin.java
index e220182..7985dc4 100644
--- a/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/AAIPlugin.java
+++ b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/AAIPlugin.java
@@ -27,9 +27,17 @@
 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;
+
+    void getVnfHierarchy(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+
+    void getResource(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+
+    void postResource(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+
+    void deleteResource(Map<String, String> params, SvcLogicContext ctx) throws APPCException;
+
 }
diff --git a/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/exception/AAIQueryException.java b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/exception/AAIQueryException.java
new file mode 100644
index 0000000..f9f781b
--- /dev/null
+++ b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/exception/AAIQueryException.java
@@ -0,0 +1,29 @@
+/*-
+ * ============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.exception;
+
+
+public class AAIQueryException extends Exception{
+    public AAIQueryException(String message){
+        super(message);
+    }
+}
diff --git a/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/AAIPluginImpl.java b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/AAIPluginImpl.java
index 6eae559..830147c 100644
--- a/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/AAIPluginImpl.java
+++ b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/AAIPluginImpl.java
@@ -20,10 +20,17 @@
  */
 
 package org.openecomp.appc.dg.aai.impl;
+import org.openecomp.appc.domainmodel.Vnf;
+import org.openecomp.appc.domainmodel.Vnfc;
+import org.openecomp.appc.domainmodel.Vserver;
+import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.appc.i18n.Msg;
+import com.att.eelf.i18n.EELFResourceManager;
 
 import org.openecomp.appc.dg.aai.AAIPlugin;
-import org.openecomp.appc.dg.aai.impl.Constants;
-import org.openecomp.appc.exceptions.APPCException;
+import org.openecomp.appc.dg.aai.exception.AAIQueryException;
+import org.openecomp.appc.dg.aai.objects.AAIQueryResult;
+import org.openecomp.appc.dg.aai.objects.Relationship;
 import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
 import org.openecomp.sdnc.sli.SvcLogicContext;
@@ -35,8 +42,7 @@
 import org.osgi.framework.FrameworkUtil;
 import org.osgi.framework.ServiceReference;
 
-import java.util.HashMap;
-import java.util.Map;
+import java.util.*;
 
 
 public class AAIPluginImpl implements AAIPlugin {
@@ -68,20 +74,23 @@
         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);
+                String msg = EELFResourceManager.format(Msg.VNF_NOT_FOUND, vnf_id);
+                ctx.setAttribute(Constants.ATTRIBUTE_ERROR_MESSAGE, msg);
+                throw new APPCException(msg);
             }
             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);
+                String msg = EELFResourceManager.format(Msg.AAI_QUERY_FAILED, vnf_id);
+                ctx.setAttribute(Constants.ATTRIBUTE_ERROR_MESSAGE, msg);
+                throw new APPCException(msg);
             }
+            String msg = EELFResourceManager.format(Msg.SUCCESS_EVENT_MESSAGE, "PostGenericVnfData", "VNF ID " + vnf_id);
+            ctx.setAttribute(org.openecomp.appc.Constants.ATTRIBUTE_SUCCESS_MESSAGE, msg);
+
         } catch (SvcLogicException e) {
-            String errorMessage = String.format("Error in postVnfdata %s", e);
-            ctx.setAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE, errorMessage);
-            logger.error(errorMessage);
+            String msg = EELFResourceManager.format(Msg.AAI_QUERY_FAILED, vnf_id);
+            ctx.setAttribute(Constants.ATTRIBUTE_ERROR_MESSAGE, msg);
+            logger.error(msg);
             throw new APPCException(e);
         }
     }
@@ -95,13 +104,14 @@
         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);
+                String msg = EELFResourceManager.format(Msg.VNF_NOT_FOUND, vnf_id);
+//                String errorMessage = String.format("VNF not found for vnf_id = %s", vnf_id);
+                ctx.setAttribute(Constants.ATTRIBUTE_ERROR_MESSAGE, msg);
+                throw new APPCException(msg);
             } 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 msg = EELFResourceManager.format(Msg.AAI_QUERY_FAILED, vnf_id);
+                ctx.setAttribute(Constants.ATTRIBUTE_ERROR_MESSAGE, msg);
+                throw new APPCException(msg);
             }
             String aaiEntitlementPoolUuid = ctx.getAttribute(Constants.AAI_ENTITLMENT_POOL_UUID_NAME);
             if (null == aaiEntitlementPoolUuid) aaiEntitlementPoolUuid = "";
@@ -110,13 +120,261 @@
 
             ctx.setAttribute(Constants.IS_RELEASE_ENTITLEMENT_REQUIRE, Boolean.toString(!aaiEntitlementPoolUuid.isEmpty()));
             ctx.setAttribute(Constants.IS_RELEASE_LICENSE_REQUIRE, Boolean.toString(!aaiLicenseKeyGroupUuid.isEmpty()));
+            String msg = EELFResourceManager.format(Msg.SUCCESS_EVENT_MESSAGE, "GetGenericVnfData","VNF ID " + vnf_id);
+            ctx.setAttribute(org.openecomp.appc.Constants.ATTRIBUTE_SUCCESS_MESSAGE, msg);
 
             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);
+            String msg = EELFResourceManager.format(Msg.AAI_QUERY_FAILED, vnf_id);
+            ctx.setAttribute(Constants.ATTRIBUTE_ERROR_MESSAGE, msg);
+            logger.error(msg);
             throw new APPCException(e);
         }
     }
+
+    @Override
+    public void getVnfHierarchy(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+
+        Map<Vnfc,Set<Vserver>> vnfcMap = new HashMap<>();
+        String vnfType,vnfVersion = null;
+        String vnfId = params.get("resourceKey");
+        AAIQueryResult vnfQueryResult = null;
+        int vmCount =0;
+        try {
+            vnfQueryResult = readVnf(vnfId);
+
+            vnfType = vnfQueryResult.getAdditionProperties().get("vnf-type");
+            vnfVersion = vnfQueryResult.getAdditionProperties().get("persona-model-version");
+
+            for(Relationship vnfRelationship:vnfQueryResult.getRelationshipList()){
+                if("vserver".equalsIgnoreCase(vnfRelationship.getRelatedTo())){
+                    vmCount++;
+                    String tenantId = vnfRelationship.getRelationShipDataMap().get("tenant.tenant-id");
+                    String vmId = vnfRelationship.getRelationShipDataMap().get("vserver.vserver-id");
+                    String vmRelatedLink = vnfRelationship.getRelatedLink();
+                    String vmName = vnfRelationship.getRelatedProperties().get("vserver.vserver-name");
+                    String cloudOwner = vnfRelationship.getRelationShipDataMap().get("cloud-region.cloud-owner");
+                    String cloudRegionId = vnfRelationship.getRelationShipDataMap().get("cloud-region.cloud-region-id");
+
+                    AAIQueryResult vmQueryResult = readVM(vmId,tenantId,cloudOwner,cloudRegionId);
+                    String vmURL = vmQueryResult.getAdditionProperties().get("vserver-selflink");
+
+                    Vserver vm = new Vserver(vmURL,tenantId,vmId,vmRelatedLink,vmName);
+                    for(Relationship vmRelation:vmQueryResult.getRelationshipList()){
+
+                        if("vnfc".equalsIgnoreCase(vmRelation.getRelatedTo())){
+                            String vnfcName = vmRelation.getRelationShipDataMap().get("vnfc.vnfc-name");
+                            AAIQueryResult vnfcQueryResult = readVnfc(vnfcName);
+                            String vnfcType = vnfcQueryResult.getAdditionProperties().get("vnfc-type");
+
+                            Vnfc vnfc = new Vnfc(vnfcType,null,vnfcName);
+                            Set<Vserver> vmSet = vnfcMap.get(vnfc);
+                            if(vmSet == null){
+                                vmSet = new HashSet<>();
+                                vnfcMap.put(vnfc,vmSet);
+                            }
+                            vmSet.add(vm);
+                        }
+                    }
+                }
+            }
+            ctx.setAttribute("VNF.VMCount",String.valueOf(vmCount));
+        } catch (AAIQueryException e) {
+            ctx.setAttribute("getVnfHierarchy_result", "FAILURE");
+            String msg = EELFResourceManager.format(Msg.AAI_QUERY_FAILED, vnfId);
+            ctx.setAttribute(Constants.ATTRIBUTE_ERROR_MESSAGE, msg);
+            logger.error("Failed in getVnfHierarchy, Error retrieving VNF details. Error message: " + ctx
+                    .getAttribute("getResource_result"));
+            logger.warn("Incorrect or Incomplete VNF Hierarchy");
+            throw new APPCException("Error Retrieving VNF hierarchy");
+        }
+
+        Vnf vnf = new Vnf(vnfId,vnfType,vnfVersion);
+        for(Vnfc vnfc:vnfcMap.keySet()){
+            for(Vserver vm:vnfcMap.get(vnfc)){
+                vnfc.addVm(vm);
+            }
+            vnf.addVnfc(vnfc);
+        }
+
+        populateContext(vnf,ctx);
+        ctx.setAttribute("getVnfHierarchy_result", "SUCCESS");
+        String msg = EELFResourceManager.format(Msg.SUCCESS_EVENT_MESSAGE, "GetVNFHierarchy","VNF ID " + vnfId);
+        ctx.setAttribute(org.openecomp.appc.Constants.ATTRIBUTE_SUCCESS_MESSAGE, msg);
+
+    }
+
+    private void populateContext(Vnf vnf ,SvcLogicContext ctx) {
+        ctx.setAttribute("vnf.type",vnf.getVnfType());
+        ctx.setAttribute("vnf.version",vnf.getVnfVersion());
+        ctx.setAttribute("vnf.vnfcCount",String.valueOf(vnf.getVnfcs().size()));
+        int vnfcCount =0;
+        for(Vnfc vnfc:vnf.getVnfcs()){
+            ctx.setAttribute("vnf.vnfc["+vnfcCount+"].name",vnfc.getVnfcName());
+            ctx.setAttribute("vnf.vnfc["+vnfcCount+"].type",vnfc.getVnfcType());
+            ctx.setAttribute("vnf.vnfc["+vnfcCount+"].vm_count",String.valueOf(vnfc.getVserverList().size()));
+            int vmCount =0;
+            for(Vserver vm:vnfc.getVserverList()){
+                ctx.setAttribute("vnf.vnfc["+vnfcCount+"].vm["+ vmCount++ +"].url",vm.getUrl());
+            }
+            vnfcCount++;
+        }
+    }
+
+    private AAIQueryResult readVnfc(String vnfcName) throws AAIQueryException {
+        String query = "vnfc.vnfc-name = '" + vnfcName + "'";
+        String prefix = "VNFC";
+        String resourceType = "vnfc";
+        SvcLogicContext vnfContext = readResource(query,prefix,resourceType);
+        String[] additionalProperties = new String[]{"vnfc-type","vnfc-name",
+                "vnfc-function-code","in-maint","prov-status",
+                "is-closed-loop-disabled","orchestration-status","resource-version"};
+        AAIQueryResult result = readRelationDataAndProperties(prefix, vnfContext,additionalProperties);
+        return result;
+    }
+
+    private AAIQueryResult readVM(String vmId,String tenantId,String cloudOwner,String cloudRegionId) throws AAIQueryException {
+        String query = "vserver.vserver-id = '" + vmId + "' AND tenant.tenant_id = '" + tenantId + "' AND cloud-region.cloud-owner = '"
+                + cloudOwner + "' AND cloud-region.cloud-region-id = '" + cloudRegionId + "'";
+        String prefix = "VM";
+        String resourceType = "vserver";
+        SvcLogicContext vnfContext = readResource(query,prefix,resourceType);
+        String[] additionalProperties = new String[]{"vserver-id","vserver-selflink",
+                                                "vserver-name","in-maint","prov-status","is-closed-loop-disabled",
+                                                "vserver-name2","resource-version",};
+        AAIQueryResult result = readRelationDataAndProperties(prefix, vnfContext,additionalProperties);
+
+        return result;
+    }
+
+    private AAIQueryResult readVnf(String vnfId) throws AAIQueryException {
+        String query = "generic-vnf.vnf-id = '" + vnfId + "'";
+        String prefix = "VNF";
+        String resourceType = "generic-vnf";
+        SvcLogicContext vnfContext = readResource(query,prefix,resourceType);
+
+        String[] additionalProperties = new String[]{"vnf-type","vnf-name",
+                "in-maint","prov-status","heat-stack-id",
+                "is-closed-loop-disabled","orchestration-status","resource-version","persona-model-version"};
+
+        AAIQueryResult result = readRelationDataAndProperties(prefix, vnfContext,additionalProperties);
+
+        return result;
+    }
+
+    private AAIQueryResult readRelationDataAndProperties(String prefix, SvcLogicContext context,String[] additionalProperties) {
+        AAIQueryResult result = new AAIQueryResult();
+
+        Integer relationsCount = Integer.parseInt(context.getAttribute(prefix + ".relationship-list.relationship_length"));
+        for(int i=0;i<relationsCount;i++){
+            Relationship relationShip = new Relationship();
+            relationShip.setRelatedLink(context.getAttribute(prefix + ".relationship-list.relationship["+i+"].related-link"));
+            relationShip.setRelatedTo(context.getAttribute(prefix + ".relationship-list.relationship["+i+"].related-to"));
+            Integer relationDataCount = Integer.parseInt(context.getAttribute(prefix + ".relationship-list.relationship["+i+"].relationship-data_length"));
+            for(int j=0;j<relationDataCount;j++){
+                String key = context.getAttribute(prefix+".relationship-list.relationship["+i+"].relationship-data["+j+"].relationship-key");
+                String value = context.getAttribute(prefix+".relationship-list.relationship["+i+"].relationship-data["+j+"].relationship-value");
+                relationShip.getRelationShipDataMap().put(key,value);
+            }
+            Integer relatedPropertyCount = 0;
+            String relatedPropertyCountStr = null;
+            try{
+                relatedPropertyCountStr =context.getAttribute(prefix + ".relationship-list.relationship["+i+"].related-to-property_length");
+                relatedPropertyCount = Integer.parseInt(relatedPropertyCountStr);
+            }
+            catch (NumberFormatException e){
+                logger.debug("Invalid value in the context for Related Property Count " + relatedPropertyCountStr);
+            }
+
+            for(int j=0;j<relatedPropertyCount;j++){
+                String key = context.getAttribute(prefix+".relationship-list.relationship["+i+"].related-to-property["+j+"].property-key");
+                String value = context.getAttribute(prefix+".relationship-list.relationship["+i+"].related-to-property["+j+"].property-value");
+                relationShip.getRelatedProperties().put(key,value);
+            }
+            result.getRelationshipList().add(relationShip);
+        }
+
+        for(String key:additionalProperties){
+            result.getAdditionProperties().put(key,context.getAttribute(prefix+"."+key));
+        }
+        return result;
+    }
+
+    private SvcLogicContext readResource(String query, String prefix, String resourceType) throws AAIQueryException {
+        SvcLogicContext resourceContext = new SvcLogicContext();
+        try {
+            SvcLogicResource.QueryStatus response = aaiClient.query(resourceType,false,null,query,prefix,null,resourceContext);
+            logger.info("AAIResponse: " + response.toString());
+            if(!SvcLogicResource.QueryStatus.SUCCESS.equals(response)){
+                throw new AAIQueryException("Error Retrieving VNF hierarchy from A&AI");
+            }
+        } catch (SvcLogicException e) {
+            logger.error(EELFResourceManager.format(Msg.AAI_GET_DATA_FAILED, query, "", e.getMessage()));
+            throw new AAIQueryException("Error Retrieving VNF hierarchy from A&AI");
+        }
+        return resourceContext;
+    }
+
+    @Override public void getResource(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        String resourceType = params.get("resourceType"), ctx_prefix = params.get("prefix"), resourceKey =
+                params.get("resourceKey");
+        if (logger.isDebugEnabled()) {
+            logger.debug("inside getResorce");
+            logger.debug("Retrieving " + resourceType + " details from A&AI for Key : " + resourceKey);
+        }
+        try {
+            SvcLogicResource.QueryStatus response =
+                    aaiClient.query(resourceType, false, null, resourceKey, ctx_prefix, null, ctx);
+            logger.info("AAIResponse: " + response.toString());
+            ctx.setAttribute("getResource_result", response.toString());
+        } catch (SvcLogicException e) {
+            logger.error(EELFResourceManager.format(Msg.AAI_GET_DATA_FAILED, resourceKey, "", e.getMessage()));
+        }
+        if (logger.isDebugEnabled()) {
+            logger.debug("exiting getResource======");
+        }
+    }
+
+    @Override public void postResource(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        String resourceType = params.get("resourceType"), ctx_prefix = params.get("prefix"), resourceKey =
+                params.get("resourceKey"), att_name = params.get("attributeName"), att_value =
+                params.get("attributeValue");
+        if (logger.isDebugEnabled()) {
+            logger.debug("inside postResource");
+            logger.debug("Updating " + resourceType + " details in A&AI for Key : " + resourceKey);
+            logger.debug("Updating " + att_name + " to : " + att_value);
+        }
+        Map<String, String> data = new HashMap<String, String>();
+        data.put(att_name, att_value);
+
+        try {
+            SvcLogicResource.QueryStatus response = aaiClient.update(resourceType, resourceKey, data, ctx_prefix, ctx);
+            logger.info("AAIResponse: " + response.toString());
+            ctx.setAttribute("postResource_result", response.toString());
+        } catch (SvcLogicException e) {
+            logger.error(EELFResourceManager.format(Msg.AAI_UPDATE_FAILED, resourceKey, att_value, e.getMessage()));
+        }
+        if (logger.isDebugEnabled()) {
+            logger.debug("exiting postResource======");
+        }
+    }
+
+    @Override public void deleteResource(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+        String resourceType = params.get("resourceType"), resourceKey = params.get("resourceKey");
+
+        if (logger.isDebugEnabled()) {
+            logger.debug("inside deleteResource");
+            logger.debug("Deleting " + resourceType + " details From A&AI for Key : " + resourceKey);
+        }
+        try {
+            SvcLogicResource.QueryStatus response = aaiClient.delete(resourceType, resourceKey, ctx);
+            logger.info("AAIResponse: " + response.toString());
+            ctx.setAttribute("deleteResource_result", response.toString());
+        } catch (SvcLogicException e) {
+            logger.error(EELFResourceManager.format(Msg.AAI_DELETE_FAILED, resourceKey, e.getMessage()));
+        }
+        if (logger.isDebugEnabled()) {
+            logger.debug("exiting deleteResource======");
+        }
+    }
 }
diff --git a/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/Constants.java b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/Constants.java
index 3feab47..8957d3a 100644
--- a/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/Constants.java
+++ b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/Constants.java
@@ -71,7 +71,7 @@
     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 ATTRIBUTE_ERROR_MESSAGE = "error-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";
diff --git a/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/objects/AAIQueryResult.java b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/objects/AAIQueryResult.java
new file mode 100644
index 0000000..0ad6292
--- /dev/null
+++ b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/objects/AAIQueryResult.java
@@ -0,0 +1,49 @@
+/*-
+ * ============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.objects;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+public class AAIQueryResult {
+    private List<Relationship> relationshipList;
+
+    private Map<String,String> additionProperties;
+
+
+    public AAIQueryResult(){
+        relationshipList = new ArrayList<>();
+        additionProperties = new HashMap<>();
+    }
+
+
+    public List<Relationship> getRelationshipList() {
+        return relationshipList;
+    }
+
+    public Map<String, String> getAdditionProperties() {
+        return additionProperties;
+    }
+}
diff --git a/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/objects/Relationship.java b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/objects/Relationship.java
new file mode 100644
index 0000000..63e6392
--- /dev/null
+++ b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/objects/Relationship.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.aai.objects;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+public class Relationship {
+
+    private String relatedTo;
+
+    private String relatedLink;
+
+    private Map<String,String> relationShipDataMap;
+
+    private Map<String,String> relatedProperties;
+
+    public Relationship(){
+        relationShipDataMap = new HashMap<>();
+        relatedProperties = new HashMap<>();
+    }
+
+    public String getRelatedTo() {
+        return relatedTo;
+    }
+
+    public String getRelatedLink() {
+        return relatedLink;
+    }
+
+    public Map<String, String> getRelationShipDataMap() {
+        return relationShipDataMap;
+    }
+
+    public Map<String, String> getRelatedProperties() {
+        return relatedProperties;
+    }
+
+    public void setRelatedTo(String relatedTo) {
+        this.relatedTo = relatedTo;
+    }
+
+    public void setRelatedLink(String relatedLink) {
+        this.relatedLink = relatedLink;
+    }
+}
diff --git a/appc-dg/appc-dg-shared/appc-dg-aai/src/main/test/java/org/openecomp/appc/dg/aai/impl/AAIPluginImplTest.java b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/test/java/org/openecomp/appc/dg/aai/impl/AAIPluginImplTest.java
index 8d6fea0..eae221b 100644
--- a/appc-dg/appc-dg-shared/appc-dg-aai/src/main/test/java/org/openecomp/appc/dg/aai/impl/AAIPluginImplTest.java
+++ b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/test/java/org/openecomp/appc/dg/aai/impl/AAIPluginImplTest.java
@@ -21,9 +21,7 @@
 
 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;
@@ -40,12 +38,10 @@
 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)
@@ -119,7 +115,7 @@
             aaiPlugin.postGenericVnfData(params, ctx);
             Assert.assertTrue(false);
         } catch (APPCException e) {
-            Assert.assertNotNull(ctx.getAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE));
+            Assert.assertNotNull(ctx.getAttribute(Constants.ATTRIBUTE_ERROR_MESSAGE));
         }
 
     }
@@ -143,7 +139,7 @@
             aaiPlugin.postGenericVnfData(params, ctx);
             Assert.assertTrue(false);
         } catch (APPCException e) {
-            Assert.assertNotNull(ctx.getAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE));
+            Assert.assertNotNull(ctx.getAttribute(Constants.ATTRIBUTE_ERROR_MESSAGE));
         }
 
     }
@@ -167,7 +163,7 @@
             aaiPlugin.postGenericVnfData(params, ctx);
             Assert.assertTrue(false);
         } catch (APPCException e) {
-            Assert.assertNotNull(ctx.getAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE));
+            Assert.assertNotNull(ctx.getAttribute(Constants.ATTRIBUTE_ERROR_MESSAGE));
         }
 
     }
@@ -219,7 +215,7 @@
             aaiPlugin.getGenericVnfData(params, ctx);
             Assert.assertTrue(false);
         } catch (APPCException e) {
-            Assert.assertNotNull(ctx.getAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE));
+            Assert.assertNotNull(ctx.getAttribute(Constants.ATTRIBUTE_ERROR_MESSAGE));
         }
     }
 
@@ -236,7 +232,7 @@
             aaiPlugin.getGenericVnfData(params, ctx);
             Assert.assertTrue(false);
         } catch (APPCException e) {
-            Assert.assertNotNull(ctx.getAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE));
+            Assert.assertNotNull(ctx.getAttribute(Constants.ATTRIBUTE_ERROR_MESSAGE));
         }
     }
 
@@ -253,7 +249,7 @@
             aaiPlugin.getGenericVnfData(params, ctx);
             Assert.assertTrue(false);
         } catch (APPCException e) {
-            Assert.assertNotNull(ctx.getAttribute(Constants.DG_OUTPUT_STATUS_MESSAGE));
+            Assert.assertNotNull(ctx.getAttribute(Constants.ATTRIBUTE_ERROR_MESSAGE));
         }
     }
 
