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 e6bc063..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
@@ -119,9 +119,12 @@
      */
     @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);
     }
 
     /**
@@ -132,10 +135,11 @@
      */
     @PostMapping(value = "/vnf_instances/{vnfInstanceId}/terminate")
     public ResponseEntity<Object> terminateVnf(@PathVariable("vnfInstanceId") final String vnfId) {
-        LOGGER.info("Start terminateVNFRequest");
+        LOGGER.info("Start terminateVNFRequest {}", vnfId);
         final HttpHeaders headers = new HttpHeaders();
-        headers.add("Content-Type", MediaType.APPLICATION_JSON);
-        return new ResponseEntity<>(svnfmService.terminateVnf(vnfId), headers, HttpStatus.ACCEPTED);
+        headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
+        headers.add(HttpHeaders.LOCATION, svnfmService.terminateVnf(vnfId));
+        return new ResponseEntity<>(headers, HttpStatus.ACCEPTED);
     }
 
 
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 030b073..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,16 +20,12 @@
 
 package org.onap.svnfm.simulator.repository;
 
-import java.util.List;
 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.InlineResponse201InstantiatedVnfInfo;
-import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201VimConnectionInfo;
 import org.onap.svnfm.simulator.constants.Constant;
 import org.onap.svnfm.simulator.services.SvnfmService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cache.annotation.CachePut;
+import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Repository;
 
@@ -49,15 +45,7 @@
         return svnfmService.createVnf(createVnfRequest, id);
     }
 
