diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudCreateResponse.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudCreateResponse.java
index bb15e58..732f9b5 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudCreateResponse.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudCreateResponse.java
@@ -22,13 +22,16 @@
 
 import java.io.Serializable;
 import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.databind.JsonNode;
 import org.apache.commons.lang.builder.ToStringBuilder;
 
 @JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({"template_type", "workload_id", "template_response"})
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonPropertyOrder({"template_type", "workload_id", "template_response", "workload_status_reason", "workload_status"})
 public class MulticloudCreateResponse implements Serializable {
     private final static long serialVersionUID = -5215028275577848311L;
 
@@ -37,12 +40,16 @@
     @JsonProperty("workload_id")
     private String workloadId;
     @JsonProperty("template_response")
-    private MulticloudCreateStackResponse templateResponse;
+    private JsonNode templateResponse;
+    @JsonProperty("workload_status_reason")
+    private JsonNode workloadStatusReason;
+    @JsonProperty("workload_status")
+    private String workloadStatus;
 
     @JsonCreator
     public MulticloudCreateResponse(@JsonProperty("template_type") String templateType,
             @JsonProperty("workload_id") String workloadId,
-            @JsonProperty("template_response") MulticloudCreateStackResponse templateResponse) {
+            @JsonProperty("template_response") JsonNode templateResponse) {
         this.templateType = templateType;
         this.workloadId = workloadId;
         this.templateResponse = templateResponse;
@@ -69,18 +76,41 @@
     }
 
     @JsonProperty("template_response")
-    public void setTemplateResponse(MulticloudCreateStackResponse templateResponse) {
+    public void setTemplateResponse(JsonNode templateResponse) {
         this.templateResponse = templateResponse;
     }
 
     @JsonProperty("template_response")
-    public MulticloudCreateStackResponse getTemplateResponse() {
+    public JsonNode getTemplateResponse() {
         return templateResponse;
     }
 
+    @JsonProperty("workload_status_reason")
+    public void setWorkloadStatusReason(JsonNode workloadStatusReason) {
+        this.workloadStatusReason = workloadStatusReason;
+    }
+
+    @JsonProperty("workload_status_reason")
+    public JsonNode getWorkloadStatusReason() {
+        return workloadStatusReason;
+    }
+
+    @JsonProperty("workload_status")
+    public String getWorkloadSstatus() {
+        return workloadStatus;
+    }
+
+    @JsonProperty("workload_status")
+    public void setWorkloadStatus(String workloadStatus) {
+        this.workloadStatus = workloadStatus;
+    }
+
+
     @Override
     public String toString() {
         return new ToStringBuilder(this).append("templateType", templateType).append("workloadId", workloadId)
-                .append("templateResponse", templateResponse).toString();
+                .append("templateResponse", templateResponse)
+                .append("workload_status_reason", workloadStatusReason.toString())
+                .append("workload_status", workloadStatus).toString();
     }
 }
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudCreateStackResponse.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudCreateStackResponse.java
deleted file mode 100644
index 67cb735..0000000
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MulticloudCreateStackResponse.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Intel Corp. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.openstack.utils;
-
-import java.io.Serializable;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({"stack"})
-public class MulticloudCreateStackResponse implements Serializable {
-    private final static long serialVersionUID = -5215028275577848311L;
-
-    @JsonProperty("stack")
-    private MulticloudCreateHeatResponse stack;
-
-    @JsonCreator
-    public MulticloudCreateStackResponse(@JsonProperty("stack") MulticloudCreateHeatResponse stack) {
-        this.stack = stack;
-    }
-
-    @JsonProperty("stack")
-    public MulticloudCreateHeatResponse getStack() {
-        return stack;
-    }
-
-    @JsonProperty("stack")
-    public void setStack(MulticloudCreateHeatResponse stack) {
-        this.stack = stack;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("stack", stack).toString();
-    }
-}
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java
index 5f20575..48ca0fd 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java
@@ -55,8 +55,6 @@
     @Autowired
     private CloudConfig cloudConfig;
 
-    private static final String CREATE_STACK_RESPONSE = "{\"template_type\": \"TEST-template\", \"workload_id\": "
-            + "\"workload-id\", \"template_response\": {\"stack\": {\"id\": \"TEST-stack\", \"links\": []}}}";
     private static final String UPDATE_STACK_RESPONSE =
             "{\"template_type\": \"heat\", \"workload_id\": " + "\"workload-id\"}";
     private static final String GET_CREATE_STACK_RESPONSE = "{\"template_type\": \"heat\", \"workload_id\": "
@@ -125,6 +123,51 @@
     }
 
     @Test
+    public void createVfModule2() throws Exception {
+
+        Map<String, Object> stackInputs = new HashMap<>();
+        stackInputs.put("oof_directives", "{}");
+        stackInputs.put("sdnc_directives", "{}");
+        stackInputs.put("user_directives", "{}");
+        stackInputs.put("generic_vnf_id", "genVNFID");
+        stackInputs.put("vf_module_id", "vfMODULEID");
+
+        MsoRequest msoRequest = new MsoRequest();
+        msoRequest.setRequestId("12345");
+        msoRequest.setServiceInstanceId("12345");
+
+        wireMockServer.stubFor(get(urlPathEqualTo(MULTICLOUD_GET_PATH_BY_NAME)).willReturn(
+                aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_NOT_FOUND)));
+
+        wireMockServer.stubFor(get(urlPathEqualTo(MULTICLOUD_GET_PATH_BY_ID)).inScenario("CREATE")
+                .whenScenarioStateIs("CREATING").willReturn(aResponse().withHeader("Content-Type", "application/json")
+                        .withBody(GET_CREATE_STACK_RESPONSE).withStatus(HttpStatus.SC_OK)));
+
+        wireMockServer.stubFor(get(urlPathEqualTo(MULTICLOUD_GET_PATH_BY_ID)).inScenario("CREATE")
+                .whenScenarioStateIs("UPDATING").willReturn(aResponse().withHeader("Content-Type", "application/json")
+                        .withBody(GET_UPDATE_STACK_RESPONSE).withStatus(HttpStatus.SC_OK)));
+
+        wireMockServer.stubFor(post(urlPathEqualTo(MULTICLOUD_CREATE_PATH)).inScenario("CREATE")
+                .willReturn(aResponse().withHeader("Content-Type", "application/json")
+                        .withBodyFile("MulticloudResponse_Stack_Create2.json").withStatus(HttpStatus.SC_CREATED))
+                .willSetStateTo("CREATING"));
+
+        wireMockServer.stubFor(post(urlPathEqualTo(MULTICLOUD_UPDATE_PATH))
+                .inScenario("CREATE").willReturn(aResponse().withHeader("Content-Type", "application/json")
+                        .withBody(UPDATE_STACK_RESPONSE).withStatus(HttpStatus.SC_ACCEPTED))
+                .willSetStateTo("UPDATING"));
+
+        try {
+            instance.createVfModule("MTN13", "CloudOwner", "123", "vf", "v1", "genericVnfId", "vfname", "vfModuleId",
+                    "create", null, "234", "9b339a61-69ca-465f-86b8-1c72c582b8e8", stackInputs, true, true, true,
+                    msoRequest, new Holder<>(), new Holder<>(), new Holder<>());
+        } catch (VnfException e) {
+            fail("createVfModule success expected, failed with exception: " + e.toString());
+        }
+        wireMockServer.resetScenarios();
+    }
+
+    @Test
     public void createVfModuleAlreadyExists() throws Exception {
 
         Map<String, Object> stackInputs = new HashMap<>();
diff --git a/adapters/mso-openstack-adapters/src/test/resources/__files/MulticloudResponse_Stack_Create2.json b/adapters/mso-openstack-adapters/src/test/resources/__files/MulticloudResponse_Stack_Create2.json
new file mode 100644
index 0000000..8532fae
--- /dev/null
+++ b/adapters/mso-openstack-adapters/src/test/resources/__files/MulticloudResponse_Stack_Create2.json
@@ -0,0 +1,15 @@
+{
+  "template_type": "HEAT",
+  "workload_id": "workload-id",
+  "workload_status_reason":
+    {
+        "id": "workload-id",
+        "links": [
+          {
+            "href": "http://localhost:1234/v1/id12345678/stacks/workload-id/abcdef00-1234-abcd-5678-ef9123456789",
+            "rel": "self"
+          }
+        ]
+    },
+  "workload_status": "CREATE_IN_PROGRESS"
+}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-adapter-api/pom.xml b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-api/pom.xml
index 66a1cb1..9d9e33a 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-adapter-api/pom.xml
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-api/pom.xml
@@ -100,5 +100,10 @@
       <groupId>com.google.code.gson</groupId>
       <artifactId>gson</artifactId>
     </dependency>
+    <dependency>
+      <groupId>com.squareup.okio</groupId>
+      <artifactId>okio</artifactId>
+      <version>1.13.0</version>
+    </dependency>
   </dependencies>
 </project>
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/pom.xml b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/pom.xml
index da778d2..91478e1 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/pom.xml
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-adapter-ext-clients/pom.xml
@@ -62,7 +62,6 @@
               <apiPackage>org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.api</apiPackage>
               <modelPackage>org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model</modelPackage>
               <configOptions>
-                <jackson>true</jackson>
                 <sourceFolder>src/gen/java/main</sourceFolder>
                 <withXml>true</withXml>
                 <useRxJava2>true</useRxJava2>
@@ -79,15 +78,16 @@
               <inputSpec>${basedir}/src/main/resources/SOL003-VNFLifecycleOperationGranting-API.json
                             </inputSpec>
               <language>java</language>
-              <library>retrofit2</library>
+              <library>okhttp-gson</library>
               <output>${project.build.directory}/generated-sources/sol003-vnf-grant</output>
-              <generateApis>false</generateApis>
+              <apiPackage>org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.api</apiPackage>
               <modelPackage>org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model</modelPackage>
               <configOptions>
                 <generateSupportingFiles>false</generateSupportingFiles>
                 <sourceFolder>src/gen/java/main</sourceFolder>
                 <withXml>true</withXml>
                 <useRxJava2>true</useRxJava2>
+                <serializableModel>true</serializableModel>
               </configOptions>
             </configuration>
           </execution>
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/pom.xml b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/pom.xml
index c561721..09c28f9 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/pom.xml
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/pom.xml
@@ -63,6 +63,12 @@
     <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-web</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>com.fasterxml.jackson.core</groupId>
+          <artifactId>jackson-databind</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.springframework.boot</groupId>
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/VnfmAdapterApplication.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/VnfmAdapterApplication.java
index 30ce0c2..62d2f7e 100755
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/VnfmAdapterApplication.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/VnfmAdapterApplication.java
@@ -20,11 +20,13 @@
 
 package org.onap.so.adapters.vnfmadapter;
 
+import static org.slf4j.LoggerFactory.getLogger;
 import org.onap.so.adapters.vnfmadapter.rest.VnfmAdapterController;
 import org.slf4j.Logger;
 import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import static org.slf4j.LoggerFactory.getLogger;
+import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
 
 /**
  * The spring boot application for the VNFM (Virtual Network Function Manager) Adapter.
@@ -36,6 +38,7 @@
  *      SOL003 v2.5.1</a>
  */
 @SpringBootApplication(scanBasePackages = {"org.onap.so"})
+@EnableAutoConfiguration(exclude = {JacksonAutoConfiguration.class})
 public class VnfmAdapterApplication {
     private static final Logger logger = getLogger(VnfmAdapterApplication.class);
 
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/SdcPackageProvider.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/SdcPackageProvider.java
index f1074bc..fd92910 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/SdcPackageProvider.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/SdcPackageProvider.java
@@ -22,32 +22,6 @@
 
 package org.onap.so.adapters.vnfmadapter.extclients;
 
-import com.google.common.io.ByteStreams;
-import com.google.gson.Gson;
-import com.google.gson.JsonObject;
-import org.apache.commons.codec.binary.Base64;
-import org.apache.http.HttpEntity;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.onap.so.utils.CryptoUtils;
-import org.slf4j.Logger;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-import org.yaml.snakeyaml.Yaml;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.charset.StandardCharsets;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
 import static com.google.common.base.Splitter.on;
 import static com.google.common.collect.Iterables.filter;
 import static com.google.common.io.ByteStreams.toByteArray;
@@ -60,13 +34,39 @@
 import static org.onap.so.adapters.vnfmadapter.NvfmAdapterUtils.children;
 import static org.slf4j.LoggerFactory.getLogger;
 import static org.springframework.http.MediaType.APPLICATION_OCTET_STREAM_VALUE;
+import com.google.common.io.ByteStreams;
+import com.google.gson.Gson;
+import com.google.gson.JsonObject;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Set;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.onap.so.utils.CryptoUtils;
+import org.slf4j.Logger;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+import org.yaml.snakeyaml.Yaml;
 
 @Component
 public class SdcPackageProvider {
-    private static final String GET_PACKAGE_URL = "%s/catalog/resources/%s/toscaModel";
+    private static final String GET_PACKAGE_URL = "%s/sdc/v1/catalog/resources/%s/toscaModel";
     @Value("${sdc.toscametapath:TOSCA-Metadata/TOSCA.meta}")
     private List<String> toscaMetaPaths;
-    private final String TOSCA_VNFD_KEY = "Entry-Definitions";
+    private static final String TOSCA_VNFD_KEY = "Entry-Definitions";
     private static Logger logger = getLogger(SdcPackageProvider.class);
 
     @Value("${sdc.username}")
@@ -78,7 +78,7 @@
     @Value("${sdc.endpoint}")
     private String baseUrl;
 
-    public String getVnfdId(String csarId) {
+    public String getVnfdId(final String csarId) {
         return getVnfNodeProperty(csarId, "descriptor_id");
     }
 
@@ -96,7 +96,7 @@
             for (final JsonObject child : children(nodeTemplates)) {
                 final String type = childElement(child, "type").getAsString();
                 String propertyValue = null;
-                if (type.equals("tosca.nodes.nfv.VNF")) {
+                if ("tosca.nodes.nfv.VNF".equals(type)) {
                     final JsonObject properties = child(child, "properties");
                     logger.debug("properties: " + properties.toString());
 
@@ -119,7 +119,7 @@
         final JsonObject nodeTypes = child(root, "node_types");
         final JsonObject nodeType = child(nodeTypes, nodeTypeName);
 
-        if (childElement(nodeType, "derived_from").getAsString().equals("tosca.nodes.nfv.VNF")) {
+        if ("tosca.nodes.nfv.VNF".equals(childElement(nodeType, "derived_from").getAsString())) {
             final JsonObject properties = child(nodeType, "properties");
             logger.debug("properties: " + properties.toString());
             final JsonObject property = child(properties, propertyName);
@@ -130,34 +130,33 @@
         return null;
     }
 
-    private byte[] getPackage(String csarId) {
+    private byte[] getPackage(final String csarId) {
         final String SERVICE_NAME = "vnfm-adapter";
         try (CloseableHttpClient client = HttpClients.createDefault()) {
-            HttpGet httpget = new HttpGet(format(GET_PACKAGE_URL, baseUrl, csarId));
+            final HttpGet httpget = new HttpGet(format(GET_PACKAGE_URL, baseUrl, csarId));
             httpget.setHeader(ACCEPT, APPLICATION_OCTET_STREAM_VALUE);
             httpget.setHeader("X-ECOMP-InstanceID", SERVICE_NAME);
             httpget.setHeader("X-FromAppId", SERVICE_NAME);
-            String auth = sdcUsername + ":" + CryptoUtils.decrypt(sdcPassword, sdcKey);
-            byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(StandardCharsets.ISO_8859_1));
-            String authHeader = "Basic " + new String(encodedAuth);
+            final String auth = sdcUsername + ":" + CryptoUtils.decrypt(sdcPassword, sdcKey);
+            final byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(StandardCharsets.ISO_8859_1));
+            final String authHeader = "Basic " + new String(encodedAuth);
             httpget.setHeader(AUTHORIZATION, authHeader);
             logger.debug("Fetching from SDC: " + httpget);
-            CloseableHttpResponse response = client.execute(httpget);
-            HttpEntity entity = response.getEntity();
-            InputStream is = entity.getContent();
-            byte[] bytes = toByteArray(is);
-            return bytes;
-        } catch (Exception e) {
+            final CloseableHttpResponse response = client.execute(httpget);
+            final HttpEntity entity = response.getEntity();
+            final InputStream is = entity.getContent();
+            return toByteArray(is);
+        } catch (final Exception e) {
             throw abortOperation("Unable to download " + csarId + " package from SDC", e);
         }
     }
 
-    private String getVnfdLocation(InputStream stream) throws IOException {
-        Iterator pathIterator = toscaMetaPaths.iterator();
+    private String getVnfdLocation(final InputStream stream) throws IOException {
+        final Iterator<String> pathIterator = toscaMetaPaths.iterator();
         while (pathIterator.hasNext()) {
-            String toscaMetadata = new String(getFileInZip(stream, pathIterator.next().toString()).toByteArray());
+            final String toscaMetadata = new String(getFileInZip(stream, pathIterator.next()).toByteArray());
             if (!toscaMetadata.isEmpty()) {
-                String toscaVnfdLine =
+                final String toscaVnfdLine =
                         filter(on("\n").split(toscaMetadata), line -> line.contains(TOSCA_VNFD_KEY)).iterator().next();
                 return toscaVnfdLine.replace(TOSCA_VNFD_KEY + ":", "").trim();
             }
@@ -165,20 +164,21 @@
         throw abortOperation("Unable to find valid Tosca Path");
     }
 
-    private static ByteArrayOutputStream getFileInZip(InputStream zip, String path) throws IOException {
-        ZipInputStream zipInputStream = new ZipInputStream(zip);
-        ByteArrayOutputStream fileContent = getFileInZip(zipInputStream, path);
+    private static ByteArrayOutputStream getFileInZip(final InputStream zip, final String path) throws IOException {
+        final ZipInputStream zipInputStream = new ZipInputStream(zip);
+        final ByteArrayOutputStream fileContent = getFileInZip(zipInputStream, path);
         zipInputStream.close();
         return fileContent;
     }
 
-    private static ByteArrayOutputStream getFileInZip(ZipInputStream zipInputStream, String path) throws IOException {
+    private static ByteArrayOutputStream getFileInZip(final ZipInputStream zipInputStream, final String path)
+            throws IOException {
         ZipEntry zipEntry;
-        Set<String> items = new HashSet<>();
+        final Set<String> items = new HashSet<>();
         while ((zipEntry = zipInputStream.getNextEntry()) != null) {
             items.add(zipEntry.getName());
             if (zipEntry.getName().matches(path)) {
-                ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+                final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
                 ByteStreams.copy(zipInputStream, byteArrayOutputStream);
                 return byteArrayOutputStream;
             }
@@ -187,7 +187,7 @@
         throw new NoSuchElementException("Unable to find the " + path + " in archive found: " + items);
     }
 
-    public String getFlavourId(String csarId) {
+    public String getFlavourId(final String csarId) {
         return getVnfNodeProperty(csarId, "flavour_id");
     }
 }
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiHelper.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiHelper.java
index 50fd5bc..1374e89 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiHelper.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiHelper.java
@@ -20,6 +20,10 @@
 
 package org.onap.so.adapters.vnfmadapter.extclients.aai;
 
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
 import org.onap.aai.domain.yang.EsrSystemInfo;
 import org.onap.aai.domain.yang.EsrSystemInfoList;
 import org.onap.aai.domain.yang.EsrVnfm;
@@ -40,9 +44,6 @@
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
 
 /**
  * Provides helper methods for interactions with AAI.
@@ -110,7 +111,7 @@
      */
     public String getIdOfAssignedVnfm(final GenericVnf vnf) {
         final Relationship relationship = getRelationship(vnf, "esr-vnfm");
-        return getRelationshipKey(relationship, "esr-vnfm.vnfm-id");
+        return getRelationshipData(relationship, "esr-vnfm.vnfm-id");
     }
 
     /**
@@ -121,9 +122,9 @@
      */
     public Tenant getAssignedTenant(final GenericVnf vnf) {
         final Relationship relationship = getRelationship(vnf, "tenant");
-        final String cloudOwner = getRelationshipKey(relationship, "cloud-region.cloud-owner");
-        final String cloudRegion = getRelationshipKey(relationship, "cloud-region.cloud-region-id");
-        final String tenantId = getRelationshipKey(relationship, "tenant.tenant-id");
+        final String cloudOwner = getRelationshipData(relationship, "cloud-region.cloud-owner");
+        final String cloudRegion = getRelationshipData(relationship, "cloud-region.cloud-region-id");
+        final String tenantId = getRelationshipData(relationship, "tenant.tenant-id");
         if (cloudOwner == null || cloudRegion == null || tenantId == null) {
             throw new TenantNotFoundException("No matching Tenant found in AAI. VNFID: " + vnf.getVnfId());
         } else {
@@ -141,10 +142,17 @@
         return null;
     }
 
-    private String getRelationshipKey(final Relationship relationship, final String relationshipKey) {
+    /**
+     * Get the value of the relationship data with the given key in the given relationship.
+     *
+     * @param relationship the relationship
+     * @param relationshipDataKey the key for the relationship data
+     * @return the value of the relationship data for the given key
+     */
+    public String getRelationshipData(final Relationship relationship, final String relationshipDataKey) {
         if (relationship != null) {
             for (final RelationshipData relationshipData : relationship.getRelationshipData()) {
-                if (relationshipData.getRelationshipKey().equals(relationshipKey)) {
+                if (relationshipData.getRelationshipKey().equals(relationshipDataKey)) {
                     return relationshipData.getRelationshipValue();
                 }
             }
@@ -153,6 +161,32 @@
     }
 
     /**
+     * Delete from the given VNF the relationship matching the given criteria.
+     *
+     * @param vnf the VNF
+     * @param relationshipRelatedToValue the related-to value for the relationship
+     * @param dataKey the relationship data key to match on
+     * @param dataValue the value the relationship data with the given key must match
+     * @return the deleted relationship or <code>null</code> if none found matching the given criteria
+     */
+    public Relationship deleteRelationshipWithDataValue(final GenericVnf vnf, final String relationshipRelatedToValue,
+            final String dataKey, final String dataValue) {
+        final Iterator<Relationship> relationships =
+                vnf.getRelationshipList() == null ? Collections.<Relationship>emptyList().iterator()
+                        : vnf.getRelationshipList().getRelationship().iterator();
+
+        while (relationships.hasNext()) {
+            final Relationship relationship = relationships.next();
+            if (relationship.getRelatedTo().equals(relationshipRelatedToValue)
+                    && dataValue.equals(getRelationshipData(relationship, dataKey))) {
+                relationships.remove();
+                return relationship;
+            }
+        }
+        return null;
+    }
+
+    /**
      * Select a VNFM to use for the given generic VNF. Should only be used when no VNFM has already been assigned to the
      * VNF.
      *
@@ -257,7 +291,12 @@
         relationship.setRelatedTo("tenant");
         relationship.setRelatedLink("/aai/" + AAIVersion.LATEST + AAIUriFactory.createResourceUri(AAIObjectType.TENANT,
                 tenant.getCloudOwner(), tenant.getRegionName(), tenant.getTenantId()).build().toString());
+        relationship.getRelationshipData()
+                .add(createRelationshipData("cloud-region.cloud-owner", tenant.getCloudOwner()));
+        relationship.getRelationshipData()
+                .add(createRelationshipData("cloud-region.cloud-region-id", tenant.getRegionName()));
         relationship.getRelationshipData().add(createRelationshipData("tenant.tenant-id", tenant.getTenantId()));
         return relationship;
     }
+
 }
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProvider.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProvider.java
index f991ffa..7021c02 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProvider.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProvider.java
@@ -24,9 +24,9 @@
 import org.onap.aai.domain.yang.EsrVnfm;
 import org.onap.aai.domain.yang.EsrVnfmList;
 import org.onap.aai.domain.yang.GenericVnf;
+import org.onap.aai.domain.yang.GenericVnfs;
 import org.onap.aai.domain.yang.Vserver;
 import org.onap.vnfmadapter.v1.model.Tenant;
-import java.util.List;
 
 /**
  * Provides methods for invoking REST calls to AAI.
@@ -47,7 +47,7 @@
      * @param selfLink the selfLink
      * @return the matching generic vnfs
      */
-    List<GenericVnf> invokeQueryGenericVnf(final String selfLink);
+    GenericVnfs invokeQueryGenericVnf(final String selfLink);
 
     /**
      * Invoke a GET request for the VNFMs.
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProviderImpl.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProviderImpl.java
index fa07ab5..50e579d 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProviderImpl.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/aai/AaiServiceProviderImpl.java
@@ -24,6 +24,7 @@
 import org.onap.aai.domain.yang.EsrVnfm;
 import org.onap.aai.domain.yang.EsrVnfmList;
 import org.onap.aai.domain.yang.GenericVnf;
+import org.onap.aai.domain.yang.GenericVnfs;
 import org.onap.aai.domain.yang.Vserver;
 import org.onap.so.client.aai.AAIObjectType;
 import org.onap.so.client.aai.entities.uri.AAIUriFactory;
@@ -32,7 +33,6 @@
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import java.util.List;
 
 @Service
 public class AaiServiceProviderImpl implements AaiServiceProvider {
@@ -56,9 +56,9 @@
     }
 
     @Override
-    public List<GenericVnf> invokeQueryGenericVnf(final String selfLink) {
+    public GenericVnfs invokeQueryGenericVnf(final String selfLink) {
         return aaiClientProvider.getAaiClient()
-                .get(List.class,
+                .get(GenericVnfs.class,
                         AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNFS).queryParam("selflink", selfLink))
                 .orElseGet(() -> {
                     logger.debug("No vnf found in AAI with selflink: {}", selfLink);
@@ -104,7 +104,7 @@
     @Override
     public void invokePutVserver(final String cloudOwner, final String cloudRegion, final String tenant,
             final Vserver vserver) {
-        aaiClientProvider.getAaiClient().update(AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner,
+        aaiClientProvider.getAaiClient().create(AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner,
                 cloudRegion, tenant, vserver.getVserverId()), vserver);
     }
 
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmHelper.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmHelper.java
index 31399f7..249cf74 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmHelper.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmHelper.java
@@ -20,10 +20,16 @@
 
 package org.onap.so.adapters.vnfmadapter.extclients.vnfm;
 
+import static org.onap.so.adapters.vnfmadapter.Constants.BASE_URL;
+import static org.onap.so.adapters.vnfmadapter.Constants.OPERATION_NOTIFICATION_ENDPOINT;
 import com.google.common.reflect.TypeToken;
 import com.google.gson.Gson;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
+import java.security.GeneralSecurityException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
 import org.onap.aai.domain.yang.EsrSystemInfo;
 import org.onap.so.adapters.vnfmadapter.extclients.aai.AaiServiceProvider;
 import org.onap.so.adapters.vnfmadapter.extclients.vim.model.AccessInfo;
@@ -40,7 +46,7 @@
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.SubscriptionsFilterVnfInstanceSubscriptionFilter;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.VnfInstancesvnfInstanceIdinstantiateExtVirtualLinks;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.VnfInstancesvnfInstanceIdinstantiateVimConnectionInfo;
-import org.onap.so.security.WebSecurityConfig;
+import org.onap.so.utils.CryptoUtils;
 import org.onap.vnfmadapter.v1.model.CreateVnfRequest;
 import org.onap.vnfmadapter.v1.model.ExternalVirtualLink;
 import org.onap.vnfmadapter.v1.model.Tenant;
@@ -49,11 +55,6 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import static org.onap.so.adapters.vnfmadapter.Constants.BASE_URL;
-import static org.onap.so.adapters.vnfmadapter.Constants.OPERATION_NOTIFICATION_ENDPOINT;
 
 /**
  * Provides helper methods for interactions with VNFM.
@@ -64,15 +65,19 @@
     private static final Logger logger = LoggerFactory.getLogger(VnfmHelper.class);
     private static final String SEPARATOR = "_";
     private final AaiServiceProvider aaiServiceProvider;
-    private final WebSecurityConfig webSecurityConfig;
 
     @Value("${vnfmadapter.endpoint}")
     private String vnfmAdapterEndoint;
 
+    @Value("${vnfmadapter.auth:E39823AAB2739CC654C4E92B52C05BC34149342D0A46451B00CA508C8EDC62242CE4E9DA9445D3C01A3F13}")
+    private String vnfmAdapterAuth;
+
+    @Value("${mso.key}")
+    private String msoEncryptionKey;
+
     @Autowired
-    public VnfmHelper(final AaiServiceProvider aaiServiceProvider, final WebSecurityConfig webSecurityConfig) {
+    public VnfmHelper(final AaiServiceProvider aaiServiceProvider) {
         this.aaiServiceProvider = aaiServiceProvider;
-        this.webSecurityConfig = webSecurityConfig;
     }
 
     /**
@@ -171,8 +176,10 @@
      *
      * @param the ID of the VNF notifications are required for
      * @return the request
+     * @throws GeneralSecurityException
      */
-    public LccnSubscriptionRequest createNotificationSubscriptionRequest(final String vnfId) {
+    public LccnSubscriptionRequest createNotificationSubscriptionRequest(final String vnfId)
+            throws GeneralSecurityException {
         final LccnSubscriptionRequest lccnSubscriptionRequest = new LccnSubscriptionRequest();
         lccnSubscriptionRequest.setAuthentication(getSubscriptionsAuthentication());
         lccnSubscriptionRequest.setCallbackUri(vnfmAdapterEndoint + BASE_URL + OPERATION_NOTIFICATION_ENDPOINT);
@@ -186,12 +193,11 @@
         return lccnSubscriptionRequest;
     }
 
-    private SubscriptionsAuthentication getSubscriptionsAuthentication() {
+    private SubscriptionsAuthentication getSubscriptionsAuthentication() throws GeneralSecurityException {
         final SubscriptionsAuthenticationParamsBasic basicAuthParams = new SubscriptionsAuthenticationParamsBasic();
-        basicAuthParams.setUserName("vnfm");
-        basicAuthParams.setPassword(webSecurityConfig.getUsercredentials().stream()
-                .filter(userCredentials -> "vnfm".equals(userCredentials.getUsername())).findFirst().get()
-                .getPassword());
+        final String[] decrypedAuth = CryptoUtils.decrypt(vnfmAdapterAuth, msoEncryptionKey).split(":");
+        basicAuthParams.setUserName(decrypedAuth[0]);
+        basicAuthParams.setPassword(decrypedAuth[1]);
 
         final SubscriptionsAuthentication authentication = new SubscriptionsAuthentication();
         authentication.addAuthTypeItem(AuthTypeEnum.BASIC);
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmServiceProviderImpl.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmServiceProviderImpl.java
index 951c6f1..e66f86b 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmServiceProviderImpl.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmServiceProviderImpl.java
@@ -84,10 +84,12 @@
     @Override
     public InlineResponse2001 subscribeForNotifications(final String vnfmId,
             final LccnSubscriptionRequest subscriptionRequest) {
+        logger.info("Subscribing for notifications {}", subscriptionRequest);
         final String url = urlProvider.getSubscriptionsUrl(vnfmId);
         ResponseEntity<InlineResponse2001> response = null;
         try {
             response = httpServiceProvider.postHttpRequest(subscriptionRequest, url, InlineResponse2001.class);
+            logger.info("Subscribing for notifications response {}", response);
         } catch (final Exception exception) {
             final String errorMessage =
                     "Subscription to VNFM " + vnfmId + " resulted in exception" + subscriptionRequest;
@@ -131,7 +133,7 @@
     public void deleteVnf(final String vnfSelfLink) {
         logger.debug("Sending delete request to : " + vnfSelfLink);
         final ResponseEntity<Void> response = httpServiceProvider.deleteHttpRequest(vnfSelfLink, Void.class);
-        if (response.getStatusCode() != HttpStatus.OK) {
+        if (response.getStatusCode() != HttpStatus.NO_CONTENT) {
             throw new VnfmRequestFailureException(
                     "Delete request to " + vnfSelfLink + " return status code: " + response.getStatusCode());
         }
@@ -146,6 +148,7 @@
     @Override
     public Optional<InlineResponse201> createVnf(final String vnfmId, final CreateVnfRequest createVnfRequest) {
         final String url = urlProvider.getCreationUrl(vnfmId);
+        logger.debug("Sending create request {} to : {}", createVnfRequest, url);
         try {
             return httpServiceProvider.post(createVnfRequest, url, InlineResponse201.class);
         } catch (final Exception exception) {
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmUrlProvider.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmUrlProvider.java
index d4aa65d..f948f3c 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmUrlProvider.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/extclients/vnfm/VnfmUrlProvider.java
@@ -20,6 +20,8 @@
 
 package org.onap.so.adapters.vnfmadapter.extclients.vnfm;
 
+import static org.slf4j.LoggerFactory.getLogger;
+import java.net.URI;
 import org.onap.aai.domain.yang.EsrSystemInfo;
 import org.onap.aai.domain.yang.EsrSystemInfoList;
 import org.onap.so.adapters.vnfmadapter.extclients.aai.AaiServiceProvider;
@@ -28,8 +30,6 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.util.UriComponentsBuilder;
-import java.net.URI;
-import static org.slf4j.LoggerFactory.getLogger;
 
 /**
  * Provides URLs for REST calls to a VNFM.
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/JobManager.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/JobManager.java
index e61bf86..345ff51 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/JobManager.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/JobManager.java
@@ -20,8 +20,11 @@
 
 package org.onap.so.adapters.vnfmadapter.jobmanagement;
 
+import static org.slf4j.LoggerFactory.getLogger;
 import com.google.common.base.Optional;
 import com.google.common.collect.Maps;
+import java.util.Map;
+import java.util.UUID;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.VnfmServiceProvider;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse200;
 import org.onap.so.adapters.vnfmadapter.rest.exceptions.JobNotFoundException;
@@ -32,9 +35,6 @@
 import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
-import java.util.Map;
-import java.util.UUID;
-import static org.slf4j.LoggerFactory.getLogger;
 
 /**
  * Manages jobs enabling the status of jobs to be queried. A job is associated with an operation on a VNFM.
@@ -123,12 +123,15 @@
 
     public void notificationProcessedForOperation(final String operationId,
             final boolean notificationProcessingWasSuccessful) {
+        logger.debug("Notification processed for operation ID {} success?: {}", operationId,
+                notificationProcessingWasSuccessful);
         final java.util.Optional<VnfmOperation> relatedOperation = mapOfJobIdToVnfmOperation.values().stream()
                 .filter(operation -> operation.getOperationId().equals(operationId)).findFirst();
         if (relatedOperation.isPresent()) {
             relatedOperation.get().setNotificationProcessed(notificationProcessingWasSuccessful);
+        } else {
+            logger.debug("No operation found for operation ID " + operationId);
         }
-        logger.debug("No operation found for operation ID " + operationId);
     }
 
 }
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/VnfmOperation.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/VnfmOperation.java
index 3ed66ad..7ce08df 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/VnfmOperation.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/jobmanagement/VnfmOperation.java
@@ -94,4 +94,11 @@
         NOTIFICATION_PROCESSING_FAILED;
     }
 
+    @Override
+    public String toString() {
+        return "VnfmOperation [vnfmId=" + vnfmId + ", operationId=" + operationId + ", notificationStatus="
+                + notificationStatus + "]";
+    }
+
+
 }
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/lifecycle/LifecycleManager.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/lifecycle/LifecycleManager.java
index e6b787b..32bb9b9 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/lifecycle/LifecycleManager.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/lifecycle/LifecycleManager.java
@@ -21,6 +21,7 @@
 package org.onap.so.adapters.vnfmadapter.lifecycle;
 
 import com.google.common.base.Optional;
+import java.util.Map;
 import org.onap.aai.domain.yang.EsrVnfm;
 import org.onap.aai.domain.yang.GenericVnf;
 import org.onap.so.adapters.vnfmadapter.extclients.SdcPackageProvider;
@@ -46,7 +47,6 @@
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
-import java.util.Map;
 
 /**
  * Manages lifecycle operations towards the VNFMs.
@@ -64,7 +64,7 @@
     @Autowired
     LifecycleManager(final AaiServiceProvider aaiServiceProvider, final AaiHelper aaiHelper,
             final VnfmHelper vnfmHelper, final VnfmServiceProvider vnfmServiceProvider, final JobManager jobManager,
-            SdcPackageProvider packageProvider) {
+            final SdcPackageProvider packageProvider) {
         this.aaiServiceProvider = aaiServiceProvider;
         this.vnfmServiceProvider = vnfmServiceProvider;
         this.aaiHelper = aaiHelper;
@@ -90,7 +90,11 @@
             aaiHelper.addRelationshipFromGenericVnfToVnfm(genericVnf, vnfm.getVnfmId());
         }
         aaiHelper.addRelationshipFromGenericVnfToTenant(genericVnf, request.getTenant());
-        InlineResponse201 vnfmResponse = sendCreateRequestToVnfm(request, genericVnf, vnfIdInAai, vnfm.getVnfmId());
+        final InlineResponse201 vnfmResponse =
+                sendCreateRequestToVnfm(request, genericVnf, vnfIdInAai, vnfm.getVnfmId());
+
+        logger.info("Create response: {}", vnfmResponse);
+
         genericVnf.setSelflink(vnfmResponse.getLinks().getSelf().getHref());
         aaiServiceProvider.invokePutGenericVnf(genericVnf);
         final String vnfIdInVnfm = vnfmResponse.getId();
@@ -135,18 +139,18 @@
         }
     }
 
-    private InlineResponse201 sendCreateRequestToVnfm(CreateVnfRequest aaiRequest, GenericVnf genericVnf,
-            String vnfIdInAai, String vnfmId) {
+    private InlineResponse201 sendCreateRequestToVnfm(final CreateVnfRequest aaiRequest, final GenericVnf genericVnf,
+            final String vnfIdInAai, final String vnfmId) {
         logger.debug("Sending a create request to SVNFM " + aaiRequest);
-        org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.CreateVnfRequest vnfmRequest =
+        final org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.CreateVnfRequest vnfmRequest =
                 new org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.CreateVnfRequest();
 
-        String vnfdId = packageProvider.getVnfdId(genericVnf.getModelVersionId());
+        final String vnfdId = packageProvider.getVnfdId(genericVnf.getModelVersionId());
         vnfmRequest.setVnfdId(vnfdId);
         vnfmRequest.setVnfInstanceName(aaiRequest.getName().replaceAll(" ", "_"));
         vnfmRequest.setVnfInstanceDescription(vnfIdInAai);
 
-        Optional<InlineResponse201> optionalResponse = vnfmServiceProvider.createVnf(vnfmId, vnfmRequest);
+        final Optional<InlineResponse201> optionalResponse = vnfmServiceProvider.createVnf(vnfmId, vnfmRequest);
 
         try {
             return optionalResponse.get();
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/notificationhandling/NotificationHandler.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/notificationhandling/NotificationHandler.java
index a339b9b..c09aa0c 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/notificationhandling/NotificationHandler.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/notificationhandling/NotificationHandler.java
@@ -20,9 +20,14 @@
 
 package org.onap.so.adapters.vnfmadapter.notificationhandling;
 
+import static org.slf4j.LoggerFactory.getLogger;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.onap.aai.domain.yang.GenericVnf;
+import org.onap.aai.domain.yang.Relationship;
 import org.onap.aai.domain.yang.Vserver;
 import org.onap.so.adapters.vnfmadapter.extclients.aai.AaiHelper;
 import org.onap.so.adapters.vnfmadapter.extclients.aai.AaiServiceProvider;
@@ -30,16 +35,13 @@
 import org.onap.so.adapters.vnfmadapter.extclients.aai.OamIpAddressSource.OamIpAddressType;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.VnfmServiceProvider;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs.ChangeTypeEnum;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification.OperationStateEnum;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201VimConnectionInfo;
 import org.onap.so.adapters.vnfmadapter.jobmanagement.JobManager;
 import org.slf4j.Logger;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import static org.slf4j.LoggerFactory.getLogger;
 
 /**
  * Performs updates to AAI based on a received notification. The updates are executed in a separate thread so as the
@@ -93,15 +95,14 @@
     }
 
     private void handleVnfInstantiateCompleted() {
-        final GenericVnf genericVnf =
-                aaiServiceProvider.invokeQueryGenericVnf(vnfInstance.getLinks().getSelf().getHref()).get(0);
+        final GenericVnf genericVnf = aaiServiceProvider
+                .invokeQueryGenericVnf(vnfInstance.getLinks().getSelf().getHref()).getGenericVnf().get(0);
         setOamIpAddress(genericVnf, vnfInstance);
         genericVnf.setOrchestrationStatus("Created");
 
         aaiServiceProvider.invokePutGenericVnf(genericVnf);
 
-        updateVservers(vnfLcmOperationOccurrenceNotification, genericVnf.getVnfId(),
-                vnfInstance.getVimConnectionInfo());
+        addVservers(vnfLcmOperationOccurrenceNotification, genericVnf.getVnfId(), vnfInstance.getVimConnectionInfo());
 
         logger.debug("Finished handling notification for vnfm: " + vnfInstance.getId());
     }
@@ -114,16 +115,17 @@
         }
         if (oamIpAddressSource.getType().equals(OamIpAddressType.LITERAL)) {
             genericVnf.setIpv4OamAddress(oamIpAddressSource.getValue());
-        }
-        try {
-            logger.debug("ConfigurableProperties: " + vnfInstance.getVnfConfigurableProperties());
-            if (vnfInstance.getVnfConfigurableProperties() == null) {
-                logger.warn("No ConfigurableProperties, cannot set OAM IP Address");
+        } else {
+            try {
+                logger.debug("ConfigurableProperties: " + vnfInstance.getVnfConfigurableProperties());
+                if (vnfInstance.getVnfConfigurableProperties() == null) {
+                    logger.warn("No ConfigurableProperties, cannot set OAM IP Address");
+                }
+                final JSONObject properties = new JSONObject((Map) vnfInstance.getVnfConfigurableProperties());
+                genericVnf.setIpv4OamAddress(properties.get(oamIpAddressSource.getValue()).toString());
+            } catch (final JSONException jsonException) {
+                logger.error("Error getting vnfIpAddress", jsonException);
             }
-            final JSONObject properties = new JSONObject((Map) vnfInstance.getVnfConfigurableProperties());
-            genericVnf.setIpv4OamAddress(properties.get(oamIpAddressSource.getValue()).toString());
-        } catch (final JSONException jsonException) {
-            logger.error("Error getting vnfIpAddress", jsonException);
         }
     }
 
@@ -141,32 +143,31 @@
     }
 
     private void handleVnfTerminateFailed() {
-        final GenericVnf genericVnf =
-                aaiServiceProvider.invokeQueryGenericVnf(vnfInstance.getLinks().getSelf().getHref()).get(0);
-        updateVservers(vnfLcmOperationOccurrenceNotification, genericVnf.getVnfId(),
-                vnfInstance.getVimConnectionInfo());
-        jobManager.notificationProcessedForOperation(vnfLcmOperationOccurrenceNotification.getId(), false);
+        final GenericVnf genericVnf = aaiServiceProvider
+                .invokeQueryGenericVnf(vnfInstance.getLinks().getSelf().getHref()).getGenericVnf().get(0);
+        deleteVservers(vnfLcmOperationOccurrenceNotification, genericVnf);
+        jobManager.notificationProcessedForOperation(vnfLcmOperationOccurrenceNotification.getVnfLcmOpOccId(), false);
     }
 
     private void handleVnfTerminateCompleted() {
-        final GenericVnf genericVnf =
-                aaiServiceProvider.invokeQueryGenericVnf(vnfInstance.getLinks().getSelf().getHref()).get(0);
-        updateVservers(vnfLcmOperationOccurrenceNotification, genericVnf.getVnfId(),
-                vnfInstance.getVimConnectionInfo());
+        final GenericVnf genericVnf = aaiServiceProvider
+                .invokeQueryGenericVnf(vnfInstance.getLinks().getSelf().getHref()).getGenericVnf().get(0);
+        deleteVservers(vnfLcmOperationOccurrenceNotification, genericVnf);
 
         boolean deleteSuccessful = false;
         try {
             vnfmServiceProvider.deleteVnf(genericVnf.getSelflink());
             deleteSuccessful = true;
         } finally {
-            jobManager.notificationProcessedForOperation(vnfLcmOperationOccurrenceNotification.getId(),
+            jobManager.notificationProcessedForOperation(vnfLcmOperationOccurrenceNotification.getVnfLcmOpOccId(),
                     deleteSuccessful);
             genericVnf.setOrchestrationStatus("Assigned");
+            genericVnf.setSelflink("");
             aaiServiceProvider.invokePutGenericVnf(genericVnf);
         }
     }
 
-    private void updateVservers(final VnfLcmOperationOccurrenceNotification notification, final String vnfId,
+    private void addVservers(final VnfLcmOperationOccurrenceNotification notification, final String vnfId,
             final List<InlineResponse201VimConnectionInfo> vnfInstancesVimConnectionInfo) {
         final Map<String, InlineResponse201VimConnectionInfo> vimConnectionIdToVimConnectionInfo = new HashMap<>();
         for (final InlineResponse201VimConnectionInfo vimConnectionInfo : vnfInstancesVimConnectionInfo) {
@@ -176,22 +177,28 @@
         for (final LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs vnfc : notification.getAffectedVnfcs()) {
             final InlineResponse201VimConnectionInfo vimConnectionInfo =
                     getVimConnectionInfo(vimConnectionIdToVimConnectionInfo, vnfc);
-            switch (vnfc.getChangeType()) {
-                case ADDED:
-                    final Vserver vserver = aaiHelper.createVserver(vnfc);
-                    aaiHelper.addRelationshipFromVserverVnfToGenericVnf(vserver, vnfId);
+            if (ChangeTypeEnum.ADDED.equals(vnfc.getChangeType())) {
+                final Vserver vserver = aaiHelper.createVserver(vnfc);
+                aaiHelper.addRelationshipFromVserverVnfToGenericVnf(vserver, vnfId);
 
-                    aaiServiceProvider.invokePutVserver(getCloudOwner(vimConnectionInfo),
-                            getCloudRegion(vimConnectionInfo), getTenant(vimConnectionInfo), vserver);
-                    break;
-                case REMOVED:
-                    aaiServiceProvider.invokeDeleteVserver(getCloudOwner(vimConnectionInfo),
-                            getCloudRegion(vimConnectionInfo), getTenant(vimConnectionInfo),
-                            vnfc.getComputeResource().getResourceId());
-                    break;
-                case MODIFIED:
-                case TEMPORARY:
-                default:
+                aaiServiceProvider.invokePutVserver(getCloudOwner(vimConnectionInfo), getCloudRegion(vimConnectionInfo),
+                        getTenant(vimConnectionInfo), vserver);
+            }
+        }
+    }
+
+    private void deleteVservers(final VnfLcmOperationOccurrenceNotification notification, final GenericVnf vnf) {
+        for (final LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs vnfc : notification.getAffectedVnfcs()) {
+            if (ChangeTypeEnum.REMOVED.equals(vnfc.getChangeType())) {
+
+                final Relationship relationshipToVserver = aaiHelper.deleteRelationshipWithDataValue(vnf, "vserver",
+                        "vserver.vserver-id", vnfc.getComputeResource().getResourceId());
+
+                aaiServiceProvider.invokeDeleteVserver(
+                        aaiHelper.getRelationshipData(relationshipToVserver, "cloud-region.cloud-owner"),
+                        aaiHelper.getRelationshipData(relationshipToVserver, "cloud-region.cloud-region-id"),
+                        aaiHelper.getRelationshipData(relationshipToVserver, "tenant.tenant-id"),
+                        vnfc.getComputeResource().getResourceId());
             }
         }
     }
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantController.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantController.java
index 6b8802e..3ead98f 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantController.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantController.java
@@ -20,6 +20,11 @@
 
 package org.onap.so.adapters.vnfmadapter.rest;
 
+import static org.onap.so.adapters.vnfmadapter.Constants.BASE_URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+import javax.ws.rs.core.MediaType;
 import org.onap.so.adapters.vnfmadapter.extclients.aai.AaiHelper;
 import org.onap.so.adapters.vnfmadapter.extclients.aai.AaiServiceProvider;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.VnfmHelper;
@@ -36,15 +41,10 @@
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
-import javax.ws.rs.core.MediaType;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-import static org.onap.so.adapters.vnfmadapter.Constants.BASE_URL;
+import org.springframework.web.bind.annotation.RequestMapping;
 
 @Controller
 @RequestMapping(value = BASE_URL, produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@@ -52,9 +52,6 @@
 
     private static final String SEPARATOR = "_";
     private static final String VIM_TYPE = "OPENSTACK";
-    private static final String CLOUD_OWNER = "myTestCloudOwner";
-    private static final String REGION = "myTestRegion";
-    private static final String TENANT_ID = "myTestTenantId";
     private static final Logger logger = LoggerFactory.getLogger(Sol003GrantController.class);
     public final AaiServiceProvider aaiServiceProvider;
     public final AaiHelper aaiHelper;
@@ -71,7 +68,7 @@
     @GetMapping(value = "/grants/{grantId}")
     public ResponseEntity<InlineResponse201> grantsGrantIdGet(@PathVariable("grantId") final String grantId) {
         logger.info("Get grant received from VNFM, grant id: " + grantId);
-        return new ResponseEntity<InlineResponse201>(HttpStatus.NOT_IMPLEMENTED);
+        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
     }
 
     @PostMapping(value = "/grants")
@@ -80,7 +77,7 @@
 
         final InlineResponse201 grantResponse = createGrantResponse(grantRequest);
         logger.info("Grant request returning to VNFM: " + grantResponse);
-        return new ResponseEntity<InlineResponse201>(grantResponse, HttpStatus.CREATED);
+        return new ResponseEntity<>(grantResponse, HttpStatus.CREATED);
     }
 
     private InlineResponse201 createGrantResponse(final GrantRequest grantRequest) {
@@ -88,8 +85,9 @@
         grantResponse.setId(UUID.randomUUID().toString());
         grantResponse.setVnfInstanceId(grantRequest.getVnfInstanceId());
         grantResponse.setVnfLcmOpOccId(grantRequest.getVnfLcmOpOccId());
-        final Tenant tenant =
-                aaiHelper.getAssignedTenant(aaiServiceProvider.invokeGetGenericVnf((grantRequest.getVnfInstanceId())));
+        final String vnfSelfLink = grantRequest.getLinks().getVnfInstance().getHref();
+        final Tenant tenant = aaiHelper
+                .getAssignedTenant(aaiServiceProvider.invokeQueryGenericVnf(vnfSelfLink).getGenericVnf().get(0));
 
         String vimConnectionId = "";
         final InlineResponse201VimConnections vimConnection = vnfmHelper.getVimConnections(tenant);
@@ -99,19 +97,11 @@
         if (grantRequest.getOperation().equals(GrantRequest.OperationEnum.INSTANTIATE)) {
             grantResponse.addResources(getResources(grantRequest.getAddResources(), vimConnectionId));
         } else if (grantRequest.getOperation().equals(GrantRequest.OperationEnum.TERMINATE)) {
-            grantResponse.addResources(getResources(grantRequest.getRemoveResources(), vimConnectionId));
+            grantResponse.removeResources(getResources(grantRequest.getRemoveResources(), vimConnectionId));
         }
         return grantResponse;
     }
 
-    private InlineResponse201VimConnections getVimConnectionsItem(final Tenant tenant) {
-        final InlineResponse201VimConnections vimConnection = new InlineResponse201VimConnections();
-        vimConnection.setId(createVimConnectionId(tenant.getCloudOwner(), tenant.getRegionName()));
-        vimConnection.setVimId(vimConnection.getId());
-        vimConnection.setVimType(VIM_TYPE);
-        return vimConnection;
-    }
-
     private List<InlineResponse201AddResources> getResources(final List<GrantsAddResources> requestResources,
             final String vimId) {
         final List<InlineResponse201AddResources> resources = new ArrayList<>();
@@ -123,8 +113,4 @@
         }
         return resources;
     }
-
-    private String createVimConnectionId(String cloudOwner, String cloudRegionId) {
-        return cloudOwner + SEPARATOR + cloudRegionId;
-    }
 }
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/resources/application.yaml b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/resources/application.yaml
index 4fb1103..951d4a3 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/resources/application.yaml
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/resources/application.yaml
@@ -11,6 +11,19 @@
 # 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.
+spring:
+  security:
+    usercredentials:
+      - username: test
+        password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu'
+        role: BPEL-Client
+      - username: vnfm
+        password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
+        role: BPEL-Client
+  http:
+    converters:
+    preferred-json-mapper: gson
+        
 server:
   port: 9092
   tomcat:
@@ -29,6 +42,9 @@
   password: sdcPassword
   key: adadadadad
   endpoint: http://sdc.onap/1234A
+  
+vnfmadapter:
+  endpoint: http://so-vnfm-adapter.onap:9092
 
 #Actuator
 management:
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantControllerTest.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantControllerTest.java
index b7f5e96..69223d7 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantControllerTest.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003GrantControllerTest.java
@@ -20,7 +20,15 @@
 
 package org.onap.so.adapters.vnfmadapter.rest;
 
-import com.google.gson.Gson;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
+import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
 import org.hamcrest.BaseMatcher;
 import org.hamcrest.Description;
 import org.junit.Before;
@@ -30,6 +38,7 @@
 import org.onap.aai.domain.yang.EsrSystemInfo;
 import org.onap.aai.domain.yang.EsrSystemInfoList;
 import org.onap.aai.domain.yang.GenericVnf;
+import org.onap.aai.domain.yang.GenericVnfs;
 import org.onap.aai.domain.yang.Relationship;
 import org.onap.aai.domain.yang.RelationshipData;
 import org.onap.aai.domain.yang.RelationshipList;
@@ -38,6 +47,8 @@
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantRequest.OperationEnum;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantsAddResources;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantsAddResources.TypeEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantsLinks;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantsLinksVnfLcmOpOcc;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.InlineResponse201;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.InlineResponse201VimConnections;
 import org.onap.so.client.aai.AAIResourcesClient;
@@ -54,12 +65,6 @@
 import org.springframework.test.context.junit4.SpringRunner;
 import org.springframework.test.web.client.MockRestServiceServer;
 import org.springframework.web.client.RestTemplate;
-import java.util.Optional;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doReturn;
-import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
 
 @RunWith(SpringRunner.class)
 @SpringBootTest(classes = VnfmAdapterApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT)
@@ -84,7 +89,6 @@
 
     @Autowired
     private Sol003GrantController controller;
-    private final Gson gson = new Gson();
 
     @Before
     public void setUp() throws Exception {
@@ -94,17 +98,18 @@
 
     @Test
     public void grantRequest_ValidRequestInstantiate_GrantApproved() {
-        GrantRequest grantRequest = createGrantRequest("INSTANTIATE");
+        final GrantRequest grantRequest = createGrantRequest("INSTANTIATE");
         setUpGenericVnfWithVnfmRelationshipInMockAai("vnfmType", "vnfm1");
         final ResponseEntity<InlineResponse201> response = controller.grantsPost(grantRequest);
         assertEquals(HttpStatus.CREATED, response.getStatusCode());
         assertEquals(1, response.getBody().getAddResources().size());
+        assertNull(response.getBody().getRemoveResources());
 
         assertEquals(vimConnectionId, response.getBody().getAddResources().get(0).getVimConnectionId());
-        assertEquals("myTestVnfId", response.getBody().getVnfInstanceId());
+        assertEquals("myTestVnfIdOnVnfm", response.getBody().getVnfInstanceId());
         assertEquals("123456", response.getBody().getVnfLcmOpOccId());
 
-        InlineResponse201VimConnections vimConnections = response.getBody().getVimConnections().get(0);
+        final InlineResponse201VimConnections vimConnections = response.getBody().getVimConnections().get(0);
         assertEquals(vimConnectionId, vimConnections.getVimId());
         assertEquals("OPENSTACK", vimConnections.getVimType());
         assertNotNull(vimConnections.getAccessInfo());
@@ -120,17 +125,18 @@
 
     @Test
     public void grantRequest_ValidRequestTerminate_GrantApproved() {
-        GrantRequest grantRequest = createGrantRequest("TERMINATE");
+        final GrantRequest grantRequest = createGrantRequest("TERMINATE");
         setUpGenericVnfWithVnfmRelationshipInMockAai("vnfmType", "vnfm1");
         final ResponseEntity<InlineResponse201> response = controller.grantsPost(grantRequest);
 
         assertEquals(HttpStatus.CREATED, response.getStatusCode());
-        assertEquals(1, response.getBody().getAddResources().size());
-        assertEquals(vimConnectionId, response.getBody().getAddResources().get(0).getVimConnectionId());
-        assertEquals("myTestVnfId", response.getBody().getVnfInstanceId());
+        assertNull(response.getBody().getAddResources());
+        assertEquals(1, response.getBody().getRemoveResources().size());
+        assertEquals(vimConnectionId, response.getBody().getRemoveResources().get(0).getVimConnectionId());
+        assertEquals("myTestVnfIdOnVnfm", response.getBody().getVnfInstanceId());
         assertEquals("123456", response.getBody().getVnfLcmOpOccId());
 
-        InlineResponse201VimConnections vimConnections = response.getBody().getVimConnections().get(0);
+        final InlineResponse201VimConnections vimConnections = response.getBody().getVimConnections().get(0);
         assertEquals(vimConnectionId, vimConnections.getVimId());
         assertEquals("OPENSTACK", vimConnections.getVimType());
         assertNotNull(vimConnections.getAccessInfo());
@@ -139,19 +145,21 @@
 
     }
 
-    private GrantRequest createGrantRequest(String operation) {
-        GrantRequest grantRequest = new GrantRequest();
-        grantRequest.setVnfInstanceId("myTestVnfId");
+    private GrantRequest createGrantRequest(final String operation) {
+        final GrantRequest grantRequest = new GrantRequest();
+        grantRequest.setVnfInstanceId("myTestVnfIdOnVnfm");
         grantRequest.setVnfLcmOpOccId("123456");
+        grantRequest.links(new GrantsLinks()
+                .vnfInstance(new GrantsLinksVnfLcmOpOcc().href("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm")));
         if (operation == "INSTANTIATE") {
             grantRequest.setOperation(OperationEnum.INSTANTIATE);
-            GrantsAddResources resource = new GrantsAddResources();
+            final GrantsAddResources resource = new GrantsAddResources();
             resource.setId("123");
             resource.setType(TypeEnum.COMPUTE);
             grantRequest.addAddResourcesItem(resource);
         } else if (operation == "TERMINATE") {
             grantRequest.setOperation(OperationEnum.TERMINATE);
-            GrantsAddResources resource = new GrantsAddResources();
+            final GrantsAddResources resource = new GrantsAddResources();
             resource.setId("123");
             resource.setType(TypeEnum.COMPUTE);
             grantRequest.addRemoveResourcesItem(resource);
@@ -210,6 +218,14 @@
 
         doReturn(Optional.of(genericVnf)).when(aaiResourcesClient).get(eq(GenericVnf.class),
                 MockitoHamcrest.argThat(new AaiResourceUriMatcher("/network/generic-vnfs/generic-vnf/myTestVnfId")));
+
+        final List<GenericVnf> listOfGenericVnfs = new ArrayList<>();
+        listOfGenericVnfs.add(genericVnf);
+        final GenericVnfs genericVnfs = new GenericVnfs();
+        genericVnfs.getGenericVnf().addAll(listOfGenericVnfs);
+        doReturn(Optional.of(genericVnfs)).when(aaiResourcesClient).get(eq(GenericVnfs.class),
+                MockitoHamcrest.argThat(new AaiResourceUriMatcher(
+                        "/network/generic-vnfs?selflink=http%3A%2F%2Fvnfm%3A8080%2Fvnfs%2FmyTestVnfIdOnVnfm")));
     }
 
     private class AaiResourceUriMatcher extends BaseMatcher<AAIResourceUri> {
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnControllerTest.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnControllerTest.java
index 66e8e99..aeb7cd3 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnControllerTest.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003LcnControllerTest.java
@@ -20,7 +20,25 @@
 
 package org.onap.so.adapters.vnfmadapter.rest;
 
+import static org.junit.Assert.assertEquals;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.timeout;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
+import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
+import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
+import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
 import com.google.gson.Gson;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.inject.Inject;
 import org.hamcrest.BaseMatcher;
 import org.hamcrest.Description;
 import org.junit.Before;
@@ -29,7 +47,10 @@
 import org.mockito.ArgumentCaptor;
 import org.mockito.hamcrest.MockitoHamcrest;
 import org.onap.aai.domain.yang.GenericVnf;
+import org.onap.aai.domain.yang.GenericVnfs;
 import org.onap.aai.domain.yang.Relationship;
+import org.onap.aai.domain.yang.RelationshipData;
+import org.onap.aai.domain.yang.RelationshipList;
 import org.onap.aai.domain.yang.Vserver;
 import org.onap.so.adapters.vnfmadapter.VnfmAdapterApplication;
 import org.onap.so.adapters.vnfmadapter.extclients.aai.AaiHelper;
@@ -64,24 +85,6 @@
 import org.springframework.test.context.junit4.SpringRunner;
 import org.springframework.test.web.client.MockRestServiceServer;
 import org.springframework.web.client.RestTemplate;
-import javax.inject.Inject;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.timeout;
-import static org.mockito.Mockito.verifyZeroInteractions;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.verify;
-import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
-import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
-import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
-import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
 
 @RunWith(SpringRunner.class)
 @SpringBootTest(classes = VnfmAdapterApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT)
@@ -166,9 +169,11 @@
                 .andRespond(withSuccess(gson.toJson(vnfInstance), MediaType.APPLICATION_JSON));
 
         final GenericVnf genericVnf = createGenericVnf("vnfmType1");
-        final List<GenericVnf> genericVnfs = new ArrayList<>();
-        genericVnfs.add(genericVnf);
-        doReturn(Optional.of(genericVnfs)).when(aaiResourcesClient).get(eq(List.class),
+        final List<GenericVnf> listOfGenericVnfs = new ArrayList<>();
+        listOfGenericVnfs.add(genericVnf);
+        final GenericVnfs genericVnfs = new GenericVnfs();
+        genericVnfs.getGenericVnf().addAll(listOfGenericVnfs);
+        doReturn(Optional.of(genericVnfs)).when(aaiResourcesClient).get(eq(GenericVnfs.class),
                 MockitoHamcrest.argThat(new AaiResourceUriMatcher(
                         "/network/generic-vnfs?selflink=http%3A%2F%2Fvnfm%3A8080%2Fvnfs%2FmyTestVnfIdOnVnfm")));
 
@@ -176,23 +181,27 @@
                 controller.lcnVnfLcmOperationOccurrenceNotificationPost(vnfLcmOperationOccurrenceNotification);
         assertEquals(HttpStatus.NO_CONTENT, response.getStatusCode());
 
-        final ArgumentCaptor<Object> bodyArgument = ArgumentCaptor.forClass(Object.class);
-        final ArgumentCaptor<AAIResourceUri> uriArgument = ArgumentCaptor.forClass(AAIResourceUri.class);
+        final ArgumentCaptor<Object> bodyArgument1 = ArgumentCaptor.forClass(Object.class);
+        final ArgumentCaptor<AAIResourceUri> uriArgument1 = ArgumentCaptor.forClass(AAIResourceUri.class);
 
-        verify(aaiResourcesClient, timeout(1000).times(2)).update(uriArgument.capture(), bodyArgument.capture());
+        verify(aaiResourcesClient, timeout(1000)).update(uriArgument1.capture(), bodyArgument1.capture());
 
         assertEquals("/network/generic-vnfs/generic-vnf/myTestVnfId",
-                uriArgument.getAllValues().get(0).build().toString());
-        final GenericVnf updatedGenericVnf = (GenericVnf) bodyArgument.getAllValues().get(0);
+                uriArgument1.getAllValues().get(0).build().toString());
+        final GenericVnf updatedGenericVnf = (GenericVnf) bodyArgument1.getAllValues().get(0);
         assertEquals("10.10.10.10", updatedGenericVnf.getIpv4OamAddress());
         assertEquals("Created", updatedGenericVnf.getOrchestrationStatus());
 
+        final ArgumentCaptor<Object> bodyArgument2 = ArgumentCaptor.forClass(Object.class);
+        final ArgumentCaptor<AAIResourceUri> uriArgument2 = ArgumentCaptor.forClass(AAIResourceUri.class);
+        verify(aaiResourcesClient, timeout(1000)).create(uriArgument2.capture(), bodyArgument2.capture());
+
         assertEquals(
                 "/cloud-infrastructure/cloud-regions/cloud-region/" + CLOUD_OWNER + "/" + REGION + "/tenants/tenant/"
                         + TENANT_ID + "/vservers/vserver/myVnfc1",
-                uriArgument.getAllValues().get(1).build().toString());
+                uriArgument2.getAllValues().get(0).build().toString());
 
-        final Vserver vserver = (Vserver) bodyArgument.getAllValues().get(1);
+        final Vserver vserver = (Vserver) bodyArgument2.getAllValues().get(0);
         assertEquals("myVnfc1", vserver.getVserverId());
         final Relationship relationship = vserver.getRelationshipList().getRelationship().get(0);
         assertEquals("generic-vnf", relationship.getRelatedTo());
@@ -214,13 +223,17 @@
                 .andRespond(withSuccess(gson.toJson(vnfInstance), MediaType.APPLICATION_JSON));
 
         mockRestServer.expect(requestTo(new URI("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm")))
-                .andRespond(withStatus(HttpStatus.OK).contentType(MediaType.APPLICATION_JSON));
+                .andRespond(withStatus(HttpStatus.NO_CONTENT).contentType(MediaType.APPLICATION_JSON));
 
         final GenericVnf genericVnf = createGenericVnf("vnfmType1");
         genericVnf.setSelflink("http://vnfm:8080/vnfs/myTestVnfIdOnVnfm");
-        final List<GenericVnf> genericVnfs = new ArrayList<>();
-        genericVnfs.add(genericVnf);
-        doReturn(Optional.of(genericVnfs)).when(aaiResourcesClient).get(eq(List.class),
+        final List<GenericVnf> listOfGenericVnfs = new ArrayList<>();
+        listOfGenericVnfs.add(genericVnf);
+        final GenericVnfs genericVnfs = new GenericVnfs();
+        genericVnfs.getGenericVnf().addAll(listOfGenericVnfs);
+        addRelationshipFromGenericVnfToVserver(genericVnf, "myVnfc1");
+
+        doReturn(Optional.of(genericVnfs)).when(aaiResourcesClient).get(eq(GenericVnfs.class),
                 MockitoHamcrest.argThat(new AaiResourceUriMatcher(
                         "/network/generic-vnfs?selflink=http%3A%2F%2Fvnfm%3A8080%2Fvnfs%2FmyTestVnfIdOnVnfm")));
 
@@ -310,6 +323,31 @@
         return genericVnf;
     }
 
+    private void addRelationshipFromGenericVnfToVserver(final GenericVnf genericVnf, final String vserverId) {
+        final Relationship relationshipToVserver = new Relationship();
+        relationshipToVserver.setRelatedTo("vserver");
+        final RelationshipData relationshipData1 = new RelationshipData();
+        relationshipData1.setRelationshipKey("vserver.vserver-id");
+        relationshipData1.setRelationshipValue(vserverId);
+        relationshipToVserver.getRelationshipData().add(relationshipData1);
+        final RelationshipData relationshipData2 = new RelationshipData();
+        relationshipData2.setRelationshipKey("cloud-region.cloud-owner");
+        relationshipData2.setRelationshipValue(CLOUD_OWNER);
+        relationshipToVserver.getRelationshipData().add(relationshipData2);
+        final RelationshipData relationshipData3 = new RelationshipData();
+        relationshipData3.setRelationshipKey("cloud-region.cloud-region-id");
+        relationshipData3.setRelationshipValue(REGION);
+        relationshipToVserver.getRelationshipData().add(relationshipData3);
+        final RelationshipData relationshipData4 = new RelationshipData();
+        relationshipData4.setRelationshipKey("tenant.tenant-id");
+        relationshipData4.setRelationshipValue(TENANT_ID);
+        relationshipToVserver.getRelationshipData().add(relationshipData4);
+
+        final RelationshipList relationshipList = new RelationshipList();
+        relationshipList.getRelationship().add(relationshipToVserver);
+        genericVnf.setRelationshipList(relationshipList);
+    }
+
     private class AaiResourceUriMatcher extends BaseMatcher<AAIResourceUri> {
 
         final String uriAsString;
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/VnfmAdapterControllerTest.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/VnfmAdapterControllerTest.java
index 20a074b..73a49e9 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/VnfmAdapterControllerTest.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/VnfmAdapterControllerTest.java
@@ -20,7 +20,21 @@
 
 package org.onap.so.adapters.vnfmadapter.rest;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.verify;
+import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
+import static org.springframework.test.web.client.match.MockRestRequestMatchers.content;
+import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
+import static org.springframework.test.web.client.response.MockRestResponseCreators.withBadRequest;
+import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
+import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
 import com.google.gson.Gson;
+import java.net.URI;
+import java.util.Optional;
 import org.hamcrest.BaseMatcher;
 import org.hamcrest.Description;
 import org.junit.Before;
@@ -36,24 +50,23 @@
 import org.onap.aai.domain.yang.Relationship;
 import org.onap.aai.domain.yang.RelationshipData;
 import org.onap.aai.domain.yang.RelationshipList;
+import org.onap.so.adapters.vnfmadapter.VnfmAdapterApplication;
+import org.onap.so.adapters.vnfmadapter.extclients.SdcPackageProvider;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse200;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse2001;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201Links;
 import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201LinksSelf;
+import org.onap.so.adapters.vnfmadapter.rest.exceptions.VnfmNotFoundException;
+import org.onap.so.client.aai.AAIResourcesClient;
+import org.onap.so.client.aai.entities.uri.AAIResourceUri;
+import org.onap.vnfmadapter.v1.model.CreateVnfRequest;
 import org.onap.vnfmadapter.v1.model.CreateVnfResponse;
 import org.onap.vnfmadapter.v1.model.DeleteVnfResponse;
 import org.onap.vnfmadapter.v1.model.OperationEnum;
 import org.onap.vnfmadapter.v1.model.OperationStateEnum;
 import org.onap.vnfmadapter.v1.model.QueryJobResponse;
-import org.onap.so.adapters.vnfmadapter.VnfmAdapterApplication;
-import org.onap.so.adapters.vnfmadapter.extclients.SdcPackageProvider;
-import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.*;
-import org.onap.so.adapters.vnfmadapter.rest.exceptions.VnfmNotFoundException;
-import org.onap.so.client.aai.AAIResourcesClient;
-import org.onap.so.client.aai.entities.uri.AAIResourceUri;
-import org.onap.vnfmadapter.v1.model.CreateVnfRequest;
 import org.onap.vnfmadapter.v1.model.Tenant;
-import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse200;
-import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse2001;
-import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.boot.test.context.SpringBootTest;
@@ -72,18 +85,6 @@
 import org.threeten.bp.LocalDateTime;
 import org.threeten.bp.OffsetDateTime;
 import org.threeten.bp.ZoneOffset;
-import java.net.URI;
-import java.util.Optional;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.verify;
-import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
-import static org.springframework.test.web.client.match.MockRestRequestMatchers.content;
-import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
-import static org.springframework.test.web.client.response.MockRestResponseCreators.*;
 
 @RunWith(SpringRunner.class)
 @SpringBootTest(classes = VnfmAdapterApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT)
@@ -131,7 +132,7 @@
         setUpVimInMockAai();
 
         final String expectedsubscriptionRequest =
-                "{\"filter\":{\"vnfInstanceSubscriptionFilter\":{\"vnfInstanceIds\":[\"vnfId\"]},\"notificationTypes\":[\"VnfLcmOperationOccurrenceNotification\"]},\"callbackUri\":\"https://so-vnfm-adapter.onap:30406/so/vnfm-adapter/v1/lcn/VnfLcmOperationOccurrenceNotification\",\"authentication\":{\"authType\":[\"BASIC\"],\"paramsBasic\":{\"userName\":\"vnfm\",\"password\":\"$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke\"}}}";
+                "{\"filter\":{\"vnfInstanceSubscriptionFilter\":{\"vnfInstanceIds\":[\"vnfId\"]},\"notificationTypes\":[\"VnfLcmOperationOccurrenceNotification\"]},\"callbackUri\":\"https://so-vnfm-adapter.onap:30406/so/vnfm-adapter/v1/lcn/VnfLcmOperationOccurrenceNotification\",\"authentication\":{\"authType\":[\"BASIC\"],\"paramsBasic\":{\"userName\":\"vnfm\",\"password\":\"password1$\"}}}";
         final InlineResponse2001 subscriptionResponse = new InlineResponse2001();
 
         final InlineResponse201 createResponse = createCreateResponse();
diff --git a/asdc-controller/pom.xml b/asdc-controller/pom.xml
index 8317b66..60c517d 100644
--- a/asdc-controller/pom.xml
+++ b/asdc-controller/pom.xml
@@ -16,8 +16,8 @@
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <antlr.version>4.7.1</antlr.version>
     <java.version>1.8</java.version>
-    <sdc.tosca.version>1.5.0</sdc.tosca.version>
-    <jtosca.version>1.5.0</jtosca.version>
+    <sdc.tosca.version>1.5.1</sdc.tosca.version>
+    <jtosca.version>1.5.1</jtosca.version>
   </properties>
 
   <build>
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
index 4e97b5f..ad3e2d8 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
@@ -85,6 +85,7 @@
 import org.onap.so.db.catalog.beans.HeatFiles;
 import org.onap.so.db.catalog.beans.HeatTemplate;
 import org.onap.so.db.catalog.beans.HeatTemplateParam;
+import org.onap.so.db.catalog.beans.InstanceGroup;
 import org.onap.so.db.catalog.beans.InstanceGroupType;
 import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization;
 import org.onap.so.db.catalog.beans.NetworkInstanceGroup;
@@ -1180,6 +1181,8 @@
                     vfModuleArtifact.getArtifactInfo().getArtifactUUID());
             heatTemplate.setParameters(heatParam);
             vfModuleArtifact.setHeatTemplate(heatTemplate);
+        } else {
+            vfModuleArtifact.setHeatTemplate(existingHeatTemplate);
         }
     }
 
@@ -1208,6 +1211,8 @@
                 heatEnvironment.setArtifactChecksum(MANUAL_RECORD);
             }
             vfModuleArtifact.setHeatEnvironment(heatEnvironment);
+        } else {
+            vfModuleArtifact.setHeatEnvironment(existingHeatEnvironment);
         }
     }
 
@@ -1232,7 +1237,8 @@
                 heatFile.setArtifactChecksum(MANUAL_RECORD);
             }
             vfModuleArtifact.setHeatFiles(heatFile);
-
+        } else {
+            vfModuleArtifact.setHeatFiles(existingHeatFiles);
         }
     }
 
@@ -1724,16 +1730,25 @@
             VnfResourceCustomization vnfResourceCustomization, ToscaResourceStructure toscaResourceStructure) {
 
         Metadata instanceMetadata = group.getMetadata();
-        // Populate InstanceGroup
+
+        InstanceGroup existingInstanceGroup =
+                instanceGroupRepo.findByModelUUID(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
+
         VFCInstanceGroup vfcInstanceGroup = new VFCInstanceGroup();
 
-        vfcInstanceGroup.setModelName(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_NAME));
-        vfcInstanceGroup.setModelInvariantUUID(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID));
-        vfcInstanceGroup.setModelUUID(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
-        vfcInstanceGroup.setModelVersion(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_VERSION));
-        vfcInstanceGroup.setToscaNodeType(group.getType());
-        vfcInstanceGroup.setRole("SUB-INTERFACE"); // Set Role
-        vfcInstanceGroup.setType(InstanceGroupType.VNFC); // Set type
+        if (existingInstanceGroup == null) {
+            // Populate InstanceGroup
+            vfcInstanceGroup.setModelName(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_NAME));
+            vfcInstanceGroup
+                    .setModelInvariantUUID(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID));
+            vfcInstanceGroup.setModelUUID(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
+            vfcInstanceGroup.setModelVersion(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_VERSION));
+            vfcInstanceGroup.setToscaNodeType(group.getType());
+            vfcInstanceGroup.setRole("SUB-INTERFACE"); // Set Role
+            vfcInstanceGroup.setType(InstanceGroupType.VNFC); // Set type
+        } else {
+            vfcInstanceGroup = (VFCInstanceGroup) existingInstanceGroup;
+        }
 
         // Populate VNFCInstanceGroupCustomization
         VnfcInstanceGroupCustomization vfcInstanceGroupCustom = new VnfcInstanceGroupCustomization();
diff --git a/bpmn/MSOCommonBPMN/pom.xml b/bpmn/MSOCommonBPMN/pom.xml
index 891a57d..20be69c 100644
--- a/bpmn/MSOCommonBPMN/pom.xml
+++ b/bpmn/MSOCommonBPMN/pom.xml
@@ -364,16 +364,6 @@
       <artifactId>jersey-media-json-jackson</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.onap.sdc.sdc-tosca</groupId>
-      <artifactId>sdc-tosca</artifactId>
-      <version>1.4.4</version>
-    </dependency>
-    <dependency>
-      <groupId>org.onap.sdc.jtosca</groupId>
-      <artifactId>jtosca</artifactId>
-      <version>1.4.4</version>
-    </dependency>
-    <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-test</artifactId>
       <scope>test</scope>
diff --git a/common/src/main/java/org/onap/so/rest/service/HttpRestServiceProviderImpl.java b/common/src/main/java/org/onap/so/rest/service/HttpRestServiceProviderImpl.java
index 8e6ebab..a627e82 100644
--- a/common/src/main/java/org/onap/so/rest/service/HttpRestServiceProviderImpl.java
+++ b/common/src/main/java/org/onap/so/rest/service/HttpRestServiceProviderImpl.java
@@ -96,7 +96,7 @@
 
     private <T> Optional<T> createOptional(final ResponseEntity<T> response, final String url,
             final HttpMethod httpMethod) {
-        if (!response.getStatusCode().equals(HttpStatus.OK)) {
+        if (!response.getStatusCode().equals(HttpStatus.OK) && !response.getStatusCode().equals(HttpStatus.CREATED)) {
             final String message = "Unable to invoke HTTP " + httpMethod + " using URL: " + url + ", Response Code: "
                     + response.getStatusCode();
             LOGGER.error(message);
diff --git a/docs/architecture/SO Internal Arc.pptx b/docs/architecture/SO Internal Arc.pptx
index bff3e35..ee4b112 100644
--- a/docs/architecture/SO Internal Arc.pptx
+++ b/docs/architecture/SO Internal Arc.pptx
Binary files differ
diff --git a/vnfm-simulator/vnf-service/pom.xml b/vnfm-simulator/vnf-service/pom.xml
deleted file mode 100644
index 9a6825c..0000000
--- a/vnfm-simulator/vnf-service/pom.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<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.onap.vnfm</groupId>
-		<artifactId>vnfm-simulator</artifactId>
-		<version>0.0.1-SNAPSHOT</version>
-	</parent>
-	<artifactId>vnf-service</artifactId>
-
-
-	<properties>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<java.version>1.8</java.version>
-	</properties>
-
-	<dependencies>
-
-		<dependency>
-			<groupId>org.onap.vnfm</groupId>
-			<artifactId>vnfm-api</artifactId>
-			<version>${project.version}</version>
-
-		</dependency>
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-web</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-actuator</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-test</artifactId>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>io.swagger</groupId>
-			<artifactId>swagger-jaxrs</artifactId>
-			<version>1.5.0</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.directory.studio</groupId>
-			<artifactId>org.apache.commons.io</artifactId>
-			<version>2.4</version>
-		</dependency>
-		<dependency>
-			<groupId>com.googlecode.json-simple</groupId>
-			<artifactId>json-simple</artifactId>
-			<version>1.1.1</version>
-		</dependency>
-
-		<dependency>
-			<groupId>io.springfox</groupId>
-			<artifactId>springfox-swagger-ui</artifactId>
-			<version>2.6.1</version>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>io.springfox</groupId>
-			<artifactId>springfox-swagger2</artifactId>
-			<version>2.6.1</version>
-			<scope>compile</scope>
-		</dependency>
-		<dependency>
-			<groupId>com.fasterxml.jackson.core</groupId>
-			<artifactId>jackson-databind</artifactId>
-			<version>2.9.8</version>
-		</dependency>
-
-	</dependencies>
-</project>
\ No newline at end of file
diff --git a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/controller/SvnfmController.java b/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/controller/SvnfmController.java
deleted file mode 100644
index b9703b3..0000000
--- a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/controller/SvnfmController.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.svnfm.simulator.controller;
-
-import javax.ws.rs.core.MediaType;
-
-import org.onap.svnfm.simulator.services.SvnfmService;
-import org.onap.vnfm.v1.model.CreateVnfRequest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * This class contains the VNF life cycle management operations
- * 
- * @author ronan.kenny@est.tech
- *
- */
-
-/**
- * TO DO
- *
- * Implement Exception handling Implement VNFM adaptor call Identify the Create
- * VNF response Test itwith the VNFM Adaptor
- */
-
-@RestController
-@RequestMapping("/svnfm")
-
-public class SvnfmController {
-
-	@Autowired
-	private SvnfmService svnfmService;
-
-	private static final Logger LOGGER = LoggerFactory.getLogger(SvnfmController.class);
-
-	@RequestMapping(method = RequestMethod.POST, value = "/vnf_instances")
-	public ResponseEntity<Object> createVNFInstance(@RequestBody final CreateVnfRequest createVNFRequest) {
-		LOGGER.info("Start createVNFInstance");
-		HttpHeaders headers = new HttpHeaders();
-		headers.add("Content-Type", MediaType.APPLICATION_JSON);
-		return new ResponseEntity<>(svnfmService.createVNF(), headers, HttpStatus.CREATED);
-	}
-}
diff --git a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/controller/SvnfmHealthcheck.java b/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/controller/SvnfmHealthcheck.java
deleted file mode 100644
index e6f55f6..0000000
--- a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/controller/SvnfmHealthcheck.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.svnfm.simulator.controller;
-
-import org.onap.svnfm.simulator.exception.InvalidRestRequestException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-
-/**
- * TO DO
- *
- * Implement Exception handling 
- * Implement VNFM adaptor call 
- * Identify the Create VNF response 
- * Test it with the VNFM Adaptor
- */
-
-@RestController
-@RequestMapping("/svnfm")
-public class SvnfmHealthcheck {
-    
-    private static final Logger LOGGER = LoggerFactory.getLogger(SvnfmHealthcheck.class);
-
-    @RequestMapping(method = RequestMethod.GET, value = "/healthcheck")
-    public ResponseEntity<String> healthCheck() {
-        try {
-            return new ResponseEntity<>(HttpStatus.OK);
-        } catch (final InvalidRestRequestException extensions) {
-            final String message = "Not Found";
-            LOGGER.error(message);
-            return new ResponseEntity<>(message, HttpStatus.NOT_FOUND);
-        }
-    }
-}
diff --git a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/GlobalExceptionHandler.java b/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/GlobalExceptionHandler.java
deleted file mode 100644
index a06f2d2..0000000
--- a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/GlobalExceptionHandler.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.onap.svnfm.simulator.exception;
-
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.converter.HttpMessageNotReadableException;
-import org.springframework.web.HttpMediaTypeNotSupportedException;
-import org.springframework.web.bind.annotation.ControllerAdvice;
-import org.springframework.web.context.request.WebRequest;
-import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
-
-@ControllerAdvice
-public class GlobalExceptionHandler extends ResponseEntityExceptionHandler {
-	@Override
-	protected ResponseEntity<Object> handleHttpMessageNotReadable(HttpMessageNotReadableException ex,
-			HttpHeaders headers, HttpStatus status, WebRequest request) {
-		String error = "Malformed JSON request";
-		return new ResponseEntity<>(error, HttpStatus.BAD_REQUEST);
-	}
-
-	@Override
-	protected ResponseEntity<Object> handleHttpMediaTypeNotSupported(HttpMediaTypeNotSupportedException ex,
-			HttpHeaders headers, HttpStatus status, WebRequest request) {
-		String error = "Media type Not Supported";
-		return new ResponseEntity<>(error, HttpStatus.UNSUPPORTED_MEDIA_TYPE);
-	}
-}
diff --git a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/InvalidRestRequestException.java b/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/InvalidRestRequestException.java
deleted file mode 100644
index eabd4ec..0000000
--- a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/InvalidRestRequestException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.svnfm.simulator.exception;
-
-/**
- * @author ronan.kenny@est.tech
- *
- */
-public class InvalidRestRequestException extends RuntimeException {
-
-    private static final long serialVersionUID = 3977807111893986938L;
-
-    public InvalidRestRequestException(final String message) {
-        super(message);
-    }
-
-    public InvalidRestRequestException(final String message, final Throwable cause) {
-        super(message, cause);
-    }
-}
diff --git a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/RestProcessingException.java b/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/RestProcessingException.java
deleted file mode 100644
index c84416e..0000000
--- a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/exception/RestProcessingException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.svnfm.simulator.exception;
-
-/**
- * @author ronan.kenny@est.tech
- *
- */
-public class RestProcessingException extends RuntimeException {
-
-    private static final long serialVersionUID = 16862313537198441L;
-
-    public RestProcessingException(final String message) {
-        super(message);
-    }
-
-    public RestProcessingException(final String message, final Throwable cause) {
-        super(message, cause);
-    }
-}
diff --git a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/services/SvnfmService.java b/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/services/SvnfmService.java
deleted file mode 100644
index e2dc43a..0000000
--- a/vnfm-simulator/vnf-service/src/main/java/org/onap/svnfm/simulator/services/SvnfmService.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Ericsson. 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.
- * 
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.svnfm.simulator.services;
-
-import java.io.IOException;
-
-import org.apache.commons.io.IOUtils;
-import org.onap.svnfm.simulator.notifications.VnfmAdapterCreationNotification;
-import org.onap.vnfm.v1.model.InlineResponse201;
-import org.springframework.stereotype.Service;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-/**
- * This class handles the logic of VNF lifecycle
- * 
- * @author Lathishbabu Ganesan (lathishbabu.ganesan@est.tech)
- *
- */
-@Service
-public class SvnfmService {
-
-	/**
-	 * This method read the create VNF response from the json file and return it
-	 * to the VNFM Adaptor
-	 * 
-	 * @return
-	 */
-	public InlineResponse201 createVNF() {
-		Thread creationNodtification = new Thread(new VnfmAdapterCreationNotification());
-		creationNodtification.start();
-		ObjectMapper mapper = new ObjectMapper();
-		InlineResponse201 inlineResponse201 = null;
-		try {
-			inlineResponse201 = mapper.readValue(
-					IOUtils.toString(getClass().getClassLoader().getResource("json/createVNFResponse.json")),
-					InlineResponse201.class);
-		} catch (IOException e) {
-			e.printStackTrace();
-		}
-		return inlineResponse201;
-	}
-}
diff --git a/vnfm-simulator/vnf-service/src/main/resources/json/createVNFResponse.json b/vnfm-simulator/vnf-service/src/main/resources/json/createVNFResponse.json
deleted file mode 100644
index a66bcc1..0000000
--- a/vnfm-simulator/vnf-service/src/main/resources/json/createVNFResponse.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
-     "id": "147d9468-4646-11e9-80af-fa163e169afd",
-     "vnfInstanceName": "MME85_8.EricssonMMEVSPV2_0",
-     "vnfInstanceDescription": "2f3e21dd-99ba-45b1-b4da-1f71283c46f6",
-     "vnfdId": "sgsn-mme_onapmme01_cxp9025898_4r85d01",
-     "vnfProvider": "Ericsson",
-     "vnfProductName": "SGSN-MME",
-     "vnfSoftwareVersion": "1.24 (CXS101289_R85D01)",
-     "vnfdVersion": "onapmme01_cxp9025898_4r85d01",
-     "vnfPkgId": null,
-     "vnfConfigurableProperties": null,
-     "vimConnectionInfo": null,
-     "instantiationState": "NOT_INSTANTIATED",
-     "instantiatedVnfInfo": null,
-     "metadata": null,
-     "extensions": null,
-     "links": null
-
-}
diff --git a/vnfm-simulator/vnfm-service/pom.xml b/vnfm-simulator/vnfm-service/pom.xml
index 3f4f451..380381f 100644
--- a/vnfm-simulator/vnfm-service/pom.xml
+++ b/vnfm-simulator/vnfm-service/pom.xml
@@ -1,116 +1,149 @@
-<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.onap.so.vnfm</groupId>
-    <artifactId>vnfm-simulator</artifactId>
-    <version>1.4.0-SNAPSHOT</version>
-  </parent>
-  <artifactId>vnfm-service</artifactId>
-  <name>${project.artifactId}</name>
+<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.onap.so.vnfm</groupId>
+        <artifactId>vnfm-simulator</artifactId>
+        <version>1.4.0-SNAPSHOT</version>
+    </parent>
+    <artifactId>vnfm-service</artifactId>
+    <name>${project.artifactId}</name>
 
-  <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <java.version>1.8</java.version>
-  </properties>
-  <dependencies>
-    <dependency>
-      <groupId>org.onap.so.vnfm</groupId>
-      <artifactId>vnfm-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-starter-web</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-starter-data-jpa</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-starter-actuator</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-starter-test</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.boot</groupId>
-      <artifactId>spring-boot-devtools</artifactId>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>io.swagger</groupId>
-      <artifactId>swagger-jaxrs</artifactId>
-      <version>1.5.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.directory.studio</groupId>
-      <artifactId>org.apache.commons.io</artifactId>
-      <version>2.4</version>
-    </dependency>
-    <dependency>
-      <groupId>com.googlecode.json-simple</groupId>
-      <artifactId>json-simple</artifactId>
-      <version>1.1.1</version>
-    </dependency>
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <java.version>1.8</java.version>
+        <okhttp-version>2.7.5</okhttp-version>
+        <gson-version>2.8.1</gson-version>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.onap.so.adapters</groupId>
+            <artifactId>mso-vnfm-adapter-ext-clients</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-jaxrs</artifactId>
+            <version>1.5.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.directory.studio</groupId>
+            <artifactId>org.apache.commons.io</artifactId>
+            <version>2.4</version>
+        </dependency>
+        <dependency>
+            <groupId>com.googlecode.json-simple</groupId>
+            <artifactId>json-simple</artifactId>
+            <version>1.1.1</version>
+        </dependency>
 
-    <dependency>
-      <groupId>io.springfox</groupId>
-      <artifactId>springfox-swagger-ui</artifactId>
-      <version>2.6.1</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>io.springfox</groupId>
-      <artifactId>springfox-swagger2</artifactId>
-      <version>2.6.1</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-databind</artifactId>
-      <version>2.9.8</version>
-    </dependency>
-    <dependency>
-      <groupId>com.h2database</groupId>
-      <artifactId>h2</artifactId>
-    </dependency>
-    <!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils -->
-    <dependency>
-      <groupId>commons-beanutils</groupId>
-      <artifactId>commons-beanutils</artifactId>
-      <version>1.9.3</version>
-    </dependency>
-  </dependencies>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.springframework.boot</groupId>
-        <artifactId>spring-boot-maven-plugin</artifactId>
-        <version>${springboot.version}</version>
-        <configuration>
-          <mainClass>org.onap.svnfm.simulator.config.SvnfmApplication</mainClass>
-        </configuration>
-        <executions>
-          <execution>
-            <goals>
-              <goal>repackage</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.springframework.boot</groupId>
-        <artifactId>spring-boot-maven-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-</project>
\ No newline at end of file
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>2.6.1</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>2.6.1</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <version>2.9.8</version>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils -->
+        <dependency>
+            <groupId>commons-beanutils</groupId>
+            <artifactId>commons-beanutils</artifactId>
+            <version>1.9.3</version>
+        </dependency>
+        <dependency>
+            <groupId>org.modelmapper</groupId>
+            <artifactId>modelmapper</artifactId>
+            <version>2.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.squareup.okio</groupId>
+            <artifactId>okio</artifactId>
+            <version>1.13.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.squareup.okhttp</groupId>
+            <artifactId>okhttp</artifactId>
+            <version>${okhttp-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.squareup.okhttp</groupId>
+            <artifactId>logging-interceptor</artifactId>
+            <version>${okhttp-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>${gson-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.so</groupId>
+            <artifactId>common</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>${springboot.version}</version>
+                <configuration>
+                    <mainClass>org.onap.svnfm.simulator.config.SvnfmApplication</mainClass>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/ApplicationConfig.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/ApplicationConfig.java
new file mode 100644
index 0000000..91b7975
--- /dev/null
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/ApplicationConfig.java
@@ -0,0 +1,43 @@
+package org.onap.svnfm.simulator.config;
+
+import java.net.InetAddress;
+import java.util.Arrays;
+import org.onap.svnfm.simulator.constants.Constant;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.ApplicationArguments;
+import org.springframework.boot.ApplicationRunner;
+import org.springframework.cache.Cache;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.concurrent.ConcurrentMapCache;
+import org.springframework.cache.support.SimpleCacheManager;
+import org.springframework.context.annotation.Bean;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Component;
+
+@Component
+public class ApplicationConfig implements ApplicationRunner {
+
+    private static final String PORT = "local.server.port";
+
+    @Autowired
+    private Environment environment;
+
+    private String baseUrl;
+
+    @Override
+    public void run(final ApplicationArguments args) throws Exception {
+        baseUrl = "http://" + InetAddress.getLocalHost().getHostAddress() + ":" + environment.getProperty(PORT);
+    }
+
+    public String getBaseUrl() {
+        return baseUrl;
+    }
+
+    @Bean
+    public CacheManager cacheManager() {
+        Cache inlineResponse201 = new ConcurrentMapCache(Constant.IN_LINE_RESPONSE_201_CACHE);
+        SimpleCacheManager manager = new SimpleCacheManager();
+        manager.setCaches(Arrays.asList(inlineResponse201));
+        return manager;
+    }
+}
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/SvnfmApplication.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/SvnfmApplication.java
index 84b45d0..723ae90 100644
--- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/SvnfmApplication.java
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/SvnfmApplication.java
@@ -20,6 +20,7 @@
 
 package org.onap.svnfm.simulator.config;
 
+import org.onap.svnfm.simulator.controller.SvnfmController;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.domain.EntityScan;
@@ -27,7 +28,10 @@
 import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
 
 /**
- * 
+ * The spring boot application for the VNF LCM.
+ * <p>
+ * The VNFM receives requests through its REST API {@link SvnfmController}
+ *
  * @author Lathishbabu Ganesan (lathishbabu.ganesan@est.tech)
  * @author ronan.kenny@est.tech
  */
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/WebSecurityConfigImpl.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/WebSecurityConfigImpl.java
new file mode 100644
index 0000000..18eadd2
--- /dev/null
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/config/WebSecurityConfigImpl.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.svnfm.simulator.config;
+
+import org.onap.so.security.MSOSpringFirewall;
+import org.onap.so.security.WebSecurityConfig;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.builders.WebSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.web.firewall.StrictHttpFirewall;
+
+/**
+ * Configure the web security for the application.
+ */
+@EnableWebSecurity
+public class WebSecurityConfigImpl extends WebSecurityConfig {
+
+    @Override
+    protected void configure(final HttpSecurity http) throws Exception {
+        http.csrf().disable().authorizeRequests().antMatchers("/**").permitAll();
+    }
+
+    @Override
+    public void configure(final WebSecurity web) throws Exception {
+        super.configure(web);
+        final StrictHttpFirewall firewall = new MSOSpringFirewall();
+        web.httpFirewall(firewall);
+    }
+
+}
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/constants/Constant.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/constants/Constant.java
index bd38090..98f47bf 100644
--- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/constants/Constant.java
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/constants/Constant.java
@@ -27,9 +27,13 @@
  */
 public class Constant {
 
+    public static final String BASE_URL = "/vnflcm/v1";
     public static final String VNF_PROVIDER = "XYZ";
-    public static final String VNF_PROVIDER_NAME = "SGSN-MME";
+    public static final String VNF_PROVIDER_NAME = "vCPE";
     public static final String VNF_SOFTWARE_VERSION = "1.24";
-    public static final String VNFD_VERSION = "onapmme01_cxp9025898_4r85d01";
+    public static final String VNFD_VERSION = "onapvcpe01_cxp9025898_4r85d01";
     public static final String VNF_NOT_INSTANTIATED = "NOT_INSTANTIATED";
+    public static final String VNF_CONFIG_PROPERTIES =
+            "{\"isAutoScaleEnabled\": \"true\",\"isAutoHealingEnabled\": \"true\"}";
+    public static final String IN_LINE_RESPONSE_201_CACHE = "inlineResponse201";
 }
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/controller/SvnfmController.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/controller/SvnfmController.java
index 11099a2..9c3a02d 100644
--- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/controller/SvnfmController.java
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/controller/SvnfmController.java
@@ -22,30 +22,37 @@
 
 import java.util.UUID;
 import javax.ws.rs.core.MediaType;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.CreateVnfRequest;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse200;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse2001;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InstantiateVnfRequest;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.LccnSubscriptionRequest;
+import org.onap.svnfm.simulator.constants.Constant;
 import org.onap.svnfm.simulator.repository.VnfmCacheRepository;
 import org.onap.svnfm.simulator.services.SvnfmService;
-import org.onap.vnfm.v1.model.CreateVnfRequest;
-import org.onap.vnfm.v1.model.InlineResponse201;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseStatus;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
- * 
+ *
  * @author Lathishbabu Ganesan (lathishbabu.ganesan@est.tech)
  * @author Ronan Kenny (ronan.kenny@est.tech)
  */
 @RestController
-@RequestMapping("/svnfm")
+@RequestMapping(path = Constant.BASE_URL, produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
 public class SvnfmController {
 
     @Autowired
@@ -57,25 +64,30 @@
     private static final Logger LOGGER = LoggerFactory.getLogger(SvnfmController.class);
 
     /**
-     * 
-     * @param createVNFRequest
-     * @return
+     * To create the Vnf and stores the response in cache
+     *
+     * @param CreateVnfRequest
+     * @return InlineResponse201
      */
-    @RequestMapping(method = RequestMethod.POST, value = "/vnf_instances")
+    @PostMapping(value = "/vnf_instances")
     public ResponseEntity<InlineResponse201> createVnf(@RequestBody final CreateVnfRequest createVNFRequest) {
-        LOGGER.info("Start createVnf------");
+        LOGGER.info("Start createVnf {}", createVNFRequest);
+        final String id = UUID.randomUUID().toString();
         final HttpHeaders headers = new HttpHeaders();
-        headers.add("Content-Type", MediaType.APPLICATION_JSON);
-        return new ResponseEntity<>(vnfmCacheRepository.createVnf(createVNFRequest), headers, HttpStatus.CREATED);
+        headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
+        final ResponseEntity<InlineResponse201> responseEntity =
+                new ResponseEntity<>(vnfmCacheRepository.createVnf(createVNFRequest, id), headers, HttpStatus.CREATED);
+        LOGGER.info("Finished create {}", responseEntity);
+        return responseEntity;
     }
 
     /**
-     * 
+     * Get the vnf by id from cache
+     *
      * @param vnfId
-     * @return vnfm cache repository
+     * @return InlineResponse201
      */
-    @RequestMapping(method = RequestMethod.GET, value = "/vnf_instances/{vnfInstanceId}",
-            produces = MediaType.APPLICATION_JSON)
+    @GetMapping(value = "/vnf_instances/{vnfInstanceId}")
     @ResponseStatus(code = HttpStatus.OK)
     public InlineResponse201 getVnf(@PathVariable("vnfInstanceId") final String vnfId) {
         LOGGER.info("Start getVnf------");
@@ -83,60 +95,79 @@
     }
 
     /**
-     * 
+     * To instantiate the vnf and returns the operation id
+     *
      * @param vnfId
-     * @return response entity
      * @throws InterruptedException
      */
-    @RequestMapping(method = RequestMethod.POST, value = "/vnf_instances/{vnfInstanceId}/instantiate")
-    public ResponseEntity<Object> instantiateVnf(@PathVariable("vnfInstanceId") final String vnfId)
-            throws InterruptedException {
-        LOGGER.info("Start instantiateVNFRequest");
-        final String instantiateJobId = UUID.randomUUID().toString();
+    @PostMapping(value = "/vnf_instances/{vnfInstanceId}/instantiate")
+    public ResponseEntity<Void> instantiateVnf(@PathVariable("vnfInstanceId") final String vnfId,
+            @RequestBody final InstantiateVnfRequest instantiateVNFRequest) {
+        LOGGER.info("Start instantiateVNFRequest {} ", instantiateVNFRequest);
+
         final HttpHeaders headers = new HttpHeaders();
-        headers.add("Content-Type", MediaType.APPLICATION_JSON);
-        headers.add("Location", instantiateJobId);
-        return new ResponseEntity<>(svnfmService.instatiateVnf(vnfId, instantiateJobId), headers, HttpStatus.ACCEPTED);
+        headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
+        headers.add(HttpHeaders.LOCATION, svnfmService.instantiateVnf(vnfId, instantiateVNFRequest));
+        return new ResponseEntity<>(headers, HttpStatus.ACCEPTED);
     }
 
     /**
-     * 
-     * @param jobId
-     * @return response entity
-     * @throws InterruptedException
-     */
-    public ResponseEntity<Object> getJobStatus(@PathVariable("jobId") final String jobId) throws InterruptedException {
-        LOGGER.info("Start getJobStatus");
-        final HttpHeaders headers = new HttpHeaders();
-        headers.add("Content-Type", MediaType.APPLICATION_JSON);
-        return new ResponseEntity<>(svnfmService.getJobStatus(jobId), headers, HttpStatus.ACCEPTED);
-    }
-
-    /**
-     * 
+     * To delete the vnf by id
+     *
      * @param vnfId
-     * @return delete VNF
+     * @return InlineResponse201
      */
-    @RequestMapping(method = RequestMethod.DELETE, value = "/vnf_instances/{vnfInstanceId}",
-            produces = MediaType.APPLICATION_JSON)
+    @DeleteMapping(value = "/vnf_instances/{vnfInstanceId}")
     @ResponseStatus(code = HttpStatus.OK)
-    public InlineResponse201 deleteVnf(@PathVariable("vnfInstanceId") final String vnfId) {
+    public ResponseEntity<Void> deleteVnf(@PathVariable("vnfInstanceId") final String vnfId) {
         LOGGER.info("Start deleting Vnf------");
-        return vnfmCacheRepository.deleteVnf(vnfId);
+        vnfmCacheRepository.deleteVnf(vnfId);
+        final HttpHeaders headers = new HttpHeaders();
+        headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
+        return new ResponseEntity<>(headers, HttpStatus.NO_CONTENT);
     }
 
     /**
-     * 
+     * To terminate the vnf by id
+     *
      * @param vnfId
+     * @throws InterruptedException
+     */
+    @PostMapping(value = "/vnf_instances/{vnfInstanceId}/terminate")
+    public ResponseEntity<Object> terminateVnf(@PathVariable("vnfInstanceId") final String vnfId) {
+        LOGGER.info("Start terminateVNFRequest {}", vnfId);
+        final HttpHeaders headers = new HttpHeaders();
+        headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
+        headers.add(HttpHeaders.LOCATION, svnfmService.terminateVnf(vnfId));
+        return new ResponseEntity<>(headers, HttpStatus.ACCEPTED);
+    }
+
+
+    /**
+     * To get the status of the operation by id
+     *
+     * @param operationId
      * @return response entity
      * @throws InterruptedException
      */
-    @RequestMapping(method = RequestMethod.POST, value = "/vnf_instances/{vnfInstanceId}/terminate")
-    public ResponseEntity<Object> terminateVnf(@PathVariable("vnfInstanceId") final String vnfId)
-            throws InterruptedException {
-        LOGGER.info("Start terminateVNFRequest");
+    @GetMapping(value = "/vnf_lcm_op_occs/{vnfLcmOpOccId}")
+    public ResponseEntity<InlineResponse200> getOperationStatus(
+            @PathVariable("vnfLcmOpOccId") final String operationId) {
+        LOGGER.info("Start getOperationStatus");
         final HttpHeaders headers = new HttpHeaders();
         headers.add("Content-Type", MediaType.APPLICATION_JSON);
-        return new ResponseEntity<>(svnfmService.terminateVnf(vnfId), headers, HttpStatus.ACCEPTED);
+        return new ResponseEntity<>(svnfmService.getOperationStatus(operationId), headers, HttpStatus.OK);
+    }
+
+    @PostMapping(value = "/subscriptions")
+    public ResponseEntity<InlineResponse2001> subscribeForNotifications(
+            @RequestBody final LccnSubscriptionRequest lccnSubscriptionRequest) {
+        LOGGER.info("Subscription request received: {}", lccnSubscriptionRequest);
+        svnfmService.registerSubscription(lccnSubscriptionRequest);
+        final InlineResponse2001 response = new InlineResponse2001();
+
+        final HttpHeaders headers = new HttpHeaders();
+        headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
+        return new ResponseEntity<>(response, headers, HttpStatus.OK);
     }
 }
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/VnfJob.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/VnfJob.java
deleted file mode 100644
index 575223c..0000000
--- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/VnfJob.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-package org.onap.svnfm.simulator.model;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-/**
- * 
- * @author Lathishbabu Ganesan (lathishbabu.ganesan@est.tech)
- * @author Ronan Kenny (ronan.kenny@est.tech)
- */
-@Entity
-@Table(name = "VNF_JOB")
-public class VnfJob {
-    @Id
-    @Column(name = "jobId", nullable = false)
-    private String jobId;
-    private String vnfInstanceId;
-    private String vnfId;
-    private String status;
-
-    public String getJobId() {
-        return jobId;
-    }
-
-    public void setJobId(final String jobId) {
-        this.jobId = jobId;
-    }
-
-    public String getVnfInstanceId() {
-        return vnfInstanceId;
-    }
-
-    public void setVnfInstanceId(final String vnfInstanceId) {
-        this.vnfInstanceId = vnfInstanceId;
-    }
-
-    public String getVnfId() {
-        return vnfId;
-    }
-
-    public void setVnfId(final String vnfId) {
-        this.vnfId = vnfId;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(final String status) {
-        this.status = status;
-    }
-}
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/VnfOperation.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/VnfOperation.java
new file mode 100644
index 0000000..c37f433
--- /dev/null
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/VnfOperation.java
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.svnfm.simulator.model;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse200;
+
+/**
+ *
+ * @author Lathishbabu Ganesan (lathishbabu.ganesan@est.tech)
+ * @author Ronan Kenny (ronan.kenny@est.tech)
+ */
+@Entity
+@Table(name = "VNF_OPERATION")
+public class VnfOperation {
+    @Id
+    @Column(name = "operationId", nullable = false)
+    private String id;
+    private String vnfInstanceId;
+
+    @Enumerated(EnumType.STRING)
+    private InlineResponse200.OperationEnum operation;
+
+    @Enumerated(EnumType.STRING)
+    private InlineResponse200.OperationStateEnum operationState;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(final String id) {
+        this.id = id;
+    }
+
+    public String getVnfInstanceId() {
+        return vnfInstanceId;
+    }
+
+    public void setVnfInstanceId(final String vnfInstanceId) {
+        this.vnfInstanceId = vnfInstanceId;
+    }
+
+    public InlineResponse200.OperationEnum getOperation() {
+        return operation;
+    }
+
+    public void setOperation(final InlineResponse200.OperationEnum operation) {
+        this.operation = operation;
+    }
+
+    public InlineResponse200.OperationStateEnum getOperationState() {
+        return operationState;
+    }
+
+    public void setOperationState(final InlineResponse200.OperationStateEnum operationState) {
+        this.operationState = operationState;
+    }
+}
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/Vnfds.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/Vnfds.java
new file mode 100644
index 0000000..ea171f0
--- /dev/null
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/model/Vnfds.java
@@ -0,0 +1,97 @@
+package org.onap.svnfm.simulator.model;
+
+import java.util.List;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+@ConfigurationProperties(prefix = "vnfds")
+@Component
+public class Vnfds {
+
+    private List<Vnfd> vnfdList;
+
+    public static class Vnfd {
+
+        private String vnfdId;
+        private List<Vnfc> vnfclist;
+
+
+        public String getVnfdId() {
+            return vnfdId;
+        }
+
+        public void setVnfdId(final String vnfdId) {
+            this.vnfdId = vnfdId;
+        }
+
+        public List<Vnfc> getVnfcList() {
+            return vnfclist;
+        }
+
+        public void setVnfcList(final List<Vnfc> vnfclist) {
+            this.vnfclist = vnfclist;
+        }
+    }
+
+
+    public static class Vnfc {
+
+        private String vnfcId;
+        private String type;
+        private String vduId;
+        private String resourceTemplateId;
+        private String grantResourceId;
+
+        public String getVnfcId() {
+            return vnfcId;
+        }
+
+        public void setVnfcId(final String vnfcId) {
+            this.vnfcId = vnfcId;
+        }
+
+        public String getVduId() {
+            return vduId;
+        }
+
+        public void setVduId(final String vduId) {
+            this.vduId = vduId;
+        }
+
+        public String getType() {
+            return type;
+        }
+
+        public void setType(final String type) {
+            this.type = type;
+        }
+
+        public String getResourceTemplateId() {
+            return resourceTemplateId;
+        }
+
+        public void setResourceTemplateId(final String resourceTemplateId) {
+            this.resourceTemplateId = resourceTemplateId;
+        }
+
+        public String getGrantResourceId() {
+            return grantResourceId;
+        }
+
+        public void setGrantResourceId(final String grantResourceId) {
+            this.grantResourceId = grantResourceId;
+        }
+
+    }
+
+
+    public List<Vnfd> getVnfdList() {
+        return vnfdList;
+    }
+
+
+    public void setVnfdList(final List<Vnfd> vnfdList) {
+        this.vnfdList = vnfdList;
+    }
+
+}
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/repository/VnfJobRepository.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/repository/VnfOperationRepository.java
similarity index 88%
rename from vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/repository/VnfJobRepository.java
rename to vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/repository/VnfOperationRepository.java
index b3b39bf..43c2017 100644
--- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/repository/VnfJobRepository.java
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/repository/VnfOperationRepository.java
@@ -20,7 +20,7 @@
 
 package org.onap.svnfm.simulator.repository;
 
-import org.onap.svnfm.simulator.model.VnfJob;
+import org.onap.svnfm.simulator.model.VnfOperation;
 import org.springframework.data.repository.CrudRepository;
 
 /**
@@ -28,6 +28,6 @@
  * @author Lathishbabu Ganesan (lathishbabu.ganesan@est.tech)
  * @author Ronan Kenny (ronan.kenny@est.tech)
  */
-public interface VnfJobRepository extends CrudRepository<VnfJob, String> {
+public interface VnfOperationRepository extends CrudRepository<VnfOperation, String> {
 
 }
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/repository/VnfmCacheRepository.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/repository/VnfmCacheRepository.java
index e41cbe1..fbdbf74 100644
--- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/repository/VnfmCacheRepository.java
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/repository/VnfmCacheRepository.java
@@ -20,15 +20,17 @@
 
 package org.onap.svnfm.simulator.repository;
 
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.CreateVnfRequest;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201;
+import org.onap.svnfm.simulator.constants.Constant;
 import org.onap.svnfm.simulator.services.SvnfmService;
-import org.onap.vnfm.v1.model.CreateVnfRequest;
-import org.onap.vnfm.v1.model.InlineResponse201;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Repository;
 
 /**
- * 
+ *
  * @author Lathishbabu Ganesan (lathishbabu.ganesan@est.tech)
  * @author Ronan Kenny (ronan.kenny@est.tech)
  */
@@ -38,12 +40,13 @@
     @Autowired
     private SvnfmService svnfmService;
 
-    @Cacheable(value = "inlineResponse201", key = "#createVnfRequest.vnfdId")
-    public InlineResponse201 createVnf(final CreateVnfRequest createVnfRequest) {
-        return svnfmService.createVnf(createVnfRequest);
+    @Cacheable(value = Constant.IN_LINE_RESPONSE_201_CACHE, key = "#id")
+    public InlineResponse201 createVnf(final CreateVnfRequest createVnfRequest, final String id) {
+        return svnfmService.createVnf(createVnfRequest, id);
     }
 
-    @Cacheable(value = "inlineResponse201", key = "#id")
+
+
     public InlineResponse201 getVnf(final String id) {
         return svnfmService.getVnf(id);
     }
@@ -52,8 +55,6 @@
      * @param vnfId
      * @return
      */
-    public InlineResponse201 deleteVnf(String vnfId) {
-        // TODO
-        return null;
-    }
+    @CacheEvict(value = Constant.IN_LINE_RESPONSE_201_CACHE, key = "#id")
+    public void deleteVnf(final String id) {}
 }
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/InstantiateOperationProgressor.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/InstantiateOperationProgressor.java
new file mode 100644
index 0000000..020fa03
--- /dev/null
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/InstantiateOperationProgressor.java
@@ -0,0 +1,123 @@
+package org.onap.svnfm.simulator.services;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import org.modelmapper.ModelMapper;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantsAddResources;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantsAddResources.TypeEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.InlineResponse201;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.InlineResponse201AddResources;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.InlineResponse201VimConnections;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs.ChangeTypeEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201.InstantiationStateEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201InstantiatedVnfInfo;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201InstantiatedVnfInfoResourceHandle;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201InstantiatedVnfInfoVnfcResourceInfo;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201VimConnectionInfo;
+import org.onap.svnfm.simulator.config.ApplicationConfig;
+import org.onap.svnfm.simulator.model.VnfOperation;
+import org.onap.svnfm.simulator.model.Vnfds;
+import org.onap.svnfm.simulator.model.Vnfds.Vnfc;
+import org.onap.svnfm.simulator.model.Vnfds.Vnfd;
+import org.onap.svnfm.simulator.repository.VnfOperationRepository;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class InstantiateOperationProgressor extends OperationProgressor {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(InstantiateOperationProgressor.class);
+
+    public InstantiateOperationProgressor(final VnfOperation operation, final SvnfmService svnfmService,
+            final VnfOperationRepository vnfOperationRepository, final ApplicationConfig applicationConfig,
+            final Vnfds vnfds, final SubscriptionService subscriptionService) {
+        super(operation, svnfmService, vnfOperationRepository, applicationConfig, vnfds, subscriptionService);
+    }
+
+    @Override
+    protected List<GrantsAddResources> getAddResources(final String vnfdId) {
+        final List<GrantsAddResources> resources = new ArrayList<>();
+
+        for (final Vnfd vnfd : vnfds.getVnfdList()) {
+            if (vnfd.getVnfdId().equals(vnfdId)) {
+                for (final Vnfc vnfc : vnfd.getVnfcList()) {
+                    final GrantsAddResources addResource = new GrantsAddResources();
+                    vnfc.setGrantResourceId(UUID.randomUUID().toString());
+                    addResource.setId(vnfc.getGrantResourceId());
+                    addResource.setType(TypeEnum.fromValue(vnfc.getType()));
+                    addResource.setResourceTemplateId(vnfc.getResourceTemplateId());
+                    addResource.setVduId(vnfc.getVduId());
+                    resources.add(addResource);
+                }
+            }
+        }
+        return resources;
+    }
+
+    @Override
+    protected List<GrantsAddResources> getRemoveResources(final String vnfdId) {
+        return Collections.emptyList();
+    }
+
+    @Override
+    protected List<InlineResponse201InstantiatedVnfInfoVnfcResourceInfo> handleGrantResponse(
+            final InlineResponse201 grantResponse) {
+        final InlineResponse201InstantiatedVnfInfo instantiatedVnfInfo = createInstantiatedVnfInfo(grantResponse);
+        svnfmService.updateVnf(InstantiationStateEnum.INSTANTIATED, instantiatedVnfInfo, operation.getVnfInstanceId(),
+                getVimConnections(grantResponse));
+        return instantiatedVnfInfo.getVnfcResourceInfo();
+    }
+
+    private InlineResponse201InstantiatedVnfInfo createInstantiatedVnfInfo(final InlineResponse201 grantResponse) {
+        final InlineResponse201InstantiatedVnfInfo instantiatedVnfInfo = new InlineResponse201InstantiatedVnfInfo();
+
+        final Map<String, String> mapOfGrantResourceIdToVimConnectionId = new HashMap<>();
+        for (final InlineResponse201AddResources addResource : grantResponse.getAddResources()) {
+            mapOfGrantResourceIdToVimConnectionId.put(addResource.getResourceDefinitionId(),
+                    addResource.getVimConnectionId());
+        }
+        LOGGER.info("VIM connections in grant response: {}", mapOfGrantResourceIdToVimConnectionId);
+
+        for (final Vnfd vnfd : vnfds.getVnfdList()) {
+            if (vnfd.getVnfdId().equals(svnfmService.getVnf(operation.getVnfInstanceId()).getVnfdId())) {
+                for (final Vnfc vnfc : vnfd.getVnfcList()) {
+                    final InlineResponse201InstantiatedVnfInfoVnfcResourceInfo vnfcResourceInfoItem =
+                            new InlineResponse201InstantiatedVnfInfoVnfcResourceInfo();
+                    vnfcResourceInfoItem.setId(vnfc.getVnfcId());
+                    vnfcResourceInfoItem.setVduId(vnfc.getVduId());
+                    final InlineResponse201InstantiatedVnfInfoResourceHandle computeResource =
+                            new InlineResponse201InstantiatedVnfInfoResourceHandle();
+                    computeResource.setResourceId(UUID.randomUUID().toString());
+                    LOGGER.info("Checking for VIM connection id for : {}", vnfc.getGrantResourceId());
+                    computeResource
+                            .setVimConnectionId(mapOfGrantResourceIdToVimConnectionId.get(vnfc.getGrantResourceId()));
+
+                    computeResource.setVimLevelResourceType("OS::Nova::Server");
+                    vnfcResourceInfoItem.setComputeResource(computeResource);
+                    instantiatedVnfInfo.addVnfcResourceInfoItem(vnfcResourceInfoItem);
+                }
+            }
+        }
+
+        return instantiatedVnfInfo;
+    }
+
+
+    private List<InlineResponse201VimConnectionInfo> getVimConnections(final InlineResponse201 grantResponse) {
+        final List<InlineResponse201VimConnectionInfo> vimConnectionInfo = new ArrayList<>();
+        for (final InlineResponse201VimConnections vimConnection : grantResponse.getVimConnections()) {
+            final ModelMapper modelMapper = new ModelMapper();
+            vimConnectionInfo.add(modelMapper.map(vimConnection, InlineResponse201VimConnectionInfo.class));
+        }
+        return vimConnectionInfo;
+    }
+
+    @Override
+    protected ChangeTypeEnum getVnfcChangeType() {
+        return ChangeTypeEnum.ADDED;
+    }
+
+}
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/OperationProgressor.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/OperationProgressor.java
new file mode 100644
index 0000000..1e31ab2
--- /dev/null
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/OperationProgressor.java
@@ -0,0 +1,239 @@
+package org.onap.svnfm.simulator.services;
+
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+import javax.ws.rs.core.MediaType;
+import org.apache.commons.codec.binary.Base64;
+import org.modelmapper.ModelMapper;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.ApiResponse;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantRequest;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantsAddResources;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantsLinks;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantsLinksVnfLcmOpOcc;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.InlineResponse201;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.ApiClient;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.ApiException;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.api.DefaultApi;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs.ChangeTypeEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationLinks;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationLinksVnfInstance;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification.NotificationStatusEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification.NotificationTypeEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification.OperationEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification.OperationStateEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse200;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201InstantiatedVnfInfoVnfcResourceInfo;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.SubscriptionsAuthenticationParamsBasic;
+import org.onap.svnfm.simulator.config.ApplicationConfig;
+import org.onap.svnfm.simulator.model.VnfOperation;
+import org.onap.svnfm.simulator.model.Vnfds;
+import org.onap.svnfm.simulator.repository.VnfOperationRepository;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class OperationProgressor implements Runnable {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(OperationProgressor.class);
+    protected final VnfOperation operation;
+    protected final SvnfmService svnfmService;
+    private final VnfOperationRepository vnfOperationRepository;
+    private final ApplicationConfig applicationConfig;
+    protected final Vnfds vnfds;
+    private final SubscriptionService subscriptionService;
+    private final DefaultApi notificationClient;
+    private final org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.api.DefaultApi grantClient;
+
+    public OperationProgressor(final VnfOperation operation, final SvnfmService svnfmService,
+            final VnfOperationRepository vnfOperationRepository, final ApplicationConfig applicationConfig,
+            final Vnfds vnfds, final SubscriptionService subscriptionService) {
+        this.operation = operation;
+        this.svnfmService = svnfmService;
+        this.vnfOperationRepository = vnfOperationRepository;
+        this.applicationConfig = applicationConfig;
+        this.vnfds = vnfds;
+        this.subscriptionService = subscriptionService;
+
+        final ApiClient apiClient = new ApiClient();
+        String callBackUrl = subscriptionService.getSubscriptions().iterator().next().getCallbackUri();
+        callBackUrl = callBackUrl.substring(0, callBackUrl.indexOf("/lcn/"));
+        apiClient.setBasePath(callBackUrl);
+        notificationClient = new DefaultApi(apiClient);
+
+        final org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.ApiClient grantApiClient =
+                new org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.ApiClient();
+        grantApiClient.setBasePath(callBackUrl);
+        grantClient = new org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.api.DefaultApi(grantApiClient);
+    }
+
+    @Override
+    public void run() {
+        try {
+            final VnfLcmOperationOccurrenceNotification notificationOfStarting =
+                    buildNotification(NotificationStatusEnum.START, OperationStateEnum.STARTING);
+            sendNotification(notificationOfStarting);
+
+            sleep(2000);
+            setState(InlineResponse200.OperationStateEnum.PROCESSING);
+            final VnfLcmOperationOccurrenceNotification notificationOfProcessing =
+                    buildNotification(NotificationStatusEnum.START, OperationStateEnum.PROCESSING);
+            sendNotification(notificationOfProcessing);
+
+
+            final GrantRequest grantRequest = buildGrantRequest();
+            final InlineResponse201 grantResponse = sendGrantRequest(grantRequest);
+            final List<InlineResponse201InstantiatedVnfInfoVnfcResourceInfo> vnfcs = handleGrantResponse(grantResponse);
+
+            svnfmService.getVnf(operation.getVnfInstanceId()).getInstantiatedVnfInfo();
+
+            sleep(10000);
+            setState(InlineResponse200.OperationStateEnum.COMPLETED);
+            final VnfLcmOperationOccurrenceNotification notificationOfCompleted =
+                    buildNotification(NotificationStatusEnum.RESULT, OperationStateEnum.COMPLETED);
+            notificationOfCompleted.setAffectedVnfcs(getVnfcs(vnfcs));
+
+            sendNotification(notificationOfCompleted);
+        } catch (final Exception exception) {
+            LOGGER.error("Error in OperationProgressor ", exception);
+        }
+
+    }
+
+    private void sleep(final long milliSeconds) {
+        try {
+            Thread.sleep(milliSeconds);
+        } catch (final InterruptedException e) {
+            operation.setOperationState(InlineResponse200.OperationStateEnum.FAILED);
+        }
+    }
+
+    private void setState(final InlineResponse200.OperationStateEnum state) {
+        LOGGER.info("Setting state to {} for operation {}", state, operation.getId());
+        operation.setOperationState(state);
+        vnfOperationRepository.save(operation);
+    }
+
+    private VnfLcmOperationOccurrenceNotification buildNotification(final NotificationStatusEnum status,
+            final OperationStateEnum operationState) {
+        final VnfLcmOperationOccurrenceNotification notification = new VnfLcmOperationOccurrenceNotification();
+        notification.setId(UUID.randomUUID().toString());
+        notification.setNotificationType(NotificationTypeEnum.VNFLCMOPERATIONOCCURRENCENOTIFICATION);
+        notification.setNotificationStatus(status);
+        notification.setOperationState(operationState);
+        notification.setOperation(OperationEnum.fromValue(operation.getOperation().toString()));
+        notification.setVnfInstanceId(operation.getVnfInstanceId());
+        notification.setVnfLcmOpOccId(operation.getId());
+
+        final LcnVnfLcmOperationOccurrenceNotificationLinks links = new LcnVnfLcmOperationOccurrenceNotificationLinks();
+        final LcnVnfLcmOperationOccurrenceNotificationLinksVnfInstance vnfInstanceLink =
+                new LcnVnfLcmOperationOccurrenceNotificationLinksVnfInstance();
+        vnfInstanceLink.setHref(getVnfLink());
+        links.setVnfInstance(vnfInstanceLink);
+
+
+        final LcnVnfLcmOperationOccurrenceNotificationLinksVnfInstance operationLink =
+                new LcnVnfLcmOperationOccurrenceNotificationLinksVnfInstance();
+        operationLink.setHref(getOperationLink());
+        links.setVnfLcmOpOcc(operationLink);
+
+        notification.setLinks(links);
+
+        return notification;
+    }
+
+    private List<LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs> getVnfcs(
+            final List<InlineResponse201InstantiatedVnfInfoVnfcResourceInfo> instantiatedVnfcs) {
+        final List<LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs> vnfcs = new ArrayList<>();
+        if (instantiatedVnfcs != null) {
+            for (final InlineResponse201InstantiatedVnfInfoVnfcResourceInfo instantiatedVnfc : instantiatedVnfcs) {
+                LOGGER.info("VNFC TO BE CONVERTED: {}", instantiatedVnfc);
+                final ModelMapper mapper = new ModelMapper();
+                final LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs vnfc =
+                        mapper.map(instantiatedVnfc, LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs.class);
+                LOGGER.info("VNFC FROM CONVERSION: {}", vnfc);
+                vnfc.setChangeType(getVnfcChangeType());
+                vnfcs.add(vnfc);
+            }
+        }
+        return vnfcs;
+    }
+
+    private void sendNotification(final VnfLcmOperationOccurrenceNotification notification) {
+        LOGGER.info("Sending notification: {}", notification);
+        try {
+            final SubscriptionsAuthenticationParamsBasic subscriptionAuthentication =
+                    subscriptionService.getSubscriptions().iterator().next().getAuthentication().getParamsBasic();
+            final String auth =
+                    subscriptionAuthentication.getUserName() + ":" + subscriptionAuthentication.getPassword();
+            final byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(StandardCharsets.ISO_8859_1));
+            final String authHeader = "Basic " + new String(encodedAuth);
+            notificationClient.lcnVnfLcmOperationOccurrenceNotificationPostWithHttpInfo(notification,
+                    MediaType.APPLICATION_JSON, authHeader);
+        } catch (final ApiException exception) {
+            LOGGER.error("Error sending notification: " + notification, exception);
+        }
+    }
+
+
+    public GrantRequest buildGrantRequest() {
+        final GrantRequest grantRequest = new GrantRequest();
+        grantRequest.setVnfInstanceId(operation.getVnfInstanceId());
+        final String vnfdId = svnfmService.getVnf(operation.getVnfInstanceId()).getVnfdId();
+        grantRequest.setVnfdId(vnfdId);
+        grantRequest.setAddResources(getAddResources(vnfdId));
+        grantRequest.setRemoveResources(getRemoveResources(vnfdId));
+        grantRequest.setVnfLcmOpOccId(operation.getId());
+        grantRequest
+                .setOperation(org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantRequest.OperationEnum
+                        .fromValue(operation.getOperation().getValue()));
+        grantRequest.setIsAutomaticInvocation(false);
+
+        final GrantsLinksVnfLcmOpOcc vnfInstanceLink = new GrantsLinksVnfLcmOpOcc();
+        vnfInstanceLink.setHref(getVnfLink());
+        final GrantsLinksVnfLcmOpOcc operationInstanceLink = new GrantsLinksVnfLcmOpOcc();
+        operationInstanceLink.setHref(getOperationLink());
+        final GrantsLinks links = new GrantsLinks();
+        links.setVnfInstance(vnfInstanceLink);
+        links.setVnfLcmOpOcc(operationInstanceLink);
+        grantRequest.setLinks(links);
+        return grantRequest;
+    }
+
+    protected abstract List<GrantsAddResources> getAddResources(final String vnfdId);
+
+    protected abstract List<GrantsAddResources> getRemoveResources(final String vnfdId);
+
+    protected abstract List<InlineResponse201InstantiatedVnfInfoVnfcResourceInfo> handleGrantResponse(
+            InlineResponse201 grantResponse);
+
+    protected abstract ChangeTypeEnum getVnfcChangeType();
+
+    private InlineResponse201 sendGrantRequest(final GrantRequest grantRequest) {
+        LOGGER.info("Sending grant request: {}", grantRequest);
+        try {
+            final ApiResponse<InlineResponse201> response = grantClient.grantsPostWithHttpInfo(grantRequest,
+                    MediaType.APPLICATION_JSON, MediaType.APPLICATION_JSON, "Basic dm5mbTpwYXNzd29yZDEk");
+            LOGGER.info("Grant Response: {}", response);
+            return response.getData();
+        } catch (final org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.ApiException exception) {
+            LOGGER.error("Error sending notification: " + grantRequest, exception);
+            return null;
+        }
+    }
+
+    private String getVnfLink() {
+        return getLinkBaseUrl() + "/vnf_instances/" + operation.getVnfInstanceId();
+    }
+
+    private String getOperationLink() {
+        return getLinkBaseUrl() + "/vnf_lcm_op_occs/" + operation.getId();
+    }
+
+    private String getLinkBaseUrl() {
+        return applicationConfig.getBaseUrl() + "/vnflcm/v1";
+    }
+
+}
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/SubscriptionService.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/SubscriptionService.java
new file mode 100644
index 0000000..6a2340b
--- /dev/null
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/SubscriptionService.java
@@ -0,0 +1,21 @@
+package org.onap.svnfm.simulator.services;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.LccnSubscriptionRequest;
+import org.springframework.stereotype.Service;
+
+@Service
+public class SubscriptionService {
+
+    Collection<LccnSubscriptionRequest> subscriptions = new ArrayList<>();
+
+    public void registerSubscription(final LccnSubscriptionRequest subscription) {
+        subscriptions.add(subscription);
+    }
+
+    public Collection<LccnSubscriptionRequest> getSubscriptions() {
+        return Collections.unmodifiableCollection(subscriptions);
+    }
+}
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/SvnfmService.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/SvnfmService.java
index f7f4eaa..21bb00d 100644
--- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/SvnfmService.java
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/SvnfmService.java
@@ -21,22 +21,39 @@
 package org.onap.svnfm.simulator.services;
 
 import java.lang.reflect.InvocationTargetException;
-import java.util.Optional;
+import java.util.List;
+import java.util.UUID;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import org.modelmapper.ModelMapper;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.CreateVnfRequest;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse200;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201.InstantiationStateEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201InstantiatedVnfInfo;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201VimConnectionInfo;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InstantiateVnfRequest;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.LccnSubscriptionRequest;
+import org.onap.svnfm.simulator.config.ApplicationConfig;
+import org.onap.svnfm.simulator.constants.Constant;
 import org.onap.svnfm.simulator.model.VnfInstance;
-import org.onap.svnfm.simulator.model.VnfJob;
+import org.onap.svnfm.simulator.model.VnfOperation;
+import org.onap.svnfm.simulator.model.Vnfds;
 import org.onap.svnfm.simulator.notifications.VnfInstantiationNotification;
 import org.onap.svnfm.simulator.notifications.VnfmAdapterCreationNotification;
-import org.onap.svnfm.simulator.repository.VnfJobRepository;
+import org.onap.svnfm.simulator.repository.VnfOperationRepository;
 import org.onap.svnfm.simulator.repository.VnfmRepository;
-import org.onap.vnfm.v1.model.CreateVnfRequest;
-import org.onap.vnfm.v1.model.InlineResponse201;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.Cache;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.annotation.CachePut;
+import org.springframework.cache.support.SimpleValueWrapper;
 import org.springframework.stereotype.Service;
 
 /**
- * 
+ *
  * @author Lathishbabu Ganesan (lathishbabu.ganesan@est.tech)
  * @author Ronan Kenny (ronan.kenny@est.tech)
  */
@@ -47,122 +64,136 @@
     VnfmRepository vnfmRepository;
 
     @Autowired
-    VnfJobRepository vnfJobRepository;
+    VnfOperationRepository vnfOperationRepository;
 
     @Autowired
     private VnfmHelper vnfmHelper;
 
+    @Autowired
+    ApplicationConfig applicationConfig;
+
+    @Autowired
+    CacheManager cacheManager;
+
+    @Autowired
+    Vnfds vnfds;
+
+    @Autowired
+    SubscriptionService subscriptionService;
+
+    private final ExecutorService executor = Executors.newCachedThreadPool();
+
     private static final Logger LOGGER = LoggerFactory.getLogger(SvnfmService.class);
 
     /**
-     * 
+     *
      * @param createVNFRequest
      * @return inlineResponse201
      */
-    public InlineResponse201 createVnf(final CreateVnfRequest createVNFRequest) {
+    public InlineResponse201 createVnf(final CreateVnfRequest createVNFRequest, final String id) {
         InlineResponse201 inlineResponse201 = null;
         try {
-            final VnfInstance vnfInstance = vnfmHelper.createVnfInstance(createVNFRequest);
+            final VnfInstance vnfInstance = vnfmHelper.createVnfInstance(createVNFRequest, id);
             vnfmRepository.save(vnfInstance);
             final Thread creationNotification = new Thread(new VnfmAdapterCreationNotification());
             creationNotification.start();
             inlineResponse201 = vnfmHelper.getInlineResponse201(vnfInstance);
-            LOGGER.debug("Response from Create VNF", inlineResponse201);
+            LOGGER.debug("Response from Create VNF {}", inlineResponse201);
         } catch (IllegalAccessException | InvocationTargetException e) {
             LOGGER.error("Failed in Create Vnf", e);
         }
         return inlineResponse201;
     }
 
-    /**
-     * 
-     * @param vnfId
-     * @param instantiateJobId
-     * @throws InterruptedException
-     */
-    public Object instatiateVnf(final String vnfId, final String instantiateJobId) throws InterruptedException {
-        final VnfJob vnfJob = buildVnfInstantiation(vnfId, instantiateJobId);
-        vnfJobRepository.save(vnfJob);
-        getJobStatus(vnfJob.getJobId());
-        return null;
+    @CachePut(value = Constant.IN_LINE_RESPONSE_201_CACHE, key = "#id")
+    public InlineResponse201 updateVnf(final InstantiationStateEnum instantiationState,
+            final InlineResponse201InstantiatedVnfInfo instantiatedVnfInfo, final String id,
+            final List<InlineResponse201VimConnectionInfo> vimConnectionInfo) {
+        final InlineResponse201 vnf = getVnf(id);
+        vnf.setInstantiatedVnfInfo(instantiatedVnfInfo);
+        vnf.setInstantiationState(instantiationState);
+        vnf.setVimConnectionInfo(vimConnectionInfo);
+        return vnf;
     }
 
     /**
-     * 
+     *
      * @param vnfId
-     * @param instantiateJobId
+     * @param instantiateVNFRequest
+     * @param operationId
+     * @throws InterruptedException
      */
-    public VnfJob buildVnfInstantiation(final String vnfId, final String instantiateJobId) {
-        final VnfJob vnfJob = new VnfJob();
-        final Optional<VnfInstance> vnfInstance = vnfmRepository.findById(vnfId);
-
-        if (vnfInstance.isPresent()) {
-            vnfJob.setJobId(instantiateJobId);
-            for (final VnfInstance instance : vnfmRepository.findAll()) {
-                if (instance.getId().equals(vnfId)) {
-                    vnfJob.setVnfInstanceId(instance.getVnfInstanceDescription());
-                }
-            }
-            vnfJob.setVnfId(vnfId);
-            vnfJob.setStatus("STARTING");
-        }
-        return vnfJob;
+    public String instantiateVnf(final String vnfId, final InstantiateVnfRequest instantiateVNFRequest) {
+        final VnfOperation vnfOperation = buildVnfOperation(InlineResponse200.OperationEnum.INSTANTIATE, vnfId);
+        vnfOperationRepository.save(vnfOperation);
+        executor.submit(new InstantiateOperationProgressor(vnfOperation, this, vnfOperationRepository,
+                applicationConfig, vnfds, subscriptionService));
+        return vnfOperation.getId();
     }
 
     /**
-     * 
-     * @param jobId
+     * vnfOperationRepository
+     *
+     * @param vnfId
+     * @param instantiateOperationId
+     */
+    public VnfOperation buildVnfOperation(final InlineResponse200.OperationEnum operation, final String vnfId) {
+        final VnfOperation vnfOperation = new VnfOperation();
+        vnfOperation.setId(UUID.randomUUID().toString());
+        vnfOperation.setOperation(operation);
+        vnfOperation.setOperationState(InlineResponse200.OperationStateEnum.STARTING);
+        vnfOperation.setVnfInstanceId(vnfId);
+        return vnfOperation;
+    }
+
+    /**
+     *
+     * @param operationId
      * @throws InterruptedException
      */
-    public Object getJobStatus(final String jobId) throws InterruptedException {
-        LOGGER.info("Getting job status with id: " + jobId);
-        for (int i = 0; i < 5; i++) {
-            LOGGER.info("Instantiation status: RUNNING");
-            Thread.sleep(5000);
-            for (final VnfJob job : vnfJobRepository.findAll()) {
-                if (job.getJobId().equals(jobId)) {
-                    job.setStatus("RUNNING");
-                    vnfJobRepository.save(job);
-                }
-            }
-        }
+    public InlineResponse200 getOperationStatus(final String operationId) {
+        LOGGER.info("Getting operation status with id: {}", operationId);
         final Thread instantiationNotification = new Thread(new VnfInstantiationNotification());
         instantiationNotification.start();
-        for (final VnfJob job : vnfJobRepository.findAll()) {
-            if (job.getJobId().equals(jobId)) {
-                job.setStatus("COMPLETE");
-                vnfJobRepository.save(job);
+        for (final VnfOperation operation : vnfOperationRepository.findAll()) {
+            LOGGER.info("Operation found: {}", operation);
+            if (operation.getId().equals(operationId)) {
+                final ModelMapper modelMapper = new ModelMapper();
+                return modelMapper.map(operation, InlineResponse200.class);
             }
         }
         return null;
     }
 
     /**
-     * 
+     *
      * @param vnfId
      * @return inlineResponse201
      */
     public InlineResponse201 getVnf(final String vnfId) {
-        InlineResponse201 inlineResponse201 = null;
-
-        final Optional<VnfInstance> vnfInstance = vnfmRepository.findById(vnfId);
-        try {
-            if (vnfInstance.isPresent()) {
-                inlineResponse201 = vnfmHelper.getInlineResponse201(vnfInstance.get());
-                LOGGER.debug("Response from get VNF", inlineResponse201);
-            }
-        } catch (IllegalAccessException | InvocationTargetException e) {
-            LOGGER.error("Failed in get Vnf", e);
+        final Cache ca = cacheManager.getCache(Constant.IN_LINE_RESPONSE_201_CACHE);
+        final SimpleValueWrapper wrapper = (SimpleValueWrapper) ca.get(vnfId);
+        final InlineResponse201 inlineResponse201 = (InlineResponse201) wrapper.get();
+        if (inlineResponse201 != null) {
+            LOGGER.info("Cache Read Successful");
+            return inlineResponse201;
         }
-        return inlineResponse201;
+        return null;
     }
 
     /**
      * @param vnfId
      * @return
      */
-    public Object terminateVnf(String vnfId) {
-        // TODO
-        return null;
+    public String terminateVnf(final String vnfId) {
+        final VnfOperation vnfOperation = buildVnfOperation(InlineResponse200.OperationEnum.TERMINATE, vnfId);
+        vnfOperationRepository.save(vnfOperation);
+        executor.submit(new TerminateOperationProgressor(vnfOperation, this, vnfOperationRepository, applicationConfig,
+                vnfds, subscriptionService));
+        return vnfOperation.getId();
+    }
+
+    public void registerSubscription(final LccnSubscriptionRequest subscription) {
+        subscriptionService.registerSubscription(subscription);
     }
 }
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/TerminateOperationProgressor.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/TerminateOperationProgressor.java
new file mode 100644
index 0000000..c829be9
--- /dev/null
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/TerminateOperationProgressor.java
@@ -0,0 +1,74 @@
+package org.onap.svnfm.simulator.services;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.UUID;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantsAddResources;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantsAddResources.TypeEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.GrantsResource;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.InlineResponse201;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs.ChangeTypeEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201.InstantiationStateEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201InstantiatedVnfInfoResourceHandle;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201InstantiatedVnfInfoVnfcResourceInfo;
+import org.onap.svnfm.simulator.config.ApplicationConfig;
+import org.onap.svnfm.simulator.model.VnfOperation;
+import org.onap.svnfm.simulator.model.Vnfds;
+import org.onap.svnfm.simulator.repository.VnfOperationRepository;
+
+public class TerminateOperationProgressor extends OperationProgressor {
+
+    public TerminateOperationProgressor(final VnfOperation operation, final SvnfmService svnfmService,
+            final VnfOperationRepository vnfOperationRepository, final ApplicationConfig applicationConfig,
+            final Vnfds vnfds, final SubscriptionService subscriptionService) {
+        super(operation, svnfmService, vnfOperationRepository, applicationConfig, vnfds, subscriptionService);
+    }
+
+    @Override
+    protected List<GrantsAddResources> getAddResources(final String vnfdId) {
+        return Collections.emptyList();
+    }
+
+    @Override
+    protected List<GrantsAddResources> getRemoveResources(final String vnfdId) {
+        final List<GrantsAddResources> resources = new ArrayList<>();
+
+        final org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201 vnf =
+                svnfmService.getVnf(operation.getVnfInstanceId());
+        for (final InlineResponse201InstantiatedVnfInfoVnfcResourceInfo vnfc : vnf.getInstantiatedVnfInfo()
+                .getVnfcResourceInfo()) {
+            final GrantsAddResources addResource = new GrantsAddResources();
+            addResource.setId(UUID.randomUUID().toString());
+            addResource.setType(TypeEnum.COMPUTE);
+            addResource.setVduId(vnfc.getVduId());
+            final GrantsResource resource = new GrantsResource();
+
+            final InlineResponse201InstantiatedVnfInfoResourceHandle computeResource = vnfc.getComputeResource();
+            resource.setResourceId(computeResource.getResourceId());
+            resource.setVimConnectionId(computeResource.getVimConnectionId());
+            resource.setVimLevelResourceType(computeResource.getVimLevelResourceType());
+            addResource.setResource(resource);
+            resources.add(addResource);
+
+        }
+        return resources;
+    }
+
+    @Override
+    protected List<InlineResponse201InstantiatedVnfInfoVnfcResourceInfo> handleGrantResponse(
+            final InlineResponse201 grantResponse) {
+        final List<InlineResponse201InstantiatedVnfInfoVnfcResourceInfo> vnfcs =
+                svnfmService.getVnf(operation.getVnfInstanceId()).getInstantiatedVnfInfo().getVnfcResourceInfo();
+        svnfmService.updateVnf(InstantiationStateEnum.NOT_INSTANTIATED, null, operation.getVnfInstanceId(), null);
+        return vnfcs;
+    }
+
+    @Override
+    protected ChangeTypeEnum getVnfcChangeType() {
+        return ChangeTypeEnum.REMOVED;
+    }
+
+
+
+}
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/VnfmHelper.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/VnfmHelper.java
index f35cbf2..60b251c 100644
--- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/VnfmHelper.java
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/VnfmHelper.java
@@ -21,31 +21,39 @@
 package org.onap.svnfm.simulator.services;
 
 import java.lang.reflect.InvocationTargetException;
+import java.util.HashMap;
+import java.util.Map;
 import org.apache.commons.beanutils.BeanUtils;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.CreateVnfRequest;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201.InstantiationStateEnum;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201Links;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201LinksSelf;
+import org.onap.svnfm.simulator.config.ApplicationConfig;
 import org.onap.svnfm.simulator.constants.Constant;
 import org.onap.svnfm.simulator.model.VnfInstance;
-import org.onap.vnfm.v1.model.CreateVnfRequest;
-import org.onap.vnfm.v1.model.InlineResponse201;
-import org.onap.vnfm.v1.model.InlineResponse201.InstantiationStateEnum;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 /**
- * 
+ *
  * @author Lathishbabu Ganesan (lathishbabu.ganesan@est.tech)
  * @author Ronan Kenny (ronan.kenny@est.tech)
  */
 @Component
 public class VnfmHelper {
 
+    @Autowired
+    private ApplicationConfig applicationConfig;
+
     /**
-     * 
+     *
      * @param createVNFRequest
      * @return vnfInstance
      */
-    public VnfInstance createVnfInstance(final CreateVnfRequest createVNFRequest) {
+    public VnfInstance createVnfInstance(final CreateVnfRequest createVNFRequest, final String id) {
         final VnfInstance vnfInstance = new VnfInstance();
-        final String vnfId = createVNFRequest.getVnfdId();
-        vnfInstance.setId(vnfId);
+        vnfInstance.setId(id);
         vnfInstance.setVnfInstanceName(createVNFRequest.getVnfInstanceName());
         vnfInstance.setVnfInstanceDescription(createVNFRequest.getVnfInstanceDescription());
         vnfInstance.setVnfdId(createVNFRequest.getVnfdId());
@@ -55,7 +63,7 @@
     }
 
     /**
-     * 
+     *
      * @param vnfInstance
      * @return inlineResponse201
      * @throws IllegalAccessException
@@ -68,6 +76,27 @@
         inlineResponse201.setVnfdVersion(Constant.VNFD_VERSION);
         inlineResponse201.setVnfSoftwareVersion(Constant.VNF_SOFTWARE_VERSION);
         inlineResponse201.setInstantiationState(InstantiationStateEnum.NOT_INSTANTIATED);
+        inlineResponse201.setVnfConfigurableProperties(getConfigProperties());
+        addAdditionalPRopertyInlineResponse201(inlineResponse201);
         return inlineResponse201;
     }
+
+    private Map<String, String> getConfigProperties() {
+        final Map<String, String> configProperties = new HashMap<>();
+        configProperties.put("ipAddress", "10.11.12.13");
+        return configProperties;
+    }
+
+    private void addAdditionalPRopertyInlineResponse201(final InlineResponse201 inlineResponse201) {
+        final InlineResponse201LinksSelf VnfInstancesLinksSelf = new InlineResponse201LinksSelf();
+        VnfInstancesLinksSelf
+                .setHref(applicationConfig.getBaseUrl() + "/vnflcm/v1/vnf_instances/" + inlineResponse201.getId());
+        final InlineResponse201LinksSelf VnfInstancesLinksSelfInstantiate = new InlineResponse201LinksSelf();
+        VnfInstancesLinksSelfInstantiate.setHref(applicationConfig.getBaseUrl() + "/vnflcm/v1/vnf_instances/"
+                + inlineResponse201.getId() + "/instantiate");
+        final InlineResponse201Links inlineResponse201Links = new InlineResponse201Links();
+        inlineResponse201Links.setSelf(VnfInstancesLinksSelf);
+        inlineResponse201Links.setInstantiate(VnfInstancesLinksSelfInstantiate);
+        inlineResponse201.setLinks(inlineResponse201Links);
+    }
 }
diff --git a/vnfm-simulator/vnfm-service/src/main/resources/application.properties b/vnfm-simulator/vnfm-service/src/main/resources/application.properties
deleted file mode 100644
index c5b36d7..0000000
--- a/vnfm-simulator/vnfm-service/src/main/resources/application.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-# Enabling H2 Console
-spring.h2.console.enabled=true
-spring.h2.console.path=/console
-spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_ON_EXIT=FALSE
-spring.datasource.username=admin
-spring.datasource.password=admin
-spring.datasource.driverClassName=org.h2.Driver
-spring.jpa.hibernate.ddl-auto = update
-spring.jpa.show-sql=true
-logging.level.org.hibernate.SQL=DEBUG
-logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
-
-server.port=9081
\ No newline at end of file
diff --git a/vnfm-simulator/vnfm-service/src/main/resources/application.yaml b/vnfm-simulator/vnfm-service/src/main/resources/application.yaml
new file mode 100644
index 0000000..2ef302c
--- /dev/null
+++ b/vnfm-simulator/vnfm-service/src/main/resources/application.yaml
@@ -0,0 +1,59 @@
+# Copyright © 2019 Nordix Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+spring:
+ h2:
+  console:
+  enabled: true
+  path: console
+ datasource:
+  url: jdbc:h2:mem:testdb;DB_CLOSE_ON_EXIT=FALSE
+  username: admin
+  password: admin
+ http:
+  converters:
+   preferred-json-mapper: gson
+ security:
+  usercredentials:
+   - username: vnfm
+     password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
+     role: BPEL-Client
+   
+server:
+  port: 9093
+  tomcat:
+    max-threads: 50
+
+vnfds:
+  vnfdlist:
+  -  vnfdid: 1
+     vnfclist:
+     - vnfcid: VNFC1
+       resourceTemplateId: vnfd1_vnfc1
+       vduId: vnfd1_vduForVnfc1
+       type: COMPUTE
+     - vnfcid: VNFC2
+       resourceTemplateId: vnfd1_vnfc2
+       vduId: vnfd1_vduForVnfc2
+       type: COMPUTE
+  -  vnfdid: 2
+     vnfclist:
+     - vnfcid: VNFC3
+       resourceTemplateId: vnfd2_vnfc3
+       vduId: vnfd2_vduForVnfc3
+       type: COMPUTE
+     - vnfcid: VNFC4
+       resourceTemplateId: vnfd2_vnfc4
+       vduId: vnfd2_vduForVnfc4
+       type: COMPUTE
\ No newline at end of file
diff --git a/vnfm-simulator/vnfm-service/src/test/java/org/onap/svnfm/simulator/controllers/TestSvnfmController.java b/vnfm-simulator/vnfm-service/src/test/java/org/onap/svnfm/simulator/controllers/TestSvnfmController.java
index f338b58..9cb0702 100644
--- a/vnfm-simulator/vnfm-service/src/test/java/org/onap/svnfm/simulator/controllers/TestSvnfmController.java
+++ b/vnfm-simulator/vnfm-service/src/test/java/org/onap/svnfm/simulator/controllers/TestSvnfmController.java
@@ -20,10 +20,13 @@
 
 package org.onap.svnfm.simulator.controllers;
 
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.when;
 import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
 import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
 import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -31,15 +34,15 @@
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.CreateVnfRequest;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201;
+import org.onap.svnfm.simulator.constants.Constant;
 import org.onap.svnfm.simulator.controller.SvnfmController;
 import org.onap.svnfm.simulator.repository.VnfmCacheRepository;
 import org.onap.svnfm.simulator.services.SvnfmService;
-import org.onap.vnfm.v1.model.CreateVnfRequest;
-import org.onap.vnfm.v1.model.InlineResponse201;
 import org.springframework.http.MediaType;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.setup.MockMvcBuilders;
-import com.fasterxml.jackson.databind.ObjectMapper;
 
 @RunWith(MockitoJUnitRunner.class)
 public class TestSvnfmController {
@@ -69,14 +72,12 @@
         createVnfRequest.setVnfInstanceName("createVnfInstanceTest");
         createVnfRequest.setVnfInstanceDescription("createVnfInstanceTest");
 
-        when(vnfmCacheRepository.createVnf(createVnfRequest)).thenReturn(new InlineResponse201());
-
-        svnfmService.createVnf(createVnfRequest);
+        when(vnfmCacheRepository.createVnf(eq(createVnfRequest), anyString())).thenReturn(new InlineResponse201());
 
         final String body = (new ObjectMapper()).valueToTree(createVnfRequest).toString();
         this.mockMvc
-                .perform(post("/svnfm/vnf_instances").content(body).contentType(MediaType.APPLICATION_JSON)
-                        .accept(MediaType.APPLICATION_JSON))
+                .perform(post(Constant.BASE_URL + "/vnf_instances").content(body)
+                        .contentType(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON))
                 .andExpect(status().isCreated()).andExpect(content().contentType(MediaType.APPLICATION_JSON));
     }
 }