-    @CachePut(value = Constant.IN_LINE_RESPONSE_201_CACHE, key = "#id")
-    public InlineResponse201 updateVnf(final InlineResponse201InstantiatedVnfInfo instantiatedVnfInfo, final String id,
-            final List<InlineResponse201VimConnectionInfo> vimConnectionInfo) {
-        final InlineResponse201 vnf = getVnf(id);
-        vnf.setInstantiatedVnfInfo(instantiatedVnfInfo);
-        vnf.setInstantiationState(InstantiationStateEnum.INSTANTIATED);
-        vnf.setVimConnectionInfo(vimConnectionInfo);
-        return vnf;
-    }
+
 
     public InlineResponse201 getVnf(final String id) {
         return svnfmService.getVnf(id);
@@ -67,8 +55,6 @@
      * @param vnfId
      * @return
      */
-    public InlineResponse201 deleteVnf(final 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
index d231e1b..1e31ab2 100644
--- 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
@@ -2,9 +2,7 @@
 
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 import java.util.UUID;
 import javax.ws.rs.core.MediaType;
 import org.apache.commons.codec.binary.Base64;
@@ -12,12 +10,9 @@
 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.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.InlineResponse201AddResources;
-import org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.model.InlineResponse201VimConnections;
 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;
@@ -31,38 +26,32 @@
 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.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.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.model.Vnfds.Vnfc;
-import org.onap.svnfm.simulator.model.Vnfds.Vnfd;
 import org.onap.svnfm.simulator.repository.VnfOperationRepository;
-import org.onap.svnfm.simulator.repository.VnfmCacheRepository;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class OperationProgressor implements Runnable {
+public abstract class OperationProgressor implements Runnable {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(OperationProgressor.class);
-    private final VnfOperation operation;
-    private final VnfmCacheRepository vnfRepository;
+    protected final VnfOperation operation;
+    protected final SvnfmService svnfmService;
     private final VnfOperationRepository vnfOperationRepository;
     private final ApplicationConfig applicationConfig;
-    private final Vnfds vnfds;
+    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 VnfmCacheRepository vnfRepository,
+    public OperationProgressor(final VnfOperation operation, final SvnfmService svnfmService,
             final VnfOperationRepository vnfOperationRepository, final ApplicationConfig applicationConfig,
             final Vnfds vnfds, final SubscriptionService subscriptionService) {
         this.operation = operation;
-        this.vnfRepository = vnfRepository;
+        this.svnfmService = svnfmService;
         this.vnfOperationRepository = vnfOperationRepository;
         this.applicationConfig = applicationConfig;
         this.vnfds = vnfds;
@@ -96,15 +85,15 @@
 
             final GrantRequest grantRequest = buildGrantRequest();
             final InlineResponse201 grantResponse = sendGrantRequest(grantRequest);
-            final InlineResponse201InstantiatedVnfInfo instantiatedVnfInfo = createInstantiatedVnfInfo(grantResponse);
-            vnfRepository.updateVnf(instantiatedVnfInfo, operation.getVnfInstanceId(),
-                    getVimConnections(grantResponse));
+            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(instantiatedVnfInfo.getVnfcResourceInfo()));
+            notificationOfCompleted.setAffectedVnfcs(getVnfcs(vnfcs));
 
             sendNotification(notificationOfCompleted);
         } catch (final Exception exception) {
@@ -136,6 +125,7 @@
         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 =
@@ -157,14 +147,16 @@
     private List<LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs> getVnfcs(
             final List<InlineResponse201InstantiatedVnfInfoVnfcResourceInfo> instantiatedVnfcs) {
         final List<LcnVnfLcmOperationOccurrenceNotificationAffectedVnfcs> vnfcs = new ArrayList<>();
-        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(ChangeTypeEnum.ADDED);
-            vnfcs.add(vnfc);
+        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;
     }
@@ -189,9 +181,10 @@
     public GrantRequest buildGrantRequest() {
         final GrantRequest grantRequest = new GrantRequest();
         grantRequest.setVnfInstanceId(operation.getVnfInstanceId());
-        final String vnfdId = vnfRepository.getVnf(operation.getVnfInstanceId()).getVnfdId();
+        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
@@ -209,24 +202,14 @@
         return grantRequest;
     }
 
-    private List<GrantsAddResources> getAddResources(final String vnfdId) {
-        final List<GrantsAddResources> resources = new ArrayList<>();
+    protected abstract List<GrantsAddResources> getAddResources(final String vnfdId);
 
-        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;
-    }
+    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);
@@ -241,46 +224,6 @@
         }
     }
 
-    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());
-        }
-
-        for (final Vnfd vnfd : vnfds.getVnfdList()) {
-            if (vnfd.getVnfdId().equals(vnfRepository.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());
-                    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;
-    }
-
     private String getVnfLink() {
         return getLinkBaseUrl() + "/vnf_instances/" + operation.getVnfInstanceId();
     }
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 cac5075..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,6 +21,7 @@
 package org.onap.svnfm.simulator.services;
 
 import java.lang.reflect.InvocationTargetException;
+import java.util.List;
 import java.util.UUID;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -28,6 +29,9 @@
 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;
@@ -38,13 +42,13 @@
 import org.onap.svnfm.simulator.notifications.VnfInstantiationNotification;
 import org.onap.svnfm.simulator.notifications.VnfmAdapterCreationNotification;
 import org.onap.svnfm.simulator.repository.VnfOperationRepository;
-import org.onap.svnfm.simulator.repository.VnfmCacheRepository;
 import org.onap.svnfm.simulator.repository.VnfmRepository;
 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;
 
@@ -60,9 +64,6 @@
     VnfmRepository vnfmRepository;
 
     @Autowired
-    VnfmCacheRepository vnfRepository;
-
-    @Autowired
     VnfOperationRepository vnfOperationRepository;
 
     @Autowired
@@ -104,6 +105,17 @@
         return inlineResponse201;
     }
 
+    @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
@@ -114,8 +126,8 @@
     public String instantiateVnf(final String vnfId, final InstantiateVnfRequest instantiateVNFRequest) {
         final VnfOperation vnfOperation = buildVnfOperation(InlineResponse200.OperationEnum.INSTANTIATE, vnfId);
         vnfOperationRepository.save(vnfOperation);
-        executor.submit(new OperationProgressor(vnfOperation, vnfRepository, vnfOperationRepository, applicationConfig,
-                vnfds, subscriptionService));
+        executor.submit(new InstantiateOperationProgressor(vnfOperation, this, vnfOperationRepository,
+                applicationConfig, vnfds, subscriptionService));
         return vnfOperation.getId();
     }
 
@@ -173,9 +185,12 @@
      * @param vnfId
      * @return
      */
-    public Object terminateVnf(final 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) {
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 7c038b8..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,6 +21,8 @@
 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;
@@ -74,11 +76,17 @@
         inlineResponse201.setVnfdVersion(Constant.VNFD_VERSION);
         inlineResponse201.setVnfSoftwareVersion(Constant.VNF_SOFTWARE_VERSION);
         inlineResponse201.setInstantiationState(InstantiationStateEnum.NOT_INSTANTIATED);
-        inlineResponse201.setVnfConfigurableProperties(Constant.VNF_CONFIG_PROPERTIES);
+        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
