diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties
index 5c78c25..976ec75 100755
--- a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties
+++ b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties
@@ -23,21 +23,6 @@
 # The following properties should NOT be changed by partner applications.
 ##########################################################################
 
-application_user_id           = 30000
-post_default_role_id          = 16
-clustered                     = true
-
-#Enable Fusion Mobile capabilities for the application
-mobile_enable			  	  = false
-
-# Cache config file is needed on the classpath
-cache_config_file_path        = /WEB-INF/classes/cache.ccf
-cache_switch                  = 199
-cache_load_on_startup         = false
-
-user_name					  = fullName
-decryption_key				  = AGLDdG4D04BKm2IxIWEr8o==
-
 ##########################################################################
 # The following properties MAY require changes by partner applications.
 ##########################################################################
@@ -122,12 +107,11 @@
 aai.truststore.passwd.x=OBF:1ks51l8d1o3i1pcc1r2r1e211r391kls1pyj1z7u1njf1lx51go21hnj1y0k1mli1sop1k8o1j651vu91mxw1vun1mze1vv11j8x1k5i1sp11mjc1y161hlr1gm41m111nkj1z781pw31kku1r4p1e391r571pbm1o741l4x1ksp
 aai.keystore.filename=tomcat_keystore
 aai.keystore.passwd.x=OBF:1ks51l8d1o3i1pcc1r2r1e211r391kls1pyj1z7u1njf1lx51go21hnj1y0k1mli1sop1k8o1j651vu91mxw1vun1mze1vv11j8x1k5i1sp11mjc1y161hlr1gm41m111nkj1z781pw31kku1r4p1e391r571pbm1o741l4x1ksp
-
 aai.vid.username=VID
 aai.vid.passwd.x=OBF:1jm91i0v1jl9
-
 aai.use.client.cert=false
 aai.vnf.provstatus=PREPROV,NVTPROV,PROV,CAPPED
+
 #Cron Schedules
 log_cron                      = 0 0/1 * * * ?;
 mylogins_feed_cron            = 0 0/60 * * * ?;
@@ -169,17 +153,18 @@
 mso.restapi.vnf.instance=/serviceInstances/v6/<service_instance_id>/vnfs
 mso.restapi.vnf.changemanagement.instance=/serviceInstances/v6/<service_instance_id>/vnfs/<vnf_instance_id>/<request_type>
 mso.restapi.network.instance=/serviceInstances/v6/<service_instance_id>/networks
-mso.restapi.vf.module.instance=/serviceInstances/v6/<service_instance_id>/vnfs/<vnf_instance_id>/vfModules
 mso.restapi.vf.module.scaleout=/serviceInstantiation/v7/serviceInstances/<service_instance_id>/vnfs/<vnf_instance_id>/vfModules/scaleOut
+mso.restapi.vf.module.instance=/serviceInstances/v6/<service_instance_id>/vnfs/<vnf_instance_id>/vfModules
 mso.restapi.workflow.invoke=/instanceManagement/v1/serviceInstances/<service_instance_id>/vnfs/<vnf_instance_id>/workflows/<workflow_UUID>
 mso.restapi.volume.group.instance=/serviceInstances/v6/<service_instance_id>/vnfs/<vnf_instance_id>/volumeGroups
 mso.restapi.instance.group=/serviceInstantiation/v7/instanceGroups
 mso.restapi.get.orc.req=/orchestrationRequests/v6
 mso.restapi.get.orc.reqs=/orchestrationRequests/v6?
+mso.restapi.resume.orc.req=/orchestrationRequests/v7/<request_id>/resume
 mso.restapi.get.man.tasks=/tasks/v1
 mso.restapi.configurations=/serviceInstances/v6/<service_instance_id>/configurations
 mso.restapi.configuration.instance=${mso.restapi.configurations}/<configuration_id>
-
+mso.restapi.changeManagement.workflowSpecifications=/workflowSpecifications/v1/workflows?vnfModelVersionId=<model_version_id>
 mso.restapi.serviceInstantiationApiRoot=/serviceInstantiation/v7
 mso.restapi.serviceInstanceCreate=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances
 mso.restapi.serviceInstanceAssign=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances/assign
@@ -193,7 +178,7 @@
 
 mso.restapi.cloudResourcesRequestsApiRoot=/cloudResourcesRequests/v1
 mso.restapi.operationalEnvironment.cloudResourcesRequests.status=${mso.restapi.cloudResourcesRequestsApiRoot}?requestId=<request_id>
-mso.restapi.changeManagement.workflowSpecifications=/workflowSpecifications/v1/workflows?vnfModelVersionId=<model_version_id>
+
 mso.displayTestAPIOnScreen=true
 mso.defaultTestAPI=GR_API
 mso.maxOpenedInstantiationRequests=20
@@ -204,6 +189,7 @@
 vid.truststore.passwd.x=OBF:1dx01j0e1hs01t981mis1dws156s1ojc1qjc1zsx1pw31qob1qr71pyj1zst1qhy1ojq156i1dua1mm21tb61hvi1j0g1du2
 mso.dme2.client.timeout=30000
 mso.dme2.client.read.timeout=120000
+
 scheduler.create.new.vnf.change.instance=/v1/ChangeManagement/schedules/
 scheduler.get.time.slots=/v1/ChangeManagement/schedules/
 scheduler.server.url=http://BYO.scheduler:8989/scheduler
@@ -211,3 +197,9 @@
 scheduler.submit.new.vnf.change=/v1/ChangeManagement/schedules/{scheduleId}/approvals
 scheduler.get.schedules=/v1/ChangeManagement/schedules/scheduleDetails/
 scheduler.basic.auth=
+
+vid.asyncJob.howLongToKeepOldJobsInDays=7
+
+# thread definition - count and timeout (in seconds)
+vid.thread.count=50
+vid.thread.timeout=30
\ No newline at end of file
diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties
index 2af6798..e25b849 100755
--- a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties
+++ b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties
@@ -119,10 +119,12 @@
 mso.restapi.instance.group=/serviceInstantiation/v7/instanceGroups
 mso.restapi.get.orc.req=/orchestrationRequests/v6
 mso.restapi.get.orc.reqs=/orchestrationRequests/v6?
+mso.restapi.resume.orc.req=/orchestrationRequests/v7/<request_id>/resume
 mso.restapi.get.man.tasks=/tasks/v1
 mso.restapi.configurations=/serviceInstances/v6/<service_instance_id>/configurations
 mso.restapi.configuration.instance=${mso.restapi.configurations}/<configuration_id>
 mso.restapi.changeManagement.workflowSpecifications=/workflowSpecifications/v1/workflows?vnfModelVersionId=<model_version_id>
+
 mso.restapi.serviceInstantiationApiRoot=/serviceInstantiation/v7
 mso.restapi.serviceInstanceCreate=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances
 mso.restapi.serviceInstanceAssign=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances/assign
@@ -150,3 +152,9 @@
 mso.dme2.server.url=${MSO_DME2_SERVER_URL}
 mso.dme2.enabled=${MSO_DME2_ENABLED}
 scheduler.basic.auth=${SCHEDULER_BASIC_AUTH}
+
+vid.asyncJob.howLongToKeepOldJobsInDays=7
+
+# thread definition - count and timeout (in seconds)
+vid.thread.count=50
+vid.thread.timeout=30
\ No newline at end of file
diff --git a/vid-app-common/pom.xml b/vid-app-common/pom.xml
index b2c5c9d..28b17a3 100755
--- a/vid-app-common/pom.xml
+++ b/vid-app-common/pom.xml
@@ -821,7 +821,7 @@
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
-            <version>3.6</version>
+            <version>3.9</version>
         </dependency>
         <dependency>
             <groupId>org.apache.commons</groupId>
@@ -871,5 +871,10 @@
             <artifactId>springfox-swagger2</artifactId>
             <version>2.9.2</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-artifact</artifactId>
+            <version>3.6.1</version>
+        </dependency>
     </dependencies>
 </project>
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java
index 4ef6fbd..015ede8 100644
--- a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java
@@ -21,11 +21,13 @@
 package org.onap.vid.aai;
 
 import static java.util.Collections.emptyList;
+import static java.util.Comparator.comparing;
 import static java.util.stream.Collectors.toMap;
 import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
 import static org.apache.commons.lang3.StringUtils.equalsIgnoreCase;
 import static org.apache.commons.lang3.StringUtils.isEmpty;
 
+import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import java.io.IOException;
@@ -37,6 +39,7 @@
 import java.util.Map;
 import java.util.UUID;
 import java.util.function.Function;
+import java.util.stream.Stream;
 import javax.inject.Inject;
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Response;
@@ -49,6 +52,7 @@
 import org.json.simple.parser.JSONParser;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.vid.aai.exceptions.InvalidAAIResponseException;
+import org.onap.vid.aai.model.*;
 import org.onap.vid.aai.model.AaiGetAicZone.AicZones;
 import org.onap.vid.aai.model.AaiGetInstanceGroupsByCloudRegion;
 import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.AaiGetNetworkCollectionDetails;
@@ -117,6 +121,7 @@
 
     private static final String GET_SERVICE_MODELS_RESPONSE_BODY = "{\"start\" : \"service-design-and-creation/models/\", \"query\" : \"query/serviceModels-byDistributionStatus?distributionStatus=DISTRIBUTION_COMPLETE_OK\"}";
 
+
     @Inject
     public AaiClient(AAIRestInterface restController, PortDetailsTranslator portDetailsTranslator, CacheProvider cacheProvider) {
         this.restController = restController;
@@ -425,8 +430,8 @@
     }
 
     @Override
-    public AaiResponse getSubscriberData(String subscriberId) {
-        String depth = "2";
+    public AaiResponse getSubscriberData(String subscriberId, boolean omitServiceInstances) {
+        String depth = omitServiceInstances ? "1" : "2";
         AaiResponse subscriberDataResponse;
         Response resp = doAaiGet(BUSINESS_CUSTOMERS_CUSTOMER + subscriberId + "?depth=" + depth, false);
         subscriberDataResponse = processAaiResponse(resp, Services.class, null);
@@ -434,6 +439,41 @@
     }
 
     @Override
+    public ModelVer getLatestVersionByInvariantId(String modelInvariantId) {
+        if (modelInvariantId.isEmpty()) {
+            throw new GenericUncheckedException("no invariant-id provided to getLatestVersionByInvariantId; request is rejected");
+        }
+
+        // add the modelInvariantId to the payload
+        StringBuilder payload = new StringBuilder(GET_SERVICE_MODELS_RESPONSE_BODY);
+        payload.insert(50, modelInvariantId);
+
+        Response response = doAaiPut("service-design-and-creation/models/model/", payload.toString(),false);
+        AaiResponse<ModelVersions> aaiResponse = processAaiResponse(response, ModelVersions.class, null, VidObjectMapperType.FASTERXML);
+        Stream<ModelVer> modelVerStream = toModelVerStream(aaiResponse.getT());
+        return maxModelVer(modelVerStream);
+
+    }
+
+    protected Stream<ModelVer> toModelVerStream(ModelVersions modelVersions) {
+
+        return Stream.of(modelVersions)
+                .map(ModelVersions::getResults)
+                .flatMap(java.util.Collection::stream)
+                .flatMap(map -> map.entrySet().stream())
+                .filter(kv -> StringUtils.equals(kv.getKey(), "model-ver"))
+                .map(Map.Entry::getValue);
+
+    }
+
+    protected ModelVer maxModelVer(Stream<ModelVer> modelVerStream) {
+        return modelVerStream
+                .filter(modelVer -> StringUtils.isNotEmpty(modelVer.getModelVersion()))
+                .max(comparing(ModelVer::getModelVersion, comparing(DefaultArtifactVersion::new)))
+                .orElseThrow(() -> new GenericUncheckedException("Could not find any version"));
+    }
+
+    @Override
     public AaiResponse getServices() {
         Response resp = doAaiGet("service-design-and-creation/services", false);
         return processAaiResponse(resp, GetServicesAAIRespone.class, null);
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClientInterface.java b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClientInterface.java
index 5f69b87..1061ae5 100644
--- a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClientInterface.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClientInterface.java
@@ -7,9 +7,9 @@
  * 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.
@@ -21,30 +21,37 @@
 package org.onap.vid.aai;
 
 import com.fasterxml.jackson.databind.JsonNode;
-import java.net.URI;
-import java.util.List;
-import java.util.Map;
-import javax.ws.rs.core.Response;
 import org.onap.vid.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList;
 import org.onap.vid.aai.model.AaiGetPnfs.Pnf;
 import org.onap.vid.aai.model.AaiGetTenatns.GetTenantsResponse;
+import org.onap.vid.aai.model.ModelVer;
 import org.onap.vid.aai.model.PortDetailsTranslator;
 import org.onap.vid.aai.model.Properties;
 import org.onap.vid.aai.model.ResourceType;
-import org.onap.vid.services.ProbeInterface;
 import org.onap.vid.model.SubscriberList;
+import org.onap.vid.model.probes.ExternalComponentStatus;
+import org.onap.vid.services.ProbeInterface;
+import org.springframework.http.HttpMethod;
+
+import javax.ws.rs.core.Response;
+import java.net.URI;
+import java.util.List;
+import java.util.Map;
+
 /**
  * Created by Oren on 7/4/17.
  */
-public interface AaiClientInterface  extends ProbeInterface {
+public interface AaiClientInterface extends ProbeInterface {
 
     boolean isNodeTypeExistsByName(String name, ResourceType type);
 
     <T> T typedAaiGet(URI path, Class<T> clz);
 
+    <T> T typedAaiRest(URI path, Class<T> clz, String payload, HttpMethod method, boolean propagateExceptions);
+
     AaiResponse<SubscriberList> getAllSubscribers();
 
-    AaiResponse getSubscriberData(String subscriberId);
+    AaiResponse getSubscriberData(String subscriberId, boolean omitServiceInstances);
 
     AaiResponse getServices();
 
@@ -68,10 +75,12 @@
 
     Response getVersionByInvariantId(List<String> modelInvariantId);
 
+    ModelVer getLatestVersionByInvariantId(String modelInvariantId);
+
     AaiResponse getServicesByProjectNames(List<String> projectNames);
 
     AaiResponse getServiceModelsByDistributionStatus();
-	
+
     AaiResponse getPNFData(String globalCustomerId, String serviceType, String modelVersionId, String modelInvariantId, String cloudRegion, String equipVendor, String equipModel);
 
     AaiResponse<Pnf> getSpecificPnf(String pnfId);
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/BaseInstantiationCommand.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/KeyValueModel.java
similarity index 67%
rename from vid-app-common/src/main/java/org/onap/vid/job/command/BaseInstantiationCommand.java
rename to vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/KeyValueModel.java
index 20d71ab..6e0e1c0 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/BaseInstantiationCommand.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/KeyValueModel.java
@@ -7,9 +7,9 @@
  * 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.
@@ -18,21 +18,25 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.vid.job.command;
+package org.onap.vid.aai.model.AaiGetNetworkCollectionDetails;
 
-import org.onap.vid.job.impl.JobSharedData;
+public abstract class KeyValueModel {
+	private String key;
+    private String value;
 
-import java.util.Map;
-
-
-public abstract class BaseInstantiationCommand extends CommandBase{
-
-
-    protected CommandParentData commandParentData = new CommandParentData();
-
-    protected BaseInstantiationCommand init(JobSharedData sharedData, Map<String, Object> commandData) {
-        super.init(sharedData);
-        commandParentData.initParentData(commandData);
-        return this;
+    public String getKey() {
+        return key;
     }
+    public String getValue() {
+        return value;
+    }
+
+    public void setKey(String key) {
+        this.key = key;
+    }
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/RelatedToProperty.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/RelatedToProperty.java
index d53d90f..7c52877 100644
--- a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/RelatedToProperty.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/RelatedToProperty.java
@@ -7,9 +7,9 @@
  * 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.
@@ -25,33 +25,30 @@
 import com.fasterxml.jackson.annotation.JsonProperty;
 
 @JsonIgnoreProperties(ignoreUnknown = true)
-public class RelatedToProperty {
+public class RelatedToProperty extends KeyValueModel {
 
-	public String getPropertyKey() {
-		return propertyKey;
-	}
+    @Override
+    @JsonProperty("property-key")
+    public String getKey() {
+        return super.getKey();
+    }
 
+    @Override
+    @JsonProperty("property-key")
+    public void setKey(String propertyKey) {
+        super.setKey(propertyKey);
+    }
 
-	public void setPropertyKey(String propertyKey) {
-		this.propertyKey = propertyKey;
-	}
+    @Override
+    @JsonProperty("property-value")
+    public String getValue() {
+        return super.getValue();
+    }
 
-
-	public String getPropertyValue() {
-		return propertyValue;
-	}
-
-
-	public void setPropertyValue(String propertyValue) {
-		this.propertyValue = propertyValue;
-	}
-
-
-	@JsonProperty("property-key")
-	public String propertyKey;
-
-
-	@JsonProperty("property-value")
-	public String propertyValue;
-
+    @Override
+    @JsonProperty("property-value")
+    public void setValue(String propertyValue) {
+        super.setValue(propertyValue);
+    }
 }
+
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/Relationship.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/Relationship.java
index 4de1150..110e922 100644
--- a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/Relationship.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/Relationship.java
@@ -7,9 +7,9 @@
  * 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.
@@ -31,13 +31,13 @@
 
 	@JsonProperty("related-to")
 	public String relatedTo;
-	
+
 	@JsonProperty("related-link")
 	public String relatedLink;
 
 	@JsonProperty("relationship-label")
 	public String relationshipLabel;
-	
+
 	@JsonProperty("relationship-data")
 	public List<RelationshipData> relationshipData;
 
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/RelationshipData.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/RelationshipData.java
index cba7f43..f480ef8 100644
--- a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/RelationshipData.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/RelationshipData.java
@@ -7,9 +7,9 @@
  * 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.
@@ -24,26 +24,26 @@
 import com.fasterxml.jackson.annotation.JsonProperty;
 
 @JsonIgnoreProperties(ignoreUnknown = true)
-public class RelationshipData {
-	@JsonProperty("relationship-key")
-	public String getRelationshipKey() {
-		return relationshipKey;
-	}
-	@JsonProperty("relationship-key")
-	public void setRelationshipKey(String relationshipKey) {
-		this.relationshipKey = relationshipKey;
-	}
-	@JsonProperty("relationship-value")
-	public String getRelationshipValue() {
-		return relationshipValue;
-	}
-	@JsonProperty("relationship-value")
-	public void setRelationshipValue(String relationshipValue) {
-		this.relationshipValue = relationshipValue;
-	}
+public class RelationshipData extends KeyValueModel {
 
-	public String relationshipKey;
-	
-	public String relationshipValue;
-
+	@Override
+	@JsonProperty("relationship-key")
+	public String getKey() {
+		return super.getKey();
+	}
+	@Override
+	@JsonProperty("relationship-key")
+	public void setKey(String relationshipKey) {
+		super.setKey(relationshipKey);
+	}
+	@Override
+	@JsonProperty("relationship-value")
+	public String getValue() {
+		return super.getValue();
+	}
+	@Override
+	@JsonProperty("relationship-value")
+	public void setValue(String relationshipValue) {
+		super.setValue(relationshipValue);
+	}
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/ModelVersions.kt b/vid-app-common/src/main/java/org/onap/vid/aai/model/ModelVersions.kt
new file mode 100644
index 0000000..c4aa45d
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/ModelVersions.kt
@@ -0,0 +1,3 @@
+package org.onap.vid.aai.model
+
+data class ModelVersions(val results: List<Map<String, ModelVer>>)
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/AAITreeConverter.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAITreeConverter.java
index 5be26a0..48736bc 100644
--- a/vid-app-common/src/main/java/org/onap/vid/aai/util/AAITreeConverter.java
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAITreeConverter.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,36 +20,43 @@
 
 package org.onap.vid.aai.util;
 
-import org.apache.commons.lang3.StringUtils;
-import org.onap.vid.model.aaiTree.*;
-import org.onap.vid.mso.model.ModelInfo;
-import org.onap.vid.services.AAITreeNodeBuilder;
-import org.springframework.stereotype.Component;
-
-import java.util.Objects;
-
 import static java.util.function.Function.identity;
 import static java.util.stream.Collectors.counting;
 import static java.util.stream.Collectors.groupingBy;
 import static org.onap.vid.asdc.parser.ToscaParserImpl2.Constants.A_LA_CARTE;
 
+import java.util.Map;
+import java.util.Objects;
+import org.apache.commons.lang3.StringUtils;
+import org.onap.vid.model.aaiTree.AAITreeNode;
+import org.onap.vid.model.aaiTree.CollectionResource;
+import org.onap.vid.model.aaiTree.Network;
+import org.onap.vid.model.aaiTree.Node;
+import org.onap.vid.model.aaiTree.NodeType;
+import org.onap.vid.model.aaiTree.ServiceInstance;
+import org.onap.vid.model.aaiTree.Vnf;
+import org.onap.vid.model.aaiTree.VnfGroup;
+import org.onap.vid.model.aaiTree.Vrf;
+import org.onap.vid.mso.model.ModelInfo;
+import org.springframework.stereotype.Component;
+
 @Component
 public class AAITreeConverter {
 
     public static final String VNF_TYPE = "vnf-type";
     public static final String NETWORK_TYPE = "network-type";
+    public static final String NETWORK_ROLE = "network-role";
+    public static final String PHYSICAL_NETWORK_NAME = "physical-network-name";
+    public static final String SERVICE_INSTANCE = "service-instance";
+    public static final String TENANT = "tenant";
+    public static final String VPN_BINDING = "vpn-binding";
 
     public static final String IS_BASE_VF_MODULE = "is-base-vf-module";
+    public static final String SERVICE_INSTANCE_SERVICE_INSTANCE_NAME = "service-instance.service-instance-name";
+    public static final String SERVICE_INSTANCE_SERVICE_INSTANCE_ID = "service-instance.service-instance-id";
+    public static final String TENANT_TENANT_NAME = "tenant.tenant-name";
 
-    public enum ModelType {
-        service,
-        vnf,
-        network,
-        instanceGroup,
-        vfModule
-    }
-
-    public ServiceInstance convertTreeToUIModel(AAITreeNode rootNode, String globalCustomerId, String serviceType, String instantiationType) {
+    public ServiceInstance convertTreeToUIModel(AAITreeNode rootNode, String globalCustomerId, String serviceType, String instantiationType, String instanceRole, String instanceType) {
         ServiceInstance serviceInstance = new ServiceInstance();
         serviceInstance.setInstanceId(rootNode.getId());
         serviceInstance.setInstanceName(rootNode.getName());
@@ -58,46 +65,60 @@
         serviceInstance.setSubscriptionServiceType(serviceType);
         serviceInstance.setIsALaCarte(StringUtils.equals(instantiationType, A_LA_CARTE));
 
-        serviceInstance.setModelInfo(createModelInfo(rootNode, ModelType.service));
+        serviceInstance.setModelInfo(createModelInfo(rootNode));
 
         //set children: vnf, network,group
         rootNode.getChildren().forEach(child -> {
-            if (child.getType().equals(AAITreeNodeBuilder.GENERIC_VNF)) {
+            if (child.getType() == NodeType.GENERIC_VNF) {
                 serviceInstance.getVnfs().put(child.getUniqueNodeKey(), Vnf.from(child));
-            } else if (child.getType().equals(AAITreeNodeBuilder.NETWORK)) {
+            } else if (child.getType() == NodeType.NETWORK) {
                 serviceInstance.getNetworks().put(child.getUniqueNodeKey(), Network.from(child));
-            } else if (child.getType().equals(AAITreeNodeBuilder.INSTANCE_GROUP)) {
-                serviceInstance.getVnfGroups().put(child.getUniqueNodeKey(), VnfGroup.from(child));
+            } else if (child.getType() == NodeType.INSTANCE_GROUP) {
+                serviceInstance.getVnfGroups().put(child.getUniqueNodeKey(), new VnfGroup(child));
+            } else if (child.getType() == NodeType.COLLECTION_RESOURCE) {
+                serviceInstance.getCollectionResources().put(child.getUniqueNodeKey(), new CollectionResource(child));
+            } else if (isChildVrf(instanceType, instanceRole, child)){
+                serviceInstance.getVrfs().put(child.getUniqueNodeKey(), Vrf.from(child));
             }
         });
 
         serviceInstance.setExistingVNFCounterMap(
-                serviceInstance.getVnfs().entrySet().stream()
-                        .map(k -> k.getValue().getModelInfo().getModelVersionId())
-                        .collect(groupingBy(identity(), counting()))
+                getExistingCounterMap(serviceInstance.getVnfs())
         );
 
         serviceInstance.setExistingNetworksCounterMap(
-                serviceInstance.getNetworks().entrySet().stream()
-                .map(k -> k.getValue().getModelInfo().getModelVersionId())
-                .filter(Objects::nonNull)
-                        .collect(groupingBy(identity(), counting()))
+                getExistingCounterMap(serviceInstance.getNetworks())
         );
 
 
         serviceInstance.setExistingVnfGroupCounterMap(
-                serviceInstance.getVnfGroups().entrySet().stream()
-                .map(k -> k.getValue().getModelInfo().getModelVersionId())
-                .filter(Objects::nonNull)
-                        .collect(groupingBy(identity(), counting()))
+                getExistingCounterMap(serviceInstance.getVnfGroups())
+        );
+
+        serviceInstance.setExistingVRFCounterMap(
+                getExistingCounterMap(serviceInstance.getVrfs())
         );
 
         return serviceInstance;
     }
 
-    private static ModelInfo createModelInfo(AAITreeNode aaiNode, ModelType modelType) {
+    protected boolean isChildVrf(String instanceType, String serviceRole, AAITreeNode child) {
+        return child.getType() == NodeType.CONFIGURATION && StringUtils.equalsIgnoreCase(instanceType, "BONDING") && StringUtils.equalsIgnoreCase(serviceRole, "INFRASTRUCTURE-VPN");
+    }
+
+    private <T extends Node> Map<String, Long> getExistingCounterMap(Map<String, T> nodeList) {
+        return nodeList.entrySet().stream()
+                .map(k -> {
+                    ModelInfo modelInfo = k.getValue().getModelInfo();
+                    return StringUtils.defaultIfEmpty(modelInfo.getModelCustomizationId(), modelInfo.getModelVersionId());
+                })
+                .filter(Objects::nonNull)
+                .collect(groupingBy(identity(), counting()));
+    }
+
+    private static ModelInfo createModelInfo(AAITreeNode aaiNode) {
         ModelInfo modelInfo = new ModelInfo();
-        modelInfo.setModelType(modelType.name());
+        modelInfo.setModelType(aaiNode.getType().getModelType());
         modelInfo.setModelName(aaiNode.getModelName());
         modelInfo.setModelVersion(aaiNode.getModelVersion());
         modelInfo.setModelVersionId(aaiNode.getModelVersionId());
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/AAITreeNodeUtils.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAITreeNodeUtils.java
new file mode 100644
index 0000000..7ff6f28
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAITreeNodeUtils.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.aai.util;
+
+import java.util.List;
+import java.util.Optional;
+import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.KeyValueModel;
+import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship;
+import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.RelationshipList;
+
+public class AAITreeNodeUtils {
+
+    private AAITreeNodeUtils() {
+    }
+
+    public static Optional<Relationship> findFirstRelationshipByRelatedTo(RelationshipList relationshipList, String relatedTo) {
+        if (relationshipList==null || relationshipList.getRelationship()==null) {
+            return Optional.empty();
+        }
+        return relationshipList.getRelationship().stream().filter(x->relatedTo.equals(x.getRelatedTo())).findFirst();
+    }
+
+    public static <T extends KeyValueModel> Optional<String> findFirstValue(List<T> data, String key) {
+        if (data==null || data.isEmpty()) {
+            return Optional.empty();
+        }
+        Optional<T> optValue = data.stream().filter(x->key.equals(x.getKey())).findFirst();
+        return optValue.map(KeyValueModel::getValue);
+    }
+
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/local/LocalAsdcClient.java b/vid-app-common/src/main/java/org/onap/vid/asdc/local/LocalAsdcClient.java
index 7cfd094..ce1bbe9 100644
--- a/vid-app-common/src/main/java/org/onap/vid/asdc/local/LocalAsdcClient.java
+++ b/vid-app-common/src/main/java/org/onap/vid/asdc/local/LocalAsdcClient.java
@@ -25,13 +25,6 @@
 import com.fasterxml.jackson.databind.JsonMappingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import io.joshworks.restclient.http.HttpResponse;
-import org.json.JSONArray;
-import org.json.JSONObject;
-import org.onap.vid.asdc.AsdcCatalogException;
-import org.onap.vid.asdc.AsdcClient;
-import org.onap.vid.asdc.beans.Service;
-import org.onap.vid.exceptions.GenericUncheckedException;
-
 import java.io.File;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
@@ -39,6 +32,12 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.UUID;
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.onap.vid.asdc.AsdcCatalogException;
+import org.onap.vid.asdc.AsdcClient;
+import org.onap.vid.asdc.beans.Service;
+import org.onap.vid.exceptions.GenericUncheckedException;
 
 /**
  * The Class LocalAsdcClient.
@@ -147,14 +146,14 @@
             return null;
         }
         ClassLoader classLoader = getClass().getClassLoader();
-        File file = new File(classLoader.getResource(toscaModelURL).getFile());
 
         try {
+            File file = new File(classLoader.getResource(toscaModelURL).getFile());
             //using URLDecoder.decode to convert special characters from %XX to real character
             //see https://stackoverflow.com/questions/32251251/java-classloader-getresource-with-special-characters-in-path
             return Paths.get(URLDecoder.decode(file.getPath(), "UTF-8"));
-        } catch (UnsupportedEncodingException e) {
-            throw new GenericUncheckedException(e);
+        } catch (RuntimeException | UnsupportedEncodingException e) {
+            throw new GenericUncheckedException("Can't find " + toscaModelURL, e);
         }
     }
 
diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java
index c702cf4..735ba43 100644
--- a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java
+++ b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl2.java
@@ -7,9 +7,9 @@
  * 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.
@@ -22,6 +22,8 @@
 
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.tuple.Pair;
+import org.jetbrains.annotations.Nullable;
 import org.onap.sdc.tosca.parser.api.ISdcCsarHelper;
 import org.onap.sdc.tosca.parser.enums.FilterType;
 import org.onap.sdc.tosca.parser.enums.SdcTypes;
@@ -29,7 +31,6 @@
 import org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory;
 import org.onap.sdc.toscaparser.api.Group;
 import org.onap.sdc.toscaparser.api.*;
-import org.onap.sdc.toscaparser.api.elements.Metadata;
 import org.onap.sdc.toscaparser.api.parameters.Input;
 import org.onap.vid.asdc.beans.Service;
 import org.onap.vid.model.*;
@@ -66,6 +67,7 @@
         public static final String VF_MODULE_MODEL_NAME = "vfModuleModelName";
         public static final String GET_INPUT = "get_input";
         public static final String TYPE = "type";
+        public static final String QUANTITY = "quantity";
 
         public static final String INSTANTIATION_TYPE = "instantiationType";
         //instantiation type
@@ -106,8 +108,16 @@
 
         public static final String VNF_GROUP = "VnfGroup";
 
+        public static final String VRF_NODE_TYPE = "org.openecomp.nodes.VRFEntry";
+
+        public static final String PORT_MIRRORING_CONFIGURATION_NODE_TYPE = "org.openecomp.nodes.PortMirroringConfiguration";
+
+        public static final String PORT_MIRRORING_CONFIGURATION_BY_POLICY_NODE_TYPE = "org.openecomp.nodes.PortMirroringConfigurationByPolicy";
+
         public static final String NAMING_POLICY_TYPE = "org.openecomp.policies.External";
 
+        public static final String SCALING_POLICY_TYPE = "org.openecomp.policies.scaling.Fixed";
+
         public static final String ECOMP_GENERATED_NAMING_PROPERTY = "ecomp_generated_naming";
     }
 
@@ -119,6 +129,7 @@
         ServiceModel serviceModel = new ServiceModel();
         ISdcCsarHelper sdcCsarHelper = getSdcCsarHelper(path);
         List<String> policiesTargets = extractNamingPoliciesTargets(sdcCsarHelper);
+        Map<String, Integer> scalingPolicies = extractScalingPolicyOfGroup(sdcCsarHelper);
 
         serviceModel.setService(extractServiceFromCsar(asdcServiceMetadata, sdcCsarHelper));
         serviceModel.setVolumeGroups(extractVolumeGroups(sdcCsarHelper));
@@ -128,9 +139,10 @@
         serviceModel.setServiceProxies(extractServiceProxyFromCsar(sdcCsarHelper, policiesTargets));
         serviceModel.setNetworks(extractNetworksFromCsar(sdcCsarHelper, policiesTargets));
         serviceModel.setPnfs(extractPnfsFromCsar(sdcCsarHelper, policiesTargets));
-        serviceModel.setCollectionResource(extractCRFromCsar(sdcCsarHelper, policiesTargets));
+        serviceModel.setCollectionResources(extractCRFromCsar(sdcCsarHelper, policiesTargets));
         serviceModel.setFabricConfigurations(extractFabricConfigFromCsar(sdcCsarHelper, policiesTargets));
-        serviceModel.setVnfGroups(extractVnfGroupsFromCsar(sdcCsarHelper, policiesTargets));
+        serviceModel.setVnfGroups(extractVnfGroupsFromCsar(sdcCsarHelper, policiesTargets, scalingPolicies));
+        serviceModel.setVrfs(extractVrfsFromCsar(sdcCsarHelper, policiesTargets));
         serviceModel.getService().setVidNotions(vidNotionsBuilder.buildVidNotions(sdcCsarHelper, serviceModel));
         return serviceModel;
     }
@@ -248,7 +260,7 @@
             vnf.setVfModules(getVfModulesFromVF(csarHelper, vnf.getCustomizationUuid()));
             vnf.setVolumeGroups(getVolumeGroupsFromVF(csarHelper, vnf.getCustomizationUuid()));
             vnf.setVfcInstanceGroups(getVfcInstanceGroup(csarHelper, nodeTemplate));
-            if (ToscaNamingPolicy.getEcompNamingValueForNode(nodeTemplate, "nf_naming").equals("true")) {
+            if ("true".equals(ToscaNamingPolicy.getEcompNamingValueForNode(nodeTemplate, "nf_naming"))) {
                 setEcompNamingProperty(vnf.getProperties(), "true");
             }
             vnfsMaps.put(nodeTemplate.getName(), vnf);
@@ -291,7 +303,8 @@
     }
 
     private Map<String, PortMirroringConfig> extractPortMirroringConfigFromCsar(ISdcCsarHelper csarHelper, List<String> policiesTargets) {
-        List<NodeTemplate> nodeTemplates = csarHelper.getServiceNodeTemplateBySdcType(SdcTypes.CONFIGURATION);//TODO change to
+        List<NodeTemplate> nodeTemplates = csarHelper.getServiceNodeTemplatesByType(Constants.PORT_MIRRORING_CONFIGURATION_NODE_TYPE);
+        nodeTemplates.addAll(csarHelper.getServiceNodeTemplatesByType(Constants.PORT_MIRRORING_CONFIGURATION_BY_POLICY_NODE_TYPE));
         Map<String, PortMirroringConfig> configMaps = new HashMap<>();
 
         for (NodeTemplate nodeTemplate : nodeTemplates) {
@@ -379,7 +392,7 @@
             Network newNetwork = new Network();
             populateNodeFromNodeTemplate(nodeTemplate, csarHelper, newNetwork, policiesTargets);
             newNetwork.setModelCustomizationName(nodeTemplate.getName());
-            if (ToscaNamingPolicy.getEcompNamingValueForNode(nodeTemplate, "exVL_naming").equals("true")) {
+            if ("true".equals(ToscaNamingPolicy.getEcompNamingValueForNode(nodeTemplate, "exVL_naming"))) {
                 setEcompNamingProperty(newNetwork.getProperties(), "true");
             }
             networksMap.put(nodeTemplate.getName(), newNetwork);
@@ -389,14 +402,7 @@
 
     private Map<String, Node> extractPnfsFromCsar(ISdcCsarHelper csarHelper, List<String> policiesTargets) {
         List<NodeTemplate> nodeTemplates = csarHelper.getServiceNodeTemplateBySdcType(SdcTypes.PNF);
-        HashMap<String, Node> pnfHashMap = new HashMap<>();
-
-        for (NodeTemplate nodeTemplate : nodeTemplates) {
-            Node pnf = new Node();
-            populateNodeFromNodeTemplate(nodeTemplate, csarHelper, pnf, policiesTargets);
-            pnfHashMap.put(nodeTemplate.getName(), pnf);
-        }
-        return pnfHashMap;
+        return this.extractNodesFromCsar(csarHelper,policiesTargets,nodeTemplates);
     }
 
     private Map<String, VfModule> extractVfModuleFromCsar(ISdcCsarHelper csarHelper) {
@@ -426,7 +432,7 @@
         for (org.onap.sdc.toscaparser.api.parameters.Input input : inputList) {
             //Set only inputs without annotation to the service level
             if ( input.getAnnotations() == null )
-                inputs.put(input.getName(), convertInput(input, new org.onap.vid.asdc.beans.tosca.Input(), null));
+                inputs.put(input.getName(), convertInput(input, new org.onap.vid.asdc.beans.tosca.Input()));
         }
         return inputs;
     }
@@ -546,7 +552,7 @@
     }
 
 
-    public static boolean isModuleTypeIsBaseObjectSafe(Object vfModuleTypeValue) {
+    public static boolean isModuleTypeIsBaseObjectSafe(@Nullable Object vfModuleTypeValue) {
         return (vfModuleTypeValue instanceof String) && (isModuleTypeIsBase((String) vfModuleTypeValue));
     }
 
@@ -567,7 +573,7 @@
             for (Input input : inputs) {
                 if ( input.getName().equals(key) ) {
                     org.onap.vid.asdc.beans.tosca.Input localInput = new org.onap.vid.asdc.beans.tosca.Input();
-                    localInput = convertInput(input, localInput, nodeTemplate);
+                    localInput = convertInput(input, localInput);
                     String name = property.getKey();
                     commandPropertyMap.put(name, extractCommands(name, key));
                     inputMap.put(name, localInput);
@@ -582,23 +588,13 @@
         return inputKey.substring(inputKey.indexOf(':') + 1);
     }
 
-    private org.onap.vid.asdc.beans.tosca.Input convertInput(Input parserInput, org.onap.vid.asdc.beans.tosca.Input localInput, NodeTemplate nodeTemplate){
+    private org.onap.vid.asdc.beans.tosca.Input convertInput(Input parserInput, org.onap.vid.asdc.beans.tosca.Input localInput) {
         localInput.setDefault(parserInput.getDefault());
         localInput.setDescription(parserInput.getDescription());
         localInput.setRequired(parserInput.isRequired());
         localInput.setType(parserInput.getType());
         localInput.setConstraints(parserInput.getConstraints());
 //        localInput.setentry_schema()
-
-        //if inputs of inner nodeTemplate - tell its details
-        if(nodeTemplate != null) {
-            Metadata metadata = nodeTemplate.getMetaData();
-            localInput.setTemplateName(metadata.getValue("name"));
-            localInput.setTemplateUUID(metadata.getValue("UUID"));
-            localInput.setTemplateInvariantUUID(metadata.getValue("invariantUUID"));
-            localInput.setTemplateCustomizationUUID(metadata.getValue("customizationUUID"));
-        }
-
         return localInput;
     }
 
@@ -626,15 +622,30 @@
         return validatedInstantiationType;
     }
 
-    private Map<String, ResourceGroup> extractVnfGroupsFromCsar(ISdcCsarHelper csarHelper, List<String> policiesTargets) {
+    private Map<String, Node> extractVrfsFromCsar(ISdcCsarHelper csarHelper, List<String> policiesTargets) {
+        List<NodeTemplate> nodeTemplates = csarHelper.getServiceNodeTemplatesByType(Constants.VRF_NODE_TYPE);
+        return this.extractNodesFromCsar(csarHelper,policiesTargets,nodeTemplates);
+    }
+
+    private Map<String, Node> extractNodesFromCsar(ISdcCsarHelper csarHelper, List<String> policiesTargets, List<NodeTemplate> nodeTemplates){
+        HashMap<String, Node> nodeHashMap = new HashMap<>();
+        for (NodeTemplate nodeTemplate : nodeTemplates) {
+            Node node = new Node();
+            populateNodeFromNodeTemplate(nodeTemplate, csarHelper, node, policiesTargets);
+            nodeHashMap.put(nodeTemplate.getName(), node);
+        }
+        return nodeHashMap;
+    }
+
+    private Map<String, ResourceGroup> extractVnfGroupsFromCsar(ISdcCsarHelper csarHelper, List<String> policiesTargets, Map<String, Integer> scalingPolicies) {
         List<Group> resourceGroups = csarHelper.getGroupsOfTopologyTemplateByToscaGroupType(Constants.RESOURCE_GROUP_TYPE);
 
         return resourceGroups.stream()
                 .filter(group -> group.getProperties().get(Constants.RESOURCE_GROUP_CONTAINED_TYPE).getValue().equals("VF"))
-                .collect(toMap(Group::getName, group -> parseResourceGroup(group, csarHelper, policiesTargets)));
+                .collect(toMap(Group::getName, group -> parseResourceGroup(group, csarHelper, policiesTargets, scalingPolicies)));
     }
 
-    private ResourceGroup parseResourceGroup(Group group, ISdcCsarHelper csarHelper, List<String> policiesTargets) {
+    private ResourceGroup parseResourceGroup(Group group, ISdcCsarHelper csarHelper, List<String> policiesTargets, Map<String, Integer> scalingPolicies) {
         return new ResourceGroup(
                 Constants.VNF_GROUP,
                 group.getMetadata().getValue(Constants.INVARIANT_UUID),
@@ -642,16 +653,19 @@
                 group.getMetadata().getValue(Constants.VERSION),
                 group.getMetadata().getValue(Constants.NAME),
                 group.getMetadata().getValue(Constants.NAME),
-                getPropertiesOfResourceGroup(group.getProperties(), policiesTargets.contains(group.getName())),
+                getPropertiesOfResourceGroup(group.getProperties(), policiesTargets.contains(group.getName()), scalingPolicies.get(group.getName())),
                 csarHelper.getGroupMembersFromTopologyTemplate(group.getName()).stream()
                         .collect(toMap(NodeTemplate::getName, node -> getServiceProxyFromNodeTemplate(node, csarHelper, policiesTargets)))
         );
     }
 
-    private Map<String, Object> getPropertiesOfResourceGroup(Map<String, Property> properties, boolean hasPolicyTarget) {
+    private Map<String, Object> getPropertiesOfResourceGroup(Map<String, Property> properties, boolean hasPolicyTarget, Integer qty) {
         Map<String, Object> propertiesMap = properties.entrySet().stream()
                 .collect(toMap(Map.Entry::getKey, e -> e.getValue().getValue()));
         propertiesMap.put(Constants.ECOMP_GENERATED_NAMING_PROPERTY, String.valueOf(hasPolicyTarget));
+        if (qty != null)  {
+            propertiesMap.put(Constants.QUANTITY, qty);
+        }
 
         return propertiesMap;
     }
@@ -660,9 +674,22 @@
         List<Policy> policies = csarHelper.getPoliciesOfTopologyTemplateByToscaPolicyType(Constants.NAMING_POLICY_TYPE);
         return policies.stream()
                 .filter(policy -> policy.getProperties().get(Constants.TYPE) != null &&
-                                policy.getProperties().get(Constants.TYPE).getValue() != null &&
+                        policy.getProperties().get(Constants.TYPE).getValue() != null &&
                         StringUtils.equalsIgnoreCase(policy.getProperties().get(Constants.TYPE).getValue().toString(), "naming"))
                 .flatMap(policy -> policy.getTargets().stream())
                 .collect(toList());
     }
-}
+
+    public Map<String, Integer> extractScalingPolicyOfGroup(ISdcCsarHelper csarHelper)  {
+        return csarHelper.getPoliciesOfTopologyTemplateByToscaPolicyType(Constants.SCALING_POLICY_TYPE)
+                .stream()
+                .filter(policy -> policy.getProperties().containsKey(Constants.QUANTITY))
+                .flatMap(policy -> {
+                    Integer qty = Integer.parseInt(policy.getProperties().get(Constants.QUANTITY).getValue().toString());
+                    return policy
+                            .getTargets().stream()
+                            .map(target -> Pair.of(target, qty));
+                })
+                .collect(toMap(Pair::getKey, Pair::getValue));
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/VidNotionsBuilder.java b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/VidNotionsBuilder.java
index a286952..c9c2649 100644
--- a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/VidNotionsBuilder.java
+++ b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/VidNotionsBuilder.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,36 +20,75 @@
 
 package org.onap.vid.asdc.parser;
 
+import static org.apache.commons.lang3.StringUtils.equalsAnyIgnoreCase;
+import static org.apache.commons.lang3.StringUtils.equalsIgnoreCase;
+import static org.apache.commons.lang3.StringUtils.isEmpty;
+
+import com.google.common.collect.ImmutableMap;
+import java.util.Map;
 import org.apache.commons.collections.MapUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.jetbrains.annotations.Nullable;
 import org.onap.sdc.tosca.parser.api.ISdcCsarHelper;
 import org.onap.sdc.toscaparser.api.NodeTemplate;
+import org.onap.sdc.toscaparser.api.elements.Metadata;
 import org.onap.vid.model.ServiceModel;
 import org.onap.vid.model.VidNotions;
 import org.onap.vid.properties.Features;
 import org.togglz.core.manager.FeatureManager;
 
-import static org.apache.commons.lang3.StringUtils.equalsAnyIgnoreCase;
-import static org.apache.commons.lang3.StringUtils.equalsIgnoreCase;
-
 public class VidNotionsBuilder {
 
     private final FeatureManager featureManager;
 
+    //map of service type that are always macro services, and their relevant featureFlag
+    private static final Map<VidNotions.ModelCategory, Features> macroServicesByModelCategory = ImmutableMap.of(
+            VidNotions.ModelCategory.INFRASTRUCTURE_VPN, Features.FLAG_1908_INFRASTRUCTURE_VPN,
+            VidNotions.ModelCategory.Transport, Features.FLAG_1908_TRANSPORT_SERVICE_NEW_INSTANTIATION_UI,
+            VidNotions.ModelCategory.SERVICE_WITH_COLLECTION_RESOURCE, Features.FLAG_1908_COLLECTION_RESOURCE_NEW_INSTANTIATION_UI
+    );
+
     public VidNotionsBuilder(FeatureManager featureManager) {
         this.featureManager = featureManager;
     }
 
-    public VidNotions buildVidNotions(ISdcCsarHelper csarHelper, ServiceModel serviceModel) {
-        final VidNotions.InstantiationUI instantiationUI = suggestInstantiationUI(csarHelper);
+    VidNotions buildVidNotions(ISdcCsarHelper csarHelper, ServiceModel serviceModel) {
+        VidNotions.ModelCategory modelCategory = suggestModelCategory(csarHelper, serviceModel);
+        return new VidNotions(
+                suggestInstantiationUI(csarHelper, serviceModel),
+                modelCategory,
+                suggestViewEditUI(csarHelper, serviceModel),
+                suggestInstantiationType(serviceModel, modelCategory));
+    }
 
-        return new VidNotions(instantiationUI, suggestModelCategory(csarHelper), suggestViewEditUI(csarHelper, serviceModel));
+    private boolean isMacroTypeByModelCategory(VidNotions.ModelCategory modelCategory) {
+        Features featureOfMacroType = macroServicesByModelCategory.get(modelCategory);
+        //if featureOfMacroType is null this service is not a macro by its type
+        return (featureOfMacroType!=null && featureManager.isActive(featureOfMacroType));
+    }
+
+    VidNotions.InstantiationType suggestInstantiationType(ServiceModel serviceModel, VidNotions.ModelCategory modelCategory) {
+        if (isMacroTypeByModelCategory(modelCategory)) {
+            return VidNotions.InstantiationType.Macro;
+        }
+        if (serviceModel==null || serviceModel.getService()==null || isEmpty(serviceModel.getService().getInstantiationType())) {
+            return VidNotions.InstantiationType.ClientConfig;
+        }
+        String instantiationType = serviceModel.getService().getInstantiationType();
+        if (instantiationType.equals(ToscaParserImpl2.Constants.MACRO)) {
+            return VidNotions.InstantiationType.Macro;
+        }
+        if (instantiationType.equals(ToscaParserImpl2.Constants.A_LA_CARTE)) {
+            return VidNotions.InstantiationType.ALaCarte;
+        }
+
+        return VidNotions.InstantiationType.ClientConfig;
     }
 
     //UI route a-la-carte services to old UI only if InstantiationUI is LEGACY
     //So any other value for InstantiationUI other than LEGACY make UI to route
     //a-la-carte services to new UI
-    VidNotions.InstantiationUI suggestInstantiationUI(ISdcCsarHelper csarHelper) {
+    VidNotions.InstantiationUI suggestInstantiationUI(ISdcCsarHelper csarHelper, ServiceModel serviceModel) {
         if(featureManager.isActive(Features.FLAG_EXP_ANY_ALACARTE_NEW_INSTANTIATION_UI) && isALaCarte(csarHelper)) {
             return VidNotions.InstantiationUI.ANY_ALACARTE_NEW_UI;
         }
@@ -57,42 +96,91 @@
             return VidNotions.InstantiationUI.SERVICE_WITH_VNF_GROUPING;
         }
         if (featureManager.isActive(Features.FLAG_5G_IN_NEW_INSTANTIATION_UI)) {
-            if (isUuidExactlyHardCoded1ffce89fef3f(csarHelper)) {
-                return VidNotions.InstantiationUI.SERVICE_UUID_IS_1ffce89f_ef3f_4cbb_8b37_82134590c5de;
-            } else if (isALaCarte(csarHelper) && hasAnyNetworkWithPropertyNetworkTechnologyEqualsStandardSriovOrOvs(csarHelper)) {
-                return VidNotions.InstantiationUI.NETWORK_WITH_PROPERTY_NETWORK_TECHNOLOGY_EQUALS_STANDARD_SRIOV_OR_OVS;
-            } else if (isALaCarte(csarHelper) && hasFabricConfiguration(csarHelper)) {
-                return VidNotions.InstantiationUI.SERVICE_WITH_FABRIC_CONFIGURATION;
-            }
+            VidNotions.InstantiationUI instantiationUI = determine5GInstantiationUI(csarHelper);
+            if ( instantiationUI != null ) return instantiationUI;
         }
-
+        if (featureManager.isActive(Features.FLAG_1908_TRANSPORT_SERVICE_NEW_INSTANTIATION_UI) && isTransportService(csarHelper)){
+            return VidNotions.InstantiationUI.TRANSPORT_SERVICE;
+        }
+        if (featureManager.isActive(Features.FLAG_1908_COLLECTION_RESOURCE_NEW_INSTANTIATION_UI) && isServiceWithCollectionResource(serviceModel)){
+            return VidNotions.InstantiationUI.SERVICE_WITH_COLLECTION_RESOURCE;
+        }
+        if (featureManager.isActive(Features.FLAG_1908_INFRASTRUCTURE_VPN) && isInfraStructureVpn(csarHelper)){
+            return VidNotions.InstantiationUI.INFRASTRUCTURE_VPN;
+        }
+        if (featureManager.isActive(Features.FLAG_1908_A_LA_CARTE_VNF_NEW_INSTANTIATION_UI) && isVnfServiceRole(csarHelper)){
+            return VidNotions.InstantiationUI.A_LA_CARTE_VNF_SERVICE_ROLE;
+        }
         return VidNotions.InstantiationUI.LEGACY;
 
     }
 
-    VidNotions.ModelCategory suggestModelCategory(ISdcCsarHelper csarHelper) {
+    private boolean isVnfServiceRole(ISdcCsarHelper csarHelper) {
+        final String serviceRole = csarHelper.getServiceMetadata().getValue(ToscaParserImpl2.Constants.SERVICE_ROLE );
+        return StringUtils.equalsIgnoreCase("VNF" , serviceRole);
+    }
+
+    @Nullable
+    private VidNotions.InstantiationUI determine5GInstantiationUI(ISdcCsarHelper csarHelper) {
+        if (isUuidExactlyHardCoded1ffce89fef3f(csarHelper)) {
+            return VidNotions.InstantiationUI.SERVICE_UUID_IS_1ffce89f_ef3f_4cbb_8b37_82134590c5de;
+        } else if (isALaCarte(csarHelper) && hasAnyNetworkWithPropertyNetworkTechnologyEqualsStandardSriovOrOvs(csarHelper)) {
+            return VidNotions.InstantiationUI.NETWORK_WITH_PROPERTY_NETWORK_TECHNOLOGY_EQUALS_STANDARD_SRIOV_OR_OVS;
+        } else if (isALaCarte(csarHelper) && hasFabricConfiguration(csarHelper)) {
+            return VidNotions.InstantiationUI.SERVICE_WITH_FABRIC_CONFIGURATION;
+        }
+        return null;
+    }
+
+    private boolean isTransportService(ISdcCsarHelper csarHelper) {
+        return ("TRANSPORT".equalsIgnoreCase(csarHelper.getServiceMetadata().getValue(ToscaParserImpl2.Constants.SERVICE_TYPE)));
+    }
+
+    private boolean isServiceWithCollectionResource(ServiceModel serviceModel){
+        return MapUtils.isNotEmpty(serviceModel.getCollectionResources());
+    }
+
+    private boolean isInfraStructureVpn(ISdcCsarHelper csarHelper) {
+        Metadata serviceMetadata = csarHelper.getServiceMetadata();
+        return ("BONDING".equalsIgnoreCase(serviceMetadata.getValue(ToscaParserImpl2.Constants.SERVICE_TYPE)) &&
+                "INFRASTRUCTURE-VPN".equalsIgnoreCase(serviceMetadata.getValue(ToscaParserImpl2.Constants.SERVICE_ROLE)));
+    }
+
+    VidNotions.ModelCategory suggestModelCategory(ISdcCsarHelper csarHelper, ServiceModel serviceModel) {
         if (isALaCarte(csarHelper) && hasAnyNetworkWithPropertyNetworkTechnologyEqualsStandardSriovOrOvs(csarHelper)){
             return VidNotions.ModelCategory.IS_5G_PROVIDER_NETWORK_MODEL;
-          } else if(isALaCarte(csarHelper) && hasFabricConfiguration(csarHelper)) {
-            return VidNotions.ModelCategory.IS_5G_FABRIC_CONFIGURATION_MODEL;
-        } else {
-            return VidNotions.ModelCategory.OTHER;
         }
+        if(isALaCarte(csarHelper) && hasFabricConfiguration(csarHelper)) {
+            return VidNotions.ModelCategory.IS_5G_FABRIC_CONFIGURATION_MODEL;
+        }
+        if (isInfraStructureVpn(csarHelper)) {
+            return VidNotions.ModelCategory.INFRASTRUCTURE_VPN;
+        }
+        if (isTransportService(csarHelper)) {
+            return VidNotions.ModelCategory.Transport;
+        }
+        if (isServiceWithCollectionResource(serviceModel)) {
+            return VidNotions.ModelCategory.SERVICE_WITH_COLLECTION_RESOURCE;
+        }
+        return VidNotions.ModelCategory.OTHER;
     }
 
     VidNotions.InstantiationUI suggestViewEditUI(ISdcCsarHelper csarHelper, ServiceModel serviceModel) {
-        if (!featureManager.isActive(Features.FLAG_ASYNC_INSTANTIATION)){
-            return VidNotions.InstantiationUI.LEGACY;
-        }
         if (featureManager.isActive(Features.FLAG_1902_VNF_GROUPING) && isGrouping(csarHelper)) {
             return VidNotions.InstantiationUI.SERVICE_WITH_VNF_GROUPING;
         }
 
+        if (featureManager.isActive(Features.FLAG_1908_COLLECTION_RESOURCE_NEW_INSTANTIATION_UI) &&
+                featureManager.isActive(Features.FLAG_1908_RESUME_MACRO_SERVICE) &&
+                isServiceWithCollectionResource(serviceModel)) {
+            return VidNotions.InstantiationUI.SERVICE_WITH_COLLECTION_RESOURCE;
+        }
+
         if (featureManager.isActive(Features.FLAG_1902_NEW_VIEW_EDIT)) {
             if (isMacro(serviceModel) && !isMacroExcludedFromAsyncFlow(serviceModel)) {
                 return VidNotions.InstantiationUI.MACRO_SERVICE;
             }
-            VidNotions.InstantiationUI instantiationUISuggestion = suggestInstantiationUI(csarHelper);
+            VidNotions.InstantiationUI instantiationUISuggestion = suggestInstantiationUI(csarHelper, serviceModel);
             if (instantiationUISuggestion!=VidNotions.InstantiationUI.LEGACY) {
                 return instantiationUISuggestion;
             }
@@ -137,10 +225,8 @@
 
     boolean isMacroExcludedFromAsyncFlow(ServiceModel serviceModel) {
         return (MapUtils.isNotEmpty(serviceModel.getPnfs()) ||
-                MapUtils.isNotEmpty(serviceModel.getCollectionResource()) ||
+                MapUtils.isNotEmpty(serviceModel.getCollectionResources()) ||
                 (MapUtils.isNotEmpty(serviceModel.getNetworks()) && !featureManager.isActive(Features.FLAG_NETWORK_TO_ASYNC_INSTANTIATION)));
-
-
     }
 
     private boolean isGrouping(ISdcCsarHelper csarHelper) {
diff --git a/vid-app-common/src/main/java/org/onap/vid/changeManagement/CloudConfiguration.java b/vid-app-common/src/main/java/org/onap/vid/changeManagement/CloudConfiguration.java
index da4fd0a..f24e261 100644
--- a/vid-app-common/src/main/java/org/onap/vid/changeManagement/CloudConfiguration.java
+++ b/vid-app-common/src/main/java/org/onap/vid/changeManagement/CloudConfiguration.java
@@ -7,9 +7,9 @@
  * 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.
@@ -27,8 +27,8 @@
 
 @JsonInclude(JsonInclude.Include.NON_NULL)
 @JsonPropertyOrder({
-"lcpCloudRegionId",
-"tenantId"
+		"lcpCloudRegionId",
+		"tenantId"
 })
 public class CloudConfiguration {
 	@JsonProperty("lcpCloudRegionId")
@@ -40,32 +40,32 @@
 
 	@JsonProperty("lcpCloudRegionId")
 	public String getLcpCloudRegionId() {
-	return lcpCloudRegionId;
+		return lcpCloudRegionId;
 	}
 
 	@JsonProperty("lcpCloudRegionId")
 	public void setLcpCloudRegionId(String lcpCloudRegionId) {
-	this.lcpCloudRegionId = lcpCloudRegionId;
+		this.lcpCloudRegionId = lcpCloudRegionId;
 	}
 
 	@JsonProperty("tenantId")
 	public String getTenantId() {
-	return tenantId;
+		return tenantId;
 	}
 
 	@JsonProperty("tenantId")
 	public void setTenantId(String tenantId) {
-	this.tenantId = tenantId;
+		this.tenantId = tenantId;
 	}
 
 	@JsonAnyGetter
 	public Map<String, Object> getAdditionalProperties() {
-	return this.additionalProperties;
+		return this.additionalProperties;
 	}
 
 	@JsonAnySetter
 	public void setAdditionalProperty(String name, Object value) {
-	this.additionalProperties.put(name, value);
+		this.additionalProperties.put(name, value);
 	}
 
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/AaiController.java b/vid-app-common/src/main/java/org/onap/vid/controller/AaiController.java
index 4a4f3d3..eee2acc 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controller/AaiController.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/AaiController.java
@@ -50,6 +50,7 @@
 import org.onap.vid.aai.model.AaiGetTenatns.GetTenantsResponse;
 import org.onap.vid.aai.util.AAIRestInterface;
 import org.onap.vid.model.VersionByInvariantIdsRequest;
+import org.onap.vid.properties.Features;
 import org.onap.vid.roles.Role;
 import org.onap.vid.roles.RoleProvider;
 import org.onap.vid.roles.RoleValidator;
@@ -68,6 +69,7 @@
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.servlet.HandlerMapping;
 import org.springframework.web.servlet.ModelAndView;
+import org.togglz.core.manager.FeatureManager;
 
 
 @RestController
@@ -80,17 +82,22 @@
     private AAIRestInterface aaiRestInterface;
     private RoleProvider roleProvider;
     private SystemPropertiesWrapper systemPropertiesWrapper;
+    private FeatureManager featureManager;
+
 
     @Autowired
     public AaiController(AaiService aaiService,
         AAIRestInterface aaiRestInterface,
         RoleProvider roleProvider,
-        SystemPropertiesWrapper systemPropertiesWrapper) {
+        SystemPropertiesWrapper systemPropertiesWrapper,
+        FeatureManager featureManager
+    ) {
 
         this.aaiService = aaiService;
         this.aaiRestInterface = aaiRestInterface;
         this.roleProvider = roleProvider;
         this.systemPropertiesWrapper = systemPropertiesWrapper;
+        this.featureManager = featureManager;
     }
 
     @RequestMapping(value = {"/subscriberSearch"}, method = RequestMethod.GET)
@@ -261,13 +268,13 @@
     }
 
     @RequestMapping(value = "/aai_sub_details/{subscriberId}", method = RequestMethod.GET)
-    public ResponseEntity<String> GetSubscriberDetails(HttpServletRequest request,
-        @PathVariable("subscriberId") String subscriberId) throws IOException {
+    public ResponseEntity<String> getSubscriberDetails(HttpServletRequest request, @PathVariable("subscriberId") String subscriberId,
+                                                       @RequestParam(value="omitServiceInstances", required = false, defaultValue = "false") boolean omitServiceInstances) throws IOException {
         ObjectMapper objectMapper = new ObjectMapper();
         ResponseEntity responseEntity;
         List<Role> roles = roleProvider.getUserRoles(request);
         RoleValidator roleValidator = RoleValidator.by(roles);
-        AaiResponse subscriberData = aaiService.getSubscriberData(subscriberId, roleValidator);
+        AaiResponse subscriberData = aaiService.getSubscriberData(subscriberId, roleValidator, featureManager.isActive(Features.FLAG_1906_AAI_SUB_DETAILS_REDUCE_DEPTH) && omitServiceInstances);
         String httpMessage = subscriberData.getT() != null ?
             objectMapper.writeValueAsString(subscriberData.getT()) :
             subscriberData.getErrorMessage();
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/AaiServiceInstanceStandardQueryController.java b/vid-app-common/src/main/java/org/onap/vid/controller/AaiServiceInstanceStandardQueryController.java
index 8f56f77..015f8dc 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controller/AaiServiceInstanceStandardQueryController.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/AaiServiceInstanceStandardQueryController.java
@@ -21,48 +21,54 @@
 package org.onap.vid.controller;
 
 
-import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Network;
-import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.ServiceInstance;
-import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Vlan;
-import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Vnf;
-import org.onap.vid.aai.util.ServiceInstanceStandardQuery;
+import static java.util.stream.Collectors.toList;
+
+import com.google.common.collect.ImmutableMap;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Objects;
+import java.util.UUID;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.commons.text.StrSubstitutor;
 import org.onap.vid.asdc.AsdcCatalogException;
 import org.onap.vid.exceptions.GenericUncheckedException;
 import org.onap.vid.model.ServiceModel;
 import org.onap.vid.model.VidNotions;
+import org.onap.vid.model.aaiTree.AAITreeNode;
+import org.onap.vid.model.aaiTree.NodeType;
 import org.onap.vid.properties.Features;
+import org.onap.vid.services.AAIServiceTree;
 import org.onap.vid.services.VidService;
-import org.onap.vid.utils.Multival;
+import org.onap.vid.utils.Tree;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.togglz.core.manager.FeatureManager;
 
-import javax.servlet.http.HttpServletRequest;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.UUID;
-
-import static java.util.stream.Collectors.toList;
-
 
 @RestController
 @RequestMapping(AaiServiceInstanceStandardQueryController.AAI_STANDARD_QUERY)
 public class AaiServiceInstanceStandardQueryController extends VidRestrictedBaseController {
 
-    public static final String AAI_STANDARD_QUERY = "aai/standardQuery";
+    static final String AAI_STANDARD_QUERY = "aai/standardQuery";
+    private static final String SERVICE_INSTANCE_URI_TEMPLATE = "" +
+            "business/customers/customer/${global-customer-id}" +
+            "/service-subscriptions/service-subscription/${service-type}" +
+            "/service-instances/service-instance/${service-instance-id}";
 
-    private final ServiceInstanceStandardQuery serviceInstanceStandardQuery;
     private final FeatureManager featureManager;
     private final VidService sdcService;
+    private final AAIServiceTree aaiServiceTree;
 
     @Autowired
-    public AaiServiceInstanceStandardQueryController(FeatureManager featureManager, ServiceInstanceStandardQuery serviceInstanceStandardQuery, VidService sdcService) {
+    public AaiServiceInstanceStandardQueryController(FeatureManager featureManager,
+                                                     VidService sdcService, AAIServiceTree aaiServiceTree) {
         this.featureManager = featureManager;
-        this.serviceInstanceStandardQuery = serviceInstanceStandardQuery;
         this.sdcService = sdcService;
+        this.aaiServiceTree = aaiServiceTree;
     }
 
     @RequestMapping(value = "vlansByNetworks", method = RequestMethod.GET)
@@ -80,54 +86,50 @@
             return new VlansByNetworksHierarchy();
         }
 
-        final ServiceInstance serviceInstance =
-                serviceInstanceStandardQuery.fetchServiceInstance(globalCustomerId, serviceType, serviceInstanceId);
+        Tree<AAIServiceTree.AaiRelationship> pathsToSearch = new Tree<>(new AAIServiceTree.AaiRelationship(NodeType.SERVICE_INSTANCE));
+        pathsToSearch.addPath(AAIServiceTree.toAaiRelationshipList(NodeType.GENERIC_VNF, NodeType.NETWORK, NodeType.VLAN_TAG));
+        pathsToSearch.addPath(AAIServiceTree.toAaiRelationshipList(NodeType.NETWORK, NodeType.VLAN_TAG));
 
-        Multival<ServiceInstance, Multival<Vnf, Multival<Network, Vlan>>> l3NetworksWithVlansForVnfForService =  fetchVnfsForService(serviceInstance);
-        Multival<ServiceInstance, Multival<Network, Vlan>> l3NetworksWithVlansForService = fetchNetworksForService(serviceInstance);
+        AAITreeNode aaiTree = aaiServiceTree.buildAAITree(getServiceInstanceUri(globalCustomerId, serviceType, serviceInstanceId),
+                null, HttpMethod.GET, pathsToSearch, false).get(0);
 
         // translate to response's format
         return new VlansByNetworksHierarchy(
-                l3NetworksWithVlansForService.getValues().stream().map(this::translateNetworksFormat
-                    ).collect(toList()),
+            aaiTree.getChildren().stream()
+                .filter(child -> child.getType() == NodeType.NETWORK)
+                .map(this::translateNetworksFormat)
+                .collect(toList()),
 
-                l3NetworksWithVlansForVnfForService.getValues().stream().map(vnfWithNetworks ->
-                        new VnfVlansByNetworks(vnfWithNetworks.getKey().getVnfId(),
-                                vnfWithNetworks.getValues().stream().map(this::translateNetworksFormat
-                                ).collect(toList())
-                        )
-                ).collect(toList())
+            aaiTree.getChildren().stream()
+                    .filter(child -> child.getType() == NodeType.GENERIC_VNF)
+                    .map(vnf -> new VnfVlansByNetworks(vnf.getId(),
+                                    vnf.getChildren().stream()
+                                            .map(this::translateNetworksFormat)
+                                            .collect(toList())
+                            ))
+                    .collect(toList())
         );
     }
 
-    private Multival<ServiceInstance, Multival<Vnf, Multival<Network, Vlan>>> fetchVnfsForService(ServiceInstance serviceInstance) {
-        final Multival<ServiceInstance, Vnf> vnfsForService =
-                serviceInstanceStandardQuery.fetchRelatedVnfs(serviceInstance);
-
-        final Multival<ServiceInstance, Multival<Vnf, Network>> vnfsWithL3NetworksForService =
-                vnfsForService.mapEachVal(vnf -> serviceInstanceStandardQuery.fetchRelatedL3Networks("vnf", vnf));
-
-        return  vnfsWithL3NetworksForService.mapEachVal(vnfMulti->
-                        vnfMulti.mapEachVal(serviceInstanceStandardQuery::fetchRelatedVlanTags)
-                );
+    private String getServiceInstanceUri(String globalCustomerId, String serviceType, String serviceInstanceId) {
+        return new StrSubstitutor(ImmutableMap.of(
+                "global-customer-id", globalCustomerId,
+                "service-type", serviceType,
+                "service-instance-id", serviceInstanceId
+        )).replace(SERVICE_INSTANCE_URI_TEMPLATE);
 
     }
 
-    private Multival<ServiceInstance, Multival<Network, Vlan>> fetchNetworksForService(ServiceInstance serviceInstance) {
-        final Multival<ServiceInstance, Network> l3NetworksForService =
-                serviceInstanceStandardQuery.fetchRelatedL3Networks("service", serviceInstance);
-
-        return l3NetworksForService.mapEachVal(serviceInstanceStandardQuery::fetchRelatedVlanTags);
-    }
-
-    private NetworksToVlans translateNetworksFormat(Multival<Network, Vlan> networkWithVlan) {
+    private NetworksToVlans translateNetworksFormat(AAITreeNode networkWithVlan) {
         return new NetworksToVlans(
-                networkWithVlan.getKey().getNetworkId(),
-                networkWithVlan.getKey().getNetworkName(),
-                networkWithVlan.getKey().getNetworkType(),
-                networkWithVlan.getKey().getOrchestrationStatus(),
-                networkWithVlan.getValues().stream().map(
-                        vlan -> new NetworksToVlans.Vlan(vlan.getVlanIdInner())
+                networkWithVlan.getId(),
+                networkWithVlan.getName(),
+                Objects.toString(networkWithVlan.getAdditionalProperties().get("network-type"), null),
+                networkWithVlan.getOrchestrationStatus(),
+                networkWithVlan.getChildren().stream().map(
+                        vlan -> new NetworksToVlans.Vlan(
+                                Objects.toString(vlan.getAdditionalProperties().get("vlan-id-outer"), null)
+                        )
                 ).collect(toList())
         );
     }
@@ -138,8 +140,8 @@
             throw new GenericUncheckedException("Internal error while fetching Service Model: " + sdcModelUuid);
         }
         VidNotions.ModelCategory serviceModelCategory = serviceModel.getService().getVidNotions().getModelCategory();
-        return serviceModelCategory.equals(VidNotions.ModelCategory.IS_5G_PROVIDER_NETWORK_MODEL) ||
-                serviceModelCategory.equals(VidNotions.ModelCategory.IS_5G_FABRIC_CONFIGURATION_MODEL);
+        return (serviceModelCategory == VidNotions.ModelCategory.IS_5G_PROVIDER_NETWORK_MODEL) ||
+                (serviceModelCategory == VidNotions.ModelCategory.IS_5G_FABRIC_CONFIGURATION_MODEL);
     }
 
     protected static class VlansByNetworksHierarchy {
@@ -182,10 +184,10 @@
         }
 
         private static class Vlan {
-            public final String vlanIdInner;
+            public final String vlanIdOuter;
 
-            private Vlan(String vlanIdInner) {
-                this.vlanIdInner = vlanIdInner;
+            private Vlan(String vlanIdOuter) {
+                this.vlanIdOuter = vlanIdOuter;
             }
         }
 
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java b/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java
index 081e3c6..01b005c 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,25 +20,28 @@
 
 package org.onap.vid.controller;
 
-
-import com.fasterxml.jackson.databind.ObjectMapper;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.vid.exceptions.AccessDeniedException;
 import org.onap.vid.exceptions.OperationNotAllowedException;
 import org.onap.vid.model.ExceptionResponse;
 import org.onap.vid.model.JobAuditStatus;
 import org.onap.vid.model.ServiceInfo;
 import org.onap.vid.model.serviceInstantiation.ServiceInstantiation;
 import org.onap.vid.mso.MsoResponseWrapper2;
+import org.onap.vid.properties.Features;
+import org.onap.vid.roles.RoleProvider;
 import org.onap.vid.services.AsyncInstantiationBusinessLogic;
 import org.onap.vid.services.AuditService;
 import org.onap.vid.utils.SystemPropertiesWrapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import org.togglz.core.manager.FeatureManager;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.List;
 import java.util.UUID;
 
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
 import static org.springframework.http.HttpStatus.METHOD_NOT_ALLOWED;
 
 
@@ -51,14 +54,18 @@
     protected final AsyncInstantiationBusinessLogic asyncInstantiationBL;
     private final SystemPropertiesWrapper systemPropertiesWrapper;
 
-    protected ObjectMapper objectMapper = new ObjectMapper();
+    private final RoleProvider roleProvider;
+
+    private final FeatureManager featureManager;
 
     @Autowired
     protected AuditService auditService;
 
     @Autowired
-    public AsyncInstantiationController(AsyncInstantiationBusinessLogic asyncInstantiationBL, SystemPropertiesWrapper systemPropertiesWrapper) {
+    public AsyncInstantiationController(AsyncInstantiationBusinessLogic asyncInstantiationBL, RoleProvider roleProvider, FeatureManager featureManager, SystemPropertiesWrapper systemPropertiesWrapper) {
         this.asyncInstantiationBL = asyncInstantiationBL;
+        this.roleProvider = roleProvider;
+        this.featureManager = featureManager;
         this.systemPropertiesWrapper = systemPropertiesWrapper;
     }
 
@@ -82,14 +89,25 @@
     public MsoResponseWrapper2<List<String>> createBulkOfServices(@RequestBody ServiceInstantiation request, HttpServletRequest httpServletRequest) {
         //Push to DB according the model
         try {
-            LOGGER.debug(EELFLoggerDelegate.debugLogger, "incoming ServiceInstantiation request: "+ objectMapper.writeValueAsString(request));
+            LOGGER.debug(EELFLoggerDelegate.debugLogger, "incoming ServiceInstantiation request: "+ JACKSON_OBJECT_MAPPER.writeValueAsString(request));
         }
         catch (Exception e) {
             LOGGER.error(EELFLoggerDelegate.errorLogger, "failed to log incoming ServiceInstantiation request ", e);
         }
         String userId = new ControllersUtils(systemPropertiesWrapper).extractUserId(httpServletRequest);
-        List<UUID> uuids =  asyncInstantiationBL.pushBulkJob(request, userId);
 
+        throwExceptionIfAccessDenied(request, httpServletRequest, userId);
+        List<UUID> uuids = asyncInstantiationBL.pushBulkJob(request, userId);
+        return new MsoResponseWrapper2(200, uuids);
+    }
+
+
+
+    @RequestMapping(value = "retryJobWithChangedData/{jobId}", method = RequestMethod.POST)
+    public MsoResponseWrapper2<List<String>> retryJobWithChangedData(@RequestBody ServiceInstantiation request, @PathVariable(value="jobId") UUID jobId, HttpServletRequest httpServletRequest) {
+
+        String userId = new ControllersUtils(systemPropertiesWrapper).extractUserId(httpServletRequest);
+        List<UUID> uuids =  asyncInstantiationBL.retryJob(request, jobId, userId);
         return new MsoResponseWrapper2(200, uuids);
     }
 
@@ -105,7 +123,7 @@
 
     @RequestMapping(value = "auditStatus/{jobId}", method = RequestMethod.GET)
     public List<JobAuditStatus> getJobAuditStatus(HttpServletRequest request, @PathVariable(value="jobId") UUID jobId, @RequestParam(value="source") JobAuditStatus.SourceStatus source){
-        return asyncInstantiationBL.getAuditStatuses(jobId, source);
+        return auditService.getAuditStatuses(jobId, source);
     }
 
     @RequestMapping(value = "auditStatus/{jobId}/mso", method = RequestMethod.GET)
@@ -114,7 +132,7 @@
                                                                 @RequestParam(value="requestId", required = false) UUID requestId,
                                                                 @RequestParam(value="serviceInstanceId", required = false) UUID serviceInstanceId){
         if (serviceInstanceId != null) {
-            return auditService.getAuditStatusFromMsoByServiceInstanceId(jobId, serviceInstanceId);
+            return auditService.getAuditStatusFromMsoByInstanceId(JobAuditStatus.ResourceTypeFilter.SERVICE, serviceInstanceId, jobId);
         }
         if (requestId != null){
             return auditService.getAuditStatusFromMsoByRequestId(jobId, requestId);
@@ -123,5 +141,36 @@
 
     }
 
+    @RequestMapping(value = "auditStatus/{type}/{instanceId}/mso", method = RequestMethod.GET)
+    public List<JobAuditStatus> getAuditStatusFromMsoByInstanceId(HttpServletRequest request,
+                                                                  @PathVariable(value="type") JobAuditStatus.ResourceTypeFilter resourceTypeFilter,
+                                                                  @PathVariable(value="instanceId") UUID instanceId) {
+        return auditService.getAuditStatusFromMsoByInstanceId(resourceTypeFilter, instanceId, null);
+    }
 
+    @RequestMapping(value = "/bulkForRetry/{jobId}", method = RequestMethod.GET)
+    public ServiceInstantiation getBulkForRetry(HttpServletRequest request, @PathVariable(value="jobId") UUID jobId) {
+        return asyncInstantiationBL.getBulkForRetry(jobId);
+    }
+
+    @RequestMapping(value = "retry/{jobId}", method = RequestMethod.POST)
+    public MsoResponseWrapper2<List<UUID>> retryJobRequest(HttpServletRequest httpServletRequest,
+                                                           @PathVariable(value="jobId") UUID jobId) {
+
+        String userId = new ControllersUtils(systemPropertiesWrapper).extractUserId(httpServletRequest);
+        List<UUID> uuids =  asyncInstantiationBL.retryJob(jobId, userId);
+
+        return new MsoResponseWrapper2(200, uuids);
+    }
+
+    @RequestMapping(value = "/auditStatusForRetry/{trackById}", method = RequestMethod.GET)
+    public JobAuditStatus getResourceAuditStatus(HttpServletRequest request, @PathVariable(value="trackById") String trackById) {
+        return auditService.getResourceAuditStatus(trackById);
+    }
+
+    private void throwExceptionIfAccessDenied(ServiceInstantiation request, HttpServletRequest httpServletRequest, String userId) {
+        if (featureManager.isActive(Features.FLAG_1906_INSTANTIATION_API_USER_VALIDATION) && !roleProvider.getUserRolesValidator(httpServletRequest).isServicePermitted(request.getGlobalSubscriberId(), request.getSubscriptionServiceType())) {
+            throw new AccessDeniedException(String.format("User %s is not allowed to make this request", userId));
+        }
+    }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/MsoConfig.java b/vid-app-common/src/main/java/org/onap/vid/controller/MsoConfig.java
index 8d5fbbd..20cf6f0 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controller/MsoConfig.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/MsoConfig.java
@@ -56,8 +56,8 @@
 
 
     @Bean
-    public MsoBusinessLogic getMsoBusinessLogic(MsoInterface msoClient, FeatureManager featureManager){
-        return new MsoBusinessLogicImpl(msoClient, featureManager);
+    public MsoBusinessLogic getMsoBusinessLogic(MsoInterface msoClient){
+        return new MsoBusinessLogicImpl(msoClient);
     }
 
     @Bean
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/MsoController.java b/vid-app-common/src/main/java/org/onap/vid/controller/MsoController.java
index db3a219..fc718f0 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controller/MsoController.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/MsoController.java
@@ -20,9 +20,9 @@
 
 package org.onap.vid.controller;
 
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
 import static org.onap.vid.utils.Logging.getMethodName;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
 import java.io.IOException;
 import java.util.LinkedHashMap;
 import java.util.List;
@@ -31,10 +31,14 @@
 import org.onap.portalsdk.core.controller.RestrictedBaseController;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.vid.model.ExceptionResponse;
+import org.onap.vid.model.RequestReferencesContainer;
 import org.onap.vid.model.SoftDeleteRequest;
 import org.onap.vid.mso.MsoBusinessLogic;
 import org.onap.vid.mso.MsoResponseWrapper;
 import org.onap.vid.mso.MsoResponseWrapper2;
+import org.onap.vid.mso.RestMsoImplementation;
+import org.onap.vid.mso.RestObject;
+import org.onap.vid.mso.rest.MsoRestClientNew;
 import org.onap.vid.mso.rest.Request;
 import org.onap.vid.mso.rest.RequestDetails;
 import org.onap.vid.mso.rest.RequestDetailsWrapper;
@@ -82,11 +86,13 @@
     public static final String START_LOG = " start";
 
     private final MsoBusinessLogic msoBusinessLogic;
+    private final RestMsoImplementation restMso;
     private final CloudOwnerService cloudOwnerService;
 
     @Autowired
-    public MsoController(MsoBusinessLogic msoBusinessLogic, CloudOwnerService cloudOwnerService) {
+    public MsoController(MsoBusinessLogic msoBusinessLogic, MsoRestClientNew msoClientInterface, CloudOwnerService cloudOwnerService) {
         this.msoBusinessLogic = msoBusinessLogic;
+        this.restMso = msoClientInterface;
         this.cloudOwnerService = cloudOwnerService;
     }
 
@@ -678,30 +684,35 @@
 
     @RequestMapping(value = "/mso_activate_fabric_configuration/{serviceInstanceId}", method = RequestMethod.POST)
     public MsoResponseWrapper2 activateFabricConfiguration(
-        @PathVariable("serviceInstanceId") String serviceInstanceId,
-        @RequestBody RequestDetails requestDetails) {
+            @PathVariable("serviceInstanceId") String serviceInstanceId ,
+            @RequestBody RequestDetails requestDetails) {
 
         String methodName = "activateFabricConfiguration";
         LOGGER.debug(EELFLoggerDelegate.debugLogger, "<== " + methodName + START_LOG);
 
-        return msoBusinessLogic.activateFabricConfiguration(serviceInstanceId, requestDetails);
+        String path = msoBusinessLogic.getActivateFabricConfigurationPath(serviceInstanceId);
+        RestObject<RequestReferencesContainer> msoResponse = restMso.PostForObject(requestDetails, path, RequestReferencesContainer.class);
+
+        return new MsoResponseWrapper2<>(msoResponse);
     }
 
     @RequestMapping(value = "/mso_vfmodule_soft_delete/{serviceInstanceId}/{vnfInstanceId}/{vfModuleInstanceId}", method = RequestMethod.POST)
     public MsoResponseWrapper2 deactivateAndCloudDelete(
-        @PathVariable("serviceInstanceId") String serviceInstanceId,
-        @PathVariable("vnfInstanceId") String vnfInstanceId,
-        @PathVariable("vfModuleInstanceId") String vfModuleInstanceId,
-        @RequestBody SoftDeleteRequest softDeleteRequest) {
+            @PathVariable("serviceInstanceId") String serviceInstanceId,
+            @PathVariable("vnfInstanceId") String vnfInstanceId,
+            @PathVariable("vfModuleInstanceId") String vfModuleInstanceId,
+            @RequestBody SoftDeleteRequest softDeleteRequest) {
 
         String methodName = "deactivateAndCloudDelete";
         LOGGER.debug(EELFLoggerDelegate.debugLogger, "<== " + methodName + START_LOG);
 
+        String path = msoBusinessLogic.getDeactivateAndCloudDeletePath(serviceInstanceId, vnfInstanceId, vfModuleInstanceId);
         RequestDetails requestDetails = msoBusinessLogic.buildRequestDetailsForSoftDelete(softDeleteRequest);
 
         cloudOwnerService.enrichRequestWithCloudOwner(requestDetails);
-        return msoBusinessLogic
-            .deactivateAndCloudDelete(serviceInstanceId, vnfInstanceId, vfModuleInstanceId, requestDetails);
+        RestObject<RequestReferencesContainer> msoResponse = restMso.PostForObject(new org.onap.vid.changeManagement.RequestDetailsWrapper<>(requestDetails), path, RequestReferencesContainer.class);
+
+        return new MsoResponseWrapper2<>(msoResponse);
     }
 
     /**
@@ -723,7 +734,7 @@
         exceptionResponse.setException(e.getClass().toString().replaceFirst("^.*\\.", ""));
         exceptionResponse.setMessage(e.getMessage());
 
-        response.getWriter().write(new ObjectMapper().writeValueAsString(exceptionResponse));
+        response.getWriter().write(JACKSON_OBJECT_MAPPER.writeValueAsString(exceptionResponse));
 
         response.flushBuffer();
     }
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java b/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java
index 8d55c62..6f4ce4d 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java
@@ -21,6 +21,8 @@
 
 package org.onap.vid.controller;
 
+import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
+
 import static org.apache.commons.lang3.StringUtils.isEmpty;
 
 import com.fasterxml.jackson.core.JsonProcessingException;
@@ -29,6 +31,7 @@
 import java.io.File;
 import java.io.IOException;
 import javax.servlet.ServletContext;
+import java.util.concurrent.Executors;
 import org.onap.portalsdk.core.util.SystemProperties;
 import org.onap.vid.aai.AaiClient;
 import org.onap.vid.aai.AaiClientInterface;
@@ -54,6 +57,7 @@
 import org.onap.vid.client.SyncRestClient;
 import org.onap.vid.client.SyncRestClientInterface;
 import org.onap.vid.properties.AsdcClientConfiguration;
+import org.onap.vid.properties.VidProperties;
 import org.onap.vid.scheduler.SchedulerService;
 import org.onap.vid.scheduler.SchedulerServiceImpl;
 import org.onap.vid.services.AAIServiceTree;
@@ -73,6 +77,12 @@
 import springfox.documentation.spring.web.plugins.Docket;
 import springfox.documentation.swagger2.annotations.EnableSwagger2;
 
+
+import javax.servlet.ServletContext;
+import java.io.File;
+import java.io.IOException;
+import java.util.concurrent.ExecutorService;
+
 @EnableSwagger2
 @Configuration
 public class WebConfig {
@@ -95,8 +105,8 @@
 
     @Bean
     public AaiService getAaiService(AaiClientInterface aaiClient, AaiOverTLSClientInterface aaiOverTLSClient,
-        AaiResponseTranslator aaiResponseTranslator, AAITreeNodeBuilder aaiTreeNode, AAIServiceTree aaiServiceTree) {
-        return new AaiServiceImpl(aaiClient, aaiOverTLSClient, aaiResponseTranslator, aaiTreeNode, aaiServiceTree);
+        AaiResponseTranslator aaiResponseTranslator, AAITreeNodeBuilder aaiTreeNode, AAIServiceTree aaiServiceTree, ExecutorService executorService) {
+        return new AaiServiceImpl(aaiClient, aaiOverTLSClient, aaiResponseTranslator, aaiTreeNode, aaiServiceTree, executorService);
     }
 
     @Bean
@@ -223,4 +233,10 @@
                 .paths(PathSelectors.any())
                 .build();
     }
+
+    @Bean
+    public ExecutorService executorService() {
+        int threadsCount = defaultIfNull(Integer.parseInt(SystemProperties.getProperty(VidProperties.VID_THREAD_COUNT)), 1);
+        return Executors.newFixedThreadPool(threadsCount);
+    }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/dal/AsyncInstantiationRepository.kt b/vid-app-common/src/main/java/org/onap/vid/dal/AsyncInstantiationRepository.kt
new file mode 100644
index 0000000..79c7297
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/dal/AsyncInstantiationRepository.kt
@@ -0,0 +1,147 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.dal
+
+import org.onap.portalsdk.core.domain.support.DomainVo
+import org.onap.portalsdk.core.service.DataAccessService
+import org.onap.vid.dao.JobRequest
+import org.onap.vid.exceptions.GenericUncheckedException
+import org.onap.vid.exceptions.NotFoundException
+import org.onap.vid.job.Job
+import org.onap.vid.model.JobAuditStatus
+import org.onap.vid.model.ResourceInfo
+import org.onap.vid.model.ServiceInfo
+import org.onap.vid.model.serviceInstantiation.ServiceInstantiation
+import org.onap.vid.utils.DaoUtils
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.stereotype.Repository
+import java.sql.Timestamp
+import java.time.LocalDateTime
+import java.util.*
+import kotlin.collections.HashMap
+
+@Repository
+class AsyncInstantiationRepository @Autowired constructor(val dataAccessService:DataAccessService) {
+
+    fun addJobRequest(jobUuid: UUID, request:ServiceInstantiation) {
+        save(JobRequest(jobUuid, request))
+    }
+
+    fun getJobRequest(jobUuid: UUID):ServiceInstantiation? {
+        return getSingleItem(JobRequest::class.java, "JOB_ID", jobUuid).request
+    }
+
+    fun saveResourceInfo(resource:ResourceInfo) {
+        save(resource)
+    }
+
+    fun getResourceInfoByRootJobId(rootJobId: UUID): Map<String, ResourceInfo> {
+        val resourceInfoList:List<ResourceInfo> = getResultList(ResourceInfo::class.java, "ROOT_JOB_ID", rootJobId)
+
+        if (resourceInfoList.isEmpty()) {
+            throw GenericUncheckedException("Failed to retrieve resource info with rootJobId " + rootJobId + " from ResourceInfo table. no resource found")
+        }
+        return resourceInfoList.fold(HashMap(), { accumulator, item ->
+            accumulator.put(item.trackById, item); accumulator})
+    }
+
+    fun getResourceInfoByTrackId(trackById: String):ResourceInfo {
+        return getSingleItem(ResourceInfo::class.java, "TRACK_BY_ID", trackById)
+    }
+
+    fun saveServiceInfo(serviceInfo: ServiceInfo) {
+        save(serviceInfo)
+    }
+
+    fun getServiceInfoByJobId(jobUuid: UUID): ServiceInfo {
+        return getSingleItem(ServiceInfo::class.java, "jobId", jobUuid)
+    }
+
+    fun getServiceInfoByTemplateIdAndJobStatus(templateId: UUID, jobStatus: Job.JobStatus): List<ServiceInfo> {
+        return getResultList(ServiceInfo::class.java, mapOf("templateId" to templateId, "jobStatus" to jobStatus), "AND")
+    }
+
+    fun getAllServicesInfo(): List<ServiceInfo> {
+        return dataAccessService.getList(ServiceInfo::class.java, filterByCreationDateAndNotDeleted(), orderByCreatedDateAndStatus(), null) as List<ServiceInfo>
+    }
+
+    private fun filterByCreationDateAndNotDeleted(): String {
+        val minus3Months = LocalDateTime.now().minusMonths(3)
+        val filterDate = Timestamp.valueOf(minus3Months)
+        return " WHERE" +
+                "   hidden = false" +
+                "   and deleted_at is null" +  // don't fetch deleted
+
+                "   and created >= '" + filterDate + "' "
+    }
+
+    private fun orderByCreatedDateAndStatus(): String {
+        return " createdBulkDate DESC ,\n" +
+                "  (CASE jobStatus\n" +
+                "   WHEN 'COMPLETED' THEN 0\n" +
+                "   WHEN 'FAILED' THEN 0\n" +
+                "   WHEN 'COMPLETED_WITH_ERRORS' THEN 0\n" +
+                "   WHEN 'IN_PROGRESS' THEN 1\n" +
+                "   WHEN 'PAUSE' THEN 2\n" +
+                "   WHEN 'PENDING' THEN 3\n" +
+                "   WHEN 'STOPPED' THEN 3 END),\n" +
+                "  statusModifiedDate "
+    }
+
+    fun getAuditStatuses(jobUUID: UUID, source: JobAuditStatus.SourceStatus): List<JobAuditStatus> {
+        // order by ORDINAL.
+        // CREATED_DATE is kept for backward compatibility: when all Ordinals are zero
+        return getResultList(JobAuditStatus::class.java, mapOf("SOURCE" to source, "JOB_ID" to jobUUID), "AND", " ORDINAL, CREATED_DATE ")
+    }
+
+    fun addJobAudiStatus(jobAuditStatus:JobAuditStatus) {
+        save(jobAuditStatus)
+    }
+
+    private fun <T: DomainVo> save(item:T) {
+        dataAccessService.saveDomainObject(item, DaoUtils.getPropsMap())
+    }
+
+    private fun <T> getSingleItem(className:Class<T>, filterKey:String, filterValue:Any): T {
+        val resultList:List<T> = getResultList(className, filterKey, filterValue)
+        if (resultList.size < 1) {
+            throw NotFoundException("Failed to retrieve $className with $filterKey $filterValue from table. no resource found")
+        }else if (resultList.size > 1) {
+            throw GenericUncheckedException("Failed to retrieve $className with $filterKey $filterValue from table. found more than 1 resources")
+        }
+        return resultList[0]
+    }
+
+    private fun <T> getResultList(className:Class<T>, filterKey:String, filterValue:Any): List<T> {
+        return getResultList(className, mapOf(filterKey to filterValue), "AND", null)
+    }
+
+    private fun <T> getResultList(className:Class<T>, filters: Map<String, Any>, conditionType: String): List<T> {
+        return getResultList(className, filters, conditionType, null)
+    }
+
+    private fun <T> getResultList(className:Class<T>, filters: Map<String, Any>, conditionType: String, orderBy: String?): List<T> {
+        var condition:String = filters
+                .map{f -> f.key + " = '" + f.value + "'"}
+                .joinToString(" $conditionType ")
+        return dataAccessService.getList(className, " WHERE $condition", orderBy, null) as List<T>
+    }
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/dao/JobRequest.java b/vid-app-common/src/main/java/org/onap/vid/dao/JobRequest.java
new file mode 100644
index 0000000..eb40358
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/dao/JobRequest.java
@@ -0,0 +1,111 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.dao;
+
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import java.io.IOException;
+import java.util.Objects;
+import java.util.UUID;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+import org.hibernate.annotations.DynamicUpdate;
+import org.hibernate.annotations.SelectBeforeUpdate;
+import org.hibernate.annotations.Type;
+import org.onap.vid.model.VidBaseEntity;
+import org.onap.vid.model.serviceInstantiation.ServiceInstantiation;
+
+
+@DynamicUpdate
+@SelectBeforeUpdate
+@Entity
+@Table(name = "vid_job_request")
+public class JobRequest extends VidBaseEntity {
+
+    private UUID jobId;
+    private ServiceInstantiation request;
+
+
+    public JobRequest(UUID jobId, ServiceInstantiation request) {
+        this.jobId = jobId;
+        this.request = request;
+    }
+
+    public JobRequest() {
+    }
+
+    @Id
+    @Column(name = "JOB_ID", columnDefinition = "CHAR(36)")
+    @Type(type = "org.hibernate.type.UUIDCharType")
+    public UUID getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(UUID jobId) {
+        this.jobId = jobId;
+    }
+
+    @Transient
+    public ServiceInstantiation getRequest() {
+        return request;
+    }
+
+    public void setRequest(ServiceInstantiation request) {
+        this.request = request;
+    }
+
+    //the columnDefinition is used only in UT
+    @Column(name = "REQUEST", columnDefinition = "VARCHAR(30000)")
+    public String getRequestRaw() {
+        try {
+            return JACKSON_OBJECT_MAPPER.writeValueAsString(request);
+        } catch (JsonProcessingException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public void setRequestRaw(String raw) {
+        try {
+            this.request = JACKSON_OBJECT_MAPPER.readValue(raw, ServiceInstantiation.class);
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof JobRequest)) return false;
+        JobRequest that = (JobRequest) o;
+        return Objects.equals(getJobId(), that.getJobId()) &&
+                Objects.equals(getRequest(), that.getRequest());
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getJobId(), getRequest());
+    }
+}
+
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/BaseInstantiationCommand.java b/vid-app-common/src/main/java/org/onap/vid/exceptions/AbortingException.java
similarity index 67%
copy from vid-app-common/src/main/java/org/onap/vid/job/command/BaseInstantiationCommand.java
copy to vid-app-common/src/main/java/org/onap/vid/exceptions/AbortingException.java
index 20d71ab..22c3125 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/BaseInstantiationCommand.java
+++ b/vid-app-common/src/main/java/org/onap/vid/exceptions/AbortingException.java
@@ -7,9 +7,9 @@
  * 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.
@@ -18,21 +18,11 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.vid.job.command;
+package org.onap.vid.exceptions;
 
-import org.onap.vid.job.impl.JobSharedData;
+public class AbortingException extends RuntimeException {
 
-import java.util.Map;
-
-
-public abstract class BaseInstantiationCommand extends CommandBase{
-
-
-    protected CommandParentData commandParentData = new CommandParentData();
-
-    protected BaseInstantiationCommand init(JobSharedData sharedData, Map<String, Object> commandData) {
-        super.init(sharedData);
-        commandParentData.initParentData(commandData);
-        return this;
+    public AbortingException(Throwable cause) {
+        super(cause);
     }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/BaseInstantiationCommand.java b/vid-app-common/src/main/java/org/onap/vid/exceptions/AccessDeniedException.java
similarity index 67%
copy from vid-app-common/src/main/java/org/onap/vid/job/command/BaseInstantiationCommand.java
copy to vid-app-common/src/main/java/org/onap/vid/exceptions/AccessDeniedException.java
index 20d71ab..e82bfbc 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/BaseInstantiationCommand.java
+++ b/vid-app-common/src/main/java/org/onap/vid/exceptions/AccessDeniedException.java
@@ -7,9 +7,9 @@
  * 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.
@@ -18,21 +18,12 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.vid.job.command;
+package org.onap.vid.exceptions;
 
-import org.onap.vid.job.impl.JobSharedData;
-
-import java.util.Map;
-
-
-public abstract class BaseInstantiationCommand extends CommandBase{
-
-
-    protected CommandParentData commandParentData = new CommandParentData();
-
-    protected BaseInstantiationCommand init(JobSharedData sharedData, Map<String, Object> commandData) {
-        super.init(sharedData);
-        commandParentData.initParentData(commandData);
-        return this;
+public class AccessDeniedException extends GenericUncheckedException {
+    public AccessDeniedException(String message) {
+        super(message);
     }
+
+
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/BaseInstantiationCommand.java b/vid-app-common/src/main/java/org/onap/vid/exceptions/TryAgainException.java
similarity index 67%
copy from vid-app-common/src/main/java/org/onap/vid/job/command/BaseInstantiationCommand.java
copy to vid-app-common/src/main/java/org/onap/vid/exceptions/TryAgainException.java
index 20d71ab..f46e7e3 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/BaseInstantiationCommand.java
+++ b/vid-app-common/src/main/java/org/onap/vid/exceptions/TryAgainException.java
@@ -7,9 +7,9 @@
  * 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.
@@ -18,21 +18,11 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.vid.job.command;
+package org.onap.vid.exceptions;
 
-import org.onap.vid.job.impl.JobSharedData;
+public class TryAgainException extends RuntimeException {
 
-import java.util.Map;
-
-
-public abstract class BaseInstantiationCommand extends CommandBase{
-
-
-    protected CommandParentData commandParentData = new CommandParentData();
-
-    protected BaseInstantiationCommand init(JobSharedData sharedData, Map<String, Object> commandData) {
-        super.init(sharedData);
-        commandParentData.initParentData(commandData);
-        return this;
+    public TryAgainException(Throwable cause) {
+        super(cause);
     }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/Job.java b/vid-app-common/src/main/java/org/onap/vid/job/Job.java
index 3825c2c..197e03b 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/Job.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/Job.java
@@ -7,9 +7,9 @@
  * 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.
@@ -23,8 +23,11 @@
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import org.onap.vid.job.impl.JobSharedData;
 
+import java.util.List;
 import java.util.Map;
 import java.util.UUID;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 public interface Job {
 
@@ -63,7 +66,9 @@
         STOPPED(true, true),
         COMPLETED_WITH_ERRORS(true, true),
         COMPLETED_WITH_NO_ACTION(true, false),
-        CREATING(false);
+        CREATING(false),
+        PENDING_RESOURCE(false),
+        ;
 
         private final Boolean finalStatus;
         public Boolean isFinal(){return finalStatus;}
@@ -83,5 +88,7 @@
             this.failure = failure;
         }
 
+        public static final List<JobStatus> FINAL_STATUS = Stream.of(JobStatus.values()).filter(JobStatus::isFinal).collect(Collectors.toList());
+
     }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/JobAdapter.java b/vid-app-common/src/main/java/org/onap/vid/job/JobAdapter.java
index cd2ab8e..53b8a30 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/JobAdapter.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/JobAdapter.java
@@ -7,9 +7,9 @@
  * 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.
@@ -32,9 +32,9 @@
 public interface JobAdapter {
     JobModel toModel(Job job);
 
-    Job createServiceInstantiationJob(JobType jobType, AsyncJobRequest request, UUID templateId, String userId, String optimisticUniqueServiceInstanceName, Integer indexInBulk);
+    Job createServiceInstantiationJob(JobType jobType, AsyncJobRequest request, UUID templateId, String userId, String testApi, String optimisticUniqueServiceInstanceName, Integer indexInBulk);
 
-    Job createChildJob(JobType jobType, Job.JobStatus jobStatus, AsyncJobRequest request, JobSharedData parentSharedData, Map<String, Object> jobData);
+    Job createChildJob(JobType jobType, AsyncJobRequest request, JobSharedData parentSharedData, Map<String, Object> jobData, int indexInBulk);
 
     // Marks types that are an AsyncJob payload
     interface AsyncJobRequest {
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/JobCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/JobCommand.java
index 9d49df0..dfeacae 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/JobCommand.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/JobCommand.java
@@ -7,9 +7,9 @@
  * 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.
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/JobException.java b/vid-app-common/src/main/java/org/onap/vid/job/JobException.java
index 0ae0b1b..eb2fecc 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/JobException.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/JobException.java
@@ -7,9 +7,9 @@
  * 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.
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/JobType.java b/vid-app-common/src/main/java/org/onap/vid/job/JobType.java
index 7576c43..b0cfa7a 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/JobType.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/JobType.java
@@ -7,9 +7,9 @@
  * 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.
@@ -32,26 +32,20 @@
 
     HttpCall(HttpCallCommand.class),
     AggregateState(AggregateStateCommand.class),
-    ServiceInstantiation(MacroServiceInstantiationCommand.class),
-    MacroServiceInstantiation(MacroServiceInstantiationCommand.class),
-    ALaCarteServiceInstantiation(ALaCarteServiceInstantiationCommand.class),
+    ServiceInstantiation(MacroServiceCommand.class),
+    MacroServiceInstantiation(MacroServiceCommand.class),
+    ALaCarteServiceInstantiation(ALaCarteServiceCommand.class),
     ALaCarteService(ALaCarteServiceCommand.class),
-    VnfInstantiation(VnfInstantiationCommand.class),
-    VfmoduleInstantiation(VfmoduleInstantiationCommand.class),
-    VolumeGroupInstantiation(VolumeGroupInstantiationCommand.class),
-    VolumeGroupInProgressStatus(VolumeGroupInProgressStatusCommand.class),
-    NetworkInstantiation(NetworkInstantiationCommand.class),
-    InstanceGroupInstantiation(InstanceGroupInstantiationCommand.class),
+    VnfInstantiation(VnfCommand.class),
+    VfmoduleInstantiation(VfmoduleCommand.class),
+    VolumeGroupInstantiation(VolumeGroupCommand.class),
+    NetworkInstantiation(NetworkCommand.class),
     InstanceGroup(InstanceGroupCommand.class),
-    InProgressStatus(ServiceInProgressStatusCommand.class),
-    ResourceInProgressStatus(ResourceInProgressStatusCommand.class),
-    VnfInProgressStatus(VnfInProgressStatusCommand.class),
-    Watching(WatchingCommand.class),
-    WatchingBaseModule(WatchingCommandBaseModule.class),
+    InstanceGroupMember(InstanceGroupMemberCommand.class),
     NoOp(NoOpCommand.class);
 
     private static final Map<Class, JobType> REVERSE_MAP = Stream.of(values())
-            .filter(not(jobType -> jobType.equals(ServiceInstantiation)))
+            .filter(not(jobType -> (jobType == ServiceInstantiation) || (jobType == ALaCarteServiceInstantiation)))
             .collect(Collectors.toMap(t -> t.getCommandClass(), t -> t));
 
     private final Class commandClass;
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/JobsBrokerService.java b/vid-app-common/src/main/java/org/onap/vid/job/JobsBrokerService.java
index 5da3b30..6c3eeb9 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/JobsBrokerService.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/JobsBrokerService.java
@@ -7,9 +7,9 @@
  * 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.
@@ -40,4 +40,5 @@
 
     boolean mute(UUID jobId);
 
+    void deleteOldFinalJobs(long secondsAgo);
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/NextCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/NextCommand.java
index 966158f..298a3f4 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/NextCommand.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/NextCommand.java
@@ -7,9 +7,9 @@
  * 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.
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/ALaCarteServiceCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/ALaCarteServiceCommand.kt
index 29897ac..9bef3c1 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/ALaCarteServiceCommand.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/ALaCarteServiceCommand.kt
@@ -7,9 +7,9 @@
  * 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.
@@ -21,14 +21,16 @@
 package org.onap.vid.job.command
 
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate
-import org.onap.vid.changeManagement.RequestDetailsWrapper
-import org.onap.vid.job.*
-import org.onap.vid.model.Action
+import org.onap.vid.job.Job
+import org.onap.vid.job.JobAdapter
+import org.onap.vid.job.JobCommand
+import org.onap.vid.job.JobsBrokerService
+import org.onap.vid.model.serviceInstantiation.BaseResource
 import org.onap.vid.model.serviceInstantiation.ServiceInstantiation
 import org.onap.vid.mso.RestMsoImplementation
-import org.onap.vid.mso.model.ServiceDeletionRequestDetails
 import org.onap.vid.properties.VidProperties
 import org.onap.vid.services.AsyncInstantiationBusinessLogic
+import org.onap.vid.services.AuditService
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.beans.factory.config.ConfigurableBeanFactory
 import org.springframework.context.annotation.Scope
@@ -38,6 +40,8 @@
 import java.time.temporal.ChronoUnit
 import java.util.*
 
+const val UNIQUE_INSTANCE_NAME = "optimisticUniqueServiceInstanceName"
+
 class ServiceExpiryChecker : ExpiryChecker {
 
     override fun isExpired(jobStartTime: ZonedDateTime?): Boolean {
@@ -48,22 +52,20 @@
     }
 }
 
-
 @Component
 @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
 class ALaCarteServiceCommand @Autowired constructor(
         inProgressStatusService: InProgressStatusService,
         watchChildrenJobsBL: WatchChildrenJobsBL,
         private val asyncInstantiationBL: AsyncInstantiationBusinessLogic,
-        private val jobsBrokerService: JobsBrokerService,
+        jobsBrokerService: JobsBrokerService,
+        private val msoRequestBuilder: MsoRequestBuilder,
         msoResultHandlerService: MsoResultHandlerService,
-        private val jobAdapter: JobAdapter,
-        restMso: RestMsoImplementation
-) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService, watchChildrenJobsBL), JobCommand {
-
-    override fun getExpiryChecker(): ExpiryChecker {
-        return ServiceExpiryChecker();
-    }
+        jobAdapter: JobAdapter,
+        restMso: RestMsoImplementation,
+        auditService: AuditService
+) : RootServiceCommand(restMso, inProgressStatusService, msoResultHandlerService,
+        watchChildrenJobsBL, jobsBrokerService, jobAdapter, asyncInstantiationBL, auditService, msoRequestBuilder), JobCommand {
 
     companion object {
         private val LOGGER = EELFLoggerDelegate.getLogger(ALaCarteServiceCommand::class.java)
@@ -74,69 +76,27 @@
     }
 
     override fun createChildren(): Job.JobStatus {
-        val dataForChild = buildDataForChild(getRequest())//.plus(ACTION_PHASE to actionPhase)
+        val dataForChild = buildDataForChild(getRequest(), actionPhase)
 
-        val childJobType = when (actionPhase) {
-            Action.Create -> JobType.InstanceGroupInstantiation
-            Action.Delete -> JobType.InstanceGroup
-            else -> return Job.JobStatus.COMPLETED
-        }
-
-        childJobs = getRequest().vnfGroups
-                .map { jobAdapter.createChildJob(childJobType, Job.JobStatus.CREATING, it.value, sharedData, dataForChild) }
-                .map { jobsBrokerService.add(it) }
-                .map { it.toString() }
+        childJobs = pushChildrenJobsToBroker(getRequest().children, dataForChild)
 
         return Job.JobStatus.COMPLETED_WITH_NO_ACTION
     }
 
-    private fun buildDataForChild(request: ServiceInstantiation): Map<String, Any> {
-        val commandParentData = CommandParentData()
-        commandParentData.addInstanceId(CommandParentData.CommandDataKey.SERVICE_INSTANCE_ID, request.instanceId)
+    override fun addMyselfToChildrenData(commandParentData: CommandParentData, request: BaseResource) {
+        val instanceId = getActualInstanceId(request)
+        commandParentData.addInstanceId(CommandParentData.CommandDataKey.SERVICE_INSTANCE_ID, instanceId)
         commandParentData.addModelInfo(CommandParentData.CommandDataKey.SERVICE_MODEL_INFO, request.modelInfo)
-        return commandParentData.parentData
     }
 
-    override fun planCreateMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String): MsoRestCallPlan {
-        TODO("not implemented")
-    }
+    override fun planCreateMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String, testApi: String?): MsoRestCallPlan {
+        val instantiatePath = asyncInstantiationBL.getServiceInstantiationPath(request as ServiceInstantiation)
 
-    override fun planDeleteMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String): MsoRestCallPlan {
-        val requestDetailsWrapper = generateServiceDeletionRequest()
-        val path = asyncInstantiationBL.getServiceDeletionPath(getRequest().instanceId)
-        return MsoRestCallPlan(HttpMethod.DELETE, path, Optional.of(requestDetailsWrapper), Optional.empty(),
-                "delete instance with id ${getRequest().instanceId}")
+        val requestDetailsWrapper = msoRequestBuilder.generateALaCarteServiceInstantiationRequest(
+                request, optimisticUniqueServiceInstanceName, userId)
 
-    }
+        val actionDescription = "create service instance"
 
-    override fun handleInProgressStatus(jobStatus: Job.JobStatus): Job.JobStatus {
-        if (jobStatus==Job.JobStatus.FAILED) {
-            asyncInstantiationBL.handleFailedInstantiation(sharedData.jobUuid)
-            return jobStatus
-        }
-
-        asyncInstantiationBL.updateServiceInfoAndAuditStatus(sharedData.jobUuid, jobStatus)
-        return  if (jobStatus == Job.JobStatus.PAUSE) Job.JobStatus.IN_PROGRESS else jobStatus
-    }
-
-
-    private fun generateServiceDeletionRequest(): RequestDetailsWrapper<ServiceDeletionRequestDetails> {
-        return asyncInstantiationBL.generateALaCarteServiceDeletionRequest(
-                sharedData.jobUuid, getRequest(), sharedData.userId
-        )
-    }
-
-    override fun getExternalInProgressStatus() = Job.JobStatus.IN_PROGRESS
-
-    override fun isServiceCommand(): Boolean = true
-
-    override fun onFinal(jobStatus: Job.JobStatus) {
-        asyncInstantiationBL.updateServiceInfoAndAuditStatus(sharedData.jobUuid, jobStatus)
-    }
-
-    override fun onInitial(phase: Action) {
-        if (phase== Action.Delete) {
-            asyncInstantiationBL.updateServiceInfoAndAuditStatus(sharedData.jobUuid, Job.JobStatus.IN_PROGRESS)
-        }
+        return MsoRestCallPlan(HttpMethod.POST, instantiatePath, Optional.of(requestDetailsWrapper), Optional.empty(), actionDescription)
     }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/ALaCarteServiceInstantiationCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/ALaCarteServiceInstantiationCommand.java
deleted file mode 100644
index 38d5ede..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/ALaCarteServiceInstantiationCommand.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.onap.vid.changeManagement.RequestDetailsWrapper;
-import org.onap.vid.job.JobCommand;
-import org.onap.vid.mso.model.ServiceInstantiationRequestDetails;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-
-@Component
-@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-public class ALaCarteServiceInstantiationCommand extends ServiceInstantiationCommand implements JobCommand {
-
-    @Override
-    protected RequestDetailsWrapper<ServiceInstantiationRequestDetails> generateServiceInstantiationRequest() {
-        return asyncInstantiationBL.generateALaCarteServiceInstantiationRequest(
-                getSharedData().getJobUuid(), getRequest(), optimisticUniqueServiceInstanceName, getSharedData().getUserId()
-        );
-    }
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/AggregateStateCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/AggregateStateCommand.java
index e64c304..34861d0 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/AggregateStateCommand.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/AggregateStateCommand.java
@@ -7,9 +7,9 @@
  * 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.
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/BaseInProgressStatusCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/BaseInProgressStatusCommand.java
deleted file mode 100644
index d21973d..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/BaseInProgressStatusCommand.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import com.google.common.collect.ImmutableMap;
-import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.onap.vid.job.*;
-import org.onap.vid.job.impl.JobSharedData;
-import org.onap.vid.mso.RestMsoImplementation;
-import org.onap.vid.mso.RestObject;
-import org.onap.vid.mso.rest.AsyncRequestStatus;
-import org.onap.vid.services.AsyncInstantiationBusinessLogic;
-import org.togglz.core.manager.FeatureManager;
-
-import javax.inject.Inject;
-import java.util.Map;
-
-public abstract class BaseInProgressStatusCommand extends BaseInstantiationCommand implements JobCommand {
-    private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(BaseInProgressStatusCommand.class);
-
-    @Inject
-    protected AsyncInstantiationBusinessLogic asyncInstantiationBL;
-
-    @Inject
-    protected JobsBrokerService jobsBrokerService;
-
-    @Inject
-    protected JobAdapter jobAdapter;
-
-    @Inject
-    protected RestMsoImplementation restMso;
-
-    @Inject
-    protected FeatureManager featureManager;
-
-    @Inject
-    protected InProgressStatusService inProgressStatusService;
-
-
-    protected String requestId;
-
-    protected String instanceId;
-
-
-    @Override
-    public NextCommand call() {
-
-        try {
-            Job.JobStatus jobStatus =  inProgressStatusService.call(getExpiryChecker(), getSharedData(), requestId);
-            return processJobStatus(jobStatus);
-        } catch (javax.ws.rs.ProcessingException e) {
-            // Retry when we can't connect MSO during getStatus
-            LOGGER.error(EELFLoggerDelegate.errorLogger, "Cannot get orchestration status for {}, will retry: {}", requestId, e, e);
-            return new NextCommand(Job.JobStatus.IN_PROGRESS, this);
-        } catch (InProgressStatusService.BadResponseFromMso e) {
-            return handleFailedMsoResponse(e.getMsoResponse());
-        }
-        catch (RuntimeException e) {
-            LOGGER.error(EELFLoggerDelegate.errorLogger, "Cannot get orchestration status for {}, stopping: {}", requestId, e, e);
-            return new NextCommand(Job.JobStatus.STOPPED, this);
-        }
-    }
-
-    protected abstract ExpiryChecker getExpiryChecker();
-
-    abstract NextCommand processJobStatus(Job.JobStatus jobStatus);
-
-    private NextCommand handleFailedMsoResponse(RestObject<AsyncRequestStatus> msoResponse) {
-        inProgressStatusService.handleFailedMsoResponse(getSharedData().getJobUuid(), requestId, msoResponse);
-        return new NextCommand(Job.JobStatus.IN_PROGRESS, this);
-    }
-
-    @Override
-    public BaseInProgressStatusCommand init(JobSharedData sharedData, Map<String, Object> commandData) {
-        return init(sharedData, (String) commandData.get("requestId"), (String) commandData.get("instanceId"));
-    }
-
-
-    protected BaseInProgressStatusCommand init(JobSharedData sharedData,
-                                               String requestId,
-                                               String instanceId) {
-        init(sharedData);
-        this.requestId = requestId;
-        this.instanceId = instanceId;
-        return this;
-    }
-
-    @Override
-    public Map<String, Object> getData() {
-        return ImmutableMap.of(
-            "requestId", requestId,
-            "instanceId", instanceId
-        );
-    }
-
-
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/BaseRootCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/BaseRootCommand.java
deleted file mode 100644
index 4b81a94..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/BaseRootCommand.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.onap.vid.job.NextCommand;
-import org.onap.vid.job.impl.JobSharedData;
-import org.onap.vid.model.RequestReferencesContainer;
-import org.onap.vid.model.serviceInstantiation.ServiceInstantiation;
-import org.onap.vid.mso.RestObject;
-
-import javax.inject.Inject;
-
-
-public abstract class BaseRootCommand extends CommandBase{
-
-    @Inject
-    private MsoResultHandlerService msoResultHandlerService;
-
-    @Override
-    protected CommandBase init(JobSharedData sharedData) {
-        super.init(sharedData);
-        return this;
-    }
-
-    protected ServiceInstantiation getRequest() {
-        return msoResultHandlerService.getRequest(getSharedData());
-    }
-
-    protected NextCommand handleRootResponse(RestObject<RequestReferencesContainer> msoResponse){
-        MsoResult msoResult = msoResultHandlerService.handleRootResponse(getSharedData().getJobUuid(), msoResponse);
-        return new NextCommand(msoResult.getJobStatus(),
-                (msoResult.getMsoResourceIds()!=null) ?
-                        new ServiceInProgressStatusCommand(getSharedData(), msoResult.getMsoResourceIds()) :
-                        null
-        );
-
-    }
-
-    protected NextCommand handleCommandFailed() {
-        return new NextCommand(msoResultHandlerService.handleRootCommandFailed(getSharedData().getJobUuid()).getJobStatus());
-    }
-
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/BaseWatchingCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/BaseWatchingCommand.java
deleted file mode 100644
index a0b7cd7..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/BaseWatchingCommand.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.apache.commons.lang3.ObjectUtils;
-import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.onap.vid.job.Job;
-import org.onap.vid.job.JobCommand;
-import org.onap.vid.job.NextCommand;
-import org.onap.vid.job.impl.JobSharedData;
-import org.onap.vid.services.AsyncInstantiationBusinessLogic;
-
-import javax.inject.Inject;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public abstract class BaseWatchingCommand extends BaseInstantiationCommand implements JobCommand {
-
-    private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(BaseWatchingCommand.class);
-
-    @Inject
-    protected AsyncInstantiationBusinessLogic asyncInstantiationBL;
-
-    @Inject
-    private WatchChildrenJobsBL watchChildrenJobsBL;
-
-    private List<String> childrenJobsIds;
-
-    protected boolean isService;
-
-    public BaseWatchingCommand() {}
-
-    public BaseWatchingCommand(JobSharedData sharedData, List<String> childrenJobsIds, boolean isService) {
-        init(sharedData, childrenJobsIds, isService);
-    }
-
-    @Override
-    public NextCommand call() {
-        Job.JobStatus cumulativeJobsStatus =  watchChildrenJobsBL.cumulateJobStatus(
-                watchChildrenJobsBL.retrieveChildrenJobsStatus(childrenJobsIds),
-                Job.JobStatus.COMPLETED);
-        return getNextCommand(cumulativeJobsStatus);
-    }
-
-    protected abstract NextCommand getNextCommand(Job.JobStatus cumulativeJobsStatus);
-
-    @Override
-    public BaseWatchingCommand init(JobSharedData sharedData, Map<String, Object> commandData) {
-        return init(
-                sharedData,
-                (List<String>) commandData.get("childrenJobs"),
-                (boolean) commandData.get("isService")
-        );
-    }
-
-    protected BaseWatchingCommand init(JobSharedData sharedData, List<String> childrenJobsIds, boolean isService) {
-        super.init(sharedData);
-        this.childrenJobsIds = ObjectUtils.defaultIfNull(childrenJobsIds, new ArrayList<>());
-        this.isService = isService;
-        return this;
-    }
-
-    @Override
-    public Map<String, Object> getData() {
-        Map<String, Object> data = new HashMap<>();
-        data.put("childrenJobs", childrenJobsIds);
-        data.put("isService", isService);
-        return data;
-    }
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/CommandBase.java b/vid-app-common/src/main/java/org/onap/vid/job/command/CommandBase.java
index a13e4dc..a9b524e 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/CommandBase.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/CommandBase.java
@@ -7,9 +7,9 @@
  * 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.
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/CommandParentData.java b/vid-app-common/src/main/java/org/onap/vid/job/command/CommandParentData.java
index 35f6311..744b2fe 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/CommandParentData.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/CommandParentData.java
@@ -7,9 +7,9 @@
  * 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.
@@ -21,12 +21,15 @@
 package org.onap.vid.job.command;
 
 import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onap.vid.model.Action;
 import org.onap.vid.mso.model.ModelInfo;
 
 import java.util.HashMap;
 import java.util.Map;
 
+import static java.util.Collections.emptyMap;
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
+
 public class CommandParentData {
 
 
@@ -36,6 +39,7 @@
         VNF_INSTANCE_ID,
         VNF_MODEL_INFO,
         VG_INSTANCE_ID,
+        VNF_GROUP_INSTANCE_ID,
         ;
     }
 
@@ -49,32 +53,30 @@
             new TypeReference<Map<CommandDataKey, ModelInfo>> () {};
 
 
-    private ObjectMapper objectMapper = new ObjectMapper();
-
     private Map<CommandDataKey,ModelInfo> getModelInfosByCommandData(Map<String, Object> commandData) {
-        Object object = commandData.get(RESOURCE_MODEL_INFOS);
-        if (object != null) {
-            return objectMapper.convertValue(object, mapCommandKeyToModelInfo);
-        }
-        return null;
+        Object object = commandData.getOrDefault(RESOURCE_MODEL_INFOS, emptyMap());
+        return JACKSON_OBJECT_MAPPER.convertValue(object, mapCommandKeyToModelInfo);
     }
 
     private Map<CommandDataKey,String> getInstanceIdsByCommandData(Map<String, Object> commandData) {
-        Object object = commandData.get(RESOURCE_INSTANCE_IDS);
-        if (object != null) {
-            return objectMapper.convertValue(object, mapCommandKeyToString);
-        }
-        return null;
+        Object object = commandData.getOrDefault(RESOURCE_INSTANCE_IDS, emptyMap());
+        return JACKSON_OBJECT_MAPPER.convertValue(object, mapCommandKeyToString);
     }
 
     public Map<String, Object> getParentData() {
         Map<String, Object> data = new HashMap<>();
         data.put(RESOURCE_INSTANCE_IDS, resourceInstancesIds);
         data.put(RESOURCE_MODEL_INFOS, resourceModelInfos);
+
+        if (actionPhase != null) {
+                data.put(ResourceCommandKt.ACTION_PHASE, actionPhase);
+        }
+
         return data;
     }
     private Map<CommandDataKey, String> resourceInstancesIds = new HashMap<>();
     private Map<CommandDataKey, ModelInfo> resourceModelInfos = new HashMap<>();
+    private Action actionPhase = null;
 
     public void addModelInfo(CommandDataKey modelInfoKey, ModelInfo modelInfo) {
         resourceModelInfos.put(modelInfoKey, modelInfo);
@@ -83,6 +85,11 @@
     public void addInstanceId(CommandDataKey instanceIdKey, String instanceId) {
          resourceInstancesIds.put(instanceIdKey, instanceId);
     }
+
+    public void setActionPhase(Action actionPhase) {
+        this.actionPhase = actionPhase;
+    }
+
     public ModelInfo getModelInfo(CommandDataKey modelInfoKey) {
         return resourceModelInfos.get(modelInfoKey);
     }
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/CommandUtils.java b/vid-app-common/src/main/java/org/onap/vid/job/command/CommandUtils.java
index e9936ed..0fe7255 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/CommandUtils.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/CommandUtils.java
@@ -7,9 +7,9 @@
  * 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.
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/ExpiryChecker.java b/vid-app-common/src/main/java/org/onap/vid/job/command/ExpiryChecker.java
index c41963d..5d60825 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/ExpiryChecker.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/ExpiryChecker.java
@@ -7,9 +7,9 @@
  * 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.
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/HttpCallCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/HttpCallCommand.java
index 21c10ff..9dc88df 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/HttpCallCommand.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/HttpCallCommand.java
@@ -7,9 +7,9 @@
  * 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.
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/InProgressStatusService.java b/vid-app-common/src/main/java/org/onap/vid/job/command/InProgressStatusService.java
index 842a1bd..3d1d78f 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/InProgressStatusService.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/InProgressStatusService.java
@@ -7,9 +7,9 @@
  * 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.
@@ -26,10 +26,12 @@
 import org.onap.vid.mso.RestMsoImplementation;
 import org.onap.vid.mso.RestObject;
 import org.onap.vid.mso.rest.AsyncRequestStatus;
+import org.onap.vid.properties.Features;
 import org.onap.vid.services.AsyncInstantiationBusinessLogic;
 import org.onap.vid.services.AuditService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.togglz.core.manager.FeatureManager;
 
 import java.time.ZonedDateTime;
 import java.time.format.DateTimeParseException;
@@ -48,30 +50,37 @@
 
     private final AuditService auditService;
 
+    private final FeatureManager featureManager;
+
     @Autowired
-    public InProgressStatusService(AsyncInstantiationBusinessLogic asyncInstantiationBL, RestMsoImplementation restMso, AuditService auditService) {
+    public InProgressStatusService(AsyncInstantiationBusinessLogic asyncInstantiationBL, RestMsoImplementation restMso, AuditService auditService, FeatureManager featureManager) {
         this.asyncInstantiationBL = asyncInstantiationBL;
         this.restMso = restMso;
         this.auditService = auditService;
+        this.featureManager = featureManager;
     }
 
 
     public Job.JobStatus call(ExpiryChecker expiryChecker, JobSharedData sharedData, String requestId) {
 
         RestObject<AsyncRequestStatus> asyncRequestStatus = getAsyncRequestStatus(requestId);
-        asyncInstantiationBL.auditMsoStatus(sharedData.getRootJobId(), asyncRequestStatus.get().request);
+        auditService.auditMsoStatus(sharedData.getRootJobId(), asyncRequestStatus.get().request);
         Job.JobStatus jobStatus = asyncInstantiationBL.calcStatus(asyncRequestStatus.get());
         ZonedDateTime jobStartTime = getZonedDateTime(asyncRequestStatus, requestId);
         jobStatus = expiryChecker.isExpired(jobStartTime) ? Job.JobStatus.FAILED : jobStatus;
+        asyncInstantiationBL.updateResourceInfo(sharedData, jobStatus, asyncRequestStatus.get());
         return jobStatus;
     }
 
-    private RestObject<AsyncRequestStatus> getAsyncRequestStatus(String requestId) {
-        String path = asyncInstantiationBL.getOrchestrationRequestsPath()+"/"+requestId;
+    RestObject<AsyncRequestStatus> getAsyncRequestStatus(String requestId) {
+        String path = asyncInstantiationBL.getOrchestrationRequestsPath() + "/" + requestId +
+                (featureManager.isActive(Features.FLAG_1908_RESUME_MACRO_SERVICE) ? "?format=detail" : "");
         RestObject<AsyncRequestStatus> msoResponse = restMso.GetForObject(path, AsyncRequestStatus.class);
+
         if (msoResponse.getStatusCode() >= 400 || msoResponse.get() == null) {
             throw new BadResponseFromMso(msoResponse);
         }
+
         return msoResponse;
     }
 
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupCommand.kt
index e81fcd3..26fb9aa 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupCommand.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupCommand.kt
@@ -7,9 +7,9 @@
  * 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.
@@ -24,6 +24,8 @@
 import org.onap.vid.job.Job
 import org.onap.vid.job.JobAdapter
 import org.onap.vid.job.JobCommand
+import org.onap.vid.job.JobsBrokerService
+import org.onap.vid.model.serviceInstantiation.BaseResource
 import org.onap.vid.model.serviceInstantiation.InstanceGroup
 import org.onap.vid.mso.RestMsoImplementation
 import org.onap.vid.services.AsyncInstantiationBusinessLogic
@@ -39,29 +41,42 @@
 class InstanceGroupCommand @Autowired constructor(
         private val asyncInstantiationBL: AsyncInstantiationBusinessLogic,
         restMso: RestMsoImplementation,
+        private val msoRequestBuilder: MsoRequestBuilder,
         msoResultHandlerService: MsoResultHandlerService,
         inProgressStatusService:InProgressStatusService,
-        watchChildrenJobsBL: WatchChildrenJobsBL
-) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService, watchChildrenJobsBL), JobCommand {
+        watchChildrenJobsBL: WatchChildrenJobsBL,
+        jobsBrokerService: JobsBrokerService,
+        jobAdapter: JobAdapter
+        ) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
+        watchChildrenJobsBL, jobsBrokerService, jobAdapter), JobCommand {
 
     companion object {
         private val LOGGER = EELFLoggerDelegate.getLogger(InstanceGroupCommand::class.java)
     }
 
     override fun createChildren(): Job.JobStatus {
+        val dataForChild = buildDataForChild(getRequest(), actionPhase)
+
+        childJobs = pushChildrenJobsToBroker(getRequest().vnfGroupMembers.values, dataForChild);
+
         return Job.JobStatus.COMPLETED_WITH_NO_ACTION
     }
 
-    override fun planCreateMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String): MsoRestCallPlan {
+    override fun addMyselfToChildrenData(commandParentData: CommandParentData, request: BaseResource) {
+        commandParentData.addInstanceId(CommandParentData.CommandDataKey.VNF_GROUP_INSTANCE_ID, request.instanceId)
+    }
+
+    override fun planCreateMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String, testApi: String?): MsoRestCallPlan {
         val serviceInstanceId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.SERVICE_INSTANCE_ID)
         val serviceModelInfo = commandParentData.getModelInfo(CommandParentData.CommandDataKey.SERVICE_MODEL_INFO)
 
         val instantiatePath = asyncInstantiationBL.getInstanceGroupInstantiationPath()
 
-        val requestDetailsWrapper = asyncInstantiationBL.generateInstanceGroupInstantiationRequest(
+        val requestDetailsWrapper = msoRequestBuilder.generateInstanceGroupInstantiationRequest(
                 request as InstanceGroup,
                 serviceModelInfo, serviceInstanceId,
-                userId
+                userId,
+                testApi
         )
 
         val actionDescription = "create instance group in $serviceInstanceId"
@@ -76,4 +91,7 @@
 
     }
 
-}
+    override fun getRequest(): InstanceGroup {
+        return sharedData.request as InstanceGroup
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupInstantiationCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupInstantiationCommand.java
deleted file mode 100644
index 6d9ddd4..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupInstantiationCommand.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;//package org.onap.vid.job.command;
-
-import org.onap.vid.changeManagement.RequestDetailsWrapper;
-import org.onap.vid.job.JobAdapter;
-import org.onap.vid.job.command.CommandParentData.CommandDataKey;
-import org.onap.vid.model.Action;
-import org.onap.vid.model.serviceInstantiation.InstanceGroup;
-import org.onap.vid.mso.model.InstanceGroupInstantiationRequestDetails;
-import org.onap.vid.services.AsyncInstantiationBusinessLogic;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-import javax.inject.Inject;
-
-@Component
-@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-public class InstanceGroupInstantiationCommand extends ResourceInstantiationCommand {
-
-    @Inject
-    private AsyncInstantiationBusinessLogic asyncInstantiationBL;
-
-    @Override
-    protected String getRequestPath() {
-        return asyncInstantiationBL.getInstanceGroupInstantiationPath();
-    }
-
-    @Override
-    protected RequestDetailsWrapper<InstanceGroupInstantiationRequestDetails> generateMSORequest(JobAdapter.AsyncJobRequest request, String userId) {
-        return asyncInstantiationBL.generateInstanceGroupInstantiationRequest(
-                (InstanceGroup) getSharedData().getRequest(),
-                commandParentData.getModelInfo(CommandDataKey.SERVICE_MODEL_INFO),
-                commandParentData.getInstanceId(CommandDataKey.SERVICE_INSTANCE_ID),
-                getSharedData().getUserId()
-        );
-    }
-
-    @Override
-    protected String getJobAuditMSOStatus() {
-        return "INSTANCE_GROUP_REQUESTED";
-    }
-
-    @Override
-    protected boolean shouldInstantiateMyself() {
-        return Action.Create == ((InstanceGroup) getSharedData().getRequest()).getAction();
-    }
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupMemberCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupMemberCommand.kt
new file mode 100644
index 0000000..d8e9297
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/InstanceGroupMemberCommand.kt
@@ -0,0 +1,63 @@
+package org.onap.vid.job.command
+
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate
+import org.onap.vid.job.Job
+import org.onap.vid.job.JobAdapter
+import org.onap.vid.job.JobCommand
+import org.onap.vid.job.JobsBrokerService
+import org.onap.vid.model.serviceInstantiation.InstanceGroupMember
+import org.onap.vid.mso.RestMsoImplementation
+import org.onap.vid.services.AsyncInstantiationBusinessLogic
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.beans.factory.config.ConfigurableBeanFactory
+import org.springframework.context.annotation.Scope
+import org.springframework.http.HttpMethod
+import org.springframework.stereotype.Component
+import java.util.*
+
+@Component
+@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+class InstanceGroupMemberCommand @Autowired constructor(
+        private val asyncInstantiationBL: AsyncInstantiationBusinessLogic,
+        restMso: RestMsoImplementation,
+        private val msoRequestBuilder: MsoRequestBuilder,
+        msoResultHandlerService: MsoResultHandlerService,
+        inProgressStatusService:InProgressStatusService,
+        watchChildrenJobsBL: WatchChildrenJobsBL,
+        jobsBrokerService: JobsBrokerService,
+        jobAdapter: JobAdapter
+) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
+        watchChildrenJobsBL, jobsBrokerService, jobAdapter), JobCommand {
+
+    companion object {
+        private val LOGGER = EELFLoggerDelegate.getLogger(InstanceGroupMemberCommand::class.java)
+    }
+
+    override fun createChildren(): Job.JobStatus {
+        return Job.JobStatus.COMPLETED_WITH_NO_ACTION
+    }
+
+    override fun planCreateMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String, testApi: String?): MsoRestCallPlan {
+        val instanceGroupId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.VNF_GROUP_INSTANCE_ID)
+
+        val instantiatePath = asyncInstantiationBL.getInstanceGroupMemberInstantiationPath(instanceGroupId)
+
+        val requestDetailsWrapper = msoRequestBuilder.generateInstanceGroupMemberRequest(getRequest().instanceId, userId)
+
+        val actionDescription = "add instance group member  ${getRequest().instanceId} to instance group $instanceGroupId"
+
+        return MsoRestCallPlan(HttpMethod.POST, instantiatePath, Optional.of(requestDetailsWrapper), Optional.empty(), actionDescription)
+    }
+
+    override fun planDeleteMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String): MsoRestCallPlan {
+        val instanceGroupId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.VNF_GROUP_INSTANCE_ID)
+        val path = asyncInstantiationBL.getInstanceGroupMemberDeletePath(instanceGroupId)
+        val requestDetailsWrapper = msoRequestBuilder.generateInstanceGroupMemberRequest(getRequest().instanceId, userId)
+        return MsoRestCallPlan(HttpMethod.POST, path, Optional.of(requestDetailsWrapper), Optional.of(userId),
+                "delete instance group member ${getRequest().instanceId} from instance group $instanceGroupId")
+    }
+
+    override fun getRequest(): InstanceGroupMember {
+        return sharedData.request as InstanceGroupMember
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/JobCommandFactory.java b/vid-app-common/src/main/java/org/onap/vid/job/command/JobCommandFactory.java
index 9f9a622..32828ad 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/JobCommandFactory.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/JobCommandFactory.java
@@ -7,9 +7,9 @@
  * 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.
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/MacroServiceCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/MacroServiceCommand.kt
new file mode 100644
index 0000000..8ce73d7
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/MacroServiceCommand.kt
@@ -0,0 +1,98 @@
+package org.onap.vid.job.command
+
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate
+import org.onap.vid.aai.ExceptionWithRequestInfo
+import org.onap.vid.changeManagement.RequestDetailsWrapper
+import org.onap.vid.exceptions.AbortingException
+import org.onap.vid.exceptions.MaxRetriesException
+import org.onap.vid.exceptions.TryAgainException
+import org.onap.vid.job.Job
+import org.onap.vid.job.JobAdapter
+import org.onap.vid.job.JobCommand
+import org.onap.vid.job.JobsBrokerService
+import org.onap.vid.model.Action
+import org.onap.vid.model.VidNotions.ModelCategory.*
+import org.onap.vid.model.serviceInstantiation.ServiceInstantiation
+import org.onap.vid.mso.RestMsoImplementation
+import org.onap.vid.services.AsyncInstantiationBusinessLogic
+import org.onap.vid.services.AuditService
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.beans.factory.config.ConfigurableBeanFactory
+import org.springframework.context.annotation.Scope
+import org.springframework.http.HttpMethod
+import org.springframework.stereotype.Component
+import java.util.*
+
+@Component
+@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+class MacroServiceCommand @Autowired constructor(
+        inProgressStatusService: InProgressStatusService,
+        watchChildrenJobsBL: WatchChildrenJobsBL,
+        private val asyncInstantiationBL: AsyncInstantiationBusinessLogic,
+        jobsBrokerService: JobsBrokerService,
+        private val msoRequestBuilder: MsoRequestBuilder,
+        msoResultHandlerService: MsoResultHandlerService,
+        jobAdapter: JobAdapter,
+        restMso: RestMsoImplementation,
+        auditService: AuditService
+) : RootServiceCommand(restMso, inProgressStatusService, msoResultHandlerService,
+        watchChildrenJobsBL, jobsBrokerService, jobAdapter, asyncInstantiationBL, auditService, msoRequestBuilder), JobCommand {
+
+
+    companion object {
+        private val Logger = EELFLoggerDelegate.getLogger(MacroServiceCommand::class.java)
+    }
+
+    override fun createChildren(): Job.JobStatus {
+        return Job.JobStatus.COMPLETED_WITH_NO_ACTION
+    }
+
+    private val pre1806Models = setOf(Transport, INFRASTRUCTURE_VPN, SERVICE_WITH_COLLECTION_RESOURCE);
+
+    override fun planCreateMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String, testApi: String?): MsoRestCallPlan {
+        try {
+            val instantiatePath = asyncInstantiationBL.getServiceInstantiationPath(request as ServiceInstantiation)
+
+            val requestDetailsWrapper = generateRequest(sharedData.jobUuid, request, optimisticUniqueServiceInstanceName, userId)
+
+            val actionDescription = "create macro service instance"
+
+            return MsoRestCallPlan(HttpMethod.POST, instantiatePath, Optional.of(requestDetailsWrapper), Optional.empty(), actionDescription)
+        }
+
+        //Aai return bad response while checking names uniqueness
+        catch (exception : ExceptionWithRequestInfo) {
+            Logger.error("Failed to check name uniqueness in AAI. VID will try again later", exception)
+            throw TryAgainException(exception);
+        }
+
+        //Vid reached to max retries while trying to find unique name in AAI
+        catch (exception : MaxRetriesException) {
+            Logger.error("Failed to find unused name in AAI", exception)
+            throw AbortingException(exception);
+        }
+    }
+
+    private fun generateRequest(jobUuid: UUID?, request: ServiceInstantiation, optimisticUniqueServiceInstanceName: String, userId: String): RequestDetailsWrapper<out Any> {
+        // for transport or for infrastructure VPN - send the pre 1806 request
+        if (shouldUsePre1806Request(request)){
+            return msoRequestBuilder.generateMacroServicePre1806InstantiationRequest(request, userId)
+        }
+        return msoRequestBuilder.generateMacroServiceInstantiationRequest(jobUuid, request, optimisticUniqueServiceInstanceName, userId)
+    }
+
+    protected fun shouldUsePre1806Request(request: ServiceInstantiation): Boolean {
+        return (request.vidNotions != null && pre1806Models.contains(request.vidNotions.modelCategory))
+    }
+
+
+    override fun handleInProgressStatus(jobStatus: Job.JobStatus): Job.JobStatus {
+        asyncInstantiationBL.updateServiceInfoAndAuditStatus(sharedData.jobUuid, jobStatus)
+        return if (jobStatus==Job.JobStatus.PAUSE) Job.JobStatus.IN_PROGRESS else jobStatus
+    }
+
+    override fun isDescendantHasAction(phase: Action): Boolean {
+        return false
+    }
+
+}
\ No newline at end of file
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/MacroServiceInstantiationCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/MacroServiceInstantiationCommand.java
deleted file mode 100644
index 6687a2c..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/MacroServiceInstantiationCommand.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.onap.vid.changeManagement.RequestDetailsWrapper;
-import org.onap.vid.job.JobCommand;
-import org.onap.vid.mso.model.ServiceInstantiationRequestDetails;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-
-@Component
-@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-public class MacroServiceInstantiationCommand extends ServiceInstantiationCommand implements JobCommand {
-
-    public MacroServiceInstantiationCommand() {
-        // empty constructor
-    }
-
-    @Override
-    protected RequestDetailsWrapper<ServiceInstantiationRequestDetails> generateServiceInstantiationRequest() {
-        return asyncInstantiationBL.generateMacroServiceInstantiationRequest(
-                getSharedData().getJobUuid(), getRequest(), optimisticUniqueServiceInstanceName, getSharedData().getUserId()
-        );
-    }
-
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt
new file mode 100644
index 0000000..c8502b1
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt
@@ -0,0 +1,411 @@
+package org.onap.vid.job.command
+
+import com.google.common.collect.ImmutableList
+import org.apache.commons.lang3.ObjectUtils.defaultIfNull
+import org.apache.commons.lang3.StringUtils
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate
+import org.onap.vid.aai.AaiClientInterface
+import org.onap.vid.aai.ExceptionWithRequestInfo
+import org.onap.vid.aai.model.ResourceType
+import org.onap.vid.changeManagement.RequestDetailsWrapper
+import org.onap.vid.model.serviceInstantiation.*
+import org.onap.vid.mso.model.*
+import org.onap.vid.mso.model.BaseResourceInstantiationRequestDetails.*
+import org.onap.vid.mso.model.VfModuleInstantiationRequestDetails.UserParamMap
+import org.onap.vid.mso.rest.SubscriberInfo
+import org.onap.vid.services.AsyncInstantiationBusinessLogic
+import org.onap.vid.services.CloudOwnerService
+import org.onap.vid.utils.JACKSON_OBJECT_MAPPER
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.stereotype.Service
+import org.togglz.core.manager.FeatureManager
+import java.util.*
+import java.util.Collections.emptyList
+import java.util.stream.Collectors
+
+@Service
+class MsoRequestBuilder
+@Autowired constructor(private val asyncInstantiationBL: AsyncInstantiationBusinessLogic,
+                       private val cloudOwnerService: CloudOwnerService,
+                       private val aaiClient: AaiClientInterface,
+                       private val featureManager: FeatureManager) {
+
+    companion object {
+        private val LOGGER = EELFLoggerDelegate.getLogger(MsoRequestBuilder::class.java)
+        private const val VID_SOURCE = "VID"
+    }
+
+    fun generateALaCarteServiceInstantiationRequest(payload: ServiceInstantiation, optimisticUniqueServiceInstanceName: String, userId: String): RequestDetailsWrapper<ServiceInstantiationRequestDetails> {
+        val userParams = generateUserParamList()
+
+        val requestParameters = ServiceInstantiationRequestDetails.RequestParameters(payload.subscriptionServiceType, true, userParams, payload.testApi)
+
+        val requestDetails = generateServiceInstantiationRequestDetails(payload, requestParameters, optimisticUniqueServiceInstanceName, userId)
+
+        return RequestDetailsWrapper(requestDetails)
+    }
+
+    fun generateServiceDeletionRequest(payload: ServiceInstantiation, userId: String): RequestDetailsWrapper<ServiceDeletionRequestDetails> {
+
+        val requestParameters = ServiceDeletionRequestDetails.RequestParameters(payload.isALaCarte, payload.testApi)
+
+        val requestInfo = ServiceDeletionRequestDetails.RequestInfo(
+                VID_SOURCE,
+                userId)
+
+        val requestDetails = ServiceDeletionRequestDetails(payload.modelInfo, requestInfo, requestParameters)
+
+        return RequestDetailsWrapper(requestDetails)
+    }
+
+    fun generateMacroServiceInstantiationRequest(jobId: UUID?, payload: ServiceInstantiation, optimisticUniqueServiceInstanceName: String, userId: String): RequestDetailsWrapper<ServiceInstantiationRequestDetails> {
+        val serviceInstanceName = generateServiceName(jobId, payload, optimisticUniqueServiceInstanceName)
+
+        val serviceInstantiationServiceList = generateServiceInstantiationServicesList(payload, serviceInstanceName, createServiceInstantiationVnfList(jobId, payload))
+
+        val requestParameters = ServiceInstantiationRequestDetails.RequestParameters(payload.subscriptionServiceType, false, serviceInstantiationServiceList)
+
+        val requestDetails = generateServiceInstantiationRequestDetails(payload, requestParameters, serviceInstanceName, userId)
+
+        return RequestDetailsWrapper(requestDetails)
+    }
+
+    fun generateNetworkInstantiationRequest(networkDetails: Network, serviceModelInfo: ModelInfo, serviceInstanceId: String, userId: String, testApi: String?): RequestDetailsWrapper<NetworkInstantiationRequestDetails> {
+        val requestInfo = generateRequestInfo(networkDetails.instanceName, ResourceType.L3_NETWORK, networkDetails.isRollbackOnFailure, networkDetails.productFamilyId, userId)
+        val cloudConfiguration = generateCloudConfiguration(networkDetails.lcpCloudRegionId, networkDetails.tenantId)
+        val platform = Platform(networkDetails.platformName)
+        val lineOfBusiness = LineOfBusiness.of(networkDetails.lineOfBusiness)
+        val requestParameters = BaseResourceInstantiationRequestDetails.RequestParameters(generateUserParamList(), testApi)
+        val relatedInstanceList = generateRelatedInstances(mapOf(serviceInstanceId to serviceModelInfo))
+        return RequestDetailsWrapper(NetworkInstantiationRequestDetails(networkDetails.modelInfo, cloudConfiguration, requestInfo, platform, lineOfBusiness, relatedInstanceList, requestParameters))
+    }
+
+    fun generateVnfInstantiationRequest(vnfDetails: Vnf, serviceModelInfo: ModelInfo, serviceInstanceId: String, userId: String, testApi: String?): RequestDetailsWrapper<VnfInstantiationRequestDetails> {
+        val requestInfo = generateRequestInfo(vnfDetails.instanceName, ResourceType.GENERIC_VNF, vnfDetails.isRollbackOnFailure, vnfDetails.productFamilyId, userId)
+        val cloudConfiguration = generateCloudConfiguration(vnfDetails.lcpCloudRegionId, vnfDetails.tenantId)
+        val platform = Platform(vnfDetails.platformName)
+        val lineOfBusiness = LineOfBusiness.of(vnfDetails.lineOfBusiness)
+        val requestParameters = BaseResourceInstantiationRequestDetails.RequestParameters(generateUserParamList(), testApi)
+        val relatedInstanceList = generateRelatedInstances(mapOf(serviceInstanceId to serviceModelInfo))
+        return RequestDetailsWrapper(VnfInstantiationRequestDetails(vnfDetails.modelInfo, cloudConfiguration, requestInfo, platform, lineOfBusiness, relatedInstanceList, requestParameters))
+    }
+
+    fun generateDeleteVnfRequest(vnfDetails: Vnf, userId: String): RequestDetailsWrapper<VnfInstantiationRequestDetails> {
+        val requestInfo = generateRequestInfo(null, null, null, null, userId)
+        val cloudConfiguration = generateCloudConfiguration(vnfDetails.lcpCloudRegionId, vnfDetails.tenantId)
+        return RequestDetailsWrapper(VnfInstantiationRequestDetails(vnfDetails.modelInfo, cloudConfiguration, requestInfo, null, null, null, null))
+    }
+
+    fun generateVfModuleInstantiationRequest(vfModuleDetails: VfModule, serviceModelInfo: ModelInfo, serviceInstanceId: String, vnfModelInfo: ModelInfo, vnfInstanceId: String, vgInstanceId: String?, userId: String, testApi: String?): RequestDetailsWrapper<VfModuleInstantiationRequestDetails> {
+        val requestInfo = generateRequestInfo(vfModuleDetails.instanceName, ResourceType.VF_MODULE, vfModuleDetails.isRollbackOnFailure, null, userId)
+
+        //cloud configuration
+        val cloudConfiguration = generateCloudConfiguration(vfModuleDetails.lcpCloudRegionId, vfModuleDetails.tenantId)
+
+        //request parameters
+        val userParams = aggregateAllInstanceParams(extractActualInstanceParams(vfModuleDetails.instanceParams), vfModuleDetails.supplementaryParams)
+        val requestParameters = VfModuleInstantiationRequestDetails.RequestParametersVfModule(userParams, vfModuleDetails.isUsePreload, testApi)
+
+        //related instance list
+        val relatedInstanceList = generateRelatedInstances(mapOf(serviceInstanceId to serviceModelInfo, vnfInstanceId to vnfModelInfo))
+        if (StringUtils.isNotEmpty(vgInstanceId)) {
+            val volumeGroupModel = ModelInfo()
+            volumeGroupModel.modelType = "volumeGroup"
+            relatedInstanceList.add(RelatedInstance(volumeGroupModel, vgInstanceId, vfModuleDetails.volumeGroupInstanceName))
+        }
+        return RequestDetailsWrapper(VfModuleInstantiationRequestDetails(vfModuleDetails.modelInfo, cloudConfiguration, requestInfo, relatedInstanceList, requestParameters))
+    }
+
+    fun generateVolumeGroupInstantiationRequest(vfModuleDetails: VfModule, serviceModelInfo: ModelInfo, serviceInstanceId: String, vnfModelInfo: ModelInfo, vnfInstanceId: String, userId: String, testApi: String?): RequestDetailsWrapper<VolumeGroupRequestDetails> {
+        val requestInfo = generateRequestInfo(vfModuleDetails.volumeGroupInstanceName, ResourceType.VOLUME_GROUP, vfModuleDetails.isRollbackOnFailure, null, userId)
+        val cloudConfiguration = generateCloudConfiguration(vfModuleDetails.lcpCloudRegionId, vfModuleDetails.tenantId)
+        val userParams = aggregateAllInstanceParams(extractActualInstanceParams(vfModuleDetails.instanceParams), vfModuleDetails.supplementaryParams)
+        val requestParameters = VfModuleInstantiationRequestDetails.RequestParametersVfModule(userParams, vfModuleDetails.isUsePreload, testApi)
+        val relatedInstances = generateRelatedInstances(mapOf(serviceInstanceId to serviceModelInfo, vnfInstanceId to vnfModelInfo))
+
+        vfModuleDetails.modelInfo.modelType = "volumeGroup"
+        return RequestDetailsWrapper(VolumeGroupRequestDetails(vfModuleDetails.modelInfo, cloudConfiguration, requestInfo, relatedInstances, requestParameters))
+    }
+
+    fun generateInstanceGroupInstantiationRequest(instanceGroupDetails: InstanceGroup, serviceModelInfo: ModelInfo, serviceInstanceId: String, userId: String, testApi: String?): RequestDetailsWrapper<InstanceGroupInstantiationRequestDetails> {
+        val requestInfo = generateRequestInfo(instanceGroupDetails.instanceName, ResourceType.INSTANCE_GROUP, instanceGroupDetails.isRollbackOnFailure, null, userId)
+        val requestParameters = BaseResourceInstantiationRequestDetails.RequestParameters(generateUserParamList(), testApi)
+        val relatedInstanceList = generateRelatedInstances(mapOf(serviceInstanceId to serviceModelInfo))
+        return RequestDetailsWrapper(InstanceGroupInstantiationRequestDetails(instanceGroupDetails.modelInfo, requestInfo, relatedInstanceList, requestParameters))
+    }
+
+    fun generateInstanceGroupMemberRequest(instanceGroupMemberId: String, userId: String): RequestDetailsWrapper<AddOrRemoveInstanceGroupMemberRequestDetails> {
+        val requestInfo = generateRequestInfo(null, null, null, null, userId)
+        val modelInfo = ModelInfo()
+        modelInfo.modelType = "vnf"
+        val relatedInstanceList = generateRelatedInstances(mapOf(instanceGroupMemberId to modelInfo))
+        return RequestDetailsWrapper(AddOrRemoveInstanceGroupMemberRequestDetails(requestInfo, relatedInstanceList))
+    }
+
+    fun generateDeleteNetworkRequest(networkDetails: Network, userId: String): RequestDetailsWrapper<NetworkInstantiationRequestDetails> {
+        val requestInfo = generateRequestInfo(null, null, null, null, userId)
+        val cloudConfiguration = generateCloudConfiguration(networkDetails.lcpCloudRegionId, networkDetails.tenantId)
+        return RequestDetailsWrapper(NetworkInstantiationRequestDetails(networkDetails.modelInfo, cloudConfiguration, requestInfo, null, null, null, null))
+    }
+
+    fun generateDeleteVfModuleRequest(vfModuleDetails: VfModule, userId: String): RequestDetailsWrapper<VfModuleInstantiationRequestDetails> {
+        val requestInfo = generateRequestInfo(null, null, null, null, userId)
+        val cloudConfiguration = generateCloudConfiguration(vfModuleDetails.lcpCloudRegionId, vfModuleDetails.tenantId)
+        return RequestDetailsWrapper(VfModuleInstantiationRequestDetails(vfModuleDetails.modelInfo, cloudConfiguration, requestInfo, null, null))
+    }
+
+    private fun generateServiceName(jobId: UUID?, payload: ServiceInstantiation, optimisticUniqueServiceInstanceName: String): String? {
+        var serviceInstanceName: String? = null
+        if (StringUtils.isNotEmpty(optimisticUniqueServiceInstanceName)) {
+            serviceInstanceName = peekServiceName(jobId, payload, optimisticUniqueServiceInstanceName)
+        }
+        return serviceInstanceName
+    }
+
+    private fun peekServiceName(jobId: UUID?, payload: ServiceInstantiation, optimisticUniqueServiceInstanceName: String): String {
+        val serviceInstanceName: String
+        // unique name already exist in service info. If it's free in AAI we use it
+        if (isNameFreeInAai(optimisticUniqueServiceInstanceName, ResourceType.SERVICE_INSTANCE)) {
+            serviceInstanceName = optimisticUniqueServiceInstanceName
+        } else {
+            serviceInstanceName = asyncInstantiationBL.getUniqueName(payload.instanceName, ResourceType.SERVICE_INSTANCE)
+        }//otherwise we used the original service instance name (from payload) to get a new unique name from DB and AAI
+
+        //update serviceInfo with new name if needed
+        try {
+            asyncInstantiationBL.updateServiceInfo(jobId) { x -> x.serviceInstanceName = serviceInstanceName }
+        } catch (e: Exception) {
+            LOGGER.error("Failed updating service name {} in serviceInfo", serviceInstanceName, e)
+        }
+
+        return serviceInstanceName
+    }
+
+    @Throws(ExceptionWithRequestInfo::class)
+    private fun isNameFreeInAai(name: String, resourceType: ResourceType): Boolean {
+        return !aaiClient.isNodeTypeExistsByName(name, resourceType)
+    }
+
+    private fun generateServiceInstantiationServicesList(payload: ServiceInstantiation, serviceInstanceName: String?, vnfList: ServiceInstantiationRequestDetails.ServiceInstantiationVnfList): List<ServiceInstantiationRequestDetails.ServiceInstantiationService> {
+        val serviceInstantiationServiceList = LinkedList<ServiceInstantiationRequestDetails.ServiceInstantiationService>()
+        val unFilteredInstanceParams = defaultIfNull<List<MutableMap<String, String>>>(payload.instanceParams, emptyList())
+        val filteredInstanceParams = removeUnNeededParams(unFilteredInstanceParams)
+        val serviceInstantiationService = ServiceInstantiationRequestDetails.ServiceInstantiationService(
+                payload.modelInfo,
+                serviceInstanceName,
+                filteredInstanceParams,
+                vnfList
+        )
+        serviceInstantiationServiceList.add(serviceInstantiationService)
+        return serviceInstantiationServiceList
+    }
+
+    private fun removeUnNeededParams(instanceParams: List<MutableMap<String, String>>?): List<MutableMap<String, String>> {
+        val keysToRemove = mutableListOf<String>()
+        if (instanceParams.isNullOrEmpty()) {
+            return emptyList()
+        }
+
+        for (key in instanceParams[0].keys) {
+            for (paramToIgnore in AsyncInstantiationBusinessLogic.PARAMS_TO_IGNORE)
+                if (key.equals(paramToIgnore, ignoreCase = true)) {
+                    keysToRemove.add(key)
+                }
+        }
+
+        val result : MutableMap<String, String> = instanceParams[0].entries.stream()
+                .filter { entry -> !keysToRemove.contains(entry.key) }
+                .collect(Collectors.toMap({it.key}, {it.value}))
+
+        return if (result.isEmpty()) emptyList() else listOf(result)
+    }
+
+    private fun createServiceInstantiationVnfList(jobId: UUID?, payload: ServiceInstantiation): ServiceInstantiationRequestDetails.ServiceInstantiationVnfList {
+        val cloudConfiguration = generateCloudConfiguration(payload.lcpCloudRegionId, payload.tenantId)
+        val isBulk = asyncInstantiationBL.isPartOfBulk(jobId)
+
+        val vnfs = payload.vnfs
+        val vnfList = mutableListOf<ServiceInstantiationRequestDetails.ServiceInstantiationVnf>()
+        for (vnf in vnfs.values) {
+            val vfModules = vnf.vfModules
+            val convertedUnFilteredVfModules = convertVfModuleMapToList(vfModules)
+            val filteredVfModules = filterInstanceParamsFromVfModuleAndUniqueNames(convertedUnFilteredVfModules, isBulk)
+            val serviceInstantiationVnf = ServiceInstantiationRequestDetails.ServiceInstantiationVnf(
+                    vnf.modelInfo,
+                    cloudConfiguration,
+                    vnf.platformName,
+                    vnf.lineOfBusiness,
+                    payload.productFamilyId,
+                    buildVnfInstanceParams(vnf.instanceParams, filteredVfModules),
+                    filteredVfModules,
+                    getUniqueNameIfNeeded(vnf.instanceName, ResourceType.GENERIC_VNF, isBulk)
+            )
+            vnfList.add(serviceInstantiationVnf)
+        }
+
+        return ServiceInstantiationRequestDetails.ServiceInstantiationVnfList(vnfList)
+    }
+
+    private fun convertVfModuleMapToList(vfModules: Map<String, Map<String, VfModule>>): List<VfModuleMacro> {
+        return vfModules.values.stream().flatMap { vfModule ->
+            vfModule.values.stream().map { item ->
+                val aggregatedParams = aggregateAllInstanceParams(extractActualInstanceParams(item.instanceParams), item.supplementaryParams)
+                val aggregatedParamsConverted = JACKSON_OBJECT_MAPPER.convertValue(aggregatedParams, List::class.java)
+
+                VfModuleMacro(
+                        item.modelInfo,
+                        item.instanceName,
+                        item.volumeGroupInstanceName,
+                        aggregatedParamsConverted as List<Map<String, String>>)
+            }
+        }.collect(Collectors.toList<VfModuleMacro>())
+    }
+
+    fun aggregateAllInstanceParams(instanceParams: Map<String, String>?, supplementaryParams: Map<String, String>?): List<VfModuleInstantiationRequestDetails.UserParamMap<String, String>> {
+        var instanceParamsFinal: Map<String, String> = instanceParams ?: emptyMap()
+        val supplementaryParamsFinal: Map<String, String> = supplementaryParams ?: emptyMap()
+
+        if (!(instanceParamsFinal.isEmpty() && supplementaryParamsFinal.isEmpty())) {
+            //remove duplicate keys from instanceParams if exist in supplementaryParams
+            instanceParamsFinal = instanceParamsFinal.entries.stream()
+                    .filter { m -> !supplementaryParamsFinal.containsKey(m.key) }
+                    .collect(Collectors.toMap({ it.key }, { it.value }))
+
+            //aggregate the 2 collections and format them as UserParamMap
+            val aggregatedParams = UserParamMap<String, String>()
+            aggregatedParams.putAll(instanceParamsFinal)
+            aggregatedParams.putAll(supplementaryParamsFinal)
+
+            return mutableListOf(aggregatedParams)
+        }
+
+        return emptyList()
+    }
+
+    //Make sure we always get a one Map from InstanceParams
+    private fun extractActualInstanceParams(originalInstanceParams: List<MutableMap<String, String>>?): MutableMap<String, String> {
+        return if (originalInstanceParams.isNullOrEmpty() || originalInstanceParams[0].isNullOrEmpty()) {
+            mutableMapOf()
+        } else originalInstanceParams[0]
+    }
+
+    private fun filterInstanceParamsFromVfModuleAndUniqueNames(unFilteredVfModules: List<VfModuleMacro>, isBulk: Boolean): List<VfModuleMacro> {
+        return unFilteredVfModules.stream().map { vfModule ->
+            VfModuleMacro(
+                    vfModule.modelInfo,
+                    getUniqueNameIfNeeded(vfModule.instanceName, ResourceType.VF_MODULE, isBulk),
+                    getUniqueNameIfNeeded(vfModule.volumeGroupInstanceName, ResourceType.VOLUME_GROUP, isBulk),
+                    removeUnNeededParams(vfModule.instanceParams))
+        }
+                .collect(Collectors.toList<VfModuleMacro>())
+    }
+
+    fun buildVnfInstanceParams(currentVnfInstanceParams: List<MutableMap<String, String>>, vfModules: List<VfModuleMacro>): List<Map<String, String>> {
+        val filteredVnfInstanceParams = removeUnNeededParams(currentVnfInstanceParams)
+
+        val vnfInstanceParams = extractActualInstanceParams(filteredVnfInstanceParams)
+        vfModules.stream()
+                .map { x -> extractActualInstanceParams(x.instanceParams) }
+                .forEach { vnfInstanceParams.putAll(it) }
+        return if (vnfInstanceParams.isEmpty()) emptyList() else ImmutableList.of(vnfInstanceParams)
+    }
+
+    private fun generateServiceInstantiationRequestDetails(payload: ServiceInstantiation, requestParameters: ServiceInstantiationRequestDetails.RequestParameters, serviceInstanceName: String?, userId: String): ServiceInstantiationRequestDetails {
+        val requestInfo = ServiceInstantiationRequestDetails.RequestInfo(serviceInstanceName,
+                payload.productFamilyId,
+                VID_SOURCE,
+                payload.isRollbackOnFailure,
+                userId)
+        val owningEntity = ServiceInstantiationRequestDetails.ServiceInstantiationOwningEntity(payload.owningEntityId, payload.owningEntityName)
+        val subscriberInfo = generateSubscriberInfo(payload)
+        val project = if (payload.projectName != null) ServiceInstantiationRequestDetails.Project(payload.projectName) else null
+        return ServiceInstantiationRequestDetails(payload.modelInfo, owningEntity, subscriberInfo, project, requestInfo, requestParameters)
+    }
+
+    private fun generateSubscriberInfo(payload: ServiceInstantiation): SubscriberInfo {
+        val subscriberInfo = SubscriberInfo()
+        subscriberInfo.globalSubscriberId = payload.globalSubscriberId
+        return subscriberInfo
+    }
+
+    private fun generateCloudConfiguration(lcpCloudRegionId: String?, tenantId: String?): CloudConfiguration {
+        val cloudConfiguration = CloudConfiguration(lcpCloudRegionId, tenantId)
+        if(lcpCloudRegionId != null){
+            cloudOwnerService.enrichCloudConfigurationWithCloudOwner(cloudConfiguration, lcpCloudRegionId)
+        }
+        return cloudConfiguration
+    }
+
+    private fun generateRelatedInstances(relatedInstances: Map<String, ModelInfo>): MutableList<RelatedInstance> {
+        return relatedInstances.entries.stream()
+                .map { RelatedInstance(it.value, it.key) }
+                .collect(Collectors.toList())
+    }
+
+    private fun generateRequestInfo(instanceName: String?, resourceType: ResourceType?, rollbackOnFailure: Boolean?, productFamilyId: String?, userId: String) : BaseResourceInstantiationRequestDetails.RequestInfo {
+        return BaseResourceInstantiationRequestDetails.RequestInfo(
+                if (resourceType == null) null else getUniqueNameIfNeeded(instanceName, resourceType, false),
+                productFamilyId,
+                VID_SOURCE,
+                rollbackOnFailure,
+                userId)
+
+    }
+
+    private fun getUniqueNameIfNeeded(name: String?, resourceType: ResourceType, isBulk: Boolean): String? {
+        return if (StringUtils.isNotEmpty(name)) {
+            if (isBulk) asyncInstantiationBL.getUniqueName(name, resourceType) else name
+        } else {
+            null
+        }
+    }
+
+    private fun generateUserParamList(): List<ServiceInstantiationRequestDetails.UserParamNameAndValue> {
+        return emptyList()
+    }
+
+    fun generateMacroServicePre1806InstantiationRequest(payload: ServiceInstantiation, userId: String): RequestDetailsWrapper<ServiceInstantiationRequestDetails> {
+        val requestInfo = ServiceInstantiationRequestDetails.RequestInfo(payload.instanceName, payload.productFamilyId, VID_SOURCE, payload.isRollbackOnFailure, userId)
+        val userParams = generateUserParamsNameAndValue(payload.instanceParams)
+        val requestParameters = ServiceInstantiationRequestDetails.RequestParameters(payload.subscriptionServiceType, false, userParams)
+        val subscriberInfo = generateSubscriberInfoPre1806(payload)
+        val project = if (payload.projectName != null) ServiceInstantiationRequestDetails.Project(payload.projectName) else null
+        val owningEntity = ServiceInstantiationRequestDetails.ServiceInstantiationOwningEntity(payload.owningEntityId, payload.owningEntityName)
+        val cloudConfiguration = generateCloudConfiguration(payload.lcpCloudRegionId, payload.tenantId)
+        val relatedInstanceList = generateRelatedInstanceListForVrfEntry(payload.vrfs)
+
+        return RequestDetailsWrapper(ServiceInstantiationPre1806RequestDetails(
+                payload.modelInfo,
+                owningEntity,
+                subscriberInfo,
+                project,
+                requestInfo,
+                requestParameters,
+                cloudConfiguration,
+                relatedInstanceList))
+    }
+
+    private fun generateUserParamsNameAndValue(instanceParams: List<Map<String, String>>): List<ServiceInstantiationRequestDetails.UserParamNameAndValue> {
+        if (instanceParams == null){
+            return emptyList()
+        }
+        return instanceParams.getOrElse(0, {emptyMap()}).map{x-> ServiceInstantiationRequestDetails.UserParamNameAndValue(x.key, x.value)}
+    }
+
+    private fun generateSubscriberInfoPre1806(payload: ServiceInstantiation): SubscriberInfo {
+        val subscriberInfo = SubscriberInfo()
+        subscriberInfo.globalSubscriberId = payload.globalSubscriberId
+        subscriberInfo.subscriberName = payload.subscriberName
+        return subscriberInfo
+    }
+
+    private fun generateRelatedInstanceListForVrfEntry(vrfEntries: MutableMap<String, VrfEntry>): List<RelatedInstance> {
+        //fe send map of vrfs, with maps of networks and vpns, but actually we expect to only one vpn and one network
+        return if (vrfEntries.isEmpty() || vrfEntries.values.first().vpns.isEmpty() || vrfEntries.values.first().networks.isEmpty()) emptyList()
+        else {
+            val vpn = vrfEntries.values.first().vpns.values.first()
+            val network = vrfEntries.values.first().networks.values.first()
+            listOf(vpn, network).map { RelatedInstance(it.modelInfo, it.instanceId, it.instanceName) }
+        }
+    }
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/MsoResultHandlerService.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/MsoResultHandlerService.kt
index e1e9b13..50eada6 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/MsoResultHandlerService.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/MsoResultHandlerService.kt
@@ -7,9 +7,9 @@
  * 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.
@@ -44,43 +44,42 @@
         return jobSharedData.request as ServiceInstantiation
     }
 
-    fun handleRootResponse(jobUUID: UUID, msoResponse: RestObject<RequestReferencesContainer>): MsoResult {
+    fun handleRootResponse(sharedData: JobSharedData, msoResponse: RestObject<RequestReferencesContainer>): MsoResult {
+        val jobUUID:UUID = sharedData.jobUuid
         return if (msoResponse.statusCode in 200..399) {
             val jobStatus = Job.JobStatus.IN_PROGRESS
             val msoResourceIds = MsoResourceIds(msoResponse.get().requestReferences.requestId, msoResponse.get().requestReferences.instanceId)
-            asyncInstantiationBL.auditVidStatus(jobUUID, jobStatus)
+            auditService.auditVidStatus(jobUUID, jobStatus)
             setInitialRequestAuditStatusFromMso(jobUUID, msoResourceIds.requestId)
             asyncInstantiationBL.updateServiceInfo(jobUUID) { x ->
                 x.jobStatus = jobStatus
                 x.serviceInstanceId = msoResourceIds.instanceId
                 x.msoRequestId = UUID.fromString(msoResourceIds.requestId)
             }
-            MsoResult(jobStatus, msoResourceIds)
+            asyncInstantiationBL.addResourceInfo(sharedData, jobStatus, msoResourceIds.instanceId)
+            MsoResult(Job.JobStatus.COMPLETED_WITH_NO_ACTION, msoResourceIds)
         } else {
             auditService.setFailedAuditStatusFromMso(jobUUID, null, msoResponse.statusCode, msoResponse.raw)
-            handleRootCommandFailed(jobUUID)
+            asyncInstantiationBL.addFailedResourceInfo(sharedData, msoResponse)
+            return MsoResult(Job.JobStatus.FAILED)
         }
     }
 
-    fun handleResponse(msoResponse: RestObject<RequestReferencesContainer>, actionDescription: String): MsoResult {
+    fun handleResponse(sharedData: JobSharedData, msoResponse: RestObject<RequestReferencesContainer>, actionDescription: String): MsoResult {
         return if (msoResponse.statusCode in 200..399) {
             val msoResourceIds = MsoResourceIds(msoResponse.get().requestReferences.requestId, msoResponse.get().requestReferences.instanceId)
             LOGGER.debug("Successfully sent $actionDescription. Request id: ${msoResourceIds.requestId}")
+            asyncInstantiationBL.addResourceInfo(sharedData, Job.JobStatus.IN_PROGRESS, msoResourceIds.instanceId)
             MsoResult(Job.JobStatus.COMPLETED_WITH_NO_ACTION, msoResourceIds)
         } else {
             LOGGER.debug("Failed to $actionDescription. Details: ${msoResponse.raw}")
+            asyncInstantiationBL.addFailedResourceInfo(sharedData, msoResponse)
             MsoResult(Job.JobStatus.FAILED)
         }
     }
 
-
-    fun handleRootCommandFailed(jobUUID: UUID): MsoResult {
-        asyncInstantiationBL.handleFailedInstantiation(jobUUID)
-        return MsoResult(Job.JobStatus.FAILED)
-    }
-
     private fun setInitialRequestAuditStatusFromMso(jobUUID: UUID, requestId: String) {
         val initialMsoRequestStatus = "REQUESTED"
-        asyncInstantiationBL.auditMsoStatus(jobUUID, initialMsoRequestStatus, requestId, null)
+        auditService.auditMsoStatus(jobUUID, initialMsoRequestStatus, requestId, null)
     }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/NetworkCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/NetworkCommand.kt
new file mode 100644
index 0000000..bc4de7c
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/NetworkCommand.kt
@@ -0,0 +1,65 @@
+package org.onap.vid.job.command
+
+import org.onap.vid.job.Job
+import org.onap.vid.job.JobAdapter
+import org.onap.vid.job.JobCommand
+import org.onap.vid.job.JobsBrokerService
+import org.onap.vid.model.Action
+import org.onap.vid.model.serviceInstantiation.Network
+import org.onap.vid.mso.RestMsoImplementation
+import org.onap.vid.services.AsyncInstantiationBusinessLogic
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.beans.factory.config.ConfigurableBeanFactory
+import org.springframework.context.annotation.Scope
+import org.springframework.http.HttpMethod
+import org.springframework.stereotype.Component
+import java.util.*
+
+
+@Component
+@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+class NetworkCommand @Autowired constructor(
+        private val asyncInstantiationBL: AsyncInstantiationBusinessLogic,
+        restMso: RestMsoImplementation,
+        private val msoRequestBuilder: MsoRequestBuilder,
+        msoResultHandlerService: MsoResultHandlerService,
+        inProgressStatusService:InProgressStatusService,
+        watchChildrenJobsBL: WatchChildrenJobsBL,
+        jobsBrokerService: JobsBrokerService,
+        jobAdapter: JobAdapter
+        ) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
+        watchChildrenJobsBL, jobsBrokerService, jobAdapter), JobCommand {
+    override fun createChildren(): Job.JobStatus {
+        return Job.JobStatus.COMPLETED_WITH_NO_ACTION
+    }
+
+    override fun planCreateMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String, testApi: String?): MsoRestCallPlan {
+        val serviceInstanceId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.SERVICE_INSTANCE_ID)
+        val serviceModelInfo = commandParentData.getModelInfo(CommandParentData.CommandDataKey.SERVICE_MODEL_INFO)
+
+        val instantiatePath = asyncInstantiationBL.getNetworkInstantiationPath(serviceInstanceId)
+        val requestDetailsWrapper = msoRequestBuilder.generateNetworkInstantiationRequest(
+                request as Network,
+                serviceModelInfo,
+                serviceInstanceId,
+                userId,
+                testApi
+        )
+
+        val actionDescription = "create network in $serviceInstanceId"
+
+        return MsoRestCallPlan(HttpMethod.POST, instantiatePath, Optional.of(requestDetailsWrapper), Optional.empty(), actionDescription)
+    }
+
+    override fun planDeleteMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String): MsoRestCallPlan {
+        val serviceInstanceId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.SERVICE_INSTANCE_ID)
+        val path = asyncInstantiationBL.getNetworkDeletePath(serviceInstanceId, getRequest().instanceId)
+        val requestDetailsWrapper = msoRequestBuilder.generateDeleteNetworkRequest(getRequest() as Network, userId)
+        return MsoRestCallPlan(HttpMethod.DELETE, path, Optional.of(requestDetailsWrapper), Optional.of(userId),
+                "delete network ${getRequest().instanceId} from service instance $serviceInstanceId")
+    }
+
+    override fun isDescendantHasAction(phase: Action): Boolean {
+        return false
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/NetworkInstantiationCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/NetworkInstantiationCommand.java
deleted file mode 100644
index 2b7f79c..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/NetworkInstantiationCommand.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.onap.vid.changeManagement.RequestDetailsWrapper;
-import org.onap.vid.job.JobAdapter;
-import org.onap.vid.job.command.CommandParentData.CommandDataKey;
-import org.onap.vid.model.serviceInstantiation.Network;
-import org.onap.vid.mso.model.NetworkInstantiationRequestDetails;
-import org.onap.vid.services.AsyncInstantiationBusinessLogic;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-import javax.inject.Inject;
-
-@Component
-@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-public class NetworkInstantiationCommand extends ResourceInstantiationCommand {
-
-    @Inject
-    private AsyncInstantiationBusinessLogic asyncInstantiationBL;
-
-    @Override
-    protected String getRequestPath() {
-        return asyncInstantiationBL.getNetworkInstantiationPath(commandParentData.getInstanceId(CommandDataKey.SERVICE_INSTANCE_ID));
-    }
-
-    @Override
-    protected RequestDetailsWrapper<NetworkInstantiationRequestDetails> generateMSORequest(JobAdapter.AsyncJobRequest request, String userId) {
-        return asyncInstantiationBL.generateNetworkInstantiationRequest(
-                (Network) getSharedData().getRequest(),
-                commandParentData.getModelInfo(CommandDataKey.SERVICE_MODEL_INFO),
-                commandParentData.getInstanceId(CommandDataKey.SERVICE_INSTANCE_ID),
-                getSharedData().getUserId()
-        );
-    }
-
-    @Override
-    protected String getJobAuditMSOStatus() {
-        return "NETWORK_REQUESTED";
-    }
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/NoOpCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/NoOpCommand.java
index 9be37bb..4cc54e5 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/NoOpCommand.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/NoOpCommand.java
@@ -7,9 +7,9 @@
  * 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.
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt
index 7f3a05b..0e9ab7b 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt
@@ -7,9 +7,9 @@
  * 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.
@@ -20,14 +20,14 @@
 
 package org.onap.vid.job.command
 
+
 import com.fasterxml.jackson.module.kotlin.convertValue
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate
 import org.onap.vid.changeManagement.RequestDetailsWrapper
-import org.onap.vid.job.Job
+import org.onap.vid.exceptions.AbortingException
+import org.onap.vid.exceptions.TryAgainException
+import org.onap.vid.job.*
 import org.onap.vid.job.Job.JobStatus
-import org.onap.vid.job.JobAdapter
-import org.onap.vid.job.JobCommand
-import org.onap.vid.job.NextCommand
 import org.onap.vid.job.impl.JobSharedData
 import org.onap.vid.model.Action
 import org.onap.vid.model.RequestReferencesContainer
@@ -38,6 +38,7 @@
 import org.springframework.http.HttpMethod
 import java.util.*
 
+
 const val INTERNAL_STATE = "internalState"
 const val ACTION_PHASE = "actionPhase"
 const val CHILD_JOBS = "childJobs"
@@ -51,7 +52,9 @@
     DELETE_MYSELF,
     CREATE_MYSELF,
     IN_PROGRESS,
-    TERMINAL
+    TERMINAL,
+    RESUME_MYSELF,
+    REPLACE_MYSELF,
 }
 
 data class NextInternalState(val nextActionPhase: Action, val nextInternalState: InternalState)
@@ -69,8 +72,10 @@
         protected val restMso: RestMsoImplementation,
         protected val inProgressStatusService: InProgressStatusService,
         protected val msoResultHandlerService: MsoResultHandlerService,
-        protected val watchChildrenJobsBL: WatchChildrenJobsBL
-) : CommandBase(), JobCommand {
+        protected val watchChildrenJobsBL: WatchChildrenJobsBL,
+        private val jobsBrokerService: JobsBrokerService,
+        private val jobAdapter: JobAdapter
+        ) : CommandBase(), JobCommand {
 
     companion object {
         private val Logger = EELFLoggerDelegate.getLogger(ResourceCommand::class.java)
@@ -78,7 +83,7 @@
 
     abstract fun createChildren():JobStatus
 
-    abstract fun planCreateMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String): MsoRestCallPlan
+    abstract fun planCreateMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String, testApi: String?): MsoRestCallPlan
 
     abstract fun planDeleteMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String): MsoRestCallPlan
 
@@ -86,23 +91,28 @@
             Pair(InternalState.CREATING_CHILDREN, ::createChildren),
             Pair(InternalState.WATCHING, ::watchChildren),
             Pair(InternalState.CREATE_MYSELF, ::createMyself),
+            Pair(InternalState.RESUME_MYSELF, ::resumeMyself),
             Pair(InternalState.DELETE_MYSELF, ::deleteMyself),
-            Pair(InternalState.IN_PROGRESS, ::inProgress)
+            Pair(InternalState.IN_PROGRESS, ::inProgress),
+            Pair(InternalState.REPLACE_MYSELF, ::replaceMyself)
     )
 
     private lateinit var internalState:InternalState
     protected lateinit var actionPhase: Action
-    private var commandParentData: CommandParentData = CommandParentData()
-    private var msoResourceIds: MsoResourceIds = EMPTY_MSO_RESOURCE_ID
+    protected var commandParentData: CommandParentData = CommandParentData()
+    protected var msoResourceIds: MsoResourceIds = EMPTY_MSO_RESOURCE_ID
     protected var childJobs:List<String> = emptyList()
     private lateinit var cumulativeStatus:JobStatus
 
 
     override fun call(): NextCommand {
-        var jobStatus:JobStatus = invokeCommand()
+        var jobStatus:JobStatus = if (internalState!=InternalState.TERMINAL) invokeCommand() else cumulativeStatus
         jobStatus = comulateStatusAndUpdatePropertyIfFinal(jobStatus)
 
-        Logger.debug("command for job ${sharedData.jobUuid} invoked and finished with jobStatus $jobStatus")
+        try {
+            Logger.debug("job: ${this.javaClass.simpleName} ${sharedData.jobUuid} $actionPhase ${getActionType()} $internalState $jobStatus $childJobs")
+        } catch (e:Exception) { /* do nothing. Just failed to log...*/}
+
         if (shallStopJob(jobStatus)) {
             onFinal(jobStatus)
             return NextCommand(jobStatus)
@@ -133,7 +143,17 @@
     protected open fun getExternalInProgressStatus() = JobStatus.RESOURCE_IN_PROGRESS
 
     private fun invokeCommand(): JobStatus {
-        return commandByInternalState.getOrDefault (internalState, ::throwIllegalState).invoke()
+        return try {
+            commandByInternalState.getOrDefault(internalState, ::throwIllegalState).invoke()
+        }
+        catch (exception: TryAgainException) {
+            Logger.warn("caught TryAgainException. Set job status to IN_PROGRESS")
+            JobStatus.IN_PROGRESS
+        }
+        catch (exception: AbortingException) {
+            Logger.error("caught AbortingException. Set job status to FAILED")
+            JobStatus.FAILED;
+        }
     }
 
     private fun throwIllegalState():JobStatus {
@@ -177,7 +197,7 @@
             InternalState.DELETE_MYSELF -> InternalState.IN_PROGRESS
 
             InternalState.IN_PROGRESS -> {
-                if (jobStatus == Job.JobStatus.COMPLETED) InternalState.TERMINAL else InternalState.IN_PROGRESS
+                if (jobStatus == JobStatus.COMPLETED) InternalState.TERMINAL else InternalState.IN_PROGRESS
             }
 
             else -> InternalState.TERMINAL
@@ -187,10 +207,28 @@
     protected fun calcNextStateCreatePhase(jobStatus: JobStatus, internalState: InternalState): InternalState {
         return when (internalState) {
 
-            InternalState.CREATE_MYSELF -> InternalState.IN_PROGRESS
+            InternalState.CREATE_MYSELF -> when (jobStatus) {
+                JobStatus.IN_PROGRESS -> InternalState.CREATE_MYSELF
+                else -> InternalState.IN_PROGRESS
+            }
+
+            InternalState.RESUME_MYSELF -> when (jobStatus) {
+                JobStatus.IN_PROGRESS -> InternalState.RESUME_MYSELF
+                else -> InternalState.IN_PROGRESS
+            }
+
+            InternalState.REPLACE_MYSELF -> when (jobStatus) {
+                JobStatus.IN_PROGRESS -> InternalState.REPLACE_MYSELF
+                else -> InternalState.IN_PROGRESS
+            }
 
             InternalState.IN_PROGRESS -> {
-                if (jobStatus == Job.JobStatus.COMPLETED) InternalState.CREATING_CHILDREN else InternalState.IN_PROGRESS
+                when {
+                    jobStatus != JobStatus.COMPLETED -> InternalState.IN_PROGRESS
+                    isDescendantHasAction(Action.Create) -> InternalState.CREATING_CHILDREN
+                    isDescendantHasAction(Action.Replace) -> InternalState.CREATING_CHILDREN
+                    else -> InternalState.TERMINAL
+                }
             }
 
             InternalState.CREATING_CHILDREN -> InternalState.WATCHING
@@ -202,7 +240,6 @@
                 }
             }
 
-
             else -> InternalState.TERMINAL
         }
     }
@@ -214,7 +251,7 @@
                 MSO_RESOURCE_ID to msoResourceIds,
                 CHILD_JOBS to childJobs,
                 CUMULATIVE_STATUS to cumulativeStatus
-        )
+        ) + commandParentData.parentData
     }
 
     override fun init(sharedData: JobSharedData, commandData: Map<String, Any>): ResourceCommand {
@@ -232,13 +269,24 @@
         return this
     }
 
-    private fun calcInitialState(commandData: Map<String, Any>, phase: Action):InternalState {
+    fun calcInitialState(commandData: Map<String, Any>, phase: Action):InternalState {
         val status:InternalState = getEnumFromMapOfStrings(commandData, INTERNAL_STATE, InternalState.INITIAL)
         if (status == InternalState.INITIAL) {
             onInitial(phase)
             return when (phase) {
-                Action.Delete -> InternalState.CREATING_CHILDREN
-                Action.Create -> if (isNeedToCreateMyself()) InternalState.CREATE_MYSELF else InternalState.CREATING_CHILDREN
+                Action.Delete -> when {
+                    isDescendantHasAction(phase) -> InternalState.CREATING_CHILDREN
+                    isNeedToDeleteMyself() -> InternalState.DELETE_MYSELF
+                    else -> InternalState.TERMINAL
+                }
+                Action.Create -> when {
+                    isNeedToCreateMyself() -> InternalState.CREATE_MYSELF
+                    isNeedToResumeMySelf() -> InternalState.RESUME_MYSELF
+                    isNeedToReplaceMySelf() -> InternalState.REPLACE_MYSELF
+                    isDescendantHasAction(phase) -> InternalState.CREATING_CHILDREN
+                    isDescendantHasAction(Action.Replace) -> InternalState.CREATING_CHILDREN
+                    else -> InternalState.TERMINAL
+                }
                 else -> throw IllegalStateException("state $internalState is not supported yet")
             }
         }
@@ -269,7 +317,11 @@
 
     protected open fun isNeedToCreateMyself(): Boolean = getActionType() == Action.Create
 
-    protected open fun inProgress(): Job.JobStatus {
+    protected open fun isNeedToResumeMySelf(): Boolean = getActionType() == Action.Resume
+
+    protected open fun isNeedToReplaceMySelf(): Boolean = false
+
+    protected open fun inProgress(): JobStatus {
         val requestId:String = msoResourceIds.requestId;
         return try {
             val jobStatus = inProgressStatusService.call(getExpiryChecker(), sharedData, requestId)
@@ -277,29 +329,35 @@
         } catch (e: javax.ws.rs.ProcessingException) {
             // Retry when we can't connect MSO during getStatus
             Logger.error(EELFLoggerDelegate.errorLogger, "Cannot get orchestration status for {}, will retry: {}", requestId, e, e)
-            Job.JobStatus.IN_PROGRESS;
+            JobStatus.IN_PROGRESS;
         } catch (e: InProgressStatusService.BadResponseFromMso) {
             inProgressStatusService.handleFailedMsoResponse(sharedData.jobUuid, requestId, e.msoResponse)
-            Job.JobStatus.IN_PROGRESS
+            JobStatus.IN_PROGRESS
         } catch (e: RuntimeException) {
             Logger.error(EELFLoggerDelegate.errorLogger, "Cannot get orchestration status for {}, stopping: {}", requestId, e, e)
-            Job.JobStatus.STOPPED
+            JobStatus.STOPPED
         }
     }
 
-    fun createMyself(): Job.JobStatus {
-        val createMyselfCommand = planCreateMyselfRestCall(commandParentData, sharedData.request, sharedData.userId)
-
+    fun createMyself(): JobStatus {
+        val createMyselfCommand = planCreateMyselfRestCall(commandParentData, sharedData.request, sharedData.userId, sharedData.testApi)
         return executeAndHandleMsoInstanceRequest(createMyselfCommand)
     }
 
-    fun deleteMyself(): Job.JobStatus {
-        val deleteMyselfCommand = planDeleteMyselfRestCall(commandParentData, sharedData.request, sharedData.userId)
+    protected open fun resumeMyself(): JobStatus {
+        throw NotImplementedError("Resume is not implemented for this command " + this.javaClass)
+    }
 
+    protected open fun replaceMyself(): JobStatus {
+        throw NotImplementedError("Replace is not implemented for this command " + this.javaClass)
+    }
+
+    fun deleteMyself(): JobStatus {
+        val deleteMyselfCommand = planDeleteMyselfRestCall(commandParentData, sharedData.request, sharedData.userId)
         return executeAndHandleMsoInstanceRequest(deleteMyselfCommand)
     }
 
-    private fun executeAndHandleMsoInstanceRequest(restCallPlan: MsoRestCallPlan): JobStatus {
+    protected fun executeAndHandleMsoInstanceRequest(restCallPlan: MsoRestCallPlan): JobStatus {
         val msoResponse = restMso.restCall(
                 restCallPlan.httpMethod,
                 RequestReferencesContainer::class.java,
@@ -309,9 +367,9 @@
         )
 
         val msoResult = if (isServiceCommand()) {
-            msoResultHandlerService.handleRootResponse(sharedData.jobUuid, msoResponse)
+            msoResultHandlerService.handleRootResponse(sharedData, msoResponse)
         } else {
-            msoResultHandlerService.handleResponse(msoResponse, restCallPlan.actionDescription)
+            msoResultHandlerService.handleResponse(sharedData, msoResponse, restCallPlan.actionDescription)
         }
 
         this.msoResourceIds = msoResult.msoResourceIds
@@ -321,14 +379,14 @@
     protected open fun getExpiryChecker(): ExpiryChecker = ExpiryChecker {false}
 
     protected open fun handleInProgressStatus(jobStatus: JobStatus): JobStatus {
-        return  if (jobStatus == Job.JobStatus.PAUSE) Job.JobStatus.IN_PROGRESS else jobStatus
+        return if (jobStatus == JobStatus.PAUSE) JobStatus.IN_PROGRESS else jobStatus
     }
 
     protected open fun watchChildren():JobStatus {
         return watchChildrenJobsBL.retrieveChildrenJobsStatus(childJobs)
     }
 
-    private fun comulateStatusAndUpdatePropertyIfFinal(internalStateStatus: JobStatus): JobStatus {
+    protected fun comulateStatusAndUpdatePropertyIfFinal(internalStateStatus: JobStatus): JobStatus {
         val status = watchChildrenJobsBL.cumulateJobStatus(internalStateStatus, cumulativeStatus)
 
         //we want to update cumulativeStatus only for final status
@@ -338,6 +396,44 @@
 
         return status
     }
+
+    protected fun buildDataForChild(request: BaseResource, actionPhase: Action): Map<String, Any> {
+        addMyselfToChildrenData(commandParentData, request)
+        commandParentData.setActionPhase(actionPhase)
+        return commandParentData.parentData
+    }
+
+    protected open fun addMyselfToChildrenData(commandParentData: CommandParentData, request: BaseResource) {
+        // Nothing by default
+    }
+
+    protected open fun isDescendantHasAction(phase:Action):Boolean = isDescendantHasAction(getRequest(), phase, true )
+
+
+    @JvmOverloads
+    fun isDescendantHasAction(request: BaseResource, phase: Action, isFirstLevel:Boolean=true): Boolean {
+        if (!isFirstLevel && request.action == phase) {
+            return true;
+        }
+
+        return request.children.map {this.isDescendantHasAction(it, phase, false)}.any {it}
+    }
+
+    protected fun getActualInstanceId(request: BaseResource):String =
+            if (getActionType() == Action.Create) msoResourceIds.instanceId else request.instanceId
+
+
+    protected fun pushChildrenJobsToBroker(children:Collection<BaseResource>,
+                                           dataForChild: Map<String, Any>,
+                                           jobType: JobType?=null): List<String> {
+        var counter = 0;
+        return  children
+                .map {Pair(it, counter++)}
+                .map { jobAdapter.createChildJob(jobType ?: it.first.jobType, it.first, sharedData, dataForChild, it.second) }
+                .map { jobsBrokerService.add(it) }
+                .map { it.toString() }
+    }
+
 }
 
 
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceInProgressStatusCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceInProgressStatusCommand.java
deleted file mode 100644
index 123d38b..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceInProgressStatusCommand.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.onap.vid.job.Job;
-import org.onap.vid.job.NextCommand;
-import org.onap.vid.job.impl.JobSharedData;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-@Component
-@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-public class ResourceInProgressStatusCommand extends BaseInProgressStatusCommand {
-
-    public ResourceInProgressStatusCommand() {
-    }
-
-    ResourceInProgressStatusCommand(JobSharedData sharedData, String requestId, String instanceId) {
-        init(sharedData, requestId, instanceId);
-    }
-
-    @Override
-    protected ExpiryChecker getExpiryChecker() {
-        return x->false;
-    }
-
-    @Override
-    protected NextCommand processJobStatus(Job.JobStatus jobStatus) {
-        return new NextCommand(jobStatus, this);
-    }
-
-
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceInstantiationCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceInstantiationCommand.java
deleted file mode 100644
index 98980a3..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceInstantiationCommand.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.onap.vid.changeManagement.RequestDetailsWrapper;
-import org.onap.vid.job.Job;
-import org.onap.vid.job.JobAdapter;
-import org.onap.vid.job.JobCommand;
-import org.onap.vid.job.NextCommand;
-import org.onap.vid.job.impl.JobSharedData;
-import org.onap.vid.model.RequestReferencesContainer;
-import org.onap.vid.mso.RestMsoImplementation;
-import org.onap.vid.mso.RestObject;
-import org.onap.vid.mso.model.BaseResourceInstantiationRequestDetails;
-import org.onap.vid.services.AsyncInstantiationBusinessLogic;
-import org.onap.vid.services.AuditService;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-import javax.inject.Inject;
-import java.util.Map;
-
-
-@Component
-@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-public abstract class ResourceInstantiationCommand extends BaseInstantiationCommand implements JobCommand {
-
-
-    @Inject
-    protected RestMsoImplementation restMso;
-
-    @Inject
-    private AsyncInstantiationBusinessLogic asyncInstantiationBL;
-
-    @Inject
-    private AuditService auditService;
-
-    @Override
-    public ResourceInstantiationCommand init(JobSharedData sharedData, Map<String, Object> commandData) {
-      super.init(sharedData, commandData);
-        return this;
-    }
-
-    @Override
-    public Map<String, Object> getData() {
-       return commandParentData.getParentData();
-    }
-
-    @Override
-    public NextCommand call() {
-        if (!shouldInstantiateMyself()) {
-            return new NextCommand(Job.JobStatus.COMPLETED_WITH_NO_ACTION);
-        }
-
-        RequestDetailsWrapper<? extends BaseResourceInstantiationRequestDetails> requestDetailsWrapper = generateMSORequest(
-                getSharedData().getRequest(),
-                getSharedData().getUserId()
-                );
-        String instantiatePath = getRequestPath();
-
-        RestObject<RequestReferencesContainer> msoResponse = restMso.PostForObject(requestDetailsWrapper,
-                instantiatePath, RequestReferencesContainer.class);
-
-        if (msoResponse.getStatusCode() >= 200 && msoResponse.getStatusCode() < 400) {
-            String requestId = msoResponse.get().getRequestReferences().getRequestId();
-            String instanceId = msoResponse.get().getRequestReferences().getInstanceId();
-            asyncInstantiationBL.auditMsoStatus(getSharedData().getRootJobId(), getJobAuditMSOStatus(), requestId, null);
-            return getNextCommand(requestId, instanceId);
-        }
-        else {
-            auditService.setFailedAuditStatusFromMso(getSharedData().getRootJobId(), null, msoResponse.getStatusCode(), msoResponse.getRaw());
-            return new NextCommand(Job.JobStatus.FAILED);
-        }
-    }
-    protected NextCommand getNextCommand(String requestId, String instanceId){
-        return new NextCommand(Job.JobStatus.RESOURCE_IN_PROGRESS, new ResourceInProgressStatusCommand(getSharedData(), requestId, instanceId));
-    }
-
-    protected boolean shouldInstantiateMyself() {
-        return true;
-    }
-
-    protected abstract String getRequestPath();
-    protected abstract RequestDetailsWrapper<? extends BaseResourceInstantiationRequestDetails> generateMSORequest(JobAdapter.AsyncJobRequest request, String userId);
-    protected abstract String getJobAuditMSOStatus();
-}
-
-
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceWithChildrenInProgressCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceWithChildrenInProgressCommand.java
deleted file mode 100644
index 0a345c5..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceWithChildrenInProgressCommand.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.onap.vid.job.Job;
-import org.onap.vid.job.NextCommand;
-import org.onap.vid.job.impl.JobSharedData;
-
-import java.util.HashMap;
-import java.util.Map;
-
-
-public class ResourceWithChildrenInProgressCommand extends BaseInProgressStatusCommand {
-
-    public ResourceWithChildrenInProgressCommand() {
-    }
-
-    public ResourceWithChildrenInProgressCommand(JobSharedData sharedData,
-                                                 String requestId,
-                                                 String instanceId,
-                                                 CommandParentData commandParentData) {
-        init(sharedData, requestId, instanceId, commandParentData);
-    }
-
-    protected BaseInProgressStatusCommand init(JobSharedData sharedData,
-                                               String requestId,
-                                               String instanceId,
-                                               CommandParentData commandParentData) {
-        init(sharedData, requestId, instanceId);
-        this.commandParentData= commandParentData;
-        return this;
-    }
-
-
-    @Override
-    public Map<String, Object> getData() {
-        Map<String, Object> data = new HashMap<>(super.getData());
-        data.putAll(buildDataForChild());
-        return data;
-    }
-
-    @Override
-    public BaseInProgressStatusCommand init(JobSharedData sharedData, Map<String, Object> commandData) {
-        return init(
-                sharedData,
-                (String) commandData.get("requestId"),
-                (String) commandData.get("instanceId"),
-                commandParentData.initParentData(commandData));
-    }
-
-    protected Map<String, Object> buildDataForChild() {
-       return commandParentData.getParentData();
-    }
-
-
-
-    @Override
-    protected NextCommand processJobStatus(Job.JobStatus jobStatus) {
-        return new NextCommand(jobStatus, this);
-    }
-
-    @Override
-    protected ExpiryChecker getExpiryChecker() {
-        return x->false;
-    }
-
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/RootServiceCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/RootServiceCommand.kt
new file mode 100644
index 0000000..c4680b2
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/RootServiceCommand.kt
@@ -0,0 +1,98 @@
+package org.onap.vid.job.command
+
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate
+import org.onap.vid.job.Job
+import org.onap.vid.job.JobAdapter
+import org.onap.vid.job.JobCommand
+import org.onap.vid.job.JobsBrokerService
+import org.onap.vid.job.impl.JobSharedData
+import org.onap.vid.model.Action
+import org.onap.vid.model.serviceInstantiation.ServiceInstantiation
+import org.onap.vid.mso.RestMsoImplementation
+import org.onap.vid.services.AsyncInstantiationBusinessLogic
+import org.onap.vid.services.AuditService
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.http.HttpMethod
+import java.util.*
+
+abstract class RootServiceCommand @Autowired constructor(
+        restMso: RestMsoImplementation,
+        inProgressStatusService: InProgressStatusService,
+        msoResultHandlerService: MsoResultHandlerService,
+        watchChildrenJobsBL: WatchChildrenJobsBL,
+        jobsBrokerService: JobsBrokerService,
+        jobAdapter: JobAdapter,
+        private val asyncInstantiationBL: AsyncInstantiationBusinessLogic,
+        private val auditService: AuditService,
+        private val msoRequestBuilder: MsoRequestBuilder
+) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
+        watchChildrenJobsBL, jobsBrokerService, jobAdapter), JobCommand {
+
+    lateinit var optimisticUniqueServiceInstanceName: String
+
+    companion object {
+        private val LOGGER = EELFLoggerDelegate.getLogger(RootServiceCommand::class.java)
+    }
+
+    final override fun onInitial(phase: Action) {
+        if (phase== Action.Delete) {
+            asyncInstantiationBL.updateServiceInfoAndAuditStatus(sharedData.jobUuid, Job.JobStatus.IN_PROGRESS)
+        }
+    }
+
+    final override fun getExternalInProgressStatus() = Job.JobStatus.IN_PROGRESS
+
+    final override fun getData(): Map<String, Any?> {
+        return super.getData() + mapOf(UNIQUE_INSTANCE_NAME to optimisticUniqueServiceInstanceName)
+    }
+
+    final override fun onFinal(jobStatus: Job.JobStatus) {
+        asyncInstantiationBL.updateServiceInfoAndAuditStatus(sharedData.jobUuid, jobStatus)
+        if (jobStatus.isFailure) {
+            asyncInstantiationBL.handleFailedInstantiation(sharedData.jobUuid)
+        }
+    }
+
+    final override fun init(sharedData: JobSharedData, commandData: Map<String, Any>): ResourceCommand {
+        optimisticUniqueServiceInstanceName = commandData.getOrDefault(UNIQUE_INSTANCE_NAME, "") as String
+        return super<ResourceCommand>.init(sharedData, commandData)
+    }
+
+    final override fun isServiceCommand(): Boolean = true
+
+    final override fun getExpiryChecker(): ExpiryChecker {
+        return ServiceExpiryChecker()
+    }
+
+    override fun resumeMyself(): Job.JobStatus {
+        val requestType = "createInstance"
+        val scope = "service"
+        val serviceInstanceId = getActualInstanceId(getRequest())
+        try {
+            val requests = auditService.retrieveRequestsFromMsoByServiceIdAndRequestTypeAndScope(serviceInstanceId, requestType, scope)
+            if (requests.isEmpty() || requests[0].requestId == null) {
+                LOGGER.error("Failed to retrieve requestId with type: $type, scope: $scope for service instanceId $serviceInstanceId ")
+                return Job.JobStatus.FAILED
+            }
+            val createMyselfCommand = planResumeMyselfRestCall(requests[0].requestId, sharedData.userId)
+            return executeAndHandleMsoInstanceRequest(createMyselfCommand)
+        } catch (exception: Exception) {
+            LOGGER.error("Failed to resume instanceId $serviceInstanceId ", exception)
+            return Job.JobStatus.FAILED
+        }
+    }
+
+    private fun planResumeMyselfRestCall(requestId: String, userId: String): MsoRestCallPlan {
+        val path = asyncInstantiationBL.getResumeRequestPath(requestId)
+        return MsoRestCallPlan(HttpMethod.POST, path, Optional.empty(), Optional.of(userId), "resume request $requestId")
+    }
+
+    override fun planDeleteMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String): MsoRestCallPlan {
+        val requestDetailsWrapper = msoRequestBuilder.generateServiceDeletionRequest(
+                request as ServiceInstantiation, userId
+        )
+        val path = asyncInstantiationBL.getServiceDeletionPath(request.instanceId)
+        return MsoRestCallPlan(HttpMethod.DELETE, path, Optional.of(requestDetailsWrapper), Optional.empty(),
+                "delete instance with id ${request.instanceId}")
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/ServiceInProgressStatusCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/ServiceInProgressStatusCommand.java
deleted file mode 100644
index 6fd2213..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/ServiceInProgressStatusCommand.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.apache.commons.collections.MapUtils;
-import org.onap.vid.job.Job;
-import org.onap.vid.job.Job.JobStatus;
-import org.onap.vid.job.JobCommand;
-import org.onap.vid.job.JobType;
-import org.onap.vid.job.NextCommand;
-import org.onap.vid.job.command.CommandParentData.CommandDataKey;
-import org.onap.vid.job.impl.JobSharedData;
-import org.onap.vid.model.serviceInstantiation.ServiceInstantiation;
-import org.onap.vid.properties.Features;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-@Component
-@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-public class ServiceInProgressStatusCommand extends BaseInProgressStatusCommand {
-
-    public ServiceInProgressStatusCommand() {
-    }
-
-    ServiceInProgressStatusCommand(JobSharedData sharedData, MsoResourceIds msoResourceIds) {
-        init(sharedData, msoResourceIds.getRequestId(), msoResourceIds.getInstanceId());
-    }
-
-    @Override
-    protected ExpiryChecker getExpiryChecker() {
-        return new ServiceExpiryChecker();
-    }
-
-    protected NextCommand processJobStatus(Job.JobStatus jobStatus) {
-        JobCommand jobCommand = this;
-        Job.JobStatus nextJobStatus = jobStatus;
-        switch (jobStatus) {
-            case FAILED:
-                asyncInstantiationBL.handleFailedInstantiation(getSharedData().getJobUuid());
-                return new NextCommand(nextJobStatus, jobCommand);
-            case PAUSE:
-                nextJobStatus = Job.JobStatus.IN_PROGRESS;
-                break;
-            case COMPLETED:
-                ServiceInstantiation request = (ServiceInstantiation) getSharedData().getRequest();
-                if (isNeedToCreateChildJobs(request)) {
-                    List<String> childrenJobs = getChildJobs(request);
-                    nextJobStatus = Job.JobStatus.IN_PROGRESS;
-                    jobCommand = new WatchingCommand(getSharedData(), childrenJobs, true);
-                    return new NextCommand(nextJobStatus, jobCommand);
-                }
-                break;
-                default: // for sonar
-        }
-        asyncInstantiationBL.updateServiceInfoAndAuditStatus(getSharedData().getJobUuid(), jobStatus);
-        return new NextCommand(nextJobStatus, jobCommand);
-    }
-
-    private List<String> getChildJobs(ServiceInstantiation request) {
-        Map<String, Object> dataForChild = buildDataForChild(request);
-
-        Stream<String> vnfJobs = request.getVnfs().values().stream().map(
-                vnf -> jobsBrokerService.add(
-                        jobAdapter.createChildJob(JobType.VnfInstantiation, JobStatus.CREATING , vnf, getSharedData(), dataForChild)).toString()
-        );
-
-        Stream<String> networkJobs = request.getNetworks().values().stream().map(
-                network -> jobsBrokerService.add(
-                        jobAdapter.createChildJob(JobType.NetworkInstantiation, JobStatus.CREATING , network, getSharedData(), dataForChild)).toString()
-        );
-
-        Stream<String> instanceGroupJobs = request.getVnfGroups().values().stream().map(
-                instanceGroup -> jobsBrokerService.add(
-                        jobAdapter.createChildJob(JobType.InstanceGroupInstantiation, JobStatus.CREATING , instanceGroup, getSharedData(), dataForChild)).toString()
-        );
-
-        return Stream.of(vnfJobs, networkJobs, instanceGroupJobs)
-                .reduce(Stream::concat)
-                .orElseGet(Stream::empty)
-                .collect(Collectors.toList());
-    }
-
-    public boolean isNeedToCreateChildJobs(ServiceInstantiation request) {
-        return featureManager.isActive(Features.FLAG_ASYNC_ALACARTE_VNF) && request.isALaCarte() &&
-                    (
-                            MapUtils.isNotEmpty(request.getVnfs()) || MapUtils.isNotEmpty(request.getNetworks()) ||
-                            (featureManager.isActive(Features.FLAG_1902_VNF_GROUPING) && MapUtils.isNotEmpty(request.getVnfGroups()))
-                    );
-    }
-
-    protected Map<String, Object> buildDataForChild(ServiceInstantiation request) {
-        commandParentData.addInstanceId(CommandDataKey.SERVICE_INSTANCE_ID, this.instanceId);
-        commandParentData.addModelInfo(CommandDataKey.SERVICE_MODEL_INFO, request.getModelInfo());
-        return commandParentData.getParentData();
-    }
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/ServiceInstantiationCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/ServiceInstantiationCommand.java
deleted file mode 100644
index 414379b..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/ServiceInstantiationCommand.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import com.google.common.collect.ImmutableMap;
-import org.apache.commons.lang3.ObjectUtils;
-import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.onap.vid.aai.ExceptionWithRequestInfo;
-import org.onap.vid.changeManagement.RequestDetailsWrapper;
-import org.onap.vid.exceptions.MaxRetriesException;
-import org.onap.vid.job.Job;
-import org.onap.vid.job.JobCommand;
-import org.onap.vid.job.NextCommand;
-import org.onap.vid.job.impl.JobSharedData;
-import org.onap.vid.model.RequestReferencesContainer;
-import org.onap.vid.model.serviceInstantiation.ServiceInstantiation;
-import org.onap.vid.mso.RestMsoImplementation;
-import org.onap.vid.mso.RestObject;
-import org.onap.vid.mso.model.ServiceInstantiationRequestDetails;
-import org.onap.vid.services.AsyncInstantiationBusinessLogic;
-
-import javax.inject.Inject;
-import java.util.Map;
-
-
-public abstract class ServiceInstantiationCommand extends BaseRootCommand implements JobCommand {
-
-    private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(ServiceInstantiationCommand.class);
-
-    @Inject
-    protected AsyncInstantiationBusinessLogic asyncInstantiationBL;
-
-    @Inject
-    private RestMsoImplementation restMso;
-
-    protected String optimisticUniqueServiceInstanceName;
-
-    public ServiceInstantiationCommand() {
-    }
-
-    @Override
-    public NextCommand call() {
-        RequestDetailsWrapper<ServiceInstantiationRequestDetails> requestDetailsWrapper ;
-        try {
-            requestDetailsWrapper = generateServiceInstantiationRequest();
-        }
-
-        //Aai return bad response while checking names uniqueness
-        catch (ExceptionWithRequestInfo exception) {
-            return handleAaiNameUniquenessBadResponse(exception);
-        }
-
-        //Vid reached to max retries while trying to find unique name in AAI
-        catch (MaxRetriesException exception) {
-            return handleMaxRetryInNameUniqueness(exception);
-        }
-
-        String path = asyncInstantiationBL.getServiceInstantiationPath(getRequest());
-
-        RestObject<RequestReferencesContainer> msoResponse = restMso.PostForObject(requestDetailsWrapper,
-                path, RequestReferencesContainer.class);
-
-        return handleRootResponse(msoResponse);
-
-    }
-
-    @Override
-    protected ServiceInstantiation getRequest() {
-        return (ServiceInstantiation) getSharedData().getRequest();
-    }
-
-    protected abstract RequestDetailsWrapper<ServiceInstantiationRequestDetails> generateServiceInstantiationRequest();
-
-    private NextCommand handleMaxRetryInNameUniqueness(MaxRetriesException exception) {
-        LOGGER.error("Failed to find unused name in AAI. Set the job to FAILED ", exception);
-        return handleCommandFailed();
-    }
-
-    private NextCommand handleAaiNameUniquenessBadResponse(ExceptionWithRequestInfo exception) {
-        LOGGER.error("Failed to check name uniqueness in AAI. VID will try again later", exception);
-        //put the job in_progress so we will keep trying to check name uniqueness in AAI
-        //And then send the request to MSO
-        return new NextCommand(Job.JobStatus.IN_PROGRESS, this);
-    }
-
-    @Override
-    public ServiceInstantiationCommand init(JobSharedData sharedData, Map<String, Object> commandData) {
-
-        return init(
-                sharedData,
-                (String) commandData.get("optimisticUniqueServiceInstanceName")
-        );
-    }
-
-    protected ServiceInstantiationCommand init(JobSharedData sharedData, String optimisticUniqueServiceInstanceName) {
-        init(sharedData);
-        this.optimisticUniqueServiceInstanceName = ObjectUtils.defaultIfNull(optimisticUniqueServiceInstanceName,
-                (getRequest()).getInstanceName());
-        return this;
-    }
-
-    @Override
-    public Map<String, Object> getData() {
-        return ImmutableMap.of(
-                "optimisticUniqueServiceInstanceName", optimisticUniqueServiceInstanceName
-        );
-    }
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/VfmoduleCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/VfmoduleCommand.kt
new file mode 100644
index 0000000..af52fa0
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/VfmoduleCommand.kt
@@ -0,0 +1,106 @@
+package org.onap.vid.job.command
+
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate
+import org.onap.vid.job.Job
+import org.onap.vid.job.JobAdapter
+import org.onap.vid.job.JobCommand
+import org.onap.vid.job.JobsBrokerService
+import org.onap.vid.model.Action
+import org.onap.vid.model.serviceInstantiation.VfModule
+import org.onap.vid.mso.RestMsoImplementation
+import org.onap.vid.services.AsyncInstantiationBusinessLogic
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.beans.factory.config.ConfigurableBeanFactory
+import org.springframework.context.annotation.Scope
+import org.springframework.http.HttpMethod
+import org.springframework.stereotype.Component
+import java.util.*
+
+@Component
+@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+class VfmoduleCommand @Autowired constructor(
+        private val asyncInstantiationBL: AsyncInstantiationBusinessLogic,
+        restMso: RestMsoImplementation,
+        private val msoRequestBuilder: MsoRequestBuilder,
+        msoResultHandlerService: MsoResultHandlerService,
+        inProgressStatusService:InProgressStatusService,
+        watchChildrenJobsBL: WatchChildrenJobsBL,
+        jobsBrokerService: JobsBrokerService,
+        jobAdapter: JobAdapter
+) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
+        watchChildrenJobsBL, jobsBrokerService, jobAdapter), JobCommand {
+
+    companion object {
+        private val LOGGER = EELFLoggerDelegate.getLogger(VfmoduleCommand::class.java)
+    }
+
+    override fun createChildren(): Job.JobStatus {
+        return Job.JobStatus.COMPLETED_WITH_NO_ACTION
+    }
+
+    override fun planCreateMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String, testApi: String?): MsoRestCallPlan {
+        val serviceInstanceId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.SERVICE_INSTANCE_ID)
+        val serviceModelInfo = commandParentData.getModelInfo(CommandParentData.CommandDataKey.SERVICE_MODEL_INFO)
+        val vnfModelInfo = commandParentData.getModelInfo(CommandParentData.CommandDataKey.VNF_MODEL_INFO)
+        val vnfInstanceId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.VNF_INSTANCE_ID)
+        val vgInstaceId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.VG_INSTANCE_ID)
+
+        val instantiatePath = asyncInstantiationBL.getVfmoduleInstantiationPath(serviceInstanceId, vnfInstanceId)
+
+        val requestDetailsWrapper = msoRequestBuilder.generateVfModuleInstantiationRequest(
+                request as VfModule,
+                serviceModelInfo, serviceInstanceId, vnfModelInfo, vnfInstanceId, vgInstaceId, userId, testApi)
+
+        val actionDescription = "create vfmodule in $vnfInstanceId"
+
+        return MsoRestCallPlan(HttpMethod.POST, instantiatePath, Optional.of(requestDetailsWrapper), Optional.empty(), actionDescription)
+
+    }
+
+    override fun planDeleteMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String): MsoRestCallPlan {
+        val serviceInstanceId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.SERVICE_INSTANCE_ID)
+        val vnfInstanceId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.VNF_INSTANCE_ID)
+
+        val path = asyncInstantiationBL.getVfModuleDeletePath(serviceInstanceId, vnfInstanceId, getRequest().instanceId)
+        val requestDetailsWrapper = msoRequestBuilder.generateDeleteVfModuleRequest(getRequest(), userId)
+        return MsoRestCallPlan(HttpMethod.DELETE, path, Optional.of(requestDetailsWrapper), Optional.of(userId),
+                "delete vfmodule ${getRequest().instanceId} from service instance $serviceInstanceId and vnf $vnfInstanceId")
+    }
+
+    override fun getRequest(): VfModule {
+        return sharedData.request as VfModule
+    }
+
+    override fun isDescendantHasAction(phase: Action): Boolean {
+        return false
+    }
+
+    private fun planReplaceMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String, testApi: String?): MsoRestCallPlan {
+        val serviceInstanceId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.SERVICE_INSTANCE_ID)
+        val serviceModelInfo = commandParentData.getModelInfo(CommandParentData.CommandDataKey.SERVICE_MODEL_INFO)
+        val vnfModelInfo = commandParentData.getModelInfo(CommandParentData.CommandDataKey.VNF_MODEL_INFO)
+        val vnfInstanceId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.VNF_INSTANCE_ID)
+        val replacePath = asyncInstantiationBL.getVfModuleReplacePath(serviceInstanceId, vnfInstanceId, getRequest().instanceId)
+
+        val requestDetailsWrapper = msoRequestBuilder.generateVfModuleInstantiationRequest( 
+                request as VfModule, serviceModelInfo, serviceInstanceId,vnfModelInfo, vnfInstanceId,null,userId, testApi)
+
+        val actionDescription = "replace vfmodule ${request.instanceId}"
+
+        return MsoRestCallPlan(HttpMethod.POST, replacePath, Optional.of(requestDetailsWrapper), Optional.of(userId), actionDescription)
+    }
+
+    override fun replaceMyself(): Job.JobStatus {
+        try {
+            val replaceMyselfCommand = planReplaceMyselfRestCall(commandParentData, sharedData.request, sharedData.userId, sharedData.testApi )
+            return executeAndHandleMsoInstanceRequest(replaceMyselfCommand)
+        } catch (exception: Exception) {
+            LOGGER.error("Failed to replace instanceId ${getRequest().instanceId} ", exception)
+            return Job.JobStatus.FAILED
+        }
+    }
+
+    override fun isNeedToReplaceMySelf(): Boolean {
+        return getActionType() == Action.Replace
+    }
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/VfmoduleInstantiationCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/VfmoduleInstantiationCommand.java
deleted file mode 100644
index 75bf97f..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/VfmoduleInstantiationCommand.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.onap.vid.changeManagement.RequestDetailsWrapper;
-import org.onap.vid.job.JobAdapter;
-import org.onap.vid.job.command.CommandParentData.CommandDataKey;
-import org.onap.vid.model.serviceInstantiation.VfModule;
-import org.onap.vid.mso.model.VfModuleInstantiationRequestDetails;
-import org.onap.vid.services.AsyncInstantiationBusinessLogic;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-import javax.inject.Inject;
-
-@Component
-@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-public class VfmoduleInstantiationCommand extends ResourceInstantiationCommand {
-    @Inject
-    private AsyncInstantiationBusinessLogic asyncInstantiationBL;
-
-    @Override
-    protected String getRequestPath() {
-        return asyncInstantiationBL.getVfmoduleInstantiationPath(commandParentData.getInstanceId(CommandDataKey.SERVICE_INSTANCE_ID),commandParentData.getInstanceId(CommandDataKey.VNF_INSTANCE_ID));
-    }
-
-    @Override
-    protected RequestDetailsWrapper<VfModuleInstantiationRequestDetails> generateMSORequest(JobAdapter.AsyncJobRequest request, String userId) {
-        return asyncInstantiationBL.generateVfModuleInstantiationRequest(
-                (VfModule) getSharedData().getRequest(),
-                commandParentData.getModelInfo(CommandDataKey.SERVICE_MODEL_INFO),
-                commandParentData.getInstanceId(CommandDataKey.SERVICE_INSTANCE_ID),
-                commandParentData.getModelInfo(CommandDataKey.VNF_MODEL_INFO),
-                commandParentData.getInstanceId(CommandDataKey.VNF_INSTANCE_ID),
-                commandParentData.getInstanceId(CommandDataKey.VG_INSTANCE_ID),
-                 getSharedData().getUserId()
-        );
-    }
-
-    @Override
-    protected String getJobAuditMSOStatus() {
-        return "VF_MODULE_REQUESTED";
-    }
-
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/VnfCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/VnfCommand.kt
new file mode 100644
index 0000000..a89e196
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/VnfCommand.kt
@@ -0,0 +1,140 @@
+package org.onap.vid.job.command
+
+import org.apache.commons.collections.MapUtils
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate
+import org.onap.vid.asdc.AsdcCatalogException
+import org.onap.vid.job.*
+import org.onap.vid.job.impl.JobSharedData
+import org.onap.vid.model.Action
+import org.onap.vid.model.serviceInstantiation.BaseResource
+import org.onap.vid.model.serviceInstantiation.VfModule
+import org.onap.vid.model.serviceInstantiation.Vnf
+import org.onap.vid.mso.RestMsoImplementation
+import org.onap.vid.properties.Features
+import org.onap.vid.services.AsyncInstantiationBusinessLogic
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.beans.factory.config.ConfigurableBeanFactory
+import org.springframework.context.annotation.Scope
+import org.springframework.http.HttpMethod
+import org.springframework.stereotype.Component
+import org.togglz.core.manager.FeatureManager
+import java.util.*
+import java.util.stream.Collectors
+import kotlin.properties.Delegates
+
+const val NEED_TO_CREATE_BASE_MODULE = "needToCreateBaseModule"
+
+@Component
+@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+class VnfCommand @Autowired constructor(
+        private val asyncInstantiationBL: AsyncInstantiationBusinessLogic,
+        restMso: RestMsoImplementation,
+        private val msoRequestBuilder: MsoRequestBuilder,
+        msoResultHandlerService: MsoResultHandlerService,
+        inProgressStatusService:InProgressStatusService,
+        watchChildrenJobsBL: WatchChildrenJobsBL,
+        jobsBrokerService: JobsBrokerService,
+        jobAdapter: JobAdapter,
+        private val featureManager: FeatureManager
+) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
+        watchChildrenJobsBL, jobsBrokerService, jobAdapter), JobCommand {
+
+    private var needToCreateBaseModule:Boolean by Delegates.notNull<Boolean>()
+
+    override fun getData(): Map<String, Any?> {
+        return super.getData() + mapOf(NEED_TO_CREATE_BASE_MODULE to needToCreateBaseModule)
+    }
+
+    override fun init(sharedData: JobSharedData, commandData: Map<String, Any>): ResourceCommand {
+        super<ResourceCommand>.init(sharedData, commandData)
+        needToCreateBaseModule = commandData.getOrDefault(NEED_TO_CREATE_BASE_MODULE, actionPhase != Action.Delete) as Boolean
+        return this
+    }
+
+
+    override fun createChildren(): Job.JobStatus {
+        val request:Vnf = getRequest()
+        if(isNeedToCreateChildJobs()){
+            val dataForChild = buildDataForChild(request, actionPhase)
+            val vfModules:List<VfModule> = request.vfModules.values.stream().flatMap { vfKey -> vfKey.values.stream() }.collect(Collectors.toList<VfModule>())
+
+            try {
+                childJobs = pushChildrenJobsToBroker(vfModules.filter { filterModuleByNeedToCreateBase(it) }, dataForChild, JobType.VolumeGroupInstantiation)
+            } catch (e: AsdcCatalogException) {
+                LOGGER.error("Failed to retrieve service definitions from SDC, for VfModule is BaseModule.. Error: " + e.message , e)
+                return Job.JobStatus.FAILED
+            }
+        }
+
+        return Job.JobStatus.COMPLETED_WITH_NO_ACTION
+    }
+
+    private fun filterModuleByNeedToCreateBase(it: VfModule):Boolean {
+        return needToCreateBaseModule ==
+            commandUtils.isVfModuleBaseModule(
+                commandParentData.getModelInfo(CommandParentData.CommandDataKey.SERVICE_MODEL_INFO).getModelVersionId(),
+                it.modelInfo.modelVersionId)
+    }
+
+    override fun planCreateMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String, testApi: String?): MsoRestCallPlan {
+        val serviceInstanceId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.SERVICE_INSTANCE_ID)
+        val serviceModelInfo = commandParentData.getModelInfo(CommandParentData.CommandDataKey.SERVICE_MODEL_INFO)
+
+        val instantiatePath = asyncInstantiationBL.getVnfInstantiationPath(serviceInstanceId)
+
+        val requestDetailsWrapper = msoRequestBuilder.generateVnfInstantiationRequest(
+                request as Vnf,
+                serviceModelInfo, serviceInstanceId,
+                userId,
+                testApi
+        )
+
+        val actionDescription = "create vnf in $serviceInstanceId"
+
+        return MsoRestCallPlan(HttpMethod.POST, instantiatePath, Optional.of(requestDetailsWrapper), Optional.empty(), actionDescription)
+
+    }
+
+    override fun addMyselfToChildrenData(commandParentData: CommandParentData, request: BaseResource) {
+        commandParentData.addModelInfo(CommandParentData.CommandDataKey.VNF_MODEL_INFO, request.modelInfo);
+        commandParentData.addInstanceId(CommandParentData.CommandDataKey.VNF_INSTANCE_ID, getActualInstanceId(request))
+    }
+
+    override fun getRequest(): Vnf {
+        return sharedData.request as Vnf
+    }
+
+    private fun isNeedToCreateChildJobs(): Boolean {
+        return featureManager.isActive(Features.FLAG_ASYNC_ALACARTE_VFMODULE) &&
+                MapUtils.isNotEmpty(getRequest().vfModules)
+    }
+
+    override fun planDeleteMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String): MsoRestCallPlan {
+        val serviceInstanceId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.SERVICE_INSTANCE_ID)
+        val path = asyncInstantiationBL.getVnfDeletionPath(serviceInstanceId, getRequest().instanceId)
+        val requestDetailsWrapper = msoRequestBuilder.generateDeleteVnfRequest(getRequest(), userId)
+        return MsoRestCallPlan(HttpMethod.DELETE, path, Optional.of(requestDetailsWrapper), Optional.of(userId),
+                "delete vnf ${getRequest().instanceId} from service $serviceInstanceId")
+
+    }
+
+    companion object {
+        private val LOGGER = EELFLoggerDelegate.getLogger(VnfCommand::class.java)
+    }
+
+    //in Delete phase - we delete all non-base vf-modules first, before base vf-module
+    //in Create phase - we create base vf-module first, and then all the others
+    override fun watchChildren(): Job.JobStatus {
+        val childrenStatus:Job.JobStatus = comulateStatusAndUpdatePropertyIfFinal(watchChildrenJobsBL.retrieveChildrenJobsStatus(childJobs))
+        if (!childrenStatus.isFinal ||
+                childrenStatus.isFailure ||
+                (actionPhase == Action.Create && !needToCreateBaseModule) ||
+                (actionPhase == Action.Delete && needToCreateBaseModule)) {
+            return childrenStatus
+        }
+
+        needToCreateBaseModule = !needToCreateBaseModule;
+        createChildren()
+        return Job.JobStatus.IN_PROGRESS
+    }
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/VnfInProgressStatusCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/VnfInProgressStatusCommand.java
deleted file mode 100644
index 832c575..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/VnfInProgressStatusCommand.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.apache.commons.collections.MapUtils;
-import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.onap.vid.asdc.AsdcCatalogException;
-import org.onap.vid.job.Job;
-import org.onap.vid.job.JobType;
-import org.onap.vid.job.NextCommand;
-import org.onap.vid.job.command.CommandParentData.CommandDataKey;
-import org.onap.vid.job.impl.JobSharedData;
-import org.onap.vid.model.serviceInstantiation.BaseResource;
-import org.onap.vid.model.serviceInstantiation.VfModule;
-import org.onap.vid.model.serviceInstantiation.Vnf;
-import org.onap.vid.properties.Features;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-@Component
-@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-public class VnfInProgressStatusCommand extends ResourceWithChildrenInProgressCommand {
-    private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VnfInProgressStatusCommand.class);
-
-    public VnfInProgressStatusCommand(JobSharedData sharedData,
-                                           String requestId,
-                                           String instanceId,
-                                           CommandParentData commandParentData) {
-        super(sharedData, requestId, instanceId, commandParentData);
-     }
-
-    public VnfInProgressStatusCommand() {
-    }
-
-    @Override
-    protected NextCommand processJobStatus(Job.JobStatus jobStatus) {
-        if (jobStatus == Job.JobStatus.FAILED) {
-            return new NextCommand(jobStatus);
-        }
-
-        Vnf request = (Vnf) getSharedData().getRequest();
-
-        if (isNeedToCreateChildJobs(jobStatus, request)) {
-            commandParentData.addInstanceId(CommandDataKey.VNF_INSTANCE_ID, instanceId);
-            commandParentData.addModelInfo(CommandDataKey.VNF_MODEL_INFO, request.getModelInfo());
-            //create volume group of base module job
-            Map<String, Object> dataForChild = buildDataForChild();
-            List<VfModule> vfModules = request.getVfModules().values().stream().flatMap(vfKey -> vfKey.values().stream()).collect(Collectors.toList());
-            List<String> vgBaseJobs = new ArrayList<>();
-            for( VfModule vfModule : vfModules){
-                try {
-                    if(commandUtils.isVfModuleBaseModule(commandParentData.getModelInfo(CommandDataKey.SERVICE_MODEL_INFO).getModelVersionId(), vfModule.getModelInfo().getModelVersionId())) {
-                        vgBaseJobs.add(jobsBrokerService.add(
-                                jobAdapter.createChildJob(JobType.VolumeGroupInstantiation, Job.JobStatus.CREATING, vfModule, getSharedData(), dataForChild)).toString());
-                    }
-                } catch (AsdcCatalogException e) {
-                    LOG.error("Failed to retrieve service definitions from SDC, for VfModule is BaseModule. Error: "+e.getMessage() , e);
-                    return new NextCommand(Job.JobStatus.COMPLETED_WITH_ERRORS);
-                }
-            }
-            return new NextCommand(Job.JobStatus.RESOURCE_IN_PROGRESS, new WatchingCommandBaseModule(getSharedData(), vgBaseJobs, false, commandParentData));
-        }
-
-        //in case of JobStatus.PAUSE we leave the job itself as IN_PROGRESS, for keep tracking job progress
-        if (jobStatus == Job.JobStatus.PAUSE) {
-            return new NextCommand(Job.JobStatus.RESOURCE_IN_PROGRESS, this);
-        }
-        return new NextCommand(jobStatus, this);
-    }
-
-
-    protected boolean isNeedToCreateChildJobs(Job.JobStatus jobStatus, BaseResource request) {
-        return  featureManager.isActive(Features.FLAG_ASYNC_ALACARTE_VFMODULE) &&
-                jobStatus == Job.JobStatus.COMPLETED &&
-                MapUtils.isNotEmpty(((Vnf)request).getVfModules());
-    }
-
-
-    @Override
-    protected ExpiryChecker getExpiryChecker() {
-        return x->false;
-    }
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/VnfInstantiationCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/VnfInstantiationCommand.java
deleted file mode 100644
index d3bfde3..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/VnfInstantiationCommand.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.onap.vid.changeManagement.RequestDetailsWrapper;
-import org.onap.vid.job.Job;
-import org.onap.vid.job.JobAdapter;
-import org.onap.vid.job.NextCommand;
-import org.onap.vid.job.command.CommandParentData.CommandDataKey;
-import org.onap.vid.model.serviceInstantiation.Vnf;
-import org.onap.vid.mso.model.VnfInstantiationRequestDetails;
-import org.onap.vid.services.AsyncInstantiationBusinessLogic;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-import javax.inject.Inject;
-
-@Component
-@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-public class VnfInstantiationCommand extends ResourceInstantiationCommand {
-
-    @Inject
-    private AsyncInstantiationBusinessLogic asyncInstantiationBL;
-
-    @Override
-    protected String getRequestPath() {
-        return asyncInstantiationBL.getVnfInstantiationPath( commandParentData.getInstanceId(CommandDataKey.SERVICE_INSTANCE_ID));
-    }
-
-    @Override
-    protected RequestDetailsWrapper<VnfInstantiationRequestDetails> generateMSORequest(JobAdapter.AsyncJobRequest request, String userId) {
-        return asyncInstantiationBL.generateVnfInstantiationRequest(
-                (Vnf) getSharedData().getRequest(),
-                commandParentData.getModelInfo(CommandDataKey.SERVICE_MODEL_INFO),
-                commandParentData.getInstanceId(CommandDataKey.SERVICE_INSTANCE_ID),
-                getSharedData().getUserId()
-        );
-    }
-
-    @Override
-    protected String getJobAuditMSOStatus() {
-        return "VNF_REQUESTED";
-    }
-
-    @Override
-    protected NextCommand getNextCommand(String requestId, String instanceId) {
-        return new NextCommand(Job.JobStatus.RESOURCE_IN_PROGRESS,
-                new VnfInProgressStatusCommand(getSharedData(), requestId, instanceId, commandParentData));
-    }
-
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/VolumeGroupCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/VolumeGroupCommand.kt
new file mode 100644
index 0000000..4da1dad
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/VolumeGroupCommand.kt
@@ -0,0 +1,94 @@
+package org.onap.vid.job.command
+
+import org.apache.commons.lang3.StringUtils.isNotEmpty
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate
+import org.onap.vid.job.*
+import org.onap.vid.model.Action
+import org.onap.vid.model.serviceInstantiation.BaseResource
+import org.onap.vid.model.serviceInstantiation.VfModule
+import org.onap.vid.mso.RestMsoImplementation
+import org.onap.vid.services.AsyncInstantiationBusinessLogic
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.beans.factory.config.ConfigurableBeanFactory
+import org.springframework.context.annotation.Scope
+import org.springframework.http.HttpMethod
+import org.springframework.stereotype.Component
+import java.util.*
+
+@Component
+@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+class VolumeGroupCommand @Autowired constructor(
+        private val asyncInstantiationBL: AsyncInstantiationBusinessLogic,
+        restMso: RestMsoImplementation,
+        private val msoRequestBuilder: MsoRequestBuilder,
+        msoResultHandlerService: MsoResultHandlerService,
+        inProgressStatusService:InProgressStatusService,
+        watchChildrenJobsBL: WatchChildrenJobsBL,
+        jobsBrokerService: JobsBrokerService,
+        jobAdapter: JobAdapter
+) : ResourceCommand(restMso, inProgressStatusService, msoResultHandlerService,
+        watchChildrenJobsBL, jobsBrokerService, jobAdapter), JobCommand {
+
+    companion object {
+        private val LOGGER = EELFLoggerDelegate.getLogger(VolumeGroupCommand::class.java)
+    }
+
+    override fun createChildren(): Job.JobStatus {
+        val request: VfModule = getRequest()
+        val dataForChild = buildDataForChild(request, actionPhase)
+
+        childJobs = pushChildrenJobsToBroker(listOf(request), dataForChild, JobType.VfmoduleInstantiation)
+
+        return Job.JobStatus.COMPLETED_WITH_NO_ACTION
+    }
+
+    override fun planCreateMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String, testApi: String?): MsoRestCallPlan {
+
+        val serviceInstanceId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.SERVICE_INSTANCE_ID)
+        val serviceModelInfo = commandParentData.getModelInfo(CommandParentData.CommandDataKey.SERVICE_MODEL_INFO)
+        val vnfInstanceId = commandParentData.getInstanceId(CommandParentData.CommandDataKey.VNF_INSTANCE_ID)
+        val vnfModelInfo = commandParentData.getModelInfo(CommandParentData.CommandDataKey.VNF_MODEL_INFO)
+
+        val instantiatePath = asyncInstantiationBL.getVolumeGroupInstantiationPath(serviceInstanceId,vnfInstanceId)
+
+        val requestDetailsWrapper = msoRequestBuilder.generateVolumeGroupInstantiationRequest(
+                request as VfModule,
+                serviceModelInfo, serviceInstanceId,
+                vnfModelInfo,vnfInstanceId,
+                userId,
+                testApi
+        )
+
+        val actionDescription = "create volumeGroup in $vnfInstanceId"
+
+        return MsoRestCallPlan(HttpMethod.POST, instantiatePath, Optional.of(requestDetailsWrapper), Optional.empty(), actionDescription)
+    }
+
+    override fun planDeleteMyselfRestCall(commandParentData: CommandParentData, request: JobAdapter.AsyncJobRequest, userId: String): MsoRestCallPlan {
+        TODO("not implemented")
+    }
+
+    override fun isNeedToCreateMyself(): Boolean {
+        return super.isNeedToCreateMyself() && isNotEmpty(getRequest().volumeGroupInstanceName)
+    }
+
+    override fun isNeedToDeleteMyself(): Boolean {
+        return false
+    }
+
+    override fun getRequest(): VfModule {
+        return sharedData.request as VfModule
+    }
+
+    override fun isDescendantHasAction(phase: Action): Boolean {
+        return phase == getRequest().action
+    }
+
+    override fun addMyselfToChildrenData(commandParentData: CommandParentData, request: BaseResource) {
+        commandParentData.addInstanceId(CommandParentData.CommandDataKey.VG_INSTANCE_ID, getActualInstanceId(request));
+    }
+
+    override fun replaceMyself(): Job.JobStatus {
+        return Job.JobStatus.COMPLETED
+    }
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/VolumeGroupInProgressStatusCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/VolumeGroupInProgressStatusCommand.java
deleted file mode 100644
index 9c4d7b8..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/VolumeGroupInProgressStatusCommand.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.onap.vid.job.Job;
-import org.onap.vid.job.JobType;
-import org.onap.vid.job.NextCommand;
-import org.onap.vid.job.command.CommandParentData.CommandDataKey;
-import org.onap.vid.job.impl.JobSharedData;
-import org.onap.vid.model.serviceInstantiation.VfModule;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-@Component
-@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-public class VolumeGroupInProgressStatusCommand extends ResourceWithChildrenInProgressCommand {
-
-    public VolumeGroupInProgressStatusCommand(
-            JobSharedData sharedData,
-            String requestId,
-            String instanceId,
-            CommandParentData parentData) {
-        super(sharedData, requestId, instanceId, parentData);
-    }
-
-    public VolumeGroupInProgressStatusCommand() {
-    }
-
-    @Override
-    protected NextCommand processJobStatus(Job.JobStatus jobStatus) {
-        if (jobStatus == Job.JobStatus.FAILED) {
-            return new NextCommand(Job.JobStatus.FAILED);
-        }
-        VfModule request = (VfModule) getSharedData().getRequest();
-
-        if (jobStatus == Job.JobStatus.COMPLETED) {
-            //vf module creation
-            Map<String, Object> dataForChild = buildDataForChild();
-            List<String> vfModuleJob = Arrays.asList(jobsBrokerService.add(
-                            jobAdapter.createChildJob(JobType.VfmoduleInstantiation, Job.JobStatus.CREATING , request, getSharedData(), dataForChild)).toString());
-
-            return new NextCommand(Job.JobStatus.RESOURCE_IN_PROGRESS, new WatchingCommand(getSharedData(), vfModuleJob, false));
-        }
-
-        //in case of JobStatus.PAUSE we leave the job itself as IN_PROGRESS, for keep tracking job progress
-        if (jobStatus == Job.JobStatus.PAUSE) {
-            return new NextCommand(Job.JobStatus.RESOURCE_IN_PROGRESS, this);
-        }
-        return new NextCommand(jobStatus, this);
-    }
-
-    @Override
-    protected Map<String, Object> buildDataForChild() {
-        commandParentData.addInstanceId(CommandDataKey.VG_INSTANCE_ID, this.instanceId);
-        return super.buildDataForChild();
-    }
-
-    @Override
-    protected ExpiryChecker getExpiryChecker() {
-        return x->false;
-    }
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/VolumeGroupInstantiationCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/VolumeGroupInstantiationCommand.java
deleted file mode 100644
index eff12ec..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/VolumeGroupInstantiationCommand.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-
-import org.apache.commons.lang3.StringUtils;
-import org.onap.vid.changeManagement.RequestDetailsWrapper;
-import org.onap.vid.job.*;
-import org.onap.vid.job.command.CommandParentData.CommandDataKey;
-import org.onap.vid.model.serviceInstantiation.VfModule;
-import org.onap.vid.mso.model.VolumeGroupRequestDetails;
-import org.onap.vid.services.AsyncInstantiationBusinessLogic;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-import javax.inject.Inject;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-@Component
-@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-public class VolumeGroupInstantiationCommand extends ResourceInstantiationCommand {
-    @Inject
-    private AsyncInstantiationBusinessLogic asyncInstantiationBL;
-
-    @Inject
-    protected JobsBrokerService jobsBrokerService;
-
-    @Inject
-    protected JobAdapter jobAdapter;
-
-    @Override
-    protected String getRequestPath() {
-        return asyncInstantiationBL.getVolumeGroupInstantiationPath(commandParentData.getInstanceId(CommandDataKey.SERVICE_INSTANCE_ID),commandParentData.getInstanceId(CommandDataKey.VNF_INSTANCE_ID));
-    }
-
-    @Override
-    protected RequestDetailsWrapper<VolumeGroupRequestDetails> generateMSORequest(JobAdapter.AsyncJobRequest request, String userId) {
-        return asyncInstantiationBL.generateVolumeGroupInstantiationRequest(
-                (VfModule) getSharedData().getRequest(),
-                commandParentData.getModelInfo(CommandDataKey.SERVICE_MODEL_INFO),
-                commandParentData.getInstanceId(CommandDataKey.SERVICE_INSTANCE_ID),
-                commandParentData.getModelInfo(CommandDataKey.VNF_MODEL_INFO),
-                commandParentData.getInstanceId(CommandDataKey.VNF_INSTANCE_ID),
-                getSharedData().getUserId()
-        );
-    }
-
-    @Override
-    protected NextCommand getNextCommand(String requestId, String instanceId){
-        return new NextCommand(
-                Job.JobStatus.RESOURCE_IN_PROGRESS,
-                new VolumeGroupInProgressStatusCommand(getSharedData(), requestId, instanceId, commandParentData)
-        );
-    }
-
-    @Override
-    protected String getJobAuditMSOStatus() {
-        return "VOLUME_GROUP_REQUESTED";
-    }
-
-    @Override
-    public NextCommand call() {
-        String vgName = ((VfModule)getSharedData().getRequest()).getVolumeGroupInstanceName();
-        if(StringUtils.isNotEmpty(vgName)){
-            return super.call();//create volume group
-        }else {
-            //go to vf module creation
-            VfModule request = (VfModule) getSharedData().getRequest();
-            Map<String, Object> dataForChild = buildDataForChild();
-            List<String> vfModuleJob = Collections.singletonList(jobsBrokerService.add(
-                    jobAdapter.createChildJob(JobType.VfmoduleInstantiation, Job.JobStatus.CREATING, request, getSharedData(), dataForChild)).toString());
-
-            return new NextCommand(Job.JobStatus.RESOURCE_IN_PROGRESS, new WatchingCommand(getSharedData(), vfModuleJob, false));
-        }
-
-    }
-
-    private Map<String, Object> buildDataForChild() {
-       return commandParentData.getParentData();
-    }
-
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/WatchChildrenJobsBL.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/WatchChildrenJobsBL.kt
index 7cebe21..194fe4b 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/WatchChildrenJobsBL.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/WatchChildrenJobsBL.kt
@@ -7,9 +7,9 @@
  * 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.
@@ -21,11 +21,11 @@
 package org.onap.vid.job.command
 
 import org.apache.commons.lang3.StringUtils
-import org.onap.portalsdk.core.service.DataAccessService
 import org.onap.vid.job.Job
 import org.onap.vid.job.Job.JobStatus.*
 import org.onap.vid.job.impl.JobDaoImpl
 import org.onap.vid.utils.DaoUtils
+import org.onap.portalsdk.core.service.DataAccessService
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.stereotype.Service
 import java.util.*
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/WatchingCommand.java b/vid-app-common/src/main/java/org/onap/vid/job/command/WatchingCommand.java
deleted file mode 100644
index 758cb56..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/WatchingCommand.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.onap.vid.job.Job;
-import org.onap.vid.job.NextCommand;
-import org.onap.vid.job.impl.JobSharedData;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-@Component
-@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-public class WatchingCommand extends BaseWatchingCommand {
-
-    public WatchingCommand() {}
-
-    public WatchingCommand(JobSharedData sharedData, List<String> childrenJobsIds, boolean isService) {
-        super(sharedData, childrenJobsIds, isService);
-    }
-
-    protected NextCommand getNextCommand(Job.JobStatus cumulativeJobsStatus) {
-        if (cumulativeJobsStatus==Job.JobStatus.IN_PROGRESS) {
-            return (isService) ? new NextCommand(Job.JobStatus.IN_PROGRESS, this)
-                               : new NextCommand(Job.JobStatus.RESOURCE_IN_PROGRESS, this);
-        }
-        if (isService) {
-            asyncInstantiationBL.updateServiceInfoAndAuditStatus(getSharedData().getJobUuid(), cumulativeJobsStatus);
-        }
-        return new NextCommand(cumulativeJobsStatus);
-    }
-
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/WatchingCommandBaseModule.java b/vid-app-common/src/main/java/org/onap/vid/job/command/WatchingCommandBaseModule.java
deleted file mode 100644
index 258811a..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/WatchingCommandBaseModule.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import com.google.common.collect.ImmutableMap;
-import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.onap.vid.asdc.AsdcCatalogException;
-import org.onap.vid.job.*;
-import org.onap.vid.job.command.CommandParentData.CommandDataKey;
-import org.onap.vid.job.impl.JobSharedData;
-import org.onap.vid.model.serviceInstantiation.VfModule;
-import org.onap.vid.model.serviceInstantiation.Vnf;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Component;
-
-import javax.inject.Inject;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-@Component
-@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-public class WatchingCommandBaseModule extends BaseWatchingCommand {
-    @Inject
-    protected JobsBrokerService jobsBrokerService;
-
-    @Inject
-    protected JobAdapter jobAdapter;
-    private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(WatchingCommandBaseModule.class);
-
-    public WatchingCommandBaseModule(
-            JobSharedData sharedData,
-            List<String> childrenJobsIds,
-            boolean isService,
-            CommandParentData commandParentData) {
-       super(sharedData, childrenJobsIds, isService);
-        this.commandParentData = commandParentData;
-    }
-
-    public WatchingCommandBaseModule() {
-
-    }
-
-    @Override
-    protected NextCommand getNextCommand(Job.JobStatus cumulativeJobsStatus) {
-
-        if (cumulativeJobsStatus== Job.JobStatus.IN_PROGRESS) {
-            return new NextCommand(Job.JobStatus.RESOURCE_IN_PROGRESS, this);
-        }
-
-        if(cumulativeJobsStatus==Job.JobStatus.FAILED || cumulativeJobsStatus==Job.JobStatus.COMPLETED_WITH_ERRORS){
-            return new NextCommand(Job.JobStatus.COMPLETED_WITH_ERRORS);
-        }
-        Vnf request = (Vnf) getSharedData().getRequest();
-        Map<String, Object> dataForChild = buildDataForChild();
-        //Create non-base Volume groups job
-        List<VfModule> vfModules = request.getVfModules().values().stream().flatMap(vfKey -> vfKey.values().stream()).collect(Collectors.toList());
-        List<String> vgNonBaseJobs = new ArrayList<>();
-        for( VfModule vfModule : vfModules){
-            try {
-                if(!commandUtils.isVfModuleBaseModule(commandParentData.getModelInfo(CommandDataKey.SERVICE_MODEL_INFO).getModelVersionId(), vfModule.getModelInfo().getModelVersionId())) {
-                    vgNonBaseJobs.add(jobsBrokerService.add(
-                            jobAdapter.createChildJob(JobType.VolumeGroupInstantiation, Job.JobStatus.CREATING, vfModule, getSharedData(), dataForChild)).toString());
-                }
-            } catch (AsdcCatalogException e) {
-                LOG.error("Failed to retrieve service definitions from SDC, for VfModule is BaseModule. Error: "+e.getMessage() , e);
-                return new NextCommand(Job.JobStatus.COMPLETED_WITH_ERRORS);
-            }
-        }
-        return new NextCommand(Job.JobStatus.RESOURCE_IN_PROGRESS, new WatchingCommand(getSharedData(), vgNonBaseJobs, false));
-    }
-
-    @Override
-    public WatchingCommandBaseModule init(JobSharedData sharedData, Map<String, Object> commandData) {
-        super.init(sharedData, commandData);
-        commandParentData.initParentData(commandData);
-        return this;
-    }
-
-    protected Map<String, Object> buildDataForChild() {
-        return commandParentData.getParentData();
-    }
-
-    @Override
-    public Map<String, Object> getData() {
-        return ImmutableMap.<String, Object>builder()
-                .putAll(super.getData())
-                .putAll(commandParentData.getParentData())
-                .build();
-    }
-
-
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/impl/DeleteOldJobsSchedulerInitializer.java b/vid-app-common/src/main/java/org/onap/vid/job/impl/DeleteOldJobsSchedulerInitializer.java
new file mode 100644
index 0000000..ad4b8c9
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/job/impl/DeleteOldJobsSchedulerInitializer.java
@@ -0,0 +1,96 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.job.impl;
+
+
+import static org.quartz.CronScheduleBuilder.dailyAtHourAndMinute;
+
+import com.google.common.collect.ImmutableMap;
+import java.util.Random;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.PostConstruct;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.vid.exceptions.GenericUncheckedException;
+import org.onap.vid.job.JobsBrokerService;
+import org.quartz.JobBuilder;
+import org.quartz.JobDataMap;
+import org.quartz.JobDetail;
+import org.quartz.SchedulerException;
+import org.quartz.Trigger;
+import org.quartz.TriggerBuilder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.quartz.SchedulerFactoryBean;
+import org.springframework.stereotype.Component;
+
+@Component
+public class DeleteOldJobsSchedulerInitializer {
+
+    private JobsBrokerService jobsBrokerService;
+    private SchedulerFactoryBean schedulerFactoryBean;
+    private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DeleteOldJobsSchedulerInitializer.class);
+
+    @Autowired
+    public DeleteOldJobsSchedulerInitializer(
+            JobsBrokerService jobsBrokerService,
+            SchedulerFactoryBean schedulerFactoryBean
+    ) {
+        this.jobsBrokerService = jobsBrokerService;
+        this.schedulerFactoryBean = schedulerFactoryBean;
+    }
+
+    @PostConstruct
+    public void init() {
+        try {
+            JobDetail jobDetail = createJobDetail();
+            Trigger deleteOldJobsTrigger = createTrigger();
+            schedulerFactoryBean.getScheduler().scheduleJob(jobDetail, deleteOldJobsTrigger);
+        } catch (SchedulerException e) {
+            logger.error(EELFLoggerDelegate.errorLogger, "Failed to schedule trigger for delete old jobs: {}", e.getMessage());
+            throw new GenericUncheckedException(e);
+        }
+    }
+
+    JobDetail createJobDetail() {
+        int days = Integer.parseInt(SystemProperties.getProperty("vid.asyncJob.howLongToKeepOldJobsInDays"));
+        long secondsAgo = TimeUnit.DAYS.toSeconds(days);
+        return JobBuilder.newJob().ofType(DeleteOldJobsWorker.class)
+                .withIdentity("DeleteOldJobsWorker")
+                .withDescription("worker that delete old vid jobs from DB")
+                .setJobData(new JobDataMap(ImmutableMap.of(
+                        "jobsBrokerService", jobsBrokerService,
+                        "secondsAgo", secondsAgo
+                )))
+                .build();
+    }
+
+    Trigger createTrigger() {
+        int minutes = new Random(System.nanoTime()).nextInt(59);
+        int hours = 6;
+        logger.info("trigger for DeleteOldJobs is {}:{} ", hours, minutes);
+
+        return TriggerBuilder.newTrigger()
+                .withIdentity("DeleteOldJobsTrigger")
+                .withDescription("Trigger to run delete old vid jobs worker")
+                .withSchedule(dailyAtHourAndMinute(hours, minutes))
+                .build();
+    }
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/impl/DeleteOldJobsWorker.java b/vid-app-common/src/main/java/org/onap/vid/job/impl/DeleteOldJobsWorker.java
new file mode 100644
index 0000000..d60ddab
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/job/impl/DeleteOldJobsWorker.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.job.impl;
+
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.vid.job.JobsBrokerService;
+import org.quartz.JobExecutionContext;
+import org.springframework.scheduling.quartz.QuartzJobBean;
+
+public class DeleteOldJobsWorker extends QuartzJobBean {
+
+    private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(DeleteOldJobsWorker.class);
+
+    private JobsBrokerService jobsBrokerService;
+    private long secondsAgo;
+
+    @Override
+    protected void executeInternal(JobExecutionContext context) {
+        LOGGER.info("delete old final jobs that has finished before {} seconds", secondsAgo);
+        jobsBrokerService.deleteOldFinalJobs(secondsAgo);
+    }
+
+    //the following methods are used by quartz to inject members
+    public void setJobsBrokerService(JobsBrokerService jobsBrokerService) {
+        this.jobsBrokerService = jobsBrokerService;
+    }
+
+    public void setSecondsAgo(long secondsAgo) {
+        this.secondsAgo = secondsAgo;
+    }
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobAdapterImpl.java b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobAdapterImpl.java
index 9ea1f13..1bf0f43 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobAdapterImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobAdapterImpl.java
@@ -7,9 +7,9 @@
  * 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.
@@ -25,7 +25,10 @@
 import org.onap.vid.job.JobAdapter;
 import org.onap.vid.job.JobType;
 import org.onap.vid.model.JobModel;
+import org.onap.vid.properties.Features;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
+import org.togglz.core.manager.FeatureManager;
 
 import java.util.Map;
 import java.util.UUID;
@@ -33,6 +36,14 @@
 @Component
 public class JobAdapterImpl implements JobAdapter {
 
+    private final FeatureManager featureManager;
+
+    @Autowired
+    public JobAdapterImpl(FeatureManager featureManager) {
+        this.featureManager = featureManager;
+    }
+
+
     @Override
     public JobModel toModel(Job job) {
         JobModel jobModel = new JobModel();
@@ -43,9 +54,9 @@
     }
 
     @Override
-    public Job createServiceInstantiationJob(JobType jobType, AsyncJobRequest request, UUID templateId, String userId, String optimisticUniqueServiceInstanceName, Integer indexInBulk){
+    public Job createServiceInstantiationJob(JobType jobType, AsyncJobRequest request, UUID templateId, String userId, String testApi, String optimisticUniqueServiceInstanceName, Integer indexInBulk){
         JobDaoImpl job = createJob(jobType, Job.JobStatus.PENDING , userId);
-        job.setSharedData(new JobSharedData(job.getUuid(), userId, request));
+        job.setSharedData(new JobSharedData(job.getUuid(), userId, request, testApi));
         job.setTypeAndData(jobType, ImmutableMap.of(
                 "optimisticUniqueServiceInstanceName", optimisticUniqueServiceInstanceName
         ));
@@ -55,10 +66,14 @@
     }
 
     @Override
-    public Job createChildJob(JobType jobType, Job.JobStatus jobStatus, AsyncJobRequest request, JobSharedData parentSharedData, Map<String, Object> jobData) {
+    public Job createChildJob(JobType jobType, AsyncJobRequest request, JobSharedData parentSharedData, Map<String, Object> jobData, int indexInBulk) {
+        Job.JobStatus jobStatus = featureManager.isActive(Features.FLAG_EXP_CREATE_RESOURCES_IN_PARALLEL) ?
+                Job.JobStatus.CREATING : Job.JobStatus.PENDING_RESOURCE;
         JobDaoImpl job = createJob(jobType, jobStatus , parentSharedData.getUserId());
         job.setSharedData(new JobSharedData(job.getUuid(), request, parentSharedData));
         job.setTypeAndData(jobType, jobData);
+        job.setTemplateId(parentSharedData.jobUuid);
+        job.setIndexInBulk(indexInBulk);
         return job;
     }
 
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobDaoImpl.java b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobDaoImpl.java
index 5cddd4d..7d78d45 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobDaoImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobDaoImpl.java
@@ -7,9 +7,9 @@
  * 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.
@@ -23,7 +23,6 @@
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.base.MoreObjects;
 import org.hibernate.annotations.DynamicUpdate;
 import org.hibernate.annotations.SelectBeforeUpdate;
@@ -41,6 +40,8 @@
 import java.util.Objects;
 import java.util.UUID;
 
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
+
 /*
  The following 2 annotations let hibernate to update only fields that actually have been changed.
  DynamicUpdate tell hibernate to update only dirty fields.
@@ -52,7 +53,6 @@
 @Table(name = "vid_job")
 public class JobDaoImpl extends VidBaseEntity implements Job {
 
-    private static ObjectMapper objectMapper = new ObjectMapper();
     private Job.JobStatus status;
     private JobType type;
     private JobData data = new JobData();
@@ -63,6 +63,7 @@
     private Integer age = 0;
     private Integer indexInBulk = 0;
     private Date deletedAt;
+    private String build;
 
     @Id
     @Column(name = "JOB_ID", columnDefinition = "CHAR(36)")
@@ -107,7 +108,7 @@
     @Column(name = "JOB_DATA", columnDefinition = "VARCHAR(30000)")
     public String getDataRaw() {
         try {
-            return objectMapper.writeValueAsString(data);
+            return JACKSON_OBJECT_MAPPER.writeValueAsString(data);
         } catch (JsonProcessingException e) {
             throw new GenericUncheckedException(e);
         }
@@ -115,7 +116,7 @@
 
     public void setDataRaw(String data) {
         try {
-            this.data = objectMapper.readValue(data, JobData.class);
+            this.data = JACKSON_OBJECT_MAPPER.readValue(data, JobData.class);
         } catch (IOException e) {
             throw new JobException("Error parsing job's data", uuid, e);
         }
@@ -202,6 +203,15 @@
         this.deletedAt = deletedAt;
     }
 
+    @Column(name = "BUILD", columnDefinition = "VARCHAR(100)")
+    public String getBuild() {
+        return build;
+    }
+
+    public void setBuild(String build) {
+        this.build = build;
+    }
+
     @Override
     public boolean equals(Object o) {
         if (this == o) return true;
@@ -220,15 +230,15 @@
         return MoreObjects.toStringHelper(this)
                 .add("status", status)
                 .add("type", type)
+                .add("data", data)
                 .add("templateId", templateId)
                 .add("uuid", uuid)
                 .add("takenBy", takenBy)
                 .add("userId", userId)
                 .add("age", age)
-                .add("created", created)
-                .add("modified", modified)
+                .add("indexInBulk", indexInBulk)
                 .add("deletedAt", deletedAt)
-                .add("data", data)
+                .add("build", build)
                 .toString();
     }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobData.java b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobData.java
index c8e128e..113fde3 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobData.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobData.java
@@ -7,9 +7,9 @@
  * 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.
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobSchedulerInitializer.java b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobSchedulerInitializer.java
index 234c106..b3ab75b 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobSchedulerInitializer.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobSchedulerInitializer.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,13 +20,13 @@
 
 package org.onap.vid.job.impl;
 
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.vid.exceptions.GenericUncheckedException;
 import org.onap.vid.job.Job;
 import org.onap.vid.job.JobsBrokerService;
 import org.onap.vid.job.command.JobCommandFactory;
-import org.onap.vid.properties.Features;
 import org.quartz.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.quartz.SchedulerFactoryBean;
@@ -34,6 +34,7 @@
 import org.togglz.core.manager.FeatureManager;
 
 import javax.annotation.PostConstruct;
+import java.util.List;
 
 import static org.quartz.SimpleScheduleBuilder.simpleSchedule;
 
@@ -51,24 +52,26 @@
             JobsBrokerService jobsBrokerService,
             SchedulerFactoryBean schedulerFactoryBean,
             FeatureManager featureManager,
-            JobCommandFactory JobCommandFactory
+            JobCommandFactory jobCommandFactory
     ) {
         this.jobsBrokerService = jobsBrokerService;
         this.schedulerFactoryBean = schedulerFactoryBean;
         this.featureManager = featureManager;
-        this.jobCommandFactory = JobCommandFactory;
+        this.jobCommandFactory = jobCommandFactory;
 
     }
 
+    public static final List<Job.JobStatus> WORKERS_TOPICS = ImmutableList.of(
+            Job.JobStatus.PENDING,
+            Job.JobStatus.CREATING,
+            Job.JobStatus.IN_PROGRESS,
+            Job.JobStatus.RESOURCE_IN_PROGRESS,
+            Job.JobStatus.PENDING_RESOURCE
+    );
+
     @PostConstruct
     public void init() {
-        if (!featureManager.isActive(Features.FLAG_ASYNC_JOBS)) {
-            return;
-        }
-        scheduleJobWorker(Job.JobStatus.PENDING, 1);
-        scheduleJobWorker(Job.JobStatus.CREATING, 1);
-        scheduleJobWorker(Job.JobStatus.IN_PROGRESS, 1);
-        scheduleJobWorker(Job.JobStatus.RESOURCE_IN_PROGRESS, 1);
+        WORKERS_TOPICS.forEach(topic->scheduleJobWorker(topic, 1));
     }
 
     private void scheduleJobWorker(Job.JobStatus topic, int intervalInSeconds) {
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobSharedData.java b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobSharedData.java
index 66a0499..f420f4f 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobSharedData.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobSharedData.java
@@ -7,9 +7,9 @@
  * 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.
@@ -32,6 +32,7 @@
     protected String userId;
     protected Class requestType;
     protected UUID rootJobId;
+    protected String testApi;
 
     @JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, property="class")
     protected JobAdapter.AsyncJobRequest request;
@@ -39,16 +40,17 @@
     public JobSharedData() {
     }
 
-    public JobSharedData(UUID jobUuid, String userId, JobAdapter.AsyncJobRequest request) {
+    public JobSharedData(UUID jobUuid, String userId, JobAdapter.AsyncJobRequest request, String testApi) {
         this.jobUuid = jobUuid;
         this.userId = userId;
         this.requestType = request.getClass();
         this.request = request;
         this.rootJobId = jobUuid;
+        this.testApi = testApi;
     }
 
     public JobSharedData(UUID jobUuid, JobAdapter.AsyncJobRequest request, JobSharedData parentData) {
-        this(jobUuid, parentData.getUserId(), request);
+        this(jobUuid, parentData.getUserId(), request, parentData.getTestApi());
         rootJobId = parentData.getRootJobId() != null ? parentData.getRootJobId() : parentData.getJobUuid();
     }
 
@@ -85,6 +87,14 @@
         return rootJobId;
     }
 
+    public String getTestApi() {
+        return testApi;
+    }
+
+    public void setTestApi(String testApi) {
+        this.testApi = testApi;
+    }
+
     @Override
     public boolean equals(Object o) {
         if (this == o) return true;
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobWorker.java b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobWorker.java
index 5b5d1e1..0b277b4 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobWorker.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobWorker.java
@@ -7,9 +7,9 @@
  * 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.
@@ -25,17 +25,17 @@
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.vid.job.*;
 import org.onap.vid.job.command.JobCommandFactory;
-import org.onap.vid.properties.Features;
 import org.quartz.JobExecutionContext;
 import org.springframework.scheduling.quartz.QuartzJobBean;
 import org.springframework.stereotype.Component;
-import org.togglz.core.manager.FeatureManager;
 
 import java.util.Optional;
 import java.util.UUID;
 
 import static org.onap.vid.job.Job.JobStatus.FAILED;
 import static org.onap.vid.job.Job.JobStatus.STOPPED;
+import static org.onap.vid.job.command.ResourceCommandKt.ACTION_PHASE;
+import static org.onap.vid.job.command.ResourceCommandKt.INTERNAL_STATE;
 
 @Component
 public class JobWorker extends QuartzJobBean {
@@ -43,7 +43,6 @@
     private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(JobWorker.class);
 
     private JobsBrokerService jobsBrokerService;
-    private FeatureManager featureManager;
     private JobCommandFactory jobCommandFactory;
     private Job.JobStatus topic;
 
@@ -51,10 +50,6 @@
     protected void executeInternal(JobExecutionContext context) {
         Optional<Job> job;
 
-        if (!isMsoNewApiActive()) {
-            return;
-        }
-
         job = pullJob();
 
         while (job.isPresent()) {
@@ -85,10 +80,16 @@
     }
 
     protected Job executeJobAndGetNext(Job job) {
-        LOGGER.debug(EELFLoggerDelegate.debugLogger, "going to execute job {} of {}: {}/{}",
+        Object internalState = job.getData().get(INTERNAL_STATE);
+        Object actionPhase = job.getData().get(ACTION_PHASE);
+        LOGGER.debug(EELFLoggerDelegate.debugLogger, "going to execute job {} of {}: {}/{}  {}/{}",
                 StringUtils.substring(String.valueOf(job.getUuid()), 0, 8),
                 StringUtils.substring(String.valueOf(job.getTemplateId()), 0, 8),
-                job.getStatus(), job.getType());
+                job.getStatus(),
+                job.getType(),
+                actionPhase,
+                internalState
+                );
 
         NextCommand nextCommand = executeCommandAndGetNext(job);
 
@@ -128,10 +129,6 @@
         return job;
     }
 
-    private boolean isMsoNewApiActive() {
-        return featureManager.isActive(Features.FLAG_ASYNC_INSTANTIATION);
-    }
-
     private void tryMutingJobFromException(Exception e) {
         // If there's JobException in the stack, read job uuid from
         // the exception, and mute it in DB.
@@ -158,10 +155,6 @@
         this.jobsBrokerService = jobsBrokerService;
     }
 
-    public void setFeatureManager(FeatureManager featureManager) {
-        this.featureManager = featureManager;
-    }
-
     public void setJobCommandFactory(JobCommandFactory jobCommandFactory) {
         this.jobCommandFactory = jobCommandFactory;
     }
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobsBrokerServiceInDatabaseImpl.java b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobsBrokerServiceInDatabaseImpl.java
index 59ca437..74a7294 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobsBrokerServiceInDatabaseImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobsBrokerServiceInDatabaseImpl.java
@@ -7,9 +7,9 @@
  * 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.
@@ -22,6 +22,7 @@
 
 import org.apache.commons.lang3.StringUtils;
 import org.hibernate.SessionFactory;
+import org.jetbrains.annotations.NotNull;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.portalsdk.core.service.DataAccessService;
 import org.onap.portalsdk.core.util.SystemProperties;
@@ -30,18 +31,19 @@
 import org.onap.vid.job.Job;
 import org.onap.vid.job.JobsBrokerService;
 import org.onap.vid.properties.VidProperties;
+import org.onap.vid.services.VersionService;
 import org.onap.vid.utils.DaoUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.PostConstruct;
-import java.nio.ByteBuffer;
 import java.sql.Timestamp;
 import java.time.LocalDateTime;
 import java.util.*;
+import java.util.stream.Collectors;
 
-import static org.onap.vid.job.Job.JobStatus.CREATING;
+import static org.onap.vid.job.Job.JobStatus.*;
 
 @Service
 public class JobsBrokerServiceInDatabaseImpl implements JobsBrokerService {
@@ -54,15 +56,20 @@
     private int maxOpenedInstantiationRequestsToMso;
     private int pollingIntervalSeconds;
 
+    private final VersionService versionService;
+
     @Autowired
-    public JobsBrokerServiceInDatabaseImpl(DataAccessService dataAccessService, SessionFactory sessionFactory,
+    public JobsBrokerServiceInDatabaseImpl(DataAccessService dataAccessService,
+                                           SessionFactory sessionFactory,
                                            @Value("0") int maxOpenedInstantiationRequestsToMso,
-                                           @Value("10") int pollingIntervalSeconds) {
+                                           @Value("10") int pollingIntervalSeconds,
+                                           VersionService versionService) {
         // tha @Value will inject conservative defaults; overridden in @PostConstruct from configuration
         this.dataAccessService = dataAccessService;
         this.sessionFactory = sessionFactory;
         this.maxOpenedInstantiationRequestsToMso = maxOpenedInstantiationRequestsToMso;
         this.pollingIntervalSeconds = pollingIntervalSeconds;
+        this.versionService = versionService;
     }
 
     @PostConstruct
@@ -78,6 +85,7 @@
     @Override
     public UUID add(Job job) {
         final JobDaoImpl jobDao = castToJobDaoImpl(job);
+        jobDao.setBuild(versionService.retrieveBuildNumber());
         dataAccessService.saveDomainObject(jobDao, DaoUtils.getPropsMap());
         return job.getUuid();
     }
@@ -120,7 +128,11 @@
     }
 
     private java.sql.Timestamp nowMinusInterval() {
-        return Timestamp.valueOf(LocalDateTime.now().minusSeconds(pollingIntervalSeconds));
+        return nowMinusInterval(pollingIntervalSeconds);
+    }
+
+    private java.sql.Timestamp nowMinusInterval(long seconds) {
+        return Timestamp.valueOf(LocalDateTime.now().minusSeconds(seconds));
     }
 
     private String selectQueryByJobStatus(Job.JobStatus topic){
@@ -130,17 +142,23 @@
                 "select * from VID_JOB" +
                 " where" +
                 // select only non-deleted in-progress jobs
-                "    JOB_STATUS = '" + topic + "'" +
-                "    and TAKEN_BY is null" +
-                "    and DELETED_AT is null" +
+                filterByStatusNotTakenNotDeleted(topic) +
                 // give some breath, don't select jos that were recently reached
-                 intervalCondition +
+                intervalCondition +
                 // take the oldest handled one
                 " order by MODIFIED_DATE ASC" +
                 // select only one result
                 " limit 1";
     }
 
+    @NotNull
+    private String filterByStatusNotTakenNotDeleted(Job.JobStatus topic) {
+        return  "    JOB_STATUS = '" + topic + "'" +
+                "    and TAKEN_BY is null" +
+                "    and DELETED_AT is null "+
+                "    and BUILD = '"+ versionService.retrieveBuildNumber() +"'";
+    }
+
     private String sqlQueryForTopic(Job.JobStatus topic) {
         switch (topic) {
             case IN_PROGRESS:
@@ -148,44 +166,73 @@
             case CREATING:
                 return selectQueryByJobStatus(topic);
             case PENDING:
-                return "" +
-                        // select only pending jobs
-                        "select vid_job.* from VID_JOB " +
-                        // select users have in_progress jobs
-                        "left join \n" +
-                        " (select user_Id, 1 as has_any_in_progress_job from VID_JOB  where JOB_STATUS = 'IN_PROGRESS' or TAKEN_BY IS NOT NULL \n" +
-                        "group by user_id)  users_have_any_in_progress_job_tbl\n" +
-                        "on vid_job.user_id = users_have_any_in_progress_job_tbl.user_id " +
-                        "where JOB_STATUS = 'PENDING' and TAKEN_BY is null" +
-                        // job is not deleted
-                        "      AND DELETED_AT is null and (\n" +
-                        // limit in-progress to some amount
-                        "select sum(CASE WHEN JOB_STATUS='IN_PROGRESS' or (JOB_STATUS='PENDING' and TAKEN_BY IS NOT NULL) THEN 1 ELSE 0 END) as in_progress\n" +
-                        "from VID_JOB ) <" + maxOpenedInstantiationRequestsToMso + " \n " +
-                        // don't take jobs from templates that already in-progress/failed
-                        "and TEMPLATE_Id not in \n" +
-                        "(select TEMPLATE_Id from vid_job where" +
-                        "   TEMPLATE_Id IS NOT NULL and("+
-                        "   (JOB_STATUS='FAILED' and DELETED_AT is null)" + // failed but not deleted
-                        "   or JOB_STATUS='IN_PROGRESS'" +
-                        "   or TAKEN_BY IS NOT NULL))" + " \n " +
-                        // prefer older jobs, but the earlier in each bulk
-                        "order by has_any_in_progress_job, CREATED_DATE, INDEX_IN_BULK " +
-                        // select only one result
-                        "limit 1";
+                return selectQueryForPendingJob();
+            case PENDING_RESOURCE:
+                return selectQueryForPendingResource();
             default:
                 throw new GenericUncheckedException("Unsupported topic to pull from: " + topic);
         }
     }
 
-
-    private byte[] getUuidAsByteArray(UUID owner) {
-        ByteBuffer bb = ByteBuffer.wrap(new byte[16]);
-        bb.putLong(owner.getMostSignificantBits());
-        bb.putLong(owner.getLeastSignificantBits());
-        return bb.array();
+    @NotNull
+    private String selectQueryForPendingJob() {
+        return "" +
+                // select only pending jobs
+                "select vid_job.* from VID_JOB " +
+                // select users have in_progress jobs
+                "left join \n" +
+                " (select user_Id, 1 as has_any_in_progress_job from VID_JOB  where JOB_STATUS = 'IN_PROGRESS' or TAKEN_BY IS NOT NULL \n" +
+                "group by user_id)  users_have_any_in_progress_job_tbl\n" +
+                "on vid_job.user_id = users_have_any_in_progress_job_tbl.user_id " +
+                "where "+filterByStatusNotTakenNotDeleted(Job.JobStatus.PENDING)+" and (\n" +
+                // limit in-progress to some amount
+                "select sum(CASE WHEN JOB_STATUS='IN_PROGRESS' or (JOB_STATUS='PENDING' and TAKEN_BY IS NOT NULL) THEN 1 ELSE 0 END) as in_progress\n" +
+                "from VID_JOB ) <" + maxOpenedInstantiationRequestsToMso + " \n " +
+                // don't take jobs from templates that already in-progress/failed
+                "and TEMPLATE_Id not in \n" +
+                "(select TEMPLATE_Id from vid_job where" +
+                "   TEMPLATE_Id IS NOT NULL and("+
+                "   (JOB_STATUS='FAILED' and DELETED_AT is null)" + // failed but not deleted
+                "   or JOB_STATUS='IN_PROGRESS'" +
+                "   or TAKEN_BY IS NOT NULL))" + " \n " +
+                // prefer older jobs, but the earlier in each bulk
+                "order by has_any_in_progress_job, CREATED_DATE, INDEX_IN_BULK " +
+                // select only one result
+                "limit 1";
     }
 
+    @NotNull
+    private String selectQueryForPendingResource() {
+        return "select * from vid_job as JOB left join \n" +
+                //count jobs
+                "(select template_id,count(*) as in_progress_count from vid_job \n" +
+                String.format("where (\n"+
+                "    (\n"+
+                //with job_status IN_PROGRESS or RESOURCE_IN_PROGRESS
+                "        (job_status in ('%s','%s') and DELETED_AT is NULL) \n",IN_PROGRESS, RESOURCE_IN_PROGRESS)+
+                //or that with job_status PENDING_RESOURCE that are taken
+                String.format("        or (JOB_STATUS='%s' and TAKEN_BY IS NOT NULL)\n    )\n", PENDING_RESOURCE) +
+                //with template ID and are not deleted
+                "    and TEMPLATE_ID IS NOT NULL and DELETED_AT is NULL\n)\n" +
+                //join them to vid_job by template_id
+                "group by template_id)\n"+
+                "as COUNTER on COUNTER.template_id=JOB.template_id \n" +
+
+                "where (\n"+
+                //select jobs with job_status PENDING_RESOURCE that are nit taken and not deleted
+                filterByStatusNotTakenNotDeleted(PENDING_RESOURCE) + "\n" +
+                //that have no count in the counter (no other in progress job with same templateId)
+                "    and in_progress_count is NULL \n" +
+                //and that have valid templateId
+                "    and JOB.template_id is not NULL \n"+
+                ")\n" +
+                //INDEX_IN_BULK is for order them inside same templateId,
+                //template_id - for order between different templateId (just to be deterministic)
+                "order by INDEX_IN_BULK,JOB.template_id \n" +
+                "limit 1;";
+    }
+
+
     @Override
     public void pushBack(Job job) {
         final JobDaoImpl remoteDaoJob = (JobDaoImpl) dataAccessService.getDomainObject(JobDaoImpl.class, job.getUuid(), null);
@@ -253,7 +300,7 @@
                 throw new OperationNotAllowedException("Service does not exist");
             }
 
-            if (!remoteDaoJob.getStatus().equals(Job.JobStatus.PENDING) && !remoteDaoJob.getStatus().equals(Job.JobStatus.STOPPED) || !StringUtils.isEmpty(remoteDaoJob.getTakenBy()) ) {
+            if ((remoteDaoJob.getStatus() != Job.JobStatus.PENDING) && (remoteDaoJob.getStatus() != Job.JobStatus.STOPPED) || !StringUtils.isEmpty(remoteDaoJob.getTakenBy()) ) {
                 logger.debug(EELFLoggerDelegate.debugLogger,"jobId {}: Service status does not allow deletion from the queue, status = {}", jobId, remoteDaoJob.getStatus() +
                 ", takenBy " + remoteDaoJob.getTakenBy());
                 throw new OperationNotAllowedException("Service status does not allow deletion from the queue");
@@ -290,4 +337,17 @@
 
         return updatedEntities != 0;
     }
+
+    private static String sqlListOfFinalStatus =
+            String.format("(%s)",
+                FINAL_STATUS.stream().
+                map(x->String.format("'%s'",x)).
+                collect(Collectors.joining(","))
+            );
+
+    @Override
+    public void deleteOldFinalJobs(long secondsAgo) {
+        String select = String.format(" MODIFIED_DATE <= '%s' and JOB_STATUS in %s", nowMinusInterval(secondsAgo), sqlListOfFinalStatus);
+        dataAccessService.deleteDomainObjects(JobDaoImpl.class, select, null);
+    }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/Action.java b/vid-app-common/src/main/java/org/onap/vid/model/Action.java
index ebaa691..c0d4fae 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/Action.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/Action.java
@@ -7,9 +7,9 @@
  * 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.
@@ -23,7 +23,9 @@
 public enum Action {
     Create(ServiceInfo.ServiceAction.INSTANTIATE),
     Delete(ServiceInfo.ServiceAction.DELETE),
-    None(ServiceInfo.ServiceAction.UPDATE);
+    None(ServiceInfo.ServiceAction.UPDATE),
+    Resume(ServiceInfo.ServiceAction.RESUME),
+    Replace(ServiceInfo.ServiceAction.REPLACE);
 
     private final ServiceInfo.ServiceAction serviceAction;
     Action(ServiceInfo.ServiceAction serviceAction){
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/JobAuditStatus.java b/vid-app-common/src/main/java/org/onap/vid/model/JobAuditStatus.java
index 49e25ec..6459345 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/JobAuditStatus.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/JobAuditStatus.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,6 +20,21 @@
 
 package org.onap.vid.model;
 
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.TimeZone;
+import java.util.UUID;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.Transient;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
@@ -29,14 +44,6 @@
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.vid.job.Job.JobStatus;
 
-import javax.persistence.*;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.TimeZone;
-import java.util.UUID;
-
 /*
  The following 2 annotations let hibernate to update only fields that actually have been changed.
  DynamicUpdate tell hibernate to update only dirty fields.
@@ -54,42 +61,39 @@
 
     public JobAuditStatus(){}
 
-    public JobAuditStatus(UUID jobId, String jobStatus, SourceStatus source){
+    private JobAuditStatus(UUID jobId, String instanceName, String instanceType, String jobStatus,
+                           SourceStatus source, UUID requestId, String additionalInfo, Date date, int ordinal) {
         this.jobId = jobId;
+        this.instanceName = instanceName;
+        this.instanceType = instanceType;
         this.jobStatus = jobStatus;
         this.source = source;
+        this.requestId = requestId;
+        setAdditionalInfo(additionalInfo);
+        this.ordinal = ordinal;
+        this.created = date;
     }
 
-    public JobAuditStatus(UUID jobId, String jobStatus, SourceStatus source, Date date){
-        this(jobId, jobStatus, source);
-        this.created = date;
+    public JobAuditStatus(UUID jobId, String jobStatus, SourceStatus source){
+        this(jobId, null, null, jobStatus, source, null, null, null, 0);
     }
 
     public JobAuditStatus(UUID jobId, String jobStatus, SourceStatus source, UUID requestId, String additionalInfo) {
-        this(jobId, jobStatus, source);
-        this.requestId = requestId;
-        setAdditionalInfo(additionalInfo);
-    }
-
-    public JobAuditStatus(UUID jobId, String jobStatus, SourceStatus source, UUID requestId, String additionalInfo, Date date){
-        this(jobId, jobStatus, source, requestId, additionalInfo);
-        this.created = date;
-    }
-
-    public JobAuditStatus(String instanceName, String jobStatus, UUID requestId, String additionalInfo) {
-        this.instanceName = instanceName;
-        this.jobStatus = jobStatus;
-        this.requestId = requestId;
-        this.additionalInfo = additionalInfo;
-
+        this(jobId, null, null, jobStatus, source, requestId, additionalInfo, null, 0);
     }
 
     public JobAuditStatus(String instanceName, String jobStatus, UUID requestId, String additionalInfo, String date, String instanceType) {
-       this(instanceName, jobStatus, requestId, additionalInfo);
-       this.created = dateStringToDate(date);
-       this.instanceType = instanceType;
+        this(null, instanceName, instanceType, jobStatus, null, requestId, additionalInfo, null, 0);
+        this.created = dateStringToDate(date);
     }
 
+    public static JobAuditStatus createForTest(UUID jobId, String jobStatus, SourceStatus source, Date date, int ordinal) {
+        return new JobAuditStatus(jobId, null, null, jobStatus, source, null, null, date, ordinal);
+    }
+
+    public static JobAuditStatus createForTest(UUID jobId, String jobStatus, SourceStatus source, UUID requestId, String additionalInfo, Date date) {
+        return new JobAuditStatus(jobId, null, null, jobStatus, source, requestId, additionalInfo, date, 0);
+    }
 
     private Date dateStringToDate(String dateAsString){
         if (StringUtils.isEmpty(dateAsString)) {
@@ -121,6 +125,7 @@
                 .append(source, that.source)
                 .append(requestId, that.requestId)
                 .append(additionalInfo, that.additionalInfo)
+                // ordinal is not part of equality (similarly to "created" field)
                 .isEquals();
     }
 
@@ -132,6 +137,7 @@
                 .append(source)
                 .append(requestId)
                 .append(additionalInfo)
+                // ordinal is not part of equality (similarly to "created" field)
                 .toHashCode();
     }
 
@@ -140,6 +146,25 @@
         VID
     }
 
+    public enum ResourceTypeFilter {
+        SERVICE("serviceInstanceId"),
+        VNF("vnfInstanceId"),
+        VFMODULE("vfModuleInstanceId"),
+        NETWORK("networkInstanceId"),
+        VNFGROUP("instanceGroupId");
+
+        private final String filterBy;
+
+        ResourceTypeFilter(String filterBy) {
+            this.filterBy = filterBy;
+        }
+
+        public String getFilterBy() {
+            return filterBy;
+        }
+    }
+
+
     private UUID jobId;
     private String instanceName;
     private String instanceType;
@@ -147,6 +172,7 @@
     private SourceStatus source;
     private UUID requestId;
     private String additionalInfo;
+    private int ordinal;
 
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
@@ -206,6 +232,18 @@
         this.additionalInfo = StringUtils.substring(additionalInfo, 0, MAX_ADDITIONAL_INFO_LENGTH);
     }
 
+    @Column(name = "ORDINAL", columnDefinition = "INT")
+    public int getOrdinal() {
+        // Ordinal allows sorting audit statuses by
+        // insertion order, regardless of "created"
+        // field
+        return ordinal;
+    }
+
+    public void setOrdinal(int ordinal) {
+        this.ordinal = ordinal;
+    }
+
     @Transient
     public String getInstanceName() {
         return instanceName;
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ModelUtil.java b/vid-app-common/src/main/java/org/onap/vid/model/ModelUtil.java
index 98514f0..45e100f 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/ModelUtil.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/ModelUtil.java
@@ -18,15 +18,8 @@
  * ============LICENSE_END=========================================================
  */
 
-/**
- * 
- */
 package org.onap.vid.model;
 
-/**
- * The Class ModelUtil.
- *
- */
 public class ModelUtil {
 	/**
 	 * Gets the tags for the given element according to the configured namespace
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ResourceInfo.java b/vid-app-common/src/main/java/org/onap/vid/model/ResourceInfo.java
new file mode 100644
index 0000000..deda23f
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/model/ResourceInfo.java
@@ -0,0 +1,144 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.model;
+
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import java.io.IOException;
+import java.util.Objects;
+import java.util.UUID;
+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 javax.persistence.Transient;
+import org.hibernate.annotations.DynamicUpdate;
+import org.hibernate.annotations.SelectBeforeUpdate;
+import org.hibernate.annotations.Type;
+import org.onap.vid.exceptions.GenericUncheckedException;
+import org.onap.vid.job.Job;
+import org.onap.vid.job.JobException;
+import org.onap.vid.mso.rest.AsyncRequestStatus;
+
+@DynamicUpdate
+@SelectBeforeUpdate
+@Entity
+@Table(name = "vid_resource_info")
+public class ResourceInfo extends VidBaseEntity {
+
+    private String trackById;
+    private UUID rootJobId;
+    private String instanceId;
+    private Job.JobStatus jobStatus;
+    private AsyncRequestStatus errorMessage;
+
+    public ResourceInfo(){}
+
+    public ResourceInfo(String trackById, UUID rootJobId, String instanceId, Job.JobStatus jobStatus, AsyncRequestStatus errorMessage) {
+        this.trackById = trackById;
+        this.rootJobId = rootJobId;
+        this.instanceId = instanceId;
+        this.jobStatus = jobStatus;
+        this.errorMessage = errorMessage;
+    }
+
+    @Id
+    @Column(name = "TRACK_BY_ID", columnDefinition = "CHAR(36)")
+    public String getTrackById() {
+        return trackById;
+    }
+
+    @Column(name = "ROOT_JOB_ID", columnDefinition = "CHAR(36)")
+    @Type(type="org.hibernate.type.UUIDCharType")
+    public UUID getRootJobId() {
+        return rootJobId;
+    }
+
+    @Column(name="JOB_STATUS")
+    @Enumerated(EnumType.STRING)
+    public Job.JobStatus getJobStatus() {
+        return jobStatus;
+    }
+
+    @Column(name="INSTANCE_ID")
+    public String getInstanceId() {
+        return instanceId;
+    }
+
+    public void setTrackById(String trackById) {
+        this.trackById = trackById;
+    }
+
+    public void setRootJobId(UUID rootJobId) {
+        this.rootJobId = rootJobId;
+    }
+
+    public void setInstanceId(String instanceId) {
+        this.instanceId = instanceId;
+    }
+    public void setJobStatus(Job.JobStatus jobStatus) {
+        this.jobStatus = jobStatus;
+    }
+
+    @Column(name = "ERROR_MESSAGE", columnDefinition = "VARCHAR(30000)")
+    public String getErrorMessageRaw() {
+        try {
+            return JACKSON_OBJECT_MAPPER.writeValueAsString(errorMessage);
+        } catch (JsonProcessingException e) {
+            throw new GenericUncheckedException(e);
+        }
+    }
+
+    public void setErrorMessageRaw(String failedMessage) {
+        try {
+            this.errorMessage = JACKSON_OBJECT_MAPPER.readValue(failedMessage, AsyncRequestStatus.class);
+        } catch (IOException e) {
+            throw new JobException("Error parsing mso failed message", rootJobId, e);
+        }
+    }
+
+    @Transient
+    public AsyncRequestStatus getErrorMessage() {
+        return this.errorMessage;
+    }
+
+    public void setErrorMessage(AsyncRequestStatus errorMessage) {
+        this.errorMessage = errorMessage;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        ResourceInfo that = (ResourceInfo) o;
+        return Objects.equals(trackById, that.trackById) &&
+                Objects.equals(instanceId, that.instanceId) &&
+                jobStatus == that.jobStatus;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(trackById, instanceId, jobStatus);
+    }
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ServiceInfo.java b/vid-app-common/src/main/java/org/onap/vid/model/ServiceInfo.java
index 3b49eed..1e1e6c2 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/ServiceInfo.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/ServiceInfo.java
@@ -7,9 +7,9 @@
  * 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.
@@ -18,22 +18,22 @@
  * ============LICENSE_END=========================================================
  */
 
- package org.onap.vid.model;
+package org.onap.vid.model;
 
 
- import com.fasterxml.jackson.annotation.JsonProperty;
- import org.hibernate.annotations.DynamicUpdate;
- import org.hibernate.annotations.SelectBeforeUpdate;
- import org.hibernate.annotations.Type;
- import org.onap.portalsdk.core.domain.support.DomainVo;
- import org.onap.vid.job.Job;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.hibernate.annotations.DynamicUpdate;
+import org.hibernate.annotations.SelectBeforeUpdate;
+import org.hibernate.annotations.Type;
+import org.onap.portalsdk.core.domain.support.DomainVo;
+import org.onap.vid.job.Job;
 
- import javax.persistence.*;
- import java.io.Serializable;
- import java.util.Date;
- import java.util.Objects;
- import java.util.Set;
- import java.util.UUID;
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Objects;
+import java.util.Set;
+import java.util.UUID;
 
 /*
  The following 2 annotations let hibernate to update only fields that actually have been changed.
@@ -49,11 +49,9 @@
     public enum ServiceAction {
         INSTANTIATE,
         DELETE,
-        UPDATE
-    }
-
-    public void setUserId(String userId) {
-        this.userId = userId;
+        UPDATE,
+        RESUME,
+        REPLACE
     }
 
     private UUID jobId;
@@ -65,6 +63,7 @@
     private Date statusModifiedDate;
     private boolean hidden;
     private boolean pause;
+    private boolean retryEnabled;
     private Date deletedAt;
     private String owningEntityId;
     private String owningEntityName;
@@ -90,7 +89,12 @@
 
     }
 
-    public ServiceInfo(String userId, Boolean aLaCarte, Job.JobStatus jobStatus, boolean pause, UUID jobId, UUID templateId, String owningEntityId, String owningEntityName, String project, String aicZoneId, String aicZoneName, String tenantId, String tenantName, String regionId, String regionName, String serviceType, String subscriberName, String subscriberId, String serviceInstanceId, String serviceInstanceName, String serviceModelId, String serviceModelName, String serviceModelVersion, Date createdBulkDate, ServiceAction action) {
+    public ServiceInfo(String userId, Boolean aLaCarte, Job.JobStatus jobStatus, boolean pause, UUID jobId, UUID templateId,
+                       String owningEntityId, String owningEntityName, String project, String aicZoneId, String aicZoneName,
+                       String tenantId, String tenantName, String regionId, String regionName, String serviceType,
+                       String subscriberName, String subscriberId, String serviceInstanceId, String serviceInstanceName,
+                       String serviceModelId, String serviceModelName, String serviceModelVersion, Date createdBulkDate,
+                       ServiceAction action, boolean retryEnabled) {
         this.userId = userId;
         this.aLaCarte = aLaCarte;
         this.jobStatus = jobStatus;
@@ -116,6 +120,7 @@
         this.serviceModelVersion = serviceModelVersion;
         this.createdBulkDate = createdBulkDate;
         this.action = action;
+        this.retryEnabled = retryEnabled;
     }
 
     @Column(name = "JOB_ID", columnDefinition = "CHAR(36)")
@@ -168,6 +173,12 @@
         return pause;
     }
 
+    @Column(name="IS_RETRY_ENABLED")
+    @JsonProperty("isRetryEnabled")
+    public boolean isRetryEnabled() {
+        return retryEnabled;
+    }
+
     @Column(name="OWNING_ENTITY_ID")
     public String getOwningEntityId() {
         return owningEntityId;
@@ -260,8 +271,8 @@
 
     @Column(name="DELETED_AT")
     public Date getDeletedAt() {
-         return deletedAt;
-     }
+        return deletedAt;
+    }
 
     @Column(name="ACTION")
     @Enumerated(EnumType.STRING)
@@ -319,6 +330,9 @@
         return super.getAuditTrail();
     }
 
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
     public void setJobId(UUID jobId) {
         this.jobId = jobId;
     }
@@ -351,6 +365,10 @@
         this.pause = pause;
     }
 
+    public void setRetryEnabled(boolean retryEnabled) {
+        this.retryEnabled = retryEnabled;
+    }
+
     public void setOwningEntityId(String owningEntityId) {
         this.owningEntityId = owningEntityId;
     }
@@ -424,55 +442,54 @@
     }
 
     public void setDeletedAt(Date deletedAt) {
-         this.deletedAt = deletedAt;
-     }
+        this.deletedAt = deletedAt;
+    }
 
     public void setAction(ServiceAction action) { this.action = action; }
 
-     @Override
-     public boolean equals(Object o) {
-         if (this == o) return true;
-         if (!(o instanceof ServiceInfo)) return false;
-         ServiceInfo that = (ServiceInfo) o;
-         return isHidden() == that.isHidden() &&
-                 isPause() == that.isPause() &&
-                 isALaCarte() == that.isALaCarte() &&
-                 Objects.equals(getDeletedAt(), that.getDeletedAt()) &&
-                 Objects.equals(getJobId(), that.getJobId()) &&
-                 Objects.equals(getTemplateId(), that.getTemplateId()) &&
-                 Objects.equals(getUserId(), that.getUserId()) &&
-                 Objects.equals(getMsoRequestId(), that.getMsoRequestId()) &&
-                 getJobStatus() == that.getJobStatus() &&
-                 Objects.equals(getStatusModifiedDate(), that.getStatusModifiedDate()) &&
-                 Objects.equals(getOwningEntityId(), that.getOwningEntityId()) &&
-                 Objects.equals(getOwningEntityName(), that.getOwningEntityName()) &&
-                 Objects.equals(getProject(), that.getProject()) &&
-                 Objects.equals(getAicZoneId(), that.getAicZoneId()) &&
-                 Objects.equals(getAicZoneName(), that.getAicZoneName()) &&
-                 Objects.equals(getTenantId(), that.getTenantId()) &&
-                 Objects.equals(getTenantName(), that.getTenantName()) &&
-                 Objects.equals(getRegionId(), that.getRegionId()) &&
-                 Objects.equals(getRegionName(), that.getRegionName()) &&
-                 Objects.equals(getServiceType(), that.getServiceType()) &&
-                 Objects.equals(getSubscriberName(), that.getSubscriberName()) &&
-                 Objects.equals(getSubscriberId(), that.getSubscriberId()) &&
-                 Objects.equals(getServiceInstanceId(), that.getServiceInstanceId()) &&
-                 Objects.equals(getServiceInstanceName(), that.getServiceInstanceName()) &&
-                 Objects.equals(getServiceModelId(), that.getServiceModelId()) &&
-                 Objects.equals(getServiceModelName(), that.getServiceModelName()) &&
-                 Objects.equals(getServiceModelVersion(), that.getServiceModelVersion()) &&
-                 Objects.equals(getCreatedBulkDate(), that.getCreatedBulkDate()) &&
-                 Objects.equals(getAction(), that.getAction());
-     }
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof ServiceInfo)) return false;
+        ServiceInfo that = (ServiceInfo) o;
+        return aLaCarte == that.aLaCarte &&
+                isHidden() == that.isHidden() &&
+                isPause() == that.isPause() &&
+                isRetryEnabled() == that.isRetryEnabled() &&
+                Objects.equals(getJobId(), that.getJobId()) &&
+                Objects.equals(getTemplateId(), that.getTemplateId()) &&
+                Objects.equals(getUserId(), that.getUserId()) &&
+                Objects.equals(getMsoRequestId(), that.getMsoRequestId()) &&
+                getJobStatus() == that.getJobStatus() &&
+                Objects.equals(getStatusModifiedDate(), that.getStatusModifiedDate()) &&
+                Objects.equals(getDeletedAt(), that.getDeletedAt()) &&
+                Objects.equals(getOwningEntityId(), that.getOwningEntityId()) &&
+                Objects.equals(getOwningEntityName(), that.getOwningEntityName()) &&
+                Objects.equals(getProject(), that.getProject()) &&
+                Objects.equals(getAicZoneId(), that.getAicZoneId()) &&
+                Objects.equals(getAicZoneName(), that.getAicZoneName()) &&
+                Objects.equals(getTenantId(), that.getTenantId()) &&
+                Objects.equals(getTenantName(), that.getTenantName()) &&
+                Objects.equals(getRegionId(), that.getRegionId()) &&
+                Objects.equals(getRegionName(), that.getRegionName()) &&
+                Objects.equals(getServiceType(), that.getServiceType()) &&
+                Objects.equals(getSubscriberName(), that.getSubscriberName()) &&
+                Objects.equals(getSubscriberId(), that.getSubscriberId()) &&
+                Objects.equals(getServiceInstanceId(), that.getServiceInstanceId()) &&
+                Objects.equals(getServiceInstanceName(), that.getServiceInstanceName()) &&
+                Objects.equals(getServiceModelId(), that.getServiceModelId()) &&
+                Objects.equals(getServiceModelName(), that.getServiceModelName()) &&
+                Objects.equals(getServiceModelVersion(), that.getServiceModelVersion()) &&
+                Objects.equals(getCreatedBulkDate(), that.getCreatedBulkDate()) &&
+                getAction() == that.getAction();
+    }
 
-     @Override
-     public int hashCode() {
-
-         return Objects.hash(getJobId(), getTemplateId(), getUserId(), getMsoRequestId(), isALaCarte(), getJobStatus(), getStatusModifiedDate(),
-                 isHidden(), isPause(), getDeletedAt(), getOwningEntityId(), getOwningEntityName(), getProject(),
-                 getAicZoneId(), getAicZoneName(), getTenantId(), getTenantName(), getRegionId(),
-                 getRegionName(), getServiceType(), getSubscriberName(), getSubscriberId(), getServiceInstanceId(),
-                 getServiceInstanceName(), getServiceModelId(), getServiceModelName(),
-                 getServiceModelVersion(), getCreatedBulkDate(), getAction());
-     }
- }
+    @Override
+    public int hashCode() {
+        return Objects.hash(getJobId(), getTemplateId(), getUserId(), getMsoRequestId(), aLaCarte, getJobStatus(),
+                getStatusModifiedDate(), isHidden(), isPause(), isRetryEnabled(), getDeletedAt(), getOwningEntityId(), getOwningEntityName(),
+                getProject(), getAicZoneId(), getAicZoneName(), getTenantId(), getTenantName(), getRegionId(), getRegionName(), getServiceType(),
+                getSubscriberName(), getSubscriberId(), getServiceInstanceId(), getServiceInstanceName(), getServiceModelId(), getServiceModelName(),
+                getServiceModelVersion(), getCreatedBulkDate(), getAction());
+    }
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java b/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java
index c1e4035..121c7e4 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java
@@ -2,14 +2,14 @@
  * ============LICENSE_START=======================================================
  * VID
  * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -40,14 +40,14 @@
 
 	/** The service. */
 	private Service service;
-	
+
 	/** The vnfs. */
 	private Map<String, VNF> vnfs;
-	
+
 	/** The networks. */
 	private Map<String, Network> networks;
 
-	private Map<String, CR> collectionResource;
+	private Map<String, CR> collectionResources;
 
 	/** Port Mirroring Configuration node templates */
 	private Map<String, PortMirroringConfig> configurations;
@@ -60,12 +60,12 @@
 
 	/**
 	 * The vf modules. The VNF also has vfmodules but the vfmodules at the service level may have additional info
-	 * that is not present in the VNF, like the vf module customization String 
+	 * that is not present in the VNF, like the vf module customization String
 	 */
 	private Map<String, VfModule> vfModules;
-	/** 
-	 * The volume groups. The VNF also has volume groups but the volume groups will be populated at the service level 
-	 * for newer models 
+	/**
+	 * The volume groups. The VNF also has volume groups but the volume groups will be populated at the service level
+	 * for newer models
 	 */
 	private Map<String, VolumeGroup> volumeGroups;
 
@@ -74,12 +74,15 @@
 
 	/** Resource groups of VF (VNF) type. */
 	private Map<String, ResourceGroup> vnfGroups;
-	
+
+	/** The vrfs */
+	private Map<String, Node> vrfs;
+
 	/**
 	 * Instantiates a new service model.
 	 */
 	public ServiceModel() {}
-	
+
 	/**
 	 * Gets the service.
 	 *
@@ -140,6 +143,10 @@
 		return vnfGroups;
 	}
 
+	public Map<String, Node> getVrfs() {
+		return vrfs;
+	}
+
 	/**
 	 * Sets the service.
 	 *
@@ -230,12 +237,16 @@
 		this.vnfGroups = vnfGroups;
 	}
 
-	public Map<String, CR> getCollectionResource() {
-		return collectionResource;
+	public void setVrfs(Map<String, Node> vrfs) {
+		this.vrfs = vrfs;
 	}
 
-	public void setCollectionResource(Map<String, CR> collectionResource) {
-		this.collectionResource = collectionResource;
+	public Map<String, CR> getCollectionResources() {
+		return collectionResources;
+	}
+
+	public void setCollectionResources(Map<String, CR> collectionResources) {
+		this.collectionResources = collectionResources;
 	}
 
 	public Map<String, Node> getFabricConfigurations() {
@@ -254,9 +265,9 @@
 	 * @return the service
 	 */
 	public static Service extractService(ToscaModel serviceToscaModel, org.onap.vid.asdc.beans.Service asdcServiceMetadata) {
-		
+
 		final Service service = new Service();
-		
+
 		service.setCategory(serviceToscaModel.getMetadata().getCategory());
 		service.setInvariantUuid(serviceToscaModel.getMetadata().getInvariantUUID());
 		service.setName(serviceToscaModel.getMetadata().getName());
@@ -274,18 +285,18 @@
 	public static void extractGroups (ToscaModel serviceToscaModel,ServiceModel serviceModel) {
 		// Get the groups. The groups may duplicate the groups that are in the VNF model and have
 		// additional data like the VF module customization String>
-		
+
 		final Map<String, VfModule> vfModules = new HashMap<> ();
 		final Map<String, VolumeGroup> volumeGroups = new HashMap<> ();
-		
+
 		String asdcModelNamespace = VidProperties.getAsdcModelNamespace();
-    	String vfModuleTag = asdcModelNamespace + ModelConstants.VF_MODULE;
-    	
+		String vfModuleTag = asdcModelNamespace + ModelConstants.VF_MODULE;
+
 		for (Entry<String, Group> component : serviceToscaModel.gettopology_template().getGroups().entrySet()) {
 			final Group group = component.getValue();
 			final String type = group.getType();
 			final String customizationName = component.getKey();
-			
+
 			if (type.startsWith(vfModuleTag)) {
 				VfModule vfMod = VfModule.extractVfModule(customizationName, group);
 				vfModules.put(customizationName, vfMod);
@@ -298,14 +309,14 @@
 		// add this point vfModules and volume groups are disconnected from VNF
 		serviceModel.setVfModules (vfModules);
 		serviceModel.setVolumeGroups (volumeGroups);
-		
+
 	}
 	/**
 	 * Populate the vf modules and volume groups that we may have under the service level under each VNF.
 	 */
 	public void associateGroups() {
 		String methodName = "associateGroups()";
-        LOG.debug(EELFLoggerDelegate.debugLogger, methodName + " start");
+		LOG.debug(EELFLoggerDelegate.debugLogger, methodName + " start");
 		// go through the vnfs, get the vnf normalized name and look for a vf module with a customization name that starts
 		// with vnf + ".."
 		String vnfCustomizationName = null;
@@ -319,13 +330,13 @@
 
 				LOG.debug(EELFLoggerDelegate.debugLogger, methodName +
 						" VNF customizationName=" + vnfCustomizationName + "normalized customization name=" + normalizedVnfCustomizationName);
-				
+
 				// now check to see if there is a vf module with customization name that starts with normalizedVnfCustomizationName
 
 				if (!MapUtils.isEmpty(getVolumeGroups())) {
 					for (Entry<String, VfModule> vfModuleComponent : getVfModules().entrySet()) {
 						vfModuleCustomizationName = vfModuleComponent.getValue().getModelCustomizationName();
-						
+
 						LOG.debug(EELFLoggerDelegate.debugLogger, methodName +
 								" VF Module customizationName=" + vfModuleCustomizationName );
 						if ( vfModuleCustomizationName.startsWith(normalizedVnfCustomizationName + ".." )) {
@@ -335,7 +346,7 @@
 				}
 			}
 		}
-		
+
 	}
 
 
@@ -346,14 +357,14 @@
 		(tmpVnf.getVfModules()).put(vfModuleComponent.getKey(), vfModuleComponent.getValue());
 
 		LOG.debug(EELFLoggerDelegate.debugLogger, methodName +
-                " Associated VF Module customizationName=" + vfModuleComponent.getKey() + " with VNF customization name=" + vnfCustomizationName);
+				" Associated VF Module customizationName=" + vfModuleComponent.getKey() + " with VNF customization name=" + vnfCustomizationName);
 
 		// now find if this vf module has volume groups, if so, find the volume group with the same customization name and put it under the VNF
 		if ( vfModuleComponent.getValue().isVolumeGroupAllowed() ) {
             if (isVolumeGroupsContainsVfModuleCustomName(vfModuleCustomizationName)) {
-                    (vnfComponent.getValue().getVolumeGroups()).put(vfModuleCustomizationName, (getVolumeGroups()).get(vfModuleCustomizationName));
-            }
-        }
+			(vnfComponent.getValue().getVolumeGroups()).put(vfModuleCustomizationName, (getVolumeGroups()).get(vfModuleCustomizationName));
+		}
+	}
 	}
 
 	private boolean isVolumeGroupsContainsVfModuleCustomName(String vfModuleCustomizationName) {
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/VersionAndFeatures.kt b/vid-app-common/src/main/java/org/onap/vid/model/VersionAndFeatures.kt
new file mode 100644
index 0000000..730e382
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/model/VersionAndFeatures.kt
@@ -0,0 +1,12 @@
+package org.onap.vid.model
+
+data class VersionAndFeatures(
+        val features:String,
+        val build:String,
+        val displayVersion:String
+) {
+    companion object {
+        val unknown: VersionAndFeatures = VersionAndFeatures("unknown", "unknown", "unknown")
+    }
+}
+
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/VidNotions.kt b/vid-app-common/src/main/java/org/onap/vid/model/VidNotions.kt
index 7f06bfe..f67d8fb 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/VidNotions.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/model/VidNotions.kt
@@ -7,9 +7,9 @@
  * 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.
@@ -26,7 +26,10 @@
 import com.google.common.base.CaseFormat
 
 class VidNotions(@get:JsonInclude(JsonInclude.Include.NON_NULL)
-                 val instantiationUI: InstantiationUI, val modelCategory: ModelCategory, val viewEditUI: InstantiationUI) {
+                 val instantiationUI: InstantiationUI,
+                 val modelCategory: ModelCategory,
+                 val viewEditUI: InstantiationUI,
+                 val instantiationType: InstantiationType) {
     enum class InstantiationUI {
         NETWORK_WITH_PROPERTY_NETWORK_TECHNOLOGY_EQUALS_STANDARD_SRIOV_OR_OVS,
         SERVICE_WITH_FABRIC_CONFIGURATION,
@@ -34,7 +37,12 @@
         SERVICE_UUID_IS_1ffce89f_ef3f_4cbb_8b37_82134590c5de,
         ANY_ALACARTE_NEW_UI,
         MACRO_SERVICE,
-        SERVICE_WITH_VNF_GROUPING;
+        SERVICE_WITH_VNF_GROUPING,
+        TRANSPORT_SERVICE,
+        SERVICE_WITH_COLLECTION_RESOURCE,
+        A_LA_CARTE_VNF_SERVICE_ROLE,
+        INFRASTRUCTURE_VPN
+        ;
 
         @JsonValue
         fun toLowerCamel(): String {
@@ -48,7 +56,16 @@
         IS_5G_PROVIDER_NETWORK_MODEL,
         @JsonProperty("5G Fabric Configuration")
         IS_5G_FABRIC_CONFIGURATION_MODEL,
+        Transport,
+        SERVICE_WITH_COLLECTION_RESOURCE,
+        INFRASTRUCTURE_VPN,
         @JsonProperty("other")
         OTHER
     }
+
+    enum class InstantiationType {
+        Macro,
+        ALaCarte,
+        ClientConfig
+    }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AAITreeNode.java b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AAITreeNode.java
index 4b16b31..f092c9a 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AAITreeNode.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AAITreeNode.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,17 +20,19 @@
 
 package org.onap.vid.model.aaiTree;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.commons.lang3.StringUtils;
+import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.RelationshipList;
+import org.onap.vid.mso.model.CloudConfiguration;
 
 import java.util.*;
 
 public class AAITreeNode {
 
-    private String type;
-    private int uniqueNumber;
+    private NodeType type;
     private String orchestrationStatus;
     private String provStatus;
-    private Boolean inMaint = null;
+    private boolean inMaint;
     private String modelVersionId;
     private String modelCustomizationId;
     private String modelInvariantId;
@@ -41,25 +43,19 @@
     private String modelCustomizationName;
     private final List<AAITreeNode> children = Collections.synchronizedList(new LinkedList<>());
     private Map<String, Object> additionalProperties = new HashMap<>();
+    private CloudConfiguration cloudConfiguration;
+    private RelationshipList relationshipList;
     private String keyInModel;
     private AAITreeNode parent;
 
-    public String getType() {
+    public NodeType getType() {
         return type;
     }
 
-    public void setType(String type) {
+    public void setType(NodeType type) {
         this.type = type;
     }
 
-    public int getUniqueNumber() {
-        return uniqueNumber;
-    }
-
-    public void setUniqueNumber(int uniqueNumber) {
-        this.uniqueNumber = uniqueNumber;
-    }
-    
     public String getOrchestrationStatus() {
         return orchestrationStatus;
     }
@@ -76,11 +72,11 @@
         this.provStatus = provStatus;
     }
 
-    public Boolean getInMaint() {
+    public boolean getInMaint() {
         return inMaint;
     }
 
-    public void setInMaint(Boolean inMaint) {
+    public void setInMaint(boolean inMaint) {
         this.inMaint = inMaint;
     }
 
@@ -169,7 +165,7 @@
     }
 
     public String getUniqueNodeKey() {
-        return getNodeKey() + ":" + String.format("%03d", this.uniqueNumber);
+        return this.id;
     }
 
     public void setKeyInModel(String keyInModel) {
@@ -180,6 +176,8 @@
         return keyInModel;
     }
 
+    //prevent cyclic serialization of parent and children
+    @JsonIgnore
     public AAITreeNode getParent() {
         return parent;
     }
@@ -188,6 +186,22 @@
         this.parent = parent;
     }
 
+    public CloudConfiguration getCloudConfiguration() {
+        return cloudConfiguration;
+    }
+
+    public void setCloudConfiguration(CloudConfiguration cloudConfiguration) {
+        this.cloudConfiguration = cloudConfiguration;
+    }
+
+    public RelationshipList getRelationshipList() {
+        return relationshipList;
+    }
+
+    public void setRelationshipList(RelationshipList relationshipList) {
+        this.relationshipList = relationshipList;
+    }
+
     public void addChildren(List<AAITreeNode> children) {
         for (AAITreeNode child : children) {
             child.setParent(this);
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AbstractNode.java b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AbstractNode.java
index 64e953e..a0fa60e 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AbstractNode.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/AbstractNode.java
@@ -7,9 +7,9 @@
  * 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.
@@ -32,6 +32,7 @@
     protected String productFamilyId;
     protected String lcpCloudRegionId;
     protected String tenantId;
+    protected String cloudOwner;
     protected ModelInfo modelInfo;
 
     public AbstractNode() {
@@ -70,4 +71,7 @@
         return modelInfo;
     }
 
+    public String getCloudOwner() {
+        return cloudOwner;
+    }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/CollectionResource.kt b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/CollectionResource.kt
new file mode 100644
index 0000000..054618d
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/CollectionResource.kt
@@ -0,0 +1,15 @@
+package org.onap.vid.model.aaiTree
+
+import org.apache.commons.lang.StringUtils
+
+fun isNfc(node: AAITreeNode): Boolean {
+    return node.type == NodeType.INSTANCE_GROUP &&
+            node.additionalProperties["instance-group-type"] != null &&
+            StringUtils.equalsIgnoreCase(node.additionalProperties["instance-group-type"].toString(), "L3-NETWORK")
+}
+
+class CollectionResource(node: AAITreeNode) : Node(node) {
+
+    val ncfs: Map<String, NCF> = node.children.filter { isNfc(it) }.map { it.uniqueNodeKey to NCF(it) }.toMap()
+
+}
\ No newline at end of file
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/InstanceGroup.kt b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/InstanceGroup.kt
new file mode 100644
index 0000000..490853a
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/InstanceGroup.kt
@@ -0,0 +1,23 @@
+package org.onap.vid.model.aaiTree
+
+open class InstanceGroup(aaiNode: AAITreeNode) : Node(aaiNode) {
+    var instanceGroupRole: String? = null
+    var instanceGroupFunction: String? = null
+
+    init {
+        val INSTANCE_GROUP_TYPE = "instance-group-type"
+        val INSTANCE_GROUP_ROLE = "instance-group-role"
+        val INSTANCE_GROUP_FUNCTION = "instance-group-function"
+
+        if (aaiNode.additionalProperties[INSTANCE_GROUP_TYPE] != null) {
+            instanceType = aaiNode.additionalProperties[INSTANCE_GROUP_TYPE].toString()
+        }
+        if (aaiNode.additionalProperties[INSTANCE_GROUP_FUNCTION] != null) {
+            instanceGroupFunction = aaiNode.additionalProperties[INSTANCE_GROUP_FUNCTION].toString()
+        }
+        if (aaiNode.additionalProperties[INSTANCE_GROUP_ROLE] != null) {
+            instanceGroupRole = aaiNode.additionalProperties[INSTANCE_GROUP_ROLE].toString()
+        }
+    }
+
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/NCF.kt b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/NCF.kt
new file mode 100644
index 0000000..6d407da
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/NCF.kt
@@ -0,0 +1,12 @@
+package org.onap.vid.model.aaiTree
+
+import org.apache.commons.lang.StringUtils
+
+class NCF(node: AAITreeNode) : InstanceGroup(node) {
+    val numberOfNetworks: Int = if (node.relationshipList != null && node.relationshipList.relationship != null) {
+        node.relationshipList.relationship
+                .filter { StringUtils.equalsIgnoreCase(it.relatedTo, "L3-NETWORK") }
+                .count()
+    } else 0
+}
+
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/Network.java b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/Network.java
index e80e575..6b30233 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/Network.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/Network.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,21 +20,121 @@
 
 package org.onap.vid.model.aaiTree;
 
-import org.onap.vid.aai.util.AAITreeConverter;
-
+import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
+import static org.onap.vid.aai.util.AAITreeConverter.NETWORK_ROLE;
 import static org.onap.vid.aai.util.AAITreeConverter.NETWORK_TYPE;
+import static org.onap.vid.aai.util.AAITreeConverter.PHYSICAL_NETWORK_NAME;
+import static org.onap.vid.aai.util.AAITreeConverter.SERVICE_INSTANCE;
+import static org.onap.vid.aai.util.AAITreeConverter.SERVICE_INSTANCE_SERVICE_INSTANCE_ID;
+import static org.onap.vid.aai.util.AAITreeConverter.SERVICE_INSTANCE_SERVICE_INSTANCE_NAME;
+import static org.onap.vid.aai.util.AAITreeConverter.TENANT;
+import static org.onap.vid.aai.util.AAITreeConverter.TENANT_TENANT_NAME;
+import static org.onap.vid.aai.util.AAITreeConverter.VPN_BINDING;
 
+import com.fasterxml.jackson.annotation.JsonInclude;
+import org.apache.commons.collections.CollectionUtils;
+import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship;
+import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.RelationshipList;
+import org.onap.vid.aai.util.AAITreeNodeUtils;
+
+@JsonInclude(NON_NULL)
 public class Network extends Node {
 
-    public Network(AAITreeNode node) {
-        super(node, AAITreeConverter.ModelType.network);
+    private String role;
+    private String physicalName;
+    private String serviceName;
+    private String serviceUUID;
+    private String tenantName;
+    private Boolean isBoundToVpn;
+    private RouteTarget routeTarget;
+
+    public Network(){}
+
+    private Network(AAITreeNode node) {
+        super(node);
+        fillCloudConfigurationProperties(this, node.getCloudConfiguration());
     }
 
     public static Network from(AAITreeNode node) {
         Network network = new Network(node);
-        if (node.getAdditionalProperties().get(NETWORK_TYPE) != null) {
-            network.setInstanceType(node.getAdditionalProperties().get(NETWORK_TYPE).toString());
+        network.setInstanceType(readValueAsStringFromAdditionalProperties(node, NETWORK_TYPE));
+        network.setRole(readValueAsStringFromAdditionalProperties(node, NETWORK_ROLE));
+        network.setPhysicalName(readValueAsStringFromAdditionalProperties(node, PHYSICAL_NETWORK_NAME));
+        RelationshipList relationshipList = node.getRelationshipList();
+        Relationship serviceInstanceRelationship = AAITreeNodeUtils.findFirstRelationshipByRelatedTo(relationshipList, SERVICE_INSTANCE).orElse(null);
+        if (serviceInstanceRelationship != null) {
+            network.setServiceName(AAITreeNodeUtils.findFirstValue(serviceInstanceRelationship.getRelatedToPropertyList(), SERVICE_INSTANCE_SERVICE_INSTANCE_NAME).orElse(null));
+            network.setServiceUUID(AAITreeNodeUtils.findFirstValue(serviceInstanceRelationship.getRelationDataList(), SERVICE_INSTANCE_SERVICE_INSTANCE_ID).orElse(null));
         }
+        AAITreeNodeUtils.findFirstRelationshipByRelatedTo(relationshipList, TENANT).ifPresent(
+                tenantRelationship -> network.setTenantName(AAITreeNodeUtils.findFirstValue(tenantRelationship.getRelatedToPropertyList(), TENANT_TENANT_NAME).orElse(null))
+        );
+        // We are ignoring "is-bound-to-vpn" parameter from additionalProperties because there is a requirement to define vpn binding presence from by related-to: vpn-binding
+        network.setBoundToVpn(AAITreeNodeUtils.findFirstRelationshipByRelatedTo(relationshipList, VPN_BINDING).isPresent());
+
+        //get the route target
+        node.getChildren().stream()
+                .filter(x->x.getType()== NodeType.VPN_BINDING)                      // get all VPN_BINDING related to the network
+                .map(x->VpnBindingKt.from(x))                                       // create VPN_BINDING nodes
+                .filter(x-> CollectionUtils.isNotEmpty(x.getRouteTargets()))        // get the RouteTargets that are not empty
+                .findFirst()                                                        // get the first one
+                .ifPresent(x->network.setRouteTarget(x.getRouteTargets().get(0)));  // If there is a route target - add it to the network
         return network;
     }
+
+    public String getRole() {
+        return role;
+    }
+
+    public void setRole(String role) {
+        this.role = role;
+    }
+
+    public String getPhysicalName() {
+        return physicalName;
+    }
+
+    public void setPhysicalName(String physicalName) {
+        this.physicalName = physicalName;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public void setServiceName(String serviceName) {
+        this.serviceName = serviceName;
+    }
+
+    public String getServiceUUID() {
+        return serviceUUID;
+    }
+
+    public void setServiceUUID(String serviceUUID) {
+        this.serviceUUID = serviceUUID;
+    }
+
+    public String getTenantName() {
+        return tenantName;
+    }
+
+    public void setTenantName(String tenantName) {
+        this.tenantName = tenantName;
+    }
+
+    public Boolean isBoundToVpn() {
+        return isBoundToVpn;
+    }
+
+    public void setBoundToVpn(Boolean boundToVpn) {
+        isBoundToVpn = boundToVpn;
+    }
+
+    public RouteTarget getRouteTarget() {
+        return routeTarget;
+    }
+
+    public void setRouteTarget(RouteTarget routeTarget) {
+        this.routeTarget = routeTarget;
+    }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/Node.java b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/Node.java
index 5ce5eec..435f70f 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/Node.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/Node.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,9 +20,12 @@
 
 package org.onap.vid.model.aaiTree;
 
-import org.onap.vid.aai.util.AAITreeConverter;
+import org.onap.vid.mso.model.CloudConfiguration;
 import org.onap.vid.mso.model.ModelInfo;
 
+import java.util.Objects;
+import java.util.UUID;
+
 public class Node extends AbstractNode {
     private String instanceType;
 
@@ -38,7 +41,11 @@
 
     private final String trackById;
 
-    public Node(AAITreeNode aaiNode, AAITreeConverter.ModelType modelType) {
+    public Node() {
+        trackById = UUID.randomUUID().toString();
+    }
+
+    public Node(AAITreeNode aaiNode) {
         super();
         this.instanceId = aaiNode.getId();
         this.instanceName = aaiNode.getName();
@@ -46,11 +53,13 @@
         this.provStatus = aaiNode.getProvStatus();
         this.inMaint = aaiNode.getInMaint();
         this.uuid = aaiNode.getModelVersionId();
-        this.originalName = aaiNode.getModelCustomizationName();
+        this.originalName = aaiNode.getKeyInModel();
         this.trackById = aaiNode.getUniqueNodeKey();
 
         ModelInfo nodeModelInfo = new ModelInfo();
-        nodeModelInfo.setModelType(modelType.name());
+        if (aaiNode.getType() != null) {
+            nodeModelInfo.setModelType(aaiNode.getType().getModelType());
+        }
         nodeModelInfo.setModelName(aaiNode.getModelName());
         nodeModelInfo.setModelVersion(aaiNode.getModelVersion());
         nodeModelInfo.setModelVersionId(aaiNode.getModelVersionId());
@@ -156,4 +165,16 @@
     public String getTrackById() {
         return trackById;
     }
+
+    public static void fillCloudConfigurationProperties(AbstractNode that, CloudConfiguration cloudConfiguration) {
+        if (cloudConfiguration !=null) {
+            that.lcpCloudRegionId = cloudConfiguration.getLcpCloudRegionId();
+            that.tenantId = cloudConfiguration.getTenantId();
+            that.cloudOwner = cloudConfiguration.getCloudOwner();
+        }
+    }
+
+    public static String readValueAsStringFromAdditionalProperties(AAITreeNode node, String key) {
+        return Objects.toString(node.getAdditionalProperties().get(key), null);
+    }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/NodeType.java b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/NodeType.java
new file mode 100644
index 0000000..5e1228f
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/NodeType.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.model.aaiTree;
+
+public enum NodeType {
+    SERVICE_INSTANCE("service-instance", "service-instance-id", "service-instance-name", "service"),
+    GENERIC_VNF ("generic-vnf", "vnf-id", "vnf-name", "vnf"),
+    NETWORK ("l3-network", "network-id", "network-name", "network"),
+    FAILURE ("failure_node", NodeType.NONE, NodeType.NONE, NodeType.NONE),
+    COLLECTION_RESOURCE ("collection", "collection-id", "collection-name", "collection"),
+    CONFIGURATION ("configuration", "configuration-id", "configuration-name", "configuration"),
+    PNF ("pnf", "pnf-id", "pnf-name", "pnf"),
+    VF_MODULE ("vf-module", "vf-module-id", "vf-module-name", "vfModule"),
+    INSTANCE_GROUP ("instance-group", "id", "instance-group-name", "instanceGroup"),
+    PORT ("l-interface", "interface-id", "interface-name", "connectionPoint"),
+    VOLUME_GROUP ("volume-group", "volume-group-id", "volume-group-name", "volumeGroup"),
+    VLAN_TAG("vlan-tag", "vlan-tag-id", NodeType.NONE, NodeType.NONE),
+    VPN_BINDING("vpn-binding", "vpn-id", "vpn-name", "vpnBinding"),
+    ;
+
+    private String type;
+    private String id;
+    private String name;
+    private String modelType;
+
+    public static final String NONE = "";
+
+    NodeType(String type, String id, String name, String modelType) {
+        this.type = type;
+        this.id = id;
+        this.name = name;
+        this.modelType = modelType;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getModelType() {
+        return modelType;
+    }
+
+    public static NodeType fromString(String type) {
+        for (NodeType nodeType : NodeType.values()) {
+            if (nodeType.type.equalsIgnoreCase(type)) {
+                return nodeType;
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public String toString() {
+        return this.type;
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/RelatedVnf.java b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/RelatedVnf.java
index 37dc45a..febd8e0 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/RelatedVnf.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/RelatedVnf.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,10 +20,10 @@
 
 package org.onap.vid.model.aaiTree;
 
-import org.onap.vid.aai.util.AAITreeConverter;
-
 import static org.onap.vid.aai.util.AAITreeConverter.VNF_TYPE;
 
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
 public class RelatedVnf extends Node {
 
     private String serviceInstanceId;
@@ -55,13 +55,15 @@
     }
 
     public RelatedVnf(AAITreeNode node) {
-        super(node, AAITreeConverter.ModelType.vnf);
+        super(node);
     }
 
     public static RelatedVnf from(AAITreeNode node) {
         RelatedVnf vnf = new RelatedVnf(node);
-        vnf.setServiceInstanceId(node.getParent().getId());
-        vnf.setServiceInstanceName(node.getParent().getName());
+        if (node.getParent() != null && node.getParent().getType() == NodeType.SERVICE_INSTANCE) {
+            vnf.setServiceInstanceId(node.getParent().getId());
+            vnf.setServiceInstanceName(node.getParent().getName());
+        }
 
         if (node.getAdditionalProperties().get(VNF_TYPE) != null) {
             vnf.setInstanceType(node.getAdditionalProperties().get(VNF_TYPE).toString());
@@ -69,4 +71,22 @@
 
         return vnf;
     }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this)
+            .append("serviceInstanceId", serviceInstanceId)
+            .append("serviceInstanceName", serviceInstanceName)
+            .append("tenantName", tenantName)
+            .append("action", action)
+            .append("instanceName", instanceName)
+            .append("instanceId", instanceId)
+            .append("orchStatus", orchStatus)
+            .append("productFamilyId", productFamilyId)
+            .append("lcpCloudRegionId", lcpCloudRegionId)
+            .append("tenantId", tenantId)
+            .append("cloudOwner", cloudOwner)
+            .append("modelInfo", modelInfo)
+            .toString();
+    }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/ServiceInstance.java b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/ServiceInstance.java
index 111e98b..923be13 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/ServiceInstance.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/ServiceInstance.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,10 +20,9 @@
 
 package org.onap.vid.model.aaiTree;
 
-import org.onap.vid.mso.model.ModelInfo;
-
 import java.util.HashMap;
 import java.util.Map;
+import org.onap.vid.mso.model.ModelInfo;
 
 public class ServiceInstance extends AbstractNode {
 
@@ -43,13 +42,17 @@
 
     private Map<String, Vnf> vnfs = new HashMap<>();
     private Map<String, Network> networks = new HashMap<>();
+    private Map<String, Vrf> vrfs = new HashMap<>();
+
 
     private Map<String, VnfGroup> vnfGroups = new HashMap<>();
+    private Map<String, CollectionResource> collectionResources = new HashMap<>();
 
     private int validationCounter;
     private Map<String, Long> existingVNFCounterMap;
     private Map<String, Long> existingNetworksCounterMap;
     private Map<String, Long> existingVnfGroupCounterMap;
+    private Map<String, Long> existingVRFCounterMap;
 
     public void setInstanceName(String instanceName) {
         this.instanceName = instanceName;
@@ -175,6 +178,14 @@
         this.networks = networks;
     }
 
+    public Map<String, CollectionResource> getCollectionResources() {
+        return collectionResources;
+    }
+
+    public void setCollectionResources(Map<String, CollectionResource> collectionResources) {
+        this.collectionResources = collectionResources;
+    }
+
     public Map<String, VnfGroup> getVnfGroups() { return vnfGroups; }
 
     public void setVnfGroups(Map<String, VnfGroup> vnfGroups) { this.vnfGroups = vnfGroups; }
@@ -210,4 +221,20 @@
     public void setExistingVnfGroupCounterMap(Map<String, Long> existingVnfGroupCounterMap) {
         this.existingVnfGroupCounterMap = existingVnfGroupCounterMap;
     }
+
+    public Map<String, Vrf> getVrfs() {
+        return vrfs;
+    }
+
+    public void setVrfs(Map<String, Vrf> vrfs) {
+        this.vrfs = vrfs;
+    }
+
+    public Map<String, Long> getExistingVRFCounterMap() {
+        return existingVRFCounterMap;
+    }
+
+    public void setExistingVRFCounterMap(Map<String, Long> existingVRFCounterMap) {
+        this.existingVRFCounterMap = existingVRFCounterMap;
+    }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/VfModule.java b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/VfModule.java
index 2a4c83b..0db27ea 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/VfModule.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/VfModule.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,8 +20,6 @@
 
 package org.onap.vid.model.aaiTree;
 
-import org.onap.vid.aai.util.AAITreeConverter;
-
 import static org.onap.vid.aai.util.AAITreeConverter.IS_BASE_VF_MODULE;
 
 public class VfModule extends Node {
@@ -30,7 +28,8 @@
     private String volumeGroupName;
 
     public VfModule(AAITreeNode node) {
-        super(node, AAITreeConverter.ModelType.vfModule);
+        super(node);
+        fillCloudConfigurationProperties(this, node.getCloudConfiguration());
     }
 
     public boolean getIsBase() {
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/Vnf.java b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/Vnf.java
index 03c1508..2df5bdc 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/Vnf.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/Vnf.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,21 +20,19 @@
 
 package org.onap.vid.model.aaiTree;
 
-import org.onap.vid.aai.util.AAITreeConverter;
-import org.onap.vid.services.AAITreeNodeBuilder;
+import static org.onap.vid.aai.util.AAITreeConverter.VNF_TYPE;
 
 import java.util.HashMap;
 import java.util.Map;
 
-import static org.onap.vid.aai.util.AAITreeConverter.VNF_TYPE;
-
 public class Vnf extends Node {
 
     private Map<String, Map<String, VfModule>> vfModules = new HashMap<>();
     private Map<String, Network> networks = new HashMap<>();
 
     public Vnf(AAITreeNode node) {
-        super(node, AAITreeConverter.ModelType.vnf);
+        super(node);
+        fillCloudConfigurationProperties(this, node.getCloudConfiguration());
     }
 
     public Map<String, Map<String, VfModule>> getVfModules() {
@@ -60,11 +58,11 @@
         }
 
         node.getChildren().forEach(child -> {
-            if (child.getType().equals(AAITreeNodeBuilder.VF_MODULE)) {
+            if (child.getType() == NodeType.VF_MODULE) {
                 vnf.getVfModules().putIfAbsent(child.getNodeKey(), new HashMap<>());
                 vnf.getVfModules().get(child.getNodeKey())
-                                    .put(child.getUniqueNodeKey(), VfModule.from(child));
-            } else if (child.getType().equals(AAITreeNodeBuilder.NETWORK)) {
+                        .put(child.getUniqueNodeKey(), VfModule.from(child));
+            } else if (child.getType() == NodeType.NETWORK) {
                 vnf.getNetworks().put(child.getUniqueNodeKey(), Network.from(child));
             }
         });
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/VnfGroup.java b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/VnfGroup.java
deleted file mode 100644
index 21e5ca4..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/VnfGroup.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.model.aaiTree;
-
-import org.onap.vid.aai.util.AAITreeConverter;
-
-
-public class VnfGroup extends Node {
-
-    public static final String INSTANCE_GROUP_TYPE = "instance-group-type";
-    public static final String INSTANCE_GROUP_ROLE = "instance-group-role";
-    public static final String INSTANCE_GROUP_FUNCTION = "instance-group-function";
-
-    private String instanceGroupRole;
-    private String instanceGroupFunction;
-
-
-    public VnfGroup(AAITreeNode node) {
-        super(node, AAITreeConverter.ModelType.instanceGroup);
-    }
-
-    public static VnfGroup from(AAITreeNode node) {
-        VnfGroup vnfGroup = new VnfGroup(node);
-        if (node.getAdditionalProperties().get(INSTANCE_GROUP_TYPE) != null) {
-            vnfGroup.setInstanceType(node.getAdditionalProperties().get(INSTANCE_GROUP_TYPE).toString());
-        }
-        if (node.getAdditionalProperties().get(INSTANCE_GROUP_FUNCTION) != null) {
-            vnfGroup.setInstanceGroupFunction(node.getAdditionalProperties().get(INSTANCE_GROUP_FUNCTION).toString());
-        }
-        if (node.getAdditionalProperties().get(INSTANCE_GROUP_ROLE) != null) {
-            vnfGroup.setInstanceGroupRole(node.getAdditionalProperties().get(INSTANCE_GROUP_ROLE).toString());
-        }
-
-        return vnfGroup;
-    }
-
-    public String getInstanceGroupRole() {
-        return instanceGroupRole;
-    }
-
-    public void setInstanceGroupRole(String instanceGroupRole) {
-        this.instanceGroupRole = instanceGroupRole;
-    }
-
-    public String getInstanceGroupFunction() {
-        return instanceGroupFunction;
-    }
-
-    public void setInstanceGroupFunction(String instanceGroupFunction) {
-        this.instanceGroupFunction = instanceGroupFunction;
-    }
-
-
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/VnfGroup.kt b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/VnfGroup.kt
new file mode 100644
index 0000000..47a6c98
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/VnfGroup.kt
@@ -0,0 +1,10 @@
+package org.onap.vid.model.aaiTree
+
+class VnfGroup(node: AAITreeNode) : InstanceGroup(node) {
+
+    val vnfs: Map<String, RelatedVnf> = node.children
+            .filter { it.type == NodeType.GENERIC_VNF }
+            .map { it.uniqueNodeKey to RelatedVnf.from(it) }
+            .toMap()
+
+}
\ No newline at end of file
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/VpnBinding.kt b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/VpnBinding.kt
new file mode 100644
index 0000000..d43bf26
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/VpnBinding.kt
@@ -0,0 +1,50 @@
+package org.onap.vid.model.aaiTree
+
+import com.fasterxml.jackson.annotation.JsonAlias
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties
+import com.fasterxml.jackson.annotation.JsonInclude
+import com.fasterxml.jackson.core.type.TypeReference
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate
+import org.onap.vid.utils.JACKSON_OBJECT_MAPPER
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+class VpnBinding(aaiNode: AAITreeNode) : Node(aaiNode) {
+    @JsonCreator
+    constructor() : this(AAITreeNode())
+    var region: String? = null
+    var customerId: String? = null
+    var routeTargets: List<RouteTarget>? = null
+}
+
+val LOGGER: EELFLoggerDelegate = EELFLoggerDelegate.getLogger(VpnBinding::class.java)
+
+fun from(node: AAITreeNode): VpnBinding {
+    val vpnBinding = VpnBinding(node)
+    vpnBinding.platformName = Node.readValueAsStringFromAdditionalProperties(node, "vpn-platform")
+    vpnBinding.instanceType = Node.readValueAsStringFromAdditionalProperties(node, "vpn-type")
+    vpnBinding.region = Node.readValueAsStringFromAdditionalProperties(node, "vpn-region")
+    vpnBinding.customerId = Node.readValueAsStringFromAdditionalProperties(node, "customer-vpn-id")
+
+    vpnBinding.routeTargets = try {
+        JACKSON_OBJECT_MAPPER.convertValue(
+                node.additionalProperties.getOrDefault("route-targets", emptyList<RouteTarget>()),
+                object : TypeReference<List<RouteTarget>>() {})
+    } catch (exception: Exception) {
+        LOGGER.error("Failed to parse route-targets of vpn with id:${vpnBinding.instanceId}", exception)
+        listOf(RouteTarget("ParsingFailure", "ParsingFailure"))
+    }
+
+    return vpnBinding
+}
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+data class RouteTarget(
+
+        @JsonAlias("global-route-target")
+        val globalRouteTarget: String? = null,
+
+        @JsonAlias("route-target-role")
+        val routeTargetRole: String? = null
+)
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/Vrf.java b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/Vrf.java
new file mode 100644
index 0000000..d6ef7ab
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/model/aaiTree/Vrf.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.model.aaiTree;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class Vrf extends Node {
+
+    private Map<String, Network> networks = new HashMap<>();
+    private Map<String, VpnBinding> vpns = new HashMap<>();
+
+
+    public Vrf(AAITreeNode node){
+        super(node);
+    }
+
+    public static Vrf from(AAITreeNode node) {
+        Vrf vrf = new Vrf(node);
+
+        node.getChildren().forEach(child -> {
+            if (child.getType() == NodeType.NETWORK) {
+                vrf.getNetworks().put(child.getUniqueNodeKey(), Network.from(child));
+            }
+            if (child.getType() == NodeType.VPN_BINDING) {
+                vrf.getVpns().put(child.getUniqueNodeKey(), VpnBindingKt.from(child));
+            }
+        });
+        return vrf;
+    }
+
+    public Map<String, Network> getNetworks() {
+        return networks;
+    }
+
+    public void setNetworks(Map<String, Network> networks) {
+        this.networks = networks;
+    }
+
+    public Map<String, VpnBinding> getVpns() {
+        return vpns;
+    }
+
+    public void setVpns(Map<String, VpnBinding> vpns) {
+        this.vpns = vpns;
+    }
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/errorReport/ReportCreationParameters.java b/vid-app-common/src/main/java/org/onap/vid/model/errorReport/ReportCreationParameters.java
index babbf89..e7b7fa6 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/errorReport/ReportCreationParameters.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/errorReport/ReportCreationParameters.java
@@ -17,6 +17,7 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
+
 package org.onap.vid.model.errorReport;
 
 public class ReportCreationParameters {
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/BaseResource.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/BaseResource.java
index fe9ebc0..926dc3c 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/BaseResource.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/BaseResource.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,25 +20,29 @@
 
 package org.onap.vid.model.serviceInstantiation;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.google.common.collect.ImmutableMap;
 import org.apache.commons.lang3.StringUtils;
 import org.onap.vid.job.JobAdapter;
+import org.onap.vid.job.JobType;
 import org.onap.vid.model.Action;
 import org.onap.vid.mso.model.ModelInfo;
 
+import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
 public abstract class BaseResource implements JobAdapter.AsyncJobRequest {
 
-	protected final String instanceId;
+	protected String instanceId;
+
 	protected ModelInfo modelInfo;
 
 	protected String instanceName;
 
-	protected final Action action;
+	protected Action action;
 
 	protected String lcpCloudRegionId;
 
@@ -48,13 +52,21 @@
 
 	protected boolean rollbackOnFailure;
 
-	private static final Map<String, Action> actionStingToEnumMap = ImmutableMap.of(
-			"Delete", Action.Delete,
-			"Create", Action.Create,
-			"None", Action.None,
-			"Update_Delete", Action.Delete,
-			"None_Delete", Action.Delete
-	);
+	protected String trackById;
+
+	protected Boolean isFailed;
+
+	protected String statusMessage;
+
+	private static final Map<String, Action> actionStingToEnumMap = ImmutableMap.<String, Action>builder()
+			.put("Delete", Action.Delete)
+			.put("Create", Action.Create)
+			.put("None", Action.None)
+			.put("Update_Delete", Action.Delete)
+			.put("None_Delete", Action.Delete)
+			.put("Resume", Action.Resume)
+			.put("Replace", Action.Replace)
+			.build();
 
 
 	protected BaseResource(@JsonProperty("modelInfo") ModelInfo modelInfo,
@@ -65,16 +77,22 @@
 						   @JsonProperty("tenantId") String tenantId,
 						   @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
 						   @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
-						   @JsonProperty("instanceId") String instanceId) {
+						   @JsonProperty("instanceId") String instanceId,
+						   @JsonProperty("trackById") String trackById,
+						   @JsonProperty("isFailed") Boolean isFailed,
+						   @JsonProperty("statusMessage") String statusMessage) {
 		this.modelInfo = modelInfo;
 		this.modelInfo.setModelType(getModelType());
 		this.rollbackOnFailure = rollbackOnFailure;
-		this.instanceName = StringUtils.defaultString(instanceName, "");;
+		this.instanceName = StringUtils.defaultString(instanceName, "");
 		this.action = actionStringToEnum(action);
 		this.lcpCloudRegionId = StringUtils.isNotEmpty(legacyRegion) ? legacyRegion : lcpCloudRegionId;
 		this.tenantId = tenantId;
 		this.instanceParams = instanceParams;
 		this.instanceId = instanceId;
+		this.trackById = trackById;
+		this.isFailed = isFailed!= null ? isFailed: false;
+		this.statusMessage = statusMessage;
 	}
 
 	private Action actionStringToEnum(String actionAsString) {
@@ -90,7 +108,7 @@
 	}
 
 	public Action getAction() {
-		return action;
+		return (action == null ? Action.Create : action);
 	}
 
 	public String getLcpCloudRegionId() {
@@ -105,11 +123,49 @@
 		return instanceParams == null ? Collections.emptyList() : instanceParams;
 	}
 
-    public boolean isRollbackOnFailure() { return rollbackOnFailure; }
+	public boolean isRollbackOnFailure() { return rollbackOnFailure; }
 
 	public String getInstanceId() {
 		return instanceId;
 	}
 
 	protected abstract String getModelType();
+
+	public String getTrackById() {
+		return trackById;
+	}
+
+	public void setTrackById(String trackById) {
+		this.trackById = trackById;
+	}
+
+	public Boolean getIsFailed() {
+		return isFailed;
+	}
+
+	public void setIsFailed(Boolean isFailed) {
+		this.isFailed = isFailed;
+	}
+
+	public void setInstanceId(String instanceId) {
+		this.instanceId = instanceId;
+	}
+
+	public void setAction(Action action) {
+		this.action = action;
+	}
+
+	public String getStatusMessage() {
+		return statusMessage;
+	}
+
+	public void setStatusMessage(String statusMessage) {
+		this.statusMessage = statusMessage;
+	}
+
+	@JsonIgnore
+	public abstract Collection<? extends BaseResource> getChildren();
+
+	@JsonIgnore
+	public abstract JobType getJobType();
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroup.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroup.java
index 3fda842..b945f13 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroup.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroup.java
@@ -7,9 +7,9 @@
  * 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.
@@ -22,21 +22,47 @@
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 import org.onap.vid.job.JobAdapter;
+import org.onap.vid.job.JobType;
 import org.onap.vid.mso.model.ModelInfo;
 
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+
 public class InstanceGroup extends BaseResource implements JobAdapter.AsyncJobRequest {
 
+    private final  Map<String, InstanceGroupMember> vnfGroupMembers;
+
     public InstanceGroup(@JsonProperty("modelInfo") ModelInfo modelInfo,
                          @JsonProperty("instanceName") String instanceName,
                          @JsonProperty("action") String action,
                          @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
-                         @JsonProperty("instanceId") String instanceId) {
+                         @JsonProperty("instanceId") String instanceId,
+                         @JsonProperty("vnfs") Map<String, InstanceGroupMember> vnfGroupMembers,
+                         @JsonProperty("trackById") String trackById,
+                         @JsonProperty("isFailed") Boolean isFailed,
+                         @JsonProperty("statusMessage") String statusMessage) {
 
-        super(modelInfo, instanceName, action, null, null, null, null, rollbackOnFailure, instanceId);
+        super(modelInfo, instanceName, action, null, null, null, null, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage);
+        this.vnfGroupMembers = vnfGroupMembers;
     }
 
     @Override
     protected String getModelType() {
         return "instanceGroup";
     }
+
+    @Override
+    public Collection<InstanceGroupMember> getChildren() {
+        return getVnfGroupMembers().values();
+    }
+
+    public Map<String, InstanceGroupMember> getVnfGroupMembers() {
+        return vnfGroupMembers == null ? Collections.emptyMap() : vnfGroupMembers;
+    }
+
+    @Override
+    public JobType getJobType() {
+        return JobType.InstanceGroup;
+    }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroupMember.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroupMember.java
new file mode 100644
index 0000000..7bfaf02
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroupMember.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.model.serviceInstantiation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Collection;
+import java.util.Collections;
+import org.onap.vid.job.JobAdapter;
+import org.onap.vid.job.JobType;
+import org.onap.vid.mso.model.ModelInfo;
+
+public class InstanceGroupMember extends BaseResource implements JobAdapter.AsyncJobRequest{
+
+    public InstanceGroupMember(@JsonProperty("instanceId") String instanceId,
+                               @JsonProperty("action") String action,
+                               @JsonProperty("trackById") String trackById,
+                               @JsonProperty("isFailed") Boolean isFailed,
+                               @JsonProperty("statusMessage") String statusMessage) {
+        super(new ModelInfo(), null, action, null, null, null, null, false, instanceId, trackById, isFailed, statusMessage);
+    }
+
+    @Override
+    protected String getModelType() {
+        return "vnf";
+    }
+
+    @Override
+    public Collection<BaseResource> getChildren() {
+        return Collections.emptyList();
+    }
+
+    @Override
+    public JobType getJobType() {
+        return JobType.InstanceGroupMember;
+    }
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Network.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Network.java
index addd7e1..797e28a 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Network.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Network.java
@@ -2,14 +2,14 @@
  * ============LICENSE_START=======================================================
  * VID
  * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,8 +22,11 @@
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 import org.onap.vid.job.JobAdapter;
+import org.onap.vid.job.JobType;
 import org.onap.vid.mso.model.ModelInfo;
 
+import java.util.Collection;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
@@ -36,19 +39,22 @@
 	private final String lineOfBusiness;
 
 	public Network(@JsonProperty("modelInfo") ModelInfo modelInfo,
-                   @JsonProperty("productFamilyId") String productFamilyId,
-                   @JsonProperty("instanceName") String instanceName,
+				   @JsonProperty("productFamilyId") String productFamilyId,
+				   @JsonProperty("instanceName") String instanceName,
 				   @JsonProperty("action") String action,
-                   @JsonProperty("platformName") String platformName,
-                   @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
+				   @JsonProperty("platformName") String platformName,
+				   @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
 				   @JsonProperty("legacyRegion") String legacyRegion,
-                   @JsonProperty("tenantId") String tenantId,
-                   @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
-                   @JsonProperty("lineOfBusinessName") String lineOfBusiness,
-                   @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
-				   @JsonProperty("instanceId") String instanceId) {
+				   @JsonProperty("tenantId") String tenantId,
+				   @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
+				   @JsonProperty("lineOfBusinessName") String lineOfBusiness,
+				   @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
+				   @JsonProperty("instanceId") String instanceId,
+				   @JsonProperty("trackById") String trackById,
+				   @JsonProperty("isFailed") Boolean isFailed,
+				   @JsonProperty("statusMessage") String statusMessage) {
 
-		super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId);
+		super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage);
 		this.productFamilyId = productFamilyId;
 		this.platformName = platformName;
 		this.lineOfBusiness = lineOfBusiness;
@@ -71,4 +77,14 @@
 		return "network";
 	}
 
+	@Override
+	public Collection<BaseResource> getChildren() {
+		return Collections.emptyList();
+	}
+
+	@Override
+	public JobType getJobType() {
+		return JobType.NetworkInstantiation;
+	}
+
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiation.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiation.java
index 5d96313..afc8534 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiation.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiation.java
@@ -7,9 +7,9 @@
  * 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.
@@ -21,12 +21,18 @@
 package org.onap.vid.model.serviceInstantiation;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.commons.lang3.ObjectUtils;
 import org.onap.vid.job.JobAdapter;
+import org.onap.vid.job.JobType;
+import org.onap.vid.model.VidNotions;
 import org.onap.vid.mso.model.ModelInfo;
 
+import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 public class ServiceInstantiation extends BaseResource implements JobAdapter.AsyncJobRequest {
 
@@ -58,12 +64,15 @@
 
     private final boolean isPause;
 
-    private final int bulkSize;
+    private int bulkSize;
 
     private final String testApi;
 
     private final boolean isALaCarte;
 
+    private final VidNotions vidNotions;
+    private Map<String, VrfEntry> vrfs;
+
     public ServiceInstantiation(@JsonProperty("modelInfo") ModelInfo modelInfo,
                                 @JsonProperty("owningEntityId") String owningEntityId,
                                 @JsonProperty("owningEntityName") String owningEntityName,
@@ -82,6 +91,7 @@
                                 @JsonProperty("vnfs") Map<String, Vnf> vnfs,
                                 @JsonProperty("networks") Map<String, Network> networks,
                                 @JsonProperty("vnfGroups") Map<String, InstanceGroup> vnfGroups,
+                                @JsonProperty("vrfs") Map<String, VrfEntry> vrfs,
                                 @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
                                 @JsonProperty("pause") boolean isPause,
                                 @JsonProperty("bulkSize") int bulkSize,
@@ -89,9 +99,12 @@
                                 @JsonProperty("isALaCarte") boolean isALaCarte,
                                 @JsonProperty("testApi") String testApi,
                                 @JsonProperty("instanceId") String instanceId,
-                                @JsonProperty("action") String action
-                               ) {
-        super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId);
+                                @JsonProperty("action") String action,
+                                @JsonProperty("trackById") String trackById,
+                                @JsonProperty("isFailed") Boolean isFailed,
+                                @JsonProperty("statusMessage") String statusMessage,
+                                @JsonProperty("vidNotions") VidNotions vidNotions) {
+        super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage);
         this.owningEntityId = owningEntityId;
         this.owningEntityName = owningEntityName;
         this.projectName = projectName;
@@ -105,12 +118,15 @@
         this.vnfs = vnfs;
         this.networks = networks;
         this.vnfGroups = vnfGroups;
+        this.vrfs = vrfs;
         this.isPause = isPause;
         this.bulkSize = bulkSize;
         this.isALaCarte = isALaCarte;
         this.testApi = isALaCarte ? testApi : null;
+        this.vidNotions = vidNotions;
     }
 
+
     public String getOwningEntityId() {
         return owningEntityId;
     }
@@ -152,15 +168,19 @@
     }
 
     public Map<String, Vnf> getVnfs() {
-        return vnfs == null ? Collections.emptyMap() : vnfs;
+        return emptyMapIfNull(vnfs);
     }
 
     public Map<String, Network> getNetworks() {
-        return networks == null ? Collections.emptyMap() : networks;
+        return emptyMapIfNull(networks);
     }
 
     public Map<String, InstanceGroup> getVnfGroups() {
-        return vnfGroups == null ? Collections.emptyMap() : vnfGroups;
+        return emptyMapIfNull(vnfGroups);
+    }
+
+    public Map<String, VrfEntry> getVrfs() {
+        return emptyMapIfNull(vrfs);
     }
 
     public boolean isPause() {
@@ -169,11 +189,24 @@
 
     public int getBulkSize() { return bulkSize; }
 
+    public void setBulkSize(int bulkSize) {
+        this.bulkSize = bulkSize;
+    }
+
+    public VidNotions getVidNotions() {
+        return vidNotions;
+    }
+
     @Override
     protected String getModelType() {
         return "service";
     }
 
+    @Override
+    public Collection<BaseResource> getChildren() {
+        return Stream.of(getNetworks().values(), getVnfs().values(), getVnfGroups().values()).flatMap(Collection::stream).collect(Collectors.toList());
+    }
+
     @JsonProperty("isALaCarte")
     public boolean isALaCarte() {
         return isALaCarte;
@@ -183,4 +216,13 @@
         return this.testApi;
     }
 
-}
+    @Override
+    public JobType getJobType() {
+        return JobType.ALaCarteService;
+    }
+
+    private <T> Map<String, T> emptyMapIfNull(Map<String, T> map) {
+        return ObjectUtils.defaultIfNull(map, Collections.emptyMap());
+    }
+
+}
\ No newline at end of file
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java
index b56f116..97b23af 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java
@@ -2,14 +2,14 @@
  * ============LICENSE_START=======================================================
  * VID
  * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,8 +23,11 @@
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import org.onap.vid.job.JobAdapter;
+import org.onap.vid.job.JobType;
 import org.onap.vid.mso.model.ModelInfo;
 
+import java.util.Collection;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
@@ -37,22 +40,25 @@
 public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest {
 
 	@JsonInclude(NON_NULL) private final String volumeGroupInstanceName;
-	private boolean usePreload;
+	@JsonInclude(NON_NULL) private Boolean usePreload;
 	private Map<String, String> supplementaryParams;
 
 	public VfModule( @JsonProperty("modelInfo") ModelInfo modelInfo,
-                     @JsonProperty("instanceName") String instanceName,
-                     @JsonProperty("volumeGroupName") String volumeGroupInstanceName,
+					 @JsonProperty("instanceName") String instanceName,
+					 @JsonProperty("volumeGroupName") String volumeGroupInstanceName,
 					 @JsonProperty("action") String action,
-                     @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
-                     @JsonProperty("legacyRegion") String legacyRegion,
-                     @JsonProperty("tenantId") String tenantId,
-                     @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
-                     @JsonProperty("supplementaryFileContent") Map<String, String> supplementaryParams,
-                     @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
-                     @JsonProperty("sdncPreLoad") boolean usePreload,
-					 @JsonProperty("instanceId") String instanceId) {
-		super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId);
+					 @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
+					 @JsonProperty("legacyRegion") String legacyRegion,
+					 @JsonProperty("tenantId") String tenantId,
+					 @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
+					 @JsonProperty("supplementaryFileContent") Map<String, String> supplementaryParams,
+					 @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
+					 @JsonProperty("sdncPreLoad") Boolean usePreload,
+					 @JsonProperty("instanceId") String instanceId,
+					 @JsonProperty("trackById") String trackById,
+					 @JsonProperty("isFailed") Boolean isFailed,
+					 @JsonProperty("statusMessage") String statusMessage) {
+		super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage);
 		this.volumeGroupInstanceName = volumeGroupInstanceName;
 		this.usePreload = usePreload;
 		this.supplementaryParams = supplementaryParams;
@@ -62,7 +68,8 @@
 		return volumeGroupInstanceName;
 	}
 
-	public boolean isUsePreload() {
+	public Boolean isUsePreload() {
+
 		return usePreload;
 	}
 
@@ -75,5 +82,13 @@
 		return "vfModule";
 	}
 
+	@Override
+	public Collection<BaseResource> getChildren() {
+		return Collections.emptyList();
+	}
 
-}
+	@Override
+	public JobType getJobType() {
+		return JobType.VfmoduleInstantiation;
+	}
+}
\ No newline at end of file
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Vnf.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Vnf.java
index 2619533..0da3f06 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Vnf.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Vnf.java
@@ -2,14 +2,14 @@
  * ============LICENSE_START=======================================================
  * VID
  * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,10 +23,12 @@
 
 import com.fasterxml.jackson.annotation.JsonProperty;
 import org.onap.vid.job.JobAdapter;
+import org.onap.vid.job.JobType;
 import org.onap.vid.mso.model.ModelInfo;
 
-import java.util.List;
-import java.util.Map;
+import java.util.*;
+
+import static java.util.stream.Collectors.toList;
 
 /**
  * The Class VNF.
@@ -42,24 +44,27 @@
 	private final Map<String, Map<String, VfModule>> vfModules;
 
 	public Vnf(@JsonProperty("modelInfo") ModelInfo modelInfo,
-               @JsonProperty("productFamilyId") String productFamilyId,
-               @JsonProperty("instanceName") String instanceName,
+			   @JsonProperty("productFamilyId") String productFamilyId,
+			   @JsonProperty("instanceName") String instanceName,
 			   @JsonProperty("action") String action,
-               @JsonProperty("platformName") String platformName,
-               @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
-               @JsonProperty("legacyRegion") String legacyRegion,
-               @JsonProperty("tenantId") String tenantId,
-               @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
-               @JsonProperty("lineOfBusinessName") String lineOfBusiness,
-               @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
+			   @JsonProperty("platformName") String platformName,
+			   @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
+			   @JsonProperty("legacyRegion") String legacyRegion,
+			   @JsonProperty("tenantId") String tenantId,
+			   @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
+			   @JsonProperty("lineOfBusinessName") String lineOfBusiness,
+			   @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
 			   @JsonProperty("instanceId") String instanceId,
-               @JsonProperty("vfModules") Map<String, Map<String, VfModule>> vfModules) {
+			   @JsonProperty("vfModules") Map<String, Map<String, VfModule>> vfModules,
+			   @JsonProperty("trackById") String trackById,
+			   @JsonProperty("isFailed") Boolean isFailed,
+			   @JsonProperty("statusMessage") String statusMessage) {
 
-		super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId);
+		super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage);
 		this.productFamilyId = productFamilyId;
 		this.platformName = platformName;
 		this.lineOfBusiness = lineOfBusiness;
-		this.vfModules = vfModules;
+		this.vfModules = vfModules==null ? Collections.emptyMap() : vfModules;
 	}
 
 	public String getProductFamilyId() {
@@ -82,4 +87,17 @@
 	protected String getModelType() {
 		return "vnf";
 	}
+
+	@Override
+	public Collection<BaseResource> getChildren() {
+		return getVfModules().values().stream()
+				.filter(Objects::nonNull)
+				.flatMap(x->x.values().stream())
+				.collect(toList());
+	}
+
+	@Override
+	public JobType getJobType() {
+		return JobType.VnfInstantiation;
+	}
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VrfEntry.kt b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VrfEntry.kt
new file mode 100644
index 0000000..5c9ac90
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VrfEntry.kt
@@ -0,0 +1,6 @@
+package org.onap.vid.model.serviceInstantiation
+
+import org.onap.vid.model.aaiTree.Network
+import org.onap.vid.model.aaiTree.VpnBinding
+
+data class VrfEntry(val networks: Map<String, Network>, val vpns: Map<String, VpnBinding>)
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java
index cc32315..949fdab 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java
@@ -21,10 +21,11 @@
 
 package org.onap.vid.mso;
 
+import java.util.List;
+import java.util.UUID;
 import org.onap.vid.changeManagement.RequestDetailsWrapper;
 import org.onap.vid.changeManagement.WorkflowRequestDetail;
 import org.onap.vid.controller.OperationalEnvironmentController;
-import org.onap.vid.services.ProbeInterface;
 import org.onap.vid.model.SOWorkflowList;
 import org.onap.vid.model.SoftDeleteRequest;
 import org.onap.vid.mso.model.OperationalEnvironmentActivateInfo;
@@ -33,9 +34,7 @@
 import org.onap.vid.mso.rest.Request;
 import org.onap.vid.mso.rest.RequestDetails;
 import org.onap.vid.mso.rest.Task;
-
-import java.util.List;
-import java.util.UUID;
+import org.onap.vid.services.ProbeInterface;
 
 public interface MsoBusinessLogic extends ProbeInterface {
 
@@ -137,9 +136,5 @@
 
     RequestDetails buildRequestDetailsForSoftDelete(SoftDeleteRequest softDeleteRequest);
 
-    MsoResponseWrapper2 deactivateAndCloudDelete(String serviceInstanceId, String vnfInstanceId, String vfModuleInstanceId, RequestDetails requestDetails);
-
-    MsoResponseWrapper2 activateFabricConfiguration(String serviceInstanceId, RequestDetails requestDetails);
-
     SOWorkflowList getWorkflowListByModelId(String modelVersionId);
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java
index 4cb495e..9146e8f 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java
@@ -20,6 +20,24 @@
  */
 package org.onap.vid.mso;
 
+import static com.fasterxml.jackson.module.kotlin.ExtensionsKt.jacksonObjectMapper;
+import static java.util.stream.Collectors.collectingAndThen;
+import static java.util.stream.Collectors.toList;
+import static org.apache.commons.lang.StringUtils.upperCase;
+import static org.onap.vid.changeManagement.ChangeManagementRequest.MsoChangeManagementRequest;
+import static org.onap.vid.controller.MsoController.CONFIGURATION_ID;
+import static org.onap.vid.controller.MsoController.REQUEST_TYPE;
+import static org.onap.vid.controller.MsoController.SVC_INSTANCE_ID;
+import static org.onap.vid.controller.MsoController.VNF_INSTANCE_ID;
+import static org.onap.vid.controller.MsoController.WORKFLOW_ID;
+import static org.onap.vid.mso.MsoProperties.MSO_REST_API_CLOUD_RESOURCES_REQUEST_STATUS;
+import static org.onap.vid.mso.MsoProperties.MSO_REST_API_OPERATIONAL_ENVIRONMENT_ACTIVATE;
+import static org.onap.vid.mso.MsoProperties.MSO_REST_API_OPERATIONAL_ENVIRONMENT_CREATE;
+import static org.onap.vid.mso.MsoProperties.MSO_REST_API_OPERATIONAL_ENVIRONMENT_DEACTIVATE;
+import static org.onap.vid.mso.MsoProperties.MSO_REST_API_WORKFLOW_SPECIFICATIONS;
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
+import static org.onap.vid.utils.Logging.debugRequestDetails;
+
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonValue;
 import com.fasterxml.jackson.databind.DeserializationFeature;
@@ -27,6 +45,18 @@
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import io.joshworks.restclient.http.HttpResponse;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.UUID;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import javax.ws.rs.BadRequestException;
 import org.apache.commons.collections4.ListUtils;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.portalsdk.core.util.SystemProperties;
@@ -35,7 +65,6 @@
 import org.onap.vid.changeManagement.WorkflowRequestDetail;
 import org.onap.vid.controller.OperationalEnvironmentController;
 import org.onap.vid.exceptions.GenericUncheckedException;
-import org.onap.vid.model.RequestReferencesContainer;
 import org.onap.vid.model.SOWorkflowList;
 import org.onap.vid.model.SoftDeleteRequest;
 import org.onap.vid.model.probes.ExternalComponentStatus;
@@ -58,37 +87,6 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpMethod;
 import org.springframework.http.HttpStatus;
-import org.togglz.core.manager.FeatureManager;
-
-import javax.ws.rs.BadRequestException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.UUID;
-import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import static java.util.stream.Collectors.collectingAndThen;
-import static java.util.stream.Collectors.toList;
-import static org.apache.commons.lang.StringUtils.upperCase;
-import static org.onap.vid.changeManagement.ChangeManagementRequest.MsoChangeManagementRequest;
-import static org.onap.vid.controller.MsoController.CONFIGURATION_ID;
-import static org.onap.vid.controller.MsoController.REQUEST_TYPE;
-import static org.onap.vid.controller.MsoController.SVC_INSTANCE_ID;
-import static org.onap.vid.controller.MsoController.VNF_INSTANCE_ID;
-import static org.onap.vid.controller.MsoController.WORKFLOW_ID;
-import static org.onap.vid.mso.MsoProperties.MSO_REST_API_CLOUD_RESOURCES_REQUEST_STATUS;
-import static org.onap.vid.mso.MsoProperties.MSO_REST_API_OPERATIONAL_ENVIRONMENT_ACTIVATE;
-import static org.onap.vid.mso.MsoProperties.MSO_REST_API_OPERATIONAL_ENVIRONMENT_CREATE;
-import static org.onap.vid.mso.MsoProperties.MSO_REST_API_OPERATIONAL_ENVIRONMENT_DEACTIVATE;
-import static org.onap.vid.mso.MsoProperties.MSO_REST_API_WORKFLOW_SPECIFICATIONS;
-import static org.onap.vid.properties.Features.FLAG_UNASSIGN_SERVICE;
-import static org.onap.vid.utils.Logging.debugRequestDetails;
 
 public class MsoBusinessLogicImpl implements MsoBusinessLogic {
 
@@ -120,12 +118,10 @@
      * This should be replaced with mso client factory.
      */
     private final MsoInterface msoClientInterface;
-    FeatureManager featureManager;
 
     @Autowired
-    public MsoBusinessLogicImpl(MsoInterface msoClientInterface, FeatureManager featureManager) {
+    public MsoBusinessLogicImpl(MsoInterface msoClientInterface) {
         this.msoClientInterface = msoClientInterface;
-        this.featureManager = featureManager;
     }
 
     public static String validateEndpointPath(String endpointEnvVariable) {
@@ -168,17 +164,19 @@
     public MsoResponseWrapper createNwInstance(RequestDetails requestDetails, String serviceInstanceId) {
         logInvocationInDebug("createNwInstance");
 
-        String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_NETWORK_INSTANCE);
+        String endpoint;
+        endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_NETWORK_INSTANCE);
 
-        String nw_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
-        return msoClientInterface.createNwInstance(requestDetails, nw_endpoint);
+        String nwEndpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
+        return msoClientInterface.createNwInstance(requestDetails, nwEndpoint);
     }
 
     @Override
     public MsoResponseWrapper createVolumeGroupInstance(RequestDetails requestDetails, String serviceInstanceId, String vnfInstanceId) {
         logInvocationInDebug("createVolumeGroupInstance");
 
-        String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE);
+        String endpoint;
+        endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE);
 
         String vnfEndpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
         vnfEndpoint = vnfEndpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
@@ -192,10 +190,10 @@
 
         String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE);
 
-        String partial_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
-        String vf_module_endpoint = partial_endpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
+        String partialEndpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
+        String vfModuleEndpoint = partialEndpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
 
-        return msoClientInterface.createVfModuleInstance(requestDetails, vf_module_endpoint);
+        return msoClientInterface.createVfModuleInstance(requestDetails, vfModuleEndpoint);
     }
 
     @Override
@@ -259,19 +257,15 @@
         logInvocationInDebug("deleteSvcInstance");
         String endpoint;
 
-        if (featureManager.isActive(FLAG_UNASSIGN_SERVICE)) {
-            endpoint = validateEndpointPath(MsoProperties.MSO_DELETE_OR_UNASSIGN_REST_API_SVC_INSTANCE);
-            if (shouldUnassignService(serviceStatus)) {
-                logger.debug(EELFLoggerDelegate.debugLogger, "unassign service");
-                String svc_endpoint = endpoint + "/" + serviceInstanceId + "/unassign";
-                return msoClientInterface.unassignSvcInstance(requestDetails, svc_endpoint);
-            }
-        } else {
-            endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_SVC_INSTANCE);
+        endpoint = validateEndpointPath(MsoProperties.MSO_DELETE_OR_UNASSIGN_REST_API_SVC_INSTANCE);
+        if (shouldUnassignService(serviceStatus)){
+            logger.debug(EELFLoggerDelegate.debugLogger, "unassign service");
+            String svcEndpoint = endpoint + "/" + serviceInstanceId + "/unassign";
+            return msoClientInterface.unassignSvcInstance(requestDetails, svcEndpoint);
         }
 
-        String svc_endpoint = endpoint + "/" + serviceInstanceId;
-        return msoClientInterface.deleteSvcInstance(requestDetails, svc_endpoint);
+        String svcEndpoint = endpoint + "/" + serviceInstanceId;
+        return msoClientInterface.deleteSvcInstance(requestDetails, svcEndpoint);
     }
 
     private boolean shouldUnassignService(String serviceStatus) {
@@ -294,10 +288,10 @@
         logInvocationInDebug("deleteVfModule");
 
         String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE);
-        String vf__modules_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId).replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
-        String delete_vf_endpoint = vf__modules_endpoint + '/' + vfModuleId;
+        String vfModulesEndpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId).replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
+        String deleteVfEndpoint = vfModulesEndpoint + '/' + vfModuleId;
 
-        return msoClientInterface.deleteVfModule(requestDetails, delete_vf_endpoint);
+        return msoClientInterface.deleteVfModule(requestDetails, deleteVfEndpoint);
     }
 
     @Override
@@ -305,11 +299,11 @@
         logInvocationInDebug("deleteVolumeGroupInstance");
 
         String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE);
-        String svc_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
-        String vnfEndpoint = svc_endpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
-        String delete_volume_group_endpoint = vnfEndpoint + "/" + volumeGroupId;
+        String svcEndpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
+        String vnfEndpoint = svcEndpoint.replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
+        String deleteVolumeGroupEndpoint = vnfEndpoint + "/" + volumeGroupId;
 
-        return msoClientInterface.deleteVolumeGroupInstance(requestDetails, delete_volume_group_endpoint);
+        return msoClientInterface.deleteVolumeGroupInstance(requestDetails, deleteVolumeGroupEndpoint);
     }
 
     @Override
@@ -317,10 +311,10 @@
         logInvocationInDebug("deleteNwInstance");
 
         String endpoint = validateEndpointPath(MsoProperties.MSO_REST_API_NETWORK_INSTANCE);
-        String svc_endpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
-        String delete_nw_endpoint = svc_endpoint + "/" + networkInstanceId;
+        String svcEndpoint = endpoint.replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
+        String deleteNwEndpoint = svcEndpoint + "/" + networkInstanceId;
 
-        return msoClientInterface.deleteNwInstance(requestDetails, delete_nw_endpoint);
+        return msoClientInterface.deleteNwInstance(requestDetails, deleteNwEndpoint);
     }
 
     @Override
@@ -400,7 +394,7 @@
     private List<RequestWrapper> deserializeOrchestrationRequestsJson(String orchestrationRequestsJson) {
         logInvocationInDebug("deserializeOrchestrationRequestsJson");
 
-        ObjectMapper mapper = new ObjectMapper();
+        ObjectMapper mapper = jacksonObjectMapper();
         mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
         mapper.configure(DeserializationFeature.READ_ENUMS_USING_TO_STRING, true);
         RequestList requestList;
@@ -423,7 +417,7 @@
             String path = p + "?originalRequestId=" + originalRequestId;
 
             RestObject<String> restObjStr = new RestObject<>();
-            String str = new String();
+            String str = "";
             restObjStr.set(str);
 
             MsoResponseWrapper msoResponseWrapper = msoClientInterface.getManualTasksByRequestId(str, "", path, restObjStr);
@@ -438,9 +432,8 @@
     private List<Task> deserializeManualTasksJson(String manualTasksJson) {
         logInvocationInDebug("deserializeManualTasksJson");
 
-        ObjectMapper mapper = new ObjectMapper();
         try {
-            TaskList taskList = mapper.readValue(manualTasksJson, TaskList.class);
+            TaskList taskList = JACKSON_OBJECT_MAPPER.readValue(manualTasksJson, TaskList.class);
             return taskList.getTaskList();
         } catch (IOException e) {
             throw new GenericUncheckedException(e);
@@ -457,7 +450,7 @@
             String path = p + "/" + taskId + "/complete";
 
             RestObject<String> restObjStr = new RestObject<>();
-            String str = new String();
+            String str = "";
             restObjStr.set(str);
 
             return msoClientInterface.completeManualTask(requestDetails, str, "", path, restObjStr);
@@ -561,9 +554,7 @@
         requestInfo.setRequestorId(softDeleteRequest.getUserId());
         requestDetails.setRequestInfo(requestInfo);
 
-        CloudConfiguration cloudConfiguration = new CloudConfiguration();
-        cloudConfiguration.setTenantId(softDeleteRequest.getTenantId());
-        cloudConfiguration.setLcpCloudRegionId(softDeleteRequest.getLcpCloudRegionId());
+        CloudConfiguration cloudConfiguration = new CloudConfiguration(softDeleteRequest.getLcpCloudRegionId(), softDeleteRequest.getTenantId(), null);
         requestDetails.setCloudConfiguration(cloudConfiguration);
 
         ModelInfo modelInfo = new ModelInfo();
@@ -578,18 +569,6 @@
     }
 
     @Override
-    public MsoResponseWrapper2 deactivateAndCloudDelete(String serviceInstanceId, String vnfInstanceId, String vfModuleInstanceId, RequestDetails requestDetails) {
-        String path = getDeactivateAndCloudDeletePath(serviceInstanceId, vnfInstanceId, vfModuleInstanceId);
-        return new MsoResponseWrapper2<>(msoClientInterface.post(path, requestDetails, RequestReferencesContainer.class));
-    }
-
-    @Override
-    public MsoResponseWrapper2 activateFabricConfiguration(String serviceInstanceId, RequestDetails requestDetails) {
-        String path = getActivateFabricConfigurationPath(serviceInstanceId);
-        return new MsoResponseWrapper2<>(msoClientInterface.post(path, requestDetails, RequestReferencesContainer.class));
-    }
-
-    @Override
     public SOWorkflowList getWorkflowListByModelId(String modelVersionId) {
         logInvocationInDebug("getWorkflowListByModelId");
         String pathTemplate = validateEndpointPath(MSO_REST_API_WORKFLOW_SPECIFICATIONS);
@@ -634,7 +613,7 @@
         }
         Object payloadRaw = requestDetails.getRequestParameters().getAdditionalProperties().get("payload");
         try {
-            return objectMapper.readValue((String) payloadRaw, Map.class);
+            return JACKSON_OBJECT_MAPPER.readValue((String) payloadRaw, Map.class);
         } catch (Exception exception) {
             throw new BadRequestException(message);
         }
@@ -912,7 +891,7 @@
         }
     }
 
-    enum RequestType {
+    public enum RequestType {
 
         CREATE_INSTANCE("createInstance"),
         DELETE_INSTANCE("deleteInstance"),
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java
index 562182a..fcc20fa 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java
@@ -21,15 +21,20 @@
 
 package org.onap.vid.mso;
 
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
+
+import com.fasterxml.jackson.core.JsonParseException;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import io.joshworks.restclient.http.HttpResponse;
+import java.io.IOException;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.exception.ExceptionUtils;
-
+import org.onap.vid.exceptions.GenericUncheckedException;
 
 public class MsoUtil {
 
-    final static ObjectMapper objectMapper = new ObjectMapper();
+    static final ObjectMapper objectMapper = new ObjectMapper();
 
     private MsoUtil() {
     }
@@ -48,12 +53,30 @@
                 T body = httpResponse.getBody();
                 String entityStr = body instanceof String ? (String) body : objectMapper.writeValueAsString(httpResponse.getBody());
                 msoResponseWrapper.setEntity(entityStr);
-            }
-            catch(JsonProcessingException e)
-            {
+            } catch(JsonProcessingException e) {
                 ExceptionUtils.rethrow(e);
             }
         }
         return msoResponseWrapper;
     }
+
+    public static String formatExceptionAdditionalInfo(int statusCode, String msoResponse) {
+        String errorMsg = "Http Code:" + statusCode;
+        if (!StringUtils.isEmpty(msoResponse)) {
+            String filteredJson;
+            try {
+                filteredJson = StringUtils.defaultIfEmpty(
+                        JACKSON_OBJECT_MAPPER.readTree(msoResponse).path("serviceException").toString().replaceAll("[\\{\\}]","") ,
+                        msoResponse
+                );
+            } catch (JsonParseException e) {
+                filteredJson = msoResponse;
+            } catch (IOException e) {
+                throw new GenericUncheckedException(e);
+            }
+
+            errorMsg = errorMsg + ", " + filteredJson;
+        }
+        return errorMsg;
+    }
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/model/AddOrRemoveInstanceGroupMemberRequestDetails.java b/vid-app-common/src/main/java/org/onap/vid/mso/model/AddOrRemoveInstanceGroupMemberRequestDetails.java
new file mode 100644
index 0000000..f6b8a42
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/model/AddOrRemoveInstanceGroupMemberRequestDetails.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.mso.model;
+
+import java.util.List;
+
+/*
+Based on this model:
+{
+  "requestDetails": {
+    "requestInfo": {
+      "source": "VID",
+      "requestorId": "az2016"
+    },
+    "relatedInstanceList": [
+      {
+        "relatedInstance": {
+          "instanceId": "{the to be removed/added as member vnf-id}",
+          "modelInfo": {
+            "modelType": "vnf"
+          }
+        }
+      }
+    ]
+  }
+}
+*/
+
+public class AddOrRemoveInstanceGroupMemberRequestDetails extends BaseResourceInstantiationRequestDetails {
+    public AddOrRemoveInstanceGroupMemberRequestDetails(RequestInfo requestInfo, List<RelatedInstance> relatedInstanceList) {
+        super(null, null, requestInfo, null, null, relatedInstanceList, null);
+    }
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/model/BaseResourceInstantiationRequestDetails.java b/vid-app-common/src/main/java/org/onap/vid/mso/model/BaseResourceInstantiationRequestDetails.java
index c6eb538..43f5b00 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/model/BaseResourceInstantiationRequestDetails.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/model/BaseResourceInstantiationRequestDetails.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,15 +20,15 @@
 
 package org.onap.vid.mso.model;
 
+import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY;
+import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
+
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonTypeInfo;
 import com.fasterxml.jackson.annotation.JsonTypeName;
-
 import java.util.List;
 
-import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
-
 @JsonInclude(NON_NULL)
 public class BaseResourceInstantiationRequestDetails {
 
@@ -83,21 +83,21 @@
         this.requestParameters = requestParameters;
     }
 
-     public static class RequestInfo {
+    public static class RequestInfo {
 
-        @JsonInclude(NON_NULL) public final String instanceName;
-        @JsonInclude(NON_NULL) public final String productFamilyId;
+        @JsonInclude(NON_EMPTY) public final String instanceName;
+        @JsonInclude(NON_EMPTY) public final String productFamilyId;
         public final String source;
-        public final boolean suppressRollback;
+        @JsonInclude(NON_NULL) public final Boolean suppressRollback;
         public final String requestorId;
 
-        public RequestInfo(String instanceName, String productFamilyId, String source, boolean rollbackOnFailure, String requestorId) {
+        public RequestInfo(String instanceName, String productFamilyId, String source, Boolean rollbackOnFailure, String requestorId) {
             this.instanceName = instanceName;
             this.productFamilyId = productFamilyId;
             this.source = source;
             this.requestorId = requestorId;
             // in the FE we are asking for "RollbackOnFailure" but to MSO we are passing the negative value "suppressRollback"
-            this.suppressRollback = !rollbackOnFailure;
+            this.suppressRollback = rollbackOnFailure != null ? (!rollbackOnFailure) : null;
         }
     }
 
@@ -120,9 +120,13 @@
     public static class LineOfBusiness{
         public final String lineOfBusinessName;
 
-        public LineOfBusiness(String lineOfBusiness) {
+        private LineOfBusiness(String lineOfBusiness) {
             this.lineOfBusinessName = lineOfBusiness;
         }
+
+        public static LineOfBusiness of(String lineOfBusiness) {
+            return lineOfBusiness==null ? null : new LineOfBusiness(lineOfBusiness);
+        }
     }
 
     @JsonTypeName("relatedInstance")
@@ -150,13 +154,18 @@
     public static class RequestParameters {
         public final List<? extends UserParamTypes> userParams;
 
-        public RequestParameters(List<? extends UserParamTypes> userParams) {
+        @JsonInclude(NON_NULL) public final String testApi;
+        public RequestParameters(List<? extends UserParamTypes> userParams, String testApi) {
             this.userParams = userParams;
+            this.testApi = testApi;
         }
 
         public List<? extends UserParamTypes> getUserParams() {
             return userParams;
         }
+        public String getTestApi() {
+            return testApi;
+        }
     }
 }
 
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/model/CloudConfiguration.java b/vid-app-common/src/main/java/org/onap/vid/mso/model/CloudConfiguration.java
deleted file mode 100644
index 2e09917..0000000
--- a/vid-app-common/src/main/java/org/onap/vid/mso/model/CloudConfiguration.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.mso.model;
-
-import com.fasterxml.jackson.annotation.*;
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.apache.commons.lang.builder.ToStringBuilder;
-
-import java.util.HashMap;
-import java.util.Map;
-
-
-/**
- * fields communicating the cloud configuration in a standard way
- * 
- */
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({
-    "nodeLocation",
-    "lcpCloudRegionId",
-    "tenantId",
-    "cloudOwner"
-})
-public class CloudConfiguration {
-
-    /**
-     * Location identifier for the node
-     * 
-     */
-    @JsonProperty("nodeLocation")
-    private String nodeLocation;
-    /**
-     * LCP Node Location identifier
-     * 
-     */
-    @JsonProperty("lcpCloudRegionId")
-    private String lcpCloudRegionId;
-    /**
-     * Openstack tenant id
-     * 
-     */
-    @JsonProperty("tenantId")
-    private String tenantId;
-    /**
-     * the cloud owner
-     * 
-     */
-    @JsonProperty("cloudOwner")
-    private String cloudOwner;
-    @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<>();
-
-    /**
-     * Location identifier for the node
-     * 
-     * @return
-     *     The nodeLocation
-     */
-    @JsonProperty("nodeLocation")
-    public String getNodeLocation() {
-        return nodeLocation;
-    }
-
-    /**
-     * Location identifier for the node
-     * 
-     * @param nodeLocation
-     *     The nodeLocation
-     */
-    @JsonProperty("nodeLocation")
-    public void setNodeLocation(String nodeLocation) {
-        this.nodeLocation = nodeLocation;
-    }
-
-    /**
-     * LCP Node Location identifier
-     * 
-     * @return
-     *     The lcpCloudRegionId
-     */
-    @JsonProperty("lcpCloudRegionId")
-    public String getLcpCloudRegionId() {
-        return lcpCloudRegionId;
-    }
-
-    /**
-     * LCP Node Location identifier
-     * 
-     * @param lcpCloudRegionId
-     *     The lcpCloudRegionId
-     */
-    @JsonProperty("lcpCloudRegionId")
-    public void setLcpCloudRegionId(String lcpCloudRegionId) {
-        this.lcpCloudRegionId = lcpCloudRegionId;
-    }
-
-    /**
-     * Openstack tenant id
-     * 
-     * @return
-     *     The tenantId
-     */
-    @JsonProperty("tenantId")
-    public String getTenantId() {
-        return tenantId;
-    }
-
-    /**
-     * Openstack tenant id
-     * 
-     * @param tenantId
-     *     The tenantId
-     */
-    @JsonProperty("tenantId")
-    public void setTenantId(String tenantId) {
-        this.tenantId = tenantId;
-    }
-
-    /**
-     * the cloud owner
-     * 
-     * @return
-     *     The cloudOwner
-     */
-    @JsonProperty("cloudOwner")
-    public String getCloudOwner() {
-        return cloudOwner;
-    }
-
-    /**
-     * the cloud owner
-     * 
-     * @param cloudOwner
-     *     The cloudOwner
-     */
-    @JsonProperty("cloudOwner")
-    public void setCloudOwner(String cloudOwner) {
-        this.cloudOwner = cloudOwner;
-    }
-
-    @Override
-    public String toString() {
-        return ToStringBuilder.reflectionToString(this);
-    }
-
-    @JsonAnyGetter
-    public Map<String, Object> getAdditionalProperties() {
-        return this.additionalProperties;
-    }
-
-    @JsonAnySetter
-    public void setAdditionalProperty(String name, Object value) {
-        this.additionalProperties.put(name, value);
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(nodeLocation).append(lcpCloudRegionId).append(tenantId).append(cloudOwner).append(additionalProperties).toHashCode();
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if (!(other instanceof CloudConfiguration)) {
-            return false;
-        }
-        CloudConfiguration rhs = ((CloudConfiguration) other);
-        return new EqualsBuilder().append(nodeLocation, rhs.nodeLocation).append(lcpCloudRegionId, rhs.lcpCloudRegionId).append(tenantId, rhs.tenantId).append(cloudOwner, rhs.cloudOwner).append(additionalProperties, rhs.additionalProperties).isEquals();
-    }
-
-}
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/model/CloudConfiguration.kt b/vid-app-common/src/main/java/org/onap/vid/mso/model/CloudConfiguration.kt
new file mode 100644
index 0000000..d603e5b
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/model/CloudConfiguration.kt
@@ -0,0 +1,12 @@
+package org.onap.vid.mso.model
+
+import com.fasterxml.jackson.annotation.JsonInclude
+
+@JsonInclude(JsonInclude.Include.NON_EMPTY)
+//tenantId and might be null for supporting create configuration API (port mirroring)
+//cloudOwner might because MSO enable it and it might be used in some flows (default value in MSO "irma-aic")
+data class CloudConfiguration @JvmOverloads constructor(
+        var lcpCloudRegionId: String? = null,
+        var tenantId:String? = null,
+        var cloudOwner: String? = null
+)
\ No newline at end of file
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/model/ServiceInstantiationPre1806RequestDetails.java b/vid-app-common/src/main/java/org/onap/vid/mso/model/ServiceInstantiationPre1806RequestDetails.java
new file mode 100644
index 0000000..effc10a
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/model/ServiceInstantiationPre1806RequestDetails.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.mso.model;
+
+import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_EMPTY;
+import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
+import static org.onap.vid.mso.model.BaseResourceInstantiationRequestDetails.RelatedInstance;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.onap.vid.mso.rest.SubscriberInfo;
+
+public class ServiceInstantiationPre1806RequestDetails extends ServiceInstantiationRequestDetails {
+
+    @JsonInclude(NON_NULL)
+    public final CloudConfiguration cloudConfiguration;
+    @JsonInclude(NON_EMPTY)
+    public final List<RelatedInstance> relatedInstanceList;
+
+    public ServiceInstantiationPre1806RequestDetails(ModelInfo modelInfo, ServiceInstantiationOwningEntity owningEntity,
+                                                     SubscriberInfo subscriberInfo, Project project, RequestInfo requestInfo,
+                                                     RequestParameters requestParameters, CloudConfiguration cloudConfiguration,
+                                                     List<RelatedInstance> relatedInstanceList) {
+        super(modelInfo, owningEntity, subscriberInfo, project, requestInfo, requestParameters);
+        if ((cloudConfiguration != null) && (!StringUtils.isEmpty(cloudConfiguration.getLcpCloudRegionId())) && (!StringUtils.isEmpty(cloudConfiguration.getTenantId()))){
+            this.cloudConfiguration = cloudConfiguration;
+        } else {
+            this.cloudConfiguration = null;
+        }
+        this.relatedInstanceList = relatedInstanceList;
+    }
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/model/ServiceInstantiationRequestDetails.java b/vid-app-common/src/main/java/org/onap/vid/mso/model/ServiceInstantiationRequestDetails.java
index 700f438..8f8dd68 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/model/ServiceInstantiationRequestDetails.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/model/ServiceInstantiationRequestDetails.java
@@ -76,8 +76,8 @@
 
     public static class RequestInfo {
 
-        @JsonInclude(NON_NULL) public final String instanceName;
-        @JsonInclude(NON_NULL) public final String productFamilyId;
+        @JsonInclude(NON_EMPTY) public final String instanceName;
+        @JsonInclude(NON_EMPTY) public final String productFamilyId;
         public final String source;
         public final boolean suppressRollback;
         public final String requestorId;
@@ -150,7 +150,7 @@
 
         private static class ServiceInstantiationServiceInner implements UserParamTypes {
             public ModelInfo modelInfo = new ModelInfo();
-            @JsonInclude(NON_NULL)
+            @JsonInclude(NON_EMPTY)
             public String instanceName;
             public List<Map<String, String>> instanceParams;
             public ServiceInstantiationVnfList resources;
@@ -182,7 +182,7 @@
         public final String productFamilyId;
         public final List<Map<String, String>>  instanceParams;
         @JsonInclude(NON_EMPTY) public final List<VfModuleMacro> vfModules;
-        @JsonInclude(NON_NULL) public final String instanceName;
+        @JsonInclude(NON_EMPTY) public final String instanceName;
 
         public ServiceInstantiationVnf(ModelInfo modelInfo, CloudConfiguration cloudConfiguration, String platform, String lineOfBusiness, String productFamilyId, List<Map<String, String>>  instanceParams, List<VfModuleMacro> vfModules, String instanceName) {
             this.modelInfo = modelInfo;
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleInstantiationRequestDetails.java b/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleInstantiationRequestDetails.java
index 4e6f074..3b6cd1d 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleInstantiationRequestDetails.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleInstantiationRequestDetails.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,8 +20,10 @@
 
 package org.onap.vid.mso.model;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
+import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
 
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -109,14 +111,14 @@
     }
 
     public static class RequestParametersVfModule extends BaseResourceInstantiationRequestDetails.RequestParameters {
-        private final boolean usePreload;
+        @JsonInclude(NON_NULL) private final Boolean usePreload;
 
-        public RequestParametersVfModule(List<? extends UserParamTypes> userParams, boolean usePreload) {
-            super(userParams);
+        public RequestParametersVfModule(List<? extends UserParamTypes> userParams, Boolean usePreload, String testApi) {
+            super(userParams, testApi);
             this.usePreload = usePreload;
         }
 
-        public boolean isUsePreload() {
+        public Boolean isUsePreload() {
             return usePreload;
         }
     }
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/AsyncRequestStatus.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/AsyncRequestStatus.java
index 12bf205..61e0d3a 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/rest/AsyncRequestStatus.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/AsyncRequestStatus.java
@@ -7,9 +7,9 @@
  * 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.
@@ -53,6 +53,7 @@
 
         public String requestId;
         public String requestScope;
+        public String requestType;
 
         /**
          * The instance ids.
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestStatus.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestStatus.java
index 031eaec..29356aa 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestStatus.java
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/RequestStatus.java
@@ -43,6 +43,14 @@
 })
 public class RequestStatus {
 
+    public RequestStatus() {}
+
+    public RequestStatus(String requestState, String statusMessage, String timestamp) {
+        this.requestState = requestState;
+        this.statusMessage = statusMessage;
+        this.timestamp = timestamp;
+    }
+
     /**
      * percentage complete estimate from 0 to 100
      * 
diff --git a/vid-app-common/src/main/java/org/onap/vid/properties/Features.java b/vid-app-common/src/main/java/org/onap/vid/properties/Features.java
index ea047d6..c96efe6 100644
--- a/vid-app-common/src/main/java/org/onap/vid/properties/Features.java
+++ b/vid-app-common/src/main/java/org/onap/vid/properties/Features.java
@@ -29,22 +29,17 @@
      * Use /docs/feature-flags.md for details
      */
 
-    FLAG_ASYNC_JOBS,
     CREATE_INSTANCE_TEST,
     EMPTY_DRAWING_BOARD_TEST,
     FLAG_ADD_MSO_TESTAPI_FIELD,
-    FLAG_ASYNC_INSTANTIATION,
     FLAG_SERVICE_MODEL_CACHE,
-    FLAG_UNASSIGN_SERVICE,
     FLAG_NETWORK_TO_ASYNC_INSTANTIATION,
-    FLAG_COLLECTION_RESOURCE_SUPPORT,
     FLAG_SHOW_ASSIGNMENTS,
+    FLAG_UNASSIGN_SERVICE,
     FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS,
     FLAG_SHOW_VERIFY_SERVICE, // AKA POMBA
-    FLAG_DUPLICATE_VNF,
     FLAG_DEFAULT_VNF,
     FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD,
-    FLAG_PNP_INSTANTIATION,
     FLAG_RESTRICTED_SELECT,
     FLAG_5G_IN_NEW_INSTANTIATION_UI,
     FLAG_ASYNC_ALACARTE_VNF,
@@ -52,7 +47,6 @@
     FLAG_PRESENT_PROVIDER_NETWORKS_ASSOCIATIONS,
     FLAG_ASYNC_ALACARTE_VFMODULE,
     FLAG_SUPPLEMENTARY_FILE,
-    FLAG_SHIFT_VFMODULE_PARAMS_TO_VNF,
     FLAG_EXP_ANY_ALACARTE_NEW_INSTANTIATION_UI,
     FLAG_1810_CR_LET_SELECTING_COLLECTOR_TYPE_UNCONDITIONALLY,
     FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST,
@@ -62,10 +56,25 @@
     FLAG_1902_NEW_VIEW_EDIT,
     FLAG_EXP_USE_DEFAULT_HOST_NAME_VERIFIER,
     FLAG_1902_VNF_GROUPING,
+    FLAG_1902_RETRY_JOB,
+    FLAG_VF_MODULE_RESUME_STATUS_CREATE,
+    FLAG_EXP_CREATE_RESOURCES_IN_PARALLEL,
+    FLAG_1906_COMPONENT_INFO,
+    FLAG_1906_INSTANTIATION_API_USER_VALIDATION,
+    FLAG_1906_AAI_SUB_DETAILS_REDUCE_DEPTH,
+    FLAG_1908_TRANSPORT_SERVICE_NEW_INSTANTIATION_UI,
+    FLAG_1908_COLLECTION_RESOURCE_NEW_INSTANTIATION_UI,
+    FLAG_1908_INFRASTRUCTURE_VPN,
+    FLAG_1908_RESUME_MACRO_SERVICE,
+    FLAG_1908_RELEASE_TENANT_ISOLATION,
+    FLAG_1908_A_LA_CARTE_VNF_NEW_INSTANTIATION_UI,
+    FLAG_FLASH_REPLACE_VF_MODULE,
+    FLAG_PNP_INSTANTIATION,
     FLAG_HANDLE_SO_WORKFLOWS,
     FLAG_CREATE_ERROR_REPORTS
     ;
 
+
     public boolean isActive() {
         return FeatureContext.getFeatureManager().isActive(this);
     }
diff --git a/vid-app-common/src/main/java/org/onap/vid/properties/VidProperties.java b/vid-app-common/src/main/java/org/onap/vid/properties/VidProperties.java
index 24b72fd..8331886 100644
--- a/vid-app-common/src/main/java/org/onap/vid/properties/VidProperties.java
+++ b/vid-app-common/src/main/java/org/onap/vid/properties/VidProperties.java
@@ -7,9 +7,9 @@
  * 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.
@@ -21,9 +21,9 @@
 package org.onap.vid.properties;
 
 import org.apache.commons.lang3.StringUtils;
+import org.onap.vid.model.ModelConstants;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.portalsdk.core.util.SystemProperties;
-import org.onap.vid.model.ModelConstants;
 /**
  * The Class VidProperties.
  */
@@ -38,59 +38,62 @@
 
 	/** The Constant VID_TRUSTSTORE_FILENAME. */
 	public static final String VID_TRUSTSTORE_FILENAME = "vid.truststore.filename";
-	
+
 	/** The Constant VID_TRUSTSTORE_PASSWD_X. */
 	public static final String VID_TRUSTSTORE_PASSWD_X = "vid.truststore.passwd.x";
-	
+
 	/** The Constant FILESEPARATOR. */
 	public static final String FILESEPARATOR = (System.getProperty("file.separator") == null) ? "/" : System.getProperty("file.separator");
-	
+
 	/** The Constant LOG. */
 	private static final EELFLoggerDelegate LOG = EELFLoggerDelegate.getLogger(VidProperties.class);
 
-    public static final String VID_JOB_MAX_HOURS_IN_PROGRESS = "vid.asyncJob.maxHoursInProgress";
+	public static final String VID_JOB_MAX_HOURS_IN_PROGRESS = "vid.asyncJob.maxHoursInProgress";
+
+	public static final String VID_THREAD_COUNT = "vid.thread.count";
+	public static final String VID_THREAD_TIMEOUT = "vid.thread.timeout";
 
 	/**
 	 * Gets the asdc model namespace prefix property
-	 * 
+	 *
 	 * @return the property value or a default value
 	 */
 	public static String getAsdcModelNamespace() {
 		String methodName = "getAsdcModelNamespace ";
 		String asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE;
-	    try {
-	        asdcModelNamespace = SystemProperties.getProperty(ModelConstants.ASDC_MODEL_NAMESPACE);
-	        if ( asdcModelNamespace == null || asdcModelNamespace.isEmpty()) {
-		    	asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE;
-		    }
-	    }
-	    catch ( Exception e ) {
-	    	LOG.error (EELFLoggerDelegate.errorLogger, methodName + "unable to find the value, using the default "
-	    			+ ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE);
-	    	asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE;
-	    }
-	    return (asdcModelNamespace);
+		try {
+			asdcModelNamespace = SystemProperties.getProperty(ModelConstants.ASDC_MODEL_NAMESPACE);
+			if ( asdcModelNamespace == null || asdcModelNamespace.isEmpty()) {
+				asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE;
+			}
+		}
+		catch ( Exception e ) {
+			LOG.error (EELFLoggerDelegate.errorLogger, methodName + "unable to find the value, using the default "
+					+ ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE);
+			asdcModelNamespace = ModelConstants.DEFAULT_ASDC_MODEL_NAMESPACE;
+		}
+		return (asdcModelNamespace);
 	}
 	/**
 	 * Gets the specified property value. If the property is not defined, returns a default value.
-	 * 
+	 *
 	 * @return the property value or a default value
 	 */
 	public static String getPropertyWithDefault ( String propName, String defaultValue ) {
 		String methodName = "getPropertyWithDefault ";
 		String propValue = defaultValue;
-	    try {
-	        propValue = SystemProperties.getProperty(propName);
-	        if ( propValue == null || propValue.isEmpty()) {
-		    	propValue = defaultValue;
-		    }
-	    }
-	    catch ( Exception e ) {
-	    	LOG.error (EELFLoggerDelegate.errorLogger, methodName + "unable to find the value, using the default "
-	    			+ defaultValue);
-	    	propValue = defaultValue;
-	    }
-	    return (propValue);
+		try {
+			propValue = SystemProperties.getProperty(propName);
+			if ( propValue == null || propValue.isEmpty()) {
+				propValue = defaultValue;
+			}
+		}
+		catch ( Exception e ) {
+			LOG.error (EELFLoggerDelegate.errorLogger, methodName + "unable to find the value, using the default "
+					+ defaultValue);
+			propValue = defaultValue;
+		}
+		return (propValue);
 	}
 
 	public static long getLongProperty(String key) {
@@ -98,16 +101,16 @@
 	}
 
 	public static long getLongProperty(String key, long defaultValue) {
-	    if (!containsProperty(key)) {
-            LOG.debug(EELFLoggerDelegate.debugLogger, "No such property: {}. {} value is used", key, defaultValue);
-            return defaultValue;
-        }
-        String configValue = getProperty(key);
-        if (StringUtils.isNumeric(configValue)) {
-            return Long.parseLong(configValue);
-        } else {
-            LOG.debug(EELFLoggerDelegate.debugLogger, "{} property value is not valid: {}. {} value is used", key, configValue, defaultValue);
-            return defaultValue;
-        }
-    }
+		if (!containsProperty(key)) {
+			LOG.debug(EELFLoggerDelegate.debugLogger, "No such property: {}. {} value is used", key, defaultValue);
+			return defaultValue;
+		}
+		String configValue = getProperty(key);
+		if (StringUtils.isNumeric(configValue)) {
+			return Long.parseLong(configValue);
+		} else {
+			LOG.debug(EELFLoggerDelegate.debugLogger, "{} property value is not valid: {}. {} value is used", key, configValue, defaultValue);
+			return defaultValue;
+		}
+	}
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AAIServiceTree.java b/vid-app-common/src/main/java/org/onap/vid/services/AAIServiceTree.java
index 6199c4e..d62d5d5 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/AAIServiceTree.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/AAIServiceTree.java
@@ -7,9 +7,9 @@
  * 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.
@@ -21,7 +21,6 @@
 package org.onap.vid.services;
 
 import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.collect.ImmutableList;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.vid.aai.AaiClientInterface;
@@ -31,21 +30,24 @@
 import org.onap.vid.exceptions.GenericUncheckedException;
 import org.onap.vid.model.ServiceModel;
 import org.onap.vid.model.aaiTree.AAITreeNode;
+import org.onap.vid.model.aaiTree.NodeType;
 import org.onap.vid.model.aaiTree.ServiceInstance;
 import org.onap.vid.utils.Tree;
+import org.springframework.http.HttpMethod;
 import org.springframework.stereotype.Component;
 
 import javax.inject.Inject;
 import javax.ws.rs.core.Response;
 import java.util.*;
-import java.util.concurrent.*;
-import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.util.concurrent.ExecutorService;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
-import static java.lang.Thread.sleep;
 import static java.util.Comparator.comparing;
 import static java.util.stream.Collectors.toSet;
 import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
-import static org.onap.vid.services.AAITreeNodeBuilder.*;
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
 
 @Component
 public class AAIServiceTree {
@@ -60,38 +62,58 @@
 
     private final ServiceModelInflator serviceModelInflator;
 
-    private final ObjectMapper mapper = new ObjectMapper();
+    private final ExecutorService executorService;
 
     private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(AAIServiceTree.class);
 
     public static final Tree<AaiRelationship> AAI_TREE_PATHS =
-            new Tree<>(new AaiRelationship(SERVICE_INSTANCE));
+            new Tree<>(new AaiRelationship(NodeType.SERVICE_INSTANCE));
 
     static {
-        AAI_TREE_PATHS.addPath(toAaiRelationshipList(GENERIC_VNF, VG));
-        AAI_TREE_PATHS.addPath(toAaiRelationshipList(NETWORK));
-        AAI_TREE_PATHS.addPath(toAaiRelationshipList(GENERIC_VNF, NETWORK));
-        AAI_TREE_PATHS.addPath(toAaiRelationshipList(INSTANCE_GROUP));
+        AAI_TREE_PATHS.addPath(toAaiRelationshipList(NodeType.GENERIC_VNF, NodeType.VOLUME_GROUP));
+        AAI_TREE_PATHS.addPath(toAaiRelationshipList(NodeType.GENERIC_VNF, NodeType.VF_MODULE));
+        AAI_TREE_PATHS.addPath(toAaiRelationshipList(NodeType.GENERIC_VNF, NodeType.NETWORK, NodeType.VPN_BINDING));
+        AAI_TREE_PATHS.addPath(toAaiRelationshipList(NodeType.NETWORK, NodeType.VPN_BINDING));
+        AAI_TREE_PATHS.addPath(toAaiRelationshipList(NodeType.INSTANCE_GROUP, NodeType.GENERIC_VNF));
+        AAI_TREE_PATHS.addPath(toAaiRelationshipList(NodeType.COLLECTION_RESOURCE, NodeType.INSTANCE_GROUP));
+        AAI_TREE_PATHS.addPath(toAaiRelationshipList(NodeType.CONFIGURATION, NodeType.NETWORK, NodeType.VPN_BINDING));
+        AAI_TREE_PATHS.addPath(toAaiRelationshipList(NodeType.CONFIGURATION, NodeType.VPN_BINDING));
+    }
+
+    public static List<AAIServiceTree.AaiRelationship> toAaiRelationshipList(NodeType... types) {
+        return Stream.of(types).map(AAIServiceTree.AaiRelationship::new).collect(Collectors.toList());
     }
 
     @Inject
     public AAIServiceTree(AaiClientInterface aaiClient, AAITreeNodeBuilder aaiTreeNodeBuilder,
                           AAITreeConverter aaiTreeConverter, VidService sdcService,
-                          ServiceModelInflator serviceModelInflator) {
+                          ServiceModelInflator serviceModelInflator, ExecutorService executorService) {
         this.aaiClient = aaiClient;
         this.aaiTreeNodeBuilder = aaiTreeNodeBuilder;
         this.aaiTreeConverter = aaiTreeConverter;
         this.sdcService = sdcService;
         this.serviceModelInflator = serviceModelInflator;
+        this.executorService = executorService;
     }
 
-    public List<AAITreeNode> buildAAITree(String getUrl, Tree<AaiRelationship> pathsToSearch) {
+    List<AAITreeNode> buildAAITreeForUniqueResource(String getUrl, NodeType nodeType) {
+        return buildAAITreeForUniqueResourceFromCustomQuery(getUrl, null, HttpMethod.GET, nodeType);
+    }
+
+    List<AAITreeNode> buildAAITreeForUniqueResourceFromCustomQuery(String url, String payload, HttpMethod method, NodeType nodeType) {
+        Tree<AAIServiceTree.AaiRelationship> pathsToSearch = new Tree<>(new AAIServiceTree.AaiRelationship(nodeType));
+        return buildAAITree(url, payload, method, pathsToSearch, false);
+    }
+
+    public List<AAITreeNode> buildAAITree(String url, String payload, HttpMethod method, Tree<AaiRelationship> pathsToSearch, boolean enrichWithModelVersion) {
 
         ConcurrentSkipListSet<AAITreeNode> nodesAccumulator = createNodesAccumulator();
 
-        List<AAITreeNode> aaiTreeNodes = fetchAAITree(getUrl, pathsToSearch, nodesAccumulator, true);
+        List<AAITreeNode> aaiTreeNodes = fetchAAITree(url, payload, method, pathsToSearch, nodesAccumulator);
 
-        enrichNodesWithModelVersionAndModelName(nodesAccumulator);
+        if (enrichWithModelVersion) {
+            enrichNodesWithModelVersionAndModelName(nodesAccumulator);
+        }
 
         return aaiTreeNodes;
     }
@@ -105,7 +127,7 @@
         //Used later to get the nodes UUID
         ConcurrentSkipListSet<AAITreeNode> nodesAccumulator = createNodesAccumulator();
 
-        AAITreeNode aaiTree = fetchAAITree(getURL, AAI_TREE_PATHS, nodesAccumulator, false).get(0);
+        AAITreeNode aaiTree = fetchAAITree(getURL, null, HttpMethod.GET, AAI_TREE_PATHS, nodesAccumulator).get(0);
 
         //Populate nodes with model-name & model-version (from aai)
         enrichNodesWithModelVersionAndModelName(nodesAccumulator);
@@ -115,28 +137,28 @@
         //Populate nodes with model-customization-name (from sdc model)
         enrichNodesWithModelCustomizationName(nodesAccumulator, serviceModel);
 
-        return aaiTreeConverter.convertTreeToUIModel(aaiTree, globalCustomerId, serviceType, getInstantiationType(serviceModel));
+        return aaiTreeConverter.convertTreeToUIModel(aaiTree, globalCustomerId, serviceType, getInstantiationType(serviceModel), getInstanceRole(serviceModel), getInstanceType(serviceModel));
     }
 
-    private List<AAITreeNode> fetchAAITree(String getUrl, Tree<AaiRelationship> pathsToSearch,
-                                           ConcurrentSkipListSet<AAITreeNode> nodesAccumulator, boolean partialTreeOnTimeout) {
-        ThreadPoolExecutor threadPool = getThreadPool();
-
-        List<AAITreeNode> aaiTree =  aaiTreeNodeBuilder.buildNode(SERVICE_INSTANCE,
-                getUrl, defaultIfNull(nodesAccumulator, createNodesAccumulator()),
-                threadPool, new ConcurrentLinkedQueue<>(),
-                new AtomicInteger(0), pathsToSearch);
-
-        boolean timeoutOccurred = waitForTreeFetch(threadPool);
-
-        if (timeoutOccurred) {
-            if (!partialTreeOnTimeout) {
-                throw new GenericUncheckedException("Timeout on fetchAAITree. Fetched " + nodesAccumulator.size() + " nodes for url: " + getUrl);
-            }
-            LOGGER.warn(EELFLoggerDelegate.errorLogger, "Timeout on fetchAAITree for url: " + getUrl);
+    private String getInstanceType(ServiceModel serviceModel){
+        if (serviceModel != null && serviceModel.getService() != null) {
+            return serviceModel.getService().getServiceType();
         }
+        return "";
+    }
 
-        return aaiTree;
+    private String getInstanceRole(ServiceModel serviceModel) {
+        if (serviceModel != null && serviceModel.getService() != null) {
+            return serviceModel.getService().getServiceRole();
+        }
+        return "";
+    }
+
+    private List<AAITreeNode> fetchAAITree(String url, String payload, HttpMethod method, Tree<AaiRelationship> pathsToSearch,
+                                           ConcurrentSkipListSet<AAITreeNode> nodesAccumulator) {
+        return aaiTreeNodeBuilder.buildNode(NodeType.fromString(pathsToSearch.getRootValue().type),
+                url, payload, method, defaultIfNull(nodesAccumulator, createNodesAccumulator()),
+                executorService, pathsToSearch);
     }
 
     private ConcurrentSkipListSet<AAITreeNode> createNodesAccumulator() {
@@ -204,12 +226,12 @@
     private JsonNode getModels(AaiClientInterface aaiClient, Collection<String> invariantIDs) {
         Response response = aaiClient.getVersionByInvariantId(ImmutableList.copyOf(invariantIDs));
         try {
-            JsonNode responseJson = mapper.readTree(response.readEntity(String.class));
+            JsonNode responseJson = JACKSON_OBJECT_MAPPER.readTree(response.readEntity(String.class));
             return responseJson.get("model");
         } catch (Exception e) {
             LOGGER.error(EELFLoggerDelegate.errorLogger, "Failed to getVersionByInvariantId from A&AI", e);
         }
-        return mapper.createObjectNode();
+        return JACKSON_OBJECT_MAPPER.createObjectNode();
     }
 
     private Set<String> getModelInvariantIds(Collection<AAITreeNode> nodes) {
@@ -219,30 +241,6 @@
                 .collect(toSet());
     }
 
-    private boolean waitForTreeFetch(ThreadPoolExecutor threadPool) {
-        int timer = 60;
-        try {
-            //Stop fetching information if it takes more than 1 minute
-            while (threadPool.getActiveCount() != 0 &&
-                    timer > 0) {
-                sleep(1000);
-                timer--;
-            }
-        } catch (InterruptedException e) {
-            Thread.currentThread().interrupt();
-            throw new GenericUncheckedException(e);
-        }
-        threadPool.shutdown();
-        return (timer == 0);
-    }
-
-    private ThreadPoolExecutor getThreadPool() {
-        //Use at least one thread, and never more than 75% of the available thread.
-        int cores = Math.max((int)(Runtime.getRuntime().availableProcessors() * 0.75), 1);
-        BlockingQueue<Runnable> queue = new LinkedBlockingQueue<>();
-        return new ThreadPoolExecutor(1, cores, 10, TimeUnit.SECONDS, queue);
-    }
-
     public static class AaiRelationship {
 
         public final String type;
@@ -251,6 +249,10 @@
             this.type = type;
         }
 
+        public AaiRelationship(NodeType nodeType) {
+            this.type = nodeType.getType();
+        }
+
         @Override
         public boolean equals(Object o) {
             if (this == o) return true;
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AAITreeNodeBuilder.java b/vid-app-common/src/main/java/org/onap/vid/services/AAITreeNodeBuilder.java
index e060882..d53eba8 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/AAITreeNodeBuilder.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/AAITreeNodeBuilder.java
@@ -7,9 +7,9 @@
  * 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.
@@ -21,66 +21,49 @@
 package org.onap.vid.services;
 
 import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.collect.ImmutableList;
 import org.apache.commons.lang3.StringUtils;
-import org.jetbrains.annotations.NotNull;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.commons.lang3.tuple.Pair;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.onap.portalsdk.core.util.SystemProperties;
 import org.onap.vid.aai.AaiClientInterface;
 import org.onap.vid.aai.ExceptionWithRequestInfo;
 import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship;
+import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.RelationshipData;
 import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.RelationshipList;
+import org.onap.vid.aai.util.AAITreeNodeUtils;
+import org.onap.vid.exceptions.GenericUncheckedException;
 import org.onap.vid.model.aaiTree.AAITreeNode;
 import org.onap.vid.model.aaiTree.FailureAAITreeNode;
+import org.onap.vid.model.aaiTree.NodeType;
+import org.onap.vid.mso.model.CloudConfiguration;
+import org.onap.vid.properties.VidProperties;
 import org.onap.vid.utils.Streams;
 import org.onap.vid.utils.Tree;
 import org.onap.vid.utils.Unchecked;
+import org.springframework.http.HttpMethod;
 import org.springframework.stereotype.Component;
 
 import javax.inject.Inject;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.ConcurrentSkipListSet;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.atomic.AtomicInteger;
+import java.util.*;
+import java.util.concurrent.*;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
 import static java.util.stream.Collectors.*;
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
 import static org.onap.vid.utils.Streams.not;
 
 
 @Component
 public class AAITreeNodeBuilder {
 
+    private static final String RESULTS = "results";
     private AaiClientInterface aaiClient;
 
-    private final ObjectMapper mapper = new ObjectMapper();
-
     private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(AAITreeNodeBuilder.class);
 
-    //List of all the node types the tree should include
-    public static final String SERVICE_INSTANCE = "service-instance";
-    public static final String GENERIC_VNF = "generic-vnf";
-    public static final String NETWORK = "l3-network";
-    public static final String FAILURE = "failure_node";
-    public static final String COLLECTION_RESOURCE = "collection";
-    public static final String CONFIGURATION = "configuration";
-    public static final String PNF = "pnf";
-    public static final String VF_MODULE = "vf-module";
-    public static final String INSTANCE_GROUP = "instance-group";
-    public static final String PORT = "l-interface";
-    public static final String VG = "volume-group";
-    public static final String VLAN_TAG = "vlan-tag";
-
-    //Hashmap that defines the node-type and the tag that should be used to find it's ID key in the JSON.
-    private static HashMap<String, String> nodeTypeToIdKeyMap = generateTypeToIdKeyMap();
-
-    //Hashmap that defines the node-type and the tag that should be used to find it's NAMR key in the JSON.
-    private static HashMap<String, String> nodeTypeToNameKeyMap = generateTypeToNameKeyMap();
 
     public enum AAIBaseProperties {
         ORCHESTRATION_STATUS("orchestration-status"),
@@ -102,63 +85,121 @@
         }
     }
 
-    public static List<AAIServiceTree.AaiRelationship> toAaiRelationshipList(String... types) {
-        return Stream.of(types).map(AAIServiceTree.AaiRelationship::new).collect(Collectors.toList());
-    }
-
     @Inject
     public AAITreeNodeBuilder(AaiClientInterface aaiClient) {
         this.aaiClient = aaiClient;
     }
 
-    public List<AAITreeNode> buildNode(String nodeType,
-                                 String requestURL,
-                                 ConcurrentSkipListSet<AAITreeNode> nodesAccumulator, ExecutorService threadPool,
-                                 ConcurrentLinkedQueue<String> visitedNodes,
-                                 AtomicInteger nodesCounter,
-                                 Tree<AAIServiceTree.AaiRelationship> pathsTree) {
+    List<AAITreeNode> buildNode(NodeType nodeType,
+                                String requestURL,
+                                String payload,
+                                HttpMethod method,
+                                ConcurrentSkipListSet<AAITreeNode> nodesAccumulator,
+                                ExecutorService threadPool,
+                                Tree<AAIServiceTree.AaiRelationship> pathsTree) {
 
-        JsonNode topLevelJson = aaiClient.typedAaiGet(Unchecked.toURI(requestURL), JsonNode.class);
+        JsonNode jsonNode = aaiClient.typedAaiRest(Unchecked.toURI(requestURL), JsonNode.class, payload, method, false);
 
-        if (topLevelJson.has(nodeType) && topLevelJson.get(nodeType).isArray()) {
-            return Streams.fromIterable(topLevelJson.get(nodeType))
-                    .map(item -> parseNodeAndGetChildren(nodeType, requestURL, item,
-                            nodesAccumulator, threadPool, visitedNodes, nodesCounter, pathsTree))
-                    .collect(toList());
+        List<Pair<AAITreeNode, List<Relationship>>> nodes = getNodesWithRelationships(jsonNode, nodeType, nodesAccumulator, pathsTree);
+
+        String timeout = SystemProperties.getProperty(VidProperties.VID_THREAD_TIMEOUT);
+        long timeoutNum = Long.parseLong(StringUtils.defaultIfEmpty(timeout, "30"));
+
+        for (Pair<AAITreeNode, List<Relationship>> entry : nodes) {
+            fetchChildrenAsync(threadPool, nodesAccumulator, entry.getKey(), entry.getValue(), pathsTree, timeoutNum);
+
+            if (getNextLevelInPathsTree(pathsTree, NodeType.VF_MODULE.getType()) != null) {
+                getRelatedVfModules(threadPool, nodesAccumulator, requestURL, entry.getKey());
+            }
+        }
+
+        return nodes.stream()
+                .map(Pair::getKey)
+                .collect(Collectors.toList());
+    }
+
+    private List<Pair<AAITreeNode, List<Relationship>>> getNodesWithRelationships(JsonNode jsonNode, NodeType nodeType,
+                                                                                  ConcurrentSkipListSet<AAITreeNode> nodesAccumulator,
+                                                                                  Tree<AAIServiceTree.AaiRelationship> pathsTree) {
+        if (isListOfKeyResults(jsonNode)) {
+            return Streams.fromIterable(jsonNode.get(RESULTS))
+                    .filter(item -> item.has(nodeType.getType()))
+                    .map(item -> item.get(nodeType.getType()))
+                    .map(item -> parseNodeAndFilterRelationships(item, nodeType, nodesAccumulator, pathsTree))
+                    .collect(Collectors.toList());
+        } else if (isArray(jsonNode, nodeType)) {
+            return Streams.fromIterable(jsonNode.get(nodeType.getType()))
+                    .map(item -> parseNodeAndFilterRelationships(item, nodeType, nodesAccumulator, pathsTree))
+                    .collect(Collectors.toList());
         } else {
-            return ImmutableList.of(parseNodeAndGetChildren(nodeType, requestURL, topLevelJson,
-                    nodesAccumulator, threadPool, visitedNodes, nodesCounter, pathsTree));
+            return ImmutableList.of(parseNodeAndFilterRelationships(jsonNode, nodeType, nodesAccumulator, pathsTree));
         }
     }
 
-    private AAITreeNode parseNodeAndGetChildren(String nodeType,
-                                                String requestURL,
-                                                JsonNode topLevelJson,
-                                                ConcurrentSkipListSet<AAITreeNode> nodesAccumulator, ExecutorService threadPool,
-                                                ConcurrentLinkedQueue<String> visitedNodes,
-                                                AtomicInteger nodesCounter,
-                                                Tree<AAIServiceTree.AaiRelationship> pathsTree) {
-        AAITreeNode node = jsonToAaiNode(nodeType, topLevelJson, nodesAccumulator, nodesCounter);
+    Pair<AAITreeNode, List<Relationship>> parseNodeAndFilterRelationships(JsonNode jsonNode, NodeType nodeType,
+                                                                          ConcurrentSkipListSet<AAITreeNode> nodesAccumulator,
+                                                                          Tree<AAIServiceTree.AaiRelationship> pathsTree) {
+        AAITreeNode node = createAaiNode(nodeType, jsonNode, nodesAccumulator);
 
-        RelationshipList relationships = mapper.convertValue(topLevelJson.get(AAIBaseProperties.RELATIONSHIP_LIST.getAaiKey()), RelationshipList.class);
-        if (relationships != null) {
-            getChildren(threadPool, nodesAccumulator, relationships.getRelationship(), visitedNodes, node, nodesCounter, pathsTree);
-        }
-        if (StringUtils.equals(node.getType(), GENERIC_VNF)) {
-            getRelatedVfModules(threadPool, nodesAccumulator, requestURL, node, nodesCounter);
-        }
-        return node;
+        enrichPlacementData(node);
+
+        List<Relationship> filteredRelationships = getFilteredRelationships(jsonNode, pathsTree);
+
+        return ImmutablePair.of(node, filteredRelationships);
     }
 
-    private AAITreeNode jsonToAaiNode(String nodeType, JsonNode topLevelJson, ConcurrentSkipListSet<AAITreeNode> nodesAccumulator, AtomicInteger nodesCounter) {
-        AAITreeNode node = fillNodeMetaData(nodeType, topLevelJson, nodesCounter);
+    boolean isArray(JsonNode json, NodeType nodeType) {
+        return json != null && json.has(nodeType.getType()) && json.get(nodeType.getType()).isArray();
+    }
+
+    boolean isListOfKeyResults(JsonNode jsonNode) {
+        return jsonNode != null && jsonNode.has(RESULTS) && jsonNode.get(RESULTS).isArray();
+    }
+
+    AAITreeNode createAaiNode(NodeType nodeType, JsonNode jsonNode, ConcurrentSkipListSet<AAITreeNode> nodesAccumulator) {
+        AAITreeNode node = jsonNodeToAaiNode(nodeType, jsonNode);
 
         nodesAccumulator.add(node);
 
         return node;
     }
 
-    private void getRelatedVfModules(ExecutorService threadPool, ConcurrentSkipListSet<AAITreeNode> nodesAccumulator, String parentURL, AAITreeNode parentNode, AtomicInteger nodesCounter) {
+    private void addChildren(AAITreeNode node, Future<List<AAITreeNode>> children) {
+        try {
+            node.addChildren(children.get());
+        } catch (Exception e) {
+            node.getChildren().add(createFailureNode(e));
+        }
+    }
+
+    private Map<String,String> convertRelationshipDataToMap(List<RelationshipData> relationshipData) {
+        return relationshipData.stream().collect(
+                Collectors.toMap(RelationshipData::getKey, RelationshipData::getValue));
+    }
+
+    void enrichPlacementData(AAITreeNode node){
+        Optional<Relationship> tenantRelationShip = AAITreeNodeUtils.findFirstRelationshipByRelatedTo(node.getRelationshipList(), "tenant");
+        enrichPlacementDataUsingTenantInfo(node, tenantRelationShip);
+    }
+
+    void enrichPlacementDataUsingTenantInfo(AAITreeNode node, Optional<Relationship> tenantRelationShip) {
+        //no tenant relationship in this node - so no placement data
+        if (!tenantRelationShip.isPresent()) {
+            return;
+        }
+        try {
+            Map<String, String> relationshipsDataMap = convertRelationshipDataToMap(tenantRelationShip.get().getRelationDataList());
+            node.setCloudConfiguration(new CloudConfiguration(
+                    relationshipsDataMap.get("cloud-region.cloud-region-id"),
+                    relationshipsDataMap.get("tenant.tenant-id"),
+                    relationshipsDataMap.get("cloud-region.cloud-owner")));
+        }
+        catch (Exception exception) {
+            LOGGER.error("Failed to extract placement form tenant relationship of {}:{}", node.getType(), node.getId(), exception);
+        }
+    }
+
+    private void getRelatedVfModules(ExecutorService threadPool, ConcurrentSkipListSet<AAITreeNode> nodesAccumulator, String parentURL, AAITreeNode parentNode) {
         /*
         VNFs do not report their direct related-to vf-modules, so try
         directly fetching a resource URI.
@@ -166,73 +207,100 @@
 
         threadPool.execute(() -> {
             // the response is an array of vf-modules
-            final JsonNode topLevelJson;
+            final JsonNode jsonNode;
             try {
-                topLevelJson = aaiClient.typedAaiGet(Unchecked.toURI(parentURL + "/vf-modules"), JsonNode.class);
+                jsonNode = aaiClient.typedAaiGet(Unchecked.toURI(parentURL + "/vf-modules"), JsonNode.class);
             } catch (ExceptionWithRequestInfo e) {
                 if (e.getHttpCode().equals(404)) {
                     // it's ok, as we're just optimistically fetching
-                    // the /vf-modules uri; 404 says this time it was
-                    // a bad guess
+                    // the /vf-modules uri; 404 says this time it was a bad guess
                     return;
                 } else {
                     throw e;
                 }
             }
 
-            if (topLevelJson != null) {
-                parentNode.getChildren().addAll(
-                        Streams.fromIterable(topLevelJson.get(VF_MODULE))
-                                .map(vfModuleNode -> jsonToAaiNode(VF_MODULE, vfModuleNode, nodesAccumulator, nodesCounter))
-                                .collect(toList())
-                );
+            if (isArray(jsonNode, NodeType.VF_MODULE)) {
+
+                //create list of AAITreeNode represent the VfModules from AAI result
+                List<AAITreeNode> vfModules = Streams.fromIterable(jsonNode.get(NodeType.VF_MODULE.getType()))
+                        .map(vfModuleNode -> createAaiNode(NodeType.VF_MODULE, vfModuleNode, nodesAccumulator))
+                        .collect(toList());
+                //enrich each of the VfModule with placement info
+                vfModules.forEach(vfModule-> enrichPlacementDataUsingTenantInfo(
+                        vfModule,
+                        AAITreeNodeUtils.findFirstRelationshipByRelatedTo(vfModule.getRelationshipList(), "vserver")
+                ));
+                //add all VfModules to children list of parent node
+                parentNode.getChildren().addAll(vfModules);
             } else {
                 LOGGER.error(EELFLoggerDelegate.errorLogger, "Failed to get vf-modules for vnf " + parentNode.getId());
             }
         });
     }
 
-    private void getChildren(ExecutorService threadPool, ConcurrentSkipListSet<AAITreeNode> nodesAccumulator,
-                             List<Relationship> relationships, ConcurrentLinkedQueue<String> visitedNodes, AAITreeNode parent, AtomicInteger nodesCounter, Tree<AAIServiceTree.AaiRelationship> pathsTree) {
-        for (Relationship relationship : relationships) {
-            createChildNode(threadPool, nodesAccumulator, relationship, visitedNodes, parent, nodesCounter, pathsTree);
+    List<Relationship> getFilteredRelationships(JsonNode json, Tree<AAIServiceTree.AaiRelationship> pathsTree) {
+        RelationshipList relationshipList = JACKSON_OBJECT_MAPPER.convertValue(json.get(AAIBaseProperties.RELATIONSHIP_LIST.getAaiKey()), RelationshipList.class);
+        if (relationshipList != null) {
+            return relationshipList.getRelationship().stream()
+                    .filter(rel -> getNextLevelInPathsTree(pathsTree, rel.getRelatedTo()) != null)
+                    .filter(rel -> !Objects.equals(rel.getRelatedTo(), NodeType.VF_MODULE.getType())) // vf-modules are handled separately
+                    .collect(toList());
         }
+
+        return Collections.emptyList();
     }
 
-    private void createChildNode(ExecutorService threadPool, ConcurrentSkipListSet<AAITreeNode> nodesAccumulator,
-                                 Relationship relationship, ConcurrentLinkedQueue<String> visitedNodes, AAITreeNode parent, AtomicInteger nodesCounter, Tree<AAIServiceTree.AaiRelationship> pathsTree) {
-        String newNodeType = relationship.getRelatedTo();
-        Tree<AAIServiceTree.AaiRelationship> subTree = pathsTree.getSubTree(new AAIServiceTree.AaiRelationship(newNodeType));
-        if (subTree!=null) {
-            String newNodeUrl = relationship.getRelatedLink();
-            if (!visitedNodes.contains(newNodeUrl)) {
-                visitedNodes.add(newNodeUrl);
-                threadPool.execute(() -> {
-                            try {
-                                parent.addChildren(buildNode(newNodeType, newNodeUrl, nodesAccumulator, threadPool, visitedNodes, nodesCounter,  subTree));
-                            } catch (Exception e) {
-                                parent.getChildren().add(createFailureNode(e));
-                            }
-                        }
-                );
+    void fetchChildrenAsync(ExecutorService threadPool, ConcurrentSkipListSet<AAITreeNode> nodesAccumulator,
+                            AAITreeNode node, List<Relationship> relationships, Tree<AAIServiceTree.AaiRelationship> pathsTree, long timeout) {
+
+        if (!relationships.isEmpty()) {
+            List<Callable<List<AAITreeNode>>> tasks = relationships.stream()
+                    .map(relationship ->
+                            (Callable<List<AAITreeNode>>) () ->
+                                    getChildNode(threadPool, nodesAccumulator, relationship.getRelatedTo(),
+                                            relationship.getRelatedLink(), pathsTree))
+                    .collect(Collectors.toList());
+
+            try {
+                int depth = pathsTree.getChildrenDepth();
+                threadPool.invokeAll(tasks, timeout * depth, TimeUnit.SECONDS)
+                        .forEach(future ->
+                                addChildren(node, future)
+                        );
+            } catch (Exception e) {
+                throw new GenericUncheckedException(e);
             }
         }
     }
 
-    private AAITreeNode fillNodeMetaData(String nodeType, JsonNode model, @NotNull AtomicInteger nodesCounter) {
+    private List<AAITreeNode> getChildNode(ExecutorService threadPool, ConcurrentSkipListSet<AAITreeNode> nodesAccumulator,
+                                           String childNodeType, String childNodeUrl,
+                                           Tree<AAIServiceTree.AaiRelationship> pathsTree) {
+
+        Tree<AAIServiceTree.AaiRelationship> subTree = getNextLevelInPathsTree(pathsTree, childNodeType);
+
+        return buildNode(NodeType.fromString(childNodeType), childNodeUrl, null, HttpMethod.GET, nodesAccumulator, threadPool, subTree);
+    }
+
+    Tree<AAIServiceTree.AaiRelationship> getNextLevelInPathsTree(Tree<AAIServiceTree.AaiRelationship> pathsTree, String nodeType) {
+        return pathsTree.getSubTree(new AAIServiceTree.AaiRelationship(nodeType));
+    }
+
+    //ADD TEST
+    private AAITreeNode jsonNodeToAaiNode(NodeType nodeType, JsonNode jsonNode) {
         AAITreeNode node = new AAITreeNode();
         node.setType(nodeType);
-        node.setUniqueNumber(nodesCounter.getAndIncrement());
-        node.setOrchestrationStatus(getStringDataFromJsonIfExists(model, AAIBaseProperties.ORCHESTRATION_STATUS.getAaiKey()));
-        node.setProvStatus(getStringDataFromJsonIfExists(model, AAIBaseProperties.PROV_STATUS.getAaiKey()));
-        node.setInMaint(getBooleanDataFromJsonIfExists(model, AAIBaseProperties.IN_MAINT.getAaiKey()));
-        node.setModelVersionId(getStringDataFromJsonIfExists(model, AAIBaseProperties.MODEL_VERSION_ID.getAaiKey()));
-        node.setModelCustomizationId(getStringDataFromJsonIfExists(model, AAIBaseProperties.MODEL_CUSTOMIZATION_ID.getAaiKey()));
-        node.setModelInvariantId(getStringDataFromJsonIfExists(model, AAIBaseProperties.MODEL_INVARIANT_ID.getAaiKey()));
-        node.setId(getStringDataFromJsonIfExists(model, nodeTypeToIdKeyMap.get(nodeType)));
-        node.setName(getStringDataFromJsonIfExists(model, nodeTypeToNameKeyMap.get(nodeType)));
-        node.setAdditionalProperties(aggregateAllOtherProperties(model, nodeType));
-
+        node.setOrchestrationStatus(getStringDataFromJsonIfExists(jsonNode, AAIBaseProperties.ORCHESTRATION_STATUS.getAaiKey()));
+        node.setProvStatus(getStringDataFromJsonIfExists(jsonNode, AAIBaseProperties.PROV_STATUS.getAaiKey()));
+        node.setInMaint(getBooleanDataFromJsonIfExists(jsonNode, AAIBaseProperties.IN_MAINT.getAaiKey()));
+        node.setModelVersionId(getStringDataFromJsonIfExists(jsonNode, AAIBaseProperties.MODEL_VERSION_ID.getAaiKey()));
+        node.setModelCustomizationId(getStringDataFromJsonIfExists(jsonNode, AAIBaseProperties.MODEL_CUSTOMIZATION_ID.getAaiKey()));
+        node.setModelInvariantId(getStringDataFromJsonIfExists(jsonNode, AAIBaseProperties.MODEL_INVARIANT_ID.getAaiKey()));
+        node.setId(getStringDataFromJsonIfExists(jsonNode, nodeType.getId()));
+        node.setName(getStringDataFromJsonIfExists(jsonNode, nodeType.getName()));
+        node.setAdditionalProperties(aggregateAllOtherProperties(jsonNode, nodeType));
+        node.setRelationshipList(JACKSON_OBJECT_MAPPER.convertValue(jsonNode.get(AAIBaseProperties.RELATIONSHIP_LIST.getAaiKey()), RelationshipList.class));
         return node;
     }
 
@@ -241,7 +309,7 @@
     }
 
     private String getStringDataFromJsonIfExists(JsonNode model, String key) {
-        if (model.has(key)) {
+        if (!NodeType.NONE.equals(key) && model.has(key)) {
             return model.get(key).asText();
         }
         return null;
@@ -254,48 +322,17 @@
         return false;
     }
 
-    private Map<String, Object> aggregateAllOtherProperties(JsonNode model, String nodeType) {
+    Map<String, Object> aggregateAllOtherProperties(JsonNode model, NodeType nodeType) {
         Set<String> ignoreProperties = Stream.of(AAIBaseProperties.values())
                 .map(AAIBaseProperties::getAaiKey).collect(toSet());
-
         return Streams.fromIterator(model.fields())
-                .filter(not(field -> StringUtils.equals(field.getKey(), nodeTypeToIdKeyMap.get(nodeType))))
-                .filter(not(field -> StringUtils.equals(field.getKey(), nodeTypeToNameKeyMap.get(nodeType))))
+                .filter(not(field -> StringUtils.equals(field.getKey(), nodeType.getId())))
+                .filter(not(field -> StringUtils.equals(field.getKey(), nodeType.getName())))
                 .filter(not(field -> ignoreProperties.contains(field.getKey())))
-                .collect(toMap(Map.Entry::getKey, v -> v.getValue().asText()));
+                .collect(toMap(Map.Entry::getKey, v -> ifTextualGetAsText(v.getValue())));
     }
 
-    private static HashMap<String, String> generateTypeToIdKeyMap() {
-        HashMap<String, String> result = new HashMap<>();
-        result.put(SERVICE_INSTANCE, "service-instance-id");
-        result.put(GENERIC_VNF, "vnf-id");
-        result.put(NETWORK, "network-id");
-        result.put(COLLECTION_RESOURCE, "collection-id");
-        result.put(CONFIGURATION, "configuration-id");
-        result.put(PNF, "pnf-id");
-        result.put(VF_MODULE, "vf-module-id");
-        result.put(INSTANCE_GROUP, "id");
-        result.put(PORT, "l-interface-id");
-        result.put(VG, "volume-group-id");
-        result.put(VLAN_TAG, "vlan-id");
-
-        return result;
+    private Object ifTextualGetAsText(JsonNode jsonNode) {
+        return jsonNode.isTextual() ? jsonNode.asText() : jsonNode;
     }
-
-    private static HashMap<String, String> generateTypeToNameKeyMap() {
-        HashMap<String, String> result = new HashMap<>();
-        result.put(SERVICE_INSTANCE, "service-instance-name");
-        result.put(GENERIC_VNF, "vnf-name");
-        result.put(NETWORK, "network-name");
-        result.put(COLLECTION_RESOURCE, "collection-name");
-        result.put(CONFIGURATION, "configuration-name");
-        result.put(PNF, "pnf-name");
-        result.put(VF_MODULE, "vf-module-name");
-        result.put(INSTANCE_GROUP, "instance-group-name");
-        result.put(PORT, "l-interface-name");
-        result.put(VG, "volume-group-name");
-        result.put(VLAN_TAG, "vlan-name");
-
-        return result;
-    }
-}
+}
\ No newline at end of file
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AaiService.java b/vid-app-common/src/main/java/org/onap/vid/services/AaiService.java
index 910b341..76efbd0 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/AaiService.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/AaiService.java
@@ -48,7 +48,7 @@
 
     SubscriberFilteredResults getFullSubscriberList(RoleValidator roleValidator);
 
-    AaiResponse getSubscriberData(String subscriberId, RoleValidator roleValidator);
+    AaiResponse getSubscriberData(String subscriberId, RoleValidator roleValidator, boolean omitServiceInstances);
 
     AaiResponse getServiceInstanceSearchResults(String subscriberId, String instanceIdentifier, RoleValidator roleProvider, List<String> owningEntities, List<String> projects);
 
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java
index d01f0f7..961f110 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java
@@ -24,6 +24,7 @@
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import io.joshworks.restclient.http.HttpResponse;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.http.HttpStatus;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.vid.aai.*;
@@ -39,16 +40,19 @@
 import org.onap.vid.model.ServiceInstanceSearchResult;
 import org.onap.vid.model.SubscriberList;
 import org.onap.vid.model.aaiTree.AAITreeNode;
+import org.onap.vid.model.aaiTree.NodeType;
 import org.onap.vid.model.aaiTree.RelatedVnf;
 import org.onap.vid.roles.RoleValidator;
 import org.onap.vid.utils.Intersection;
 import org.onap.vid.utils.Tree;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
 
 import javax.ws.rs.core.Response;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.util.*;
+import java.util.concurrent.ExecutorService;
 import java.util.stream.Collectors;
 
 /**
@@ -68,6 +72,8 @@
     private AaiResponseTranslator aaiResponseTranslator;
     private AAITreeNodeBuilder aaiTreeNode;
     private AAIServiceTree aaiServiceTree;
+    private ExecutorService executorService;
+
 
     private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(AaiServiceImpl.class);
 
@@ -77,13 +83,15 @@
         AaiOverTLSClientInterface aaiOverTLSClient,
         AaiResponseTranslator aaiResponseTranslator,
         AAITreeNodeBuilder aaiTreeNode,
-        AAIServiceTree aaiServiceTree)
+        AAIServiceTree aaiServiceTree,
+        ExecutorService executorService)
     {
         this.aaiClient = aaiClient;
         this.aaiOverTLSClient = aaiOverTLSClient;
         this.aaiResponseTranslator = aaiResponseTranslator;
         this.aaiTreeNode = aaiTreeNode;
         this.aaiServiceTree = aaiServiceTree;
+        this.executorService = executorService;
     }
 
     private List<Service> convertModelToService(Model model) {
@@ -220,8 +228,8 @@
     }
 
     @Override
-    public AaiResponse getSubscriberData(String subscriberId, RoleValidator roleValidator) {
-        AaiResponse<Services> subscriberResponse = aaiClient.getSubscriberData(subscriberId);
+    public AaiResponse getSubscriberData(String subscriberId, RoleValidator roleValidator, boolean omitServiceInstances) {
+        AaiResponse<Services> subscriberResponse = aaiClient.getSubscriberData(subscriberId, omitServiceInstances);
         String subscriberGlobalId = subscriberResponse.getT().globalCustomerId;
         for (ServiceSubscription serviceSubscription : subscriberResponse.getT().serviceSubscriptions.serviceSubscription) {
             String serviceType = serviceSubscription.serviceType;
@@ -254,7 +262,7 @@
 
 
     private List<ServiceInstanceSearchResult> getServicesBySubscriber(String subscriberId, String instanceIdentifier, RoleValidator roleValidator) {
-        AaiResponse<Services> subscriberResponse = aaiClient.getSubscriberData(subscriberId);
+        AaiResponse<Services> subscriberResponse = aaiClient.getSubscriberData(subscriberId, false);
         String subscriberGlobalId = subscriberResponse.getT().globalCustomerId;
         String subscriberName = subscriberResponse.getT().subscriberName;
         ServiceSubscriptions serviceSubscriptions = subscriberResponse.getT().serviceSubscriptions;
@@ -483,26 +491,37 @@
     @Override
     public List<RelatedVnf> searchGroupMembers(String globalCustomerId, String serviceType, String invariantId, String groupType, String groupRole) {
         String getURL = "business/customers/customer/" +
-                    globalCustomerId + "/service-subscriptions/service-subscription/" +
-                    serviceType + "/service-instances?model-invariant-id=" + invariantId;
+                globalCustomerId + "/service-subscriptions/service-subscription/" +
+                serviceType + "/service-instances?model-invariant-id=" + invariantId;
 
-        Tree<AAIServiceTree.AaiRelationship> pathsToSearch = new Tree<>(new AAIServiceTree.AaiRelationship(AAITreeNodeBuilder.SERVICE_INSTANCE));
-        pathsToSearch.addPath(AAITreeNodeBuilder.toAaiRelationshipList(AAITreeNodeBuilder.GENERIC_VNF, AAITreeNodeBuilder.INSTANCE_GROUP));
+        Tree<AAIServiceTree.AaiRelationship> pathsToSearch = new Tree<>(new AAIServiceTree.AaiRelationship(NodeType.SERVICE_INSTANCE));
+        pathsToSearch.addPath(AAIServiceTree.toAaiRelationshipList(NodeType.GENERIC_VNF, NodeType.INSTANCE_GROUP));
 
         //get all vnfs related to service-instances from the model-invariant-id
-        List<AAITreeNode> aaiTree = aaiServiceTree.buildAAITree(getURL, pathsToSearch);
+        List<AAITreeNode> aaiTree = aaiServiceTree.buildAAITree(getURL, null, HttpMethod.GET, pathsToSearch, true);
 
         //filter by instance-group-role & instance-group-type properties (from getAdditionalProperties)
         //only vnfs has related instance-group with the same groupType & groupRole - are filtered out.
         List<AAITreeNode> filteredVnfs = filterByInstanceGroupRoleAndType(aaiTree, groupRole, groupType);
 
         //convert vnfs to expected result
-        return filteredVnfs.stream()
+        List<RelatedVnf> convertedVnfs = filteredVnfs.stream()
                 .map(RelatedVnf::from)
-                .map(this::enrichRelatedVnfWithCloudRegionAndTenant)
                 .collect(Collectors.toList());
+
+        try {
+            return executorService.submit(() ->
+                    convertedVnfs.parallelStream()
+                            .map(this::enrichRelatedVnfWithCloudRegionAndTenant)
+                            .collect(Collectors.toList())
+            ).get();
+        } catch (Exception e) {
+            LOGGER.error(EELFLoggerDelegate.errorLogger, "Search group Members - Failed to enrich vnf with cloud region", e);
+            return convertedVnfs;
+        }
     }
 
+
     private List<AAITreeNode> filterByInstanceGroupRoleAndType(List<AAITreeNode> aaiTree, String groupRole, String groupType) {
 
         return aaiTree.stream()
@@ -544,10 +563,10 @@
     }
 
     private void getInstanceGroupInfoFromRelationship(org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship relationship, List<InstanceGroupInfo> instanceGroupInfoList) {
-        if(relationship.getRelatedTo().equals("instance-group")){
+        if(StringUtils.equals(relationship.getRelatedTo(),"instance-group")){
             for(org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.RelatedToProperty relatedToProperty: relationship.getRelatedToPropertyList()){
-                if(relatedToProperty.getPropertyKey().equals("instance-group.instance-group-name")){
-                    instanceGroupInfoList.add(new InstanceGroupInfo(relatedToProperty.getPropertyValue()));
+                if(StringUtils.equals(relatedToProperty.getKey(),"instance-group.instance-group-name")){
+                    instanceGroupInfoList.add(new InstanceGroupInfo(relatedToProperty.getValue()));
                 }
             }
         }
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogic.java b/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogic.java
index 603f138..1202fc9 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogic.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogic.java
@@ -7,9 +7,9 @@
  * 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.
@@ -21,17 +21,15 @@
 package org.onap.vid.services;
 
 import org.onap.vid.aai.model.ResourceType;
-import org.onap.vid.changeManagement.RequestDetailsWrapper;
 import org.onap.vid.job.Job;
-import org.onap.vid.model.JobAuditStatus;
+import org.onap.vid.job.impl.JobSharedData;
 import org.onap.vid.model.ServiceInfo;
-import org.onap.vid.model.serviceInstantiation.*;
-import org.onap.vid.mso.model.*;
+import org.onap.vid.model.serviceInstantiation.ServiceInstantiation;
+import org.onap.vid.mso.RestObject;
 import org.onap.vid.mso.rest.AsyncRequestStatus;
 
 import java.util.Arrays;
 import java.util.List;
-import java.util.Map;
 import java.util.UUID;
 import java.util.function.Consumer;
 
@@ -43,23 +41,7 @@
 
     List<UUID> pushBulkJob(ServiceInstantiation request, String userId);
 
-    RequestDetailsWrapper<ServiceInstantiationRequestDetails> generateMacroServiceInstantiationRequest(UUID uuid, ServiceInstantiation details, String optimisticUniqueServiceInstanceName, String userId);
-
-    RequestDetailsWrapper<ServiceInstantiationRequestDetails> generateALaCarteServiceInstantiationRequest(UUID uuid, ServiceInstantiation details, String optimisticUniqueServiceInstanceName, String userId);
-
-    RequestDetailsWrapper<ServiceDeletionRequestDetails> generateALaCarteServiceDeletionRequest(UUID uuid, ServiceInstantiation details, String userId);
-
-    RequestDetailsWrapper<VnfInstantiationRequestDetails> generateVnfInstantiationRequest(Vnf vnfDetails, ModelInfo serviceModelInfo, String serviceInstanceId, String userId);
-
-    RequestDetailsWrapper<VfModuleInstantiationRequestDetails> generateVfModuleInstantiationRequest(VfModule vfModuleDetails, ModelInfo serviceModelInfo, String serviceInstanceId, ModelInfo vnfModelInfo, String vnfInstanceId, String vgInstanceId, String userId);
-
-    RequestDetailsWrapper<VolumeGroupRequestDetails> generateVolumeGroupInstantiationRequest(VfModule vfModuleDetails, ModelInfo serviceModelInfo, String serviceInstanceId, ModelInfo vnfModelInfo, String vnfInstanceId, String userId);
-
-    RequestDetailsWrapper<NetworkInstantiationRequestDetails> generateNetworkInstantiationRequest(Network networkDetails, ModelInfo serviceModelInfo, String serviceInstanceId, String userId);
-
-    RequestDetailsWrapper<InstanceGroupInstantiationRequestDetails> generateInstanceGroupInstantiationRequest(InstanceGroup request, ModelInfo serviceModelInfo, String serviceInstanceId, String userId);
-
-    List<Map<String,String>> buildVnfInstanceParams(List<Map<String, String>> currentVnfInstanceParams, List<VfModuleMacro> vfModules);
+    boolean isPartOfBulk(UUID jobId);
 
     String getServiceInstantiationPath(ServiceInstantiation serviceInstantiationRequest);
 
@@ -67,32 +49,34 @@
 
     String getVnfInstantiationPath(String serviceInstanceId);
 
+    String getVnfDeletionPath(String serviceInstanceId, String vnfInstanceId);
+
     String getNetworkInstantiationPath(String serviceInstanceId);
 
     String getVfmoduleInstantiationPath(String serviceInstanceId, String vnfInstanceId);
 
+    String getVfModuleReplacePath(String serviceInstanceId, String vnfInstanceId, String vfModuleInstanceId);
+
+    String getVfModuleDeletePath(String serviceInstanceId, String vnfInstanceId, String vfModuleInstanceId);
+
     String getVolumeGroupInstantiationPath(String serviceInstanceId, String vnfInstanceId);
 
     String getInstanceGroupInstantiationPath();
 
+    String getInstanceGroupMemberInstantiationPath(String vnfGroupInstanceId);
+
     String getInstanceGroupDeletePath(String instanceGroupId);
 
+    String getInstanceGroupMemberDeletePath(String vnfGroupInstanceId);
+
+    String getNetworkDeletePath(String serviceInstanceId, String networkInstanceId);
+
     String getOrchestrationRequestsPath();
 
-    ServiceInfo getServiceInfoByJobId(UUID jobUUID);
-
-    List<JobAuditStatus> getAuditStatuses(UUID jobUUID, JobAuditStatus.SourceStatus source);
-
     ServiceInfo updateServiceInfo(UUID jobUUID, Consumer<ServiceInfo> serviceUpdater);
 
     ServiceInfo updateServiceInfoAndAuditStatus(UUID jobUuid, Job.JobStatus jobStatus);
 
-    void auditVidStatus(UUID jobUUID, Job.JobStatus jobStatus);
-
-    void auditMsoStatus(UUID jobUUID, AsyncRequestStatus.Request msoRequestStatus);
-
-    void auditMsoStatus(UUID jobUUID, String jobStatus, String requestId, String additionalInfo);
-
     Job.JobStatus calcStatus(AsyncRequestStatus asyncRequestStatus);
 
     void handleFailedInstantiation(UUID jobUUID);
@@ -109,5 +93,21 @@
 
     String getUniqueName(String name, ResourceType resourceType);
 
+    ServiceInstantiation prepareServiceToBeUnique(ServiceInstantiation serviceInstantiation);
 
+    ServiceInstantiation enrichBulkForRetry(ServiceInstantiation serviceInstantiation, UUID jobId);
+
+    List<UUID> retryJob(UUID jobId, String userId);
+
+    List<UUID> retryJob(ServiceInstantiation request, UUID oldJobId, String userId);
+
+    void addResourceInfo(JobSharedData sharedData, Job.JobStatus jobStatus, String instanceId);
+
+    void addFailedResourceInfo(JobSharedData sharedData, RestObject msoResponse);
+
+    void updateResourceInfo(JobSharedData sharedData, Job.JobStatus jobStatus, AsyncRequestStatus message);
+
+    ServiceInstantiation getBulkForRetry(UUID jobId);
+
+    String getResumeRequestPath(String requestId);
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java
index 73056db..92a6d5f 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java
@@ -20,18 +20,28 @@
 
 package org.onap.vid.services;
 
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.collect.ImmutableList;
+import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
+import static org.onap.vid.controller.MsoController.SVC_INSTANCE_ID;
+import static org.onap.vid.controller.MsoController.VNF_INSTANCE_ID;
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
+
 import com.google.common.collect.ImmutableMap;
+import java.io.IOException;
+import java.time.ZonedDateTime;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.function.Consumer;
 import org.apache.commons.lang3.StringUtils;
 import org.hibernate.SessionFactory;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.onap.portalsdk.core.service.DataAccessService;
 import org.onap.vid.aai.AaiClientInterface;
 import org.onap.vid.aai.ExceptionWithRequestInfo;
 import org.onap.vid.aai.model.ResourceType;
-import org.onap.vid.changeManagement.RequestDetailsWrapper;
+import org.onap.vid.dal.AsyncInstantiationRepository;
 import org.onap.vid.exceptions.DbFailureUncheckedException;
 import org.onap.vid.exceptions.GenericUncheckedException;
 import org.onap.vid.exceptions.MaxRetriesException;
@@ -41,37 +51,26 @@
 import org.onap.vid.job.JobAdapter;
 import org.onap.vid.job.JobType;
 import org.onap.vid.job.JobsBrokerService;
+import org.onap.vid.job.impl.JobSharedData;
 import org.onap.vid.model.Action;
-import org.onap.vid.model.JobAuditStatus;
 import org.onap.vid.model.NameCounter;
+import org.onap.vid.model.ResourceInfo;
 import org.onap.vid.model.ServiceInfo;
-import org.onap.vid.model.serviceInstantiation.*;
+import org.onap.vid.model.serviceInstantiation.BaseResource;
+import org.onap.vid.model.serviceInstantiation.ServiceInstantiation;
 import org.onap.vid.mso.MsoBusinessLogicImpl;
 import org.onap.vid.mso.MsoProperties;
-import org.onap.vid.mso.model.*;
-import org.onap.vid.mso.model.ServiceInstantiationRequestDetails.RequestParameters;
-import org.onap.vid.mso.model.ServiceInstantiationRequestDetails.*;
-import org.onap.vid.mso.model.VfModuleInstantiationRequestDetails.RequestParametersVfModule;
-import org.onap.vid.mso.model.VfModuleInstantiationRequestDetails.UserParamMap;
+import org.onap.vid.mso.MsoUtil;
+import org.onap.vid.mso.RestObject;
 import org.onap.vid.mso.rest.AsyncRequestStatus;
-import org.onap.vid.mso.rest.SubscriberInfo;
+import org.onap.vid.mso.rest.RequestStatus;
 import org.onap.vid.properties.Features;
 import org.onap.vid.utils.DaoUtils;
+import org.onap.vid.utils.TimeUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.togglz.core.manager.FeatureManager;
 
-import java.sql.Timestamp;
-import java.time.LocalDateTime;
-import java.util.*;
-import java.util.function.Consumer;
-import java.util.stream.Collectors;
-
-import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
-import static org.onap.vid.controller.MsoController.SVC_INSTANCE_ID;
-import static org.onap.vid.controller.MsoController.VNF_INSTANCE_ID;
-import static org.onap.vid.utils.Logging.debugRequestDetails;
-
 @Service
 public class AsyncInstantiationBusinessLogicImpl implements
         AsyncInstantiationBusinessLogic {
@@ -79,9 +78,6 @@
     private static final int MAX_RETRIES_GETTING_COUNTER = 100;
     private static final int MAX_RETRIES_GETTING_FREE_NAME_FROM_AAI = 10000;
     public static final String NAME_FOR_CHECK_AAI_STATUS = "NAME_FOR_CHECK_AAI_STATUS";
-    private static final String VID_SOURCE = "VID";
-
-    private final DataAccessService dataAccessService;
 
     private final JobAdapter jobAdapter;
 
@@ -89,12 +85,17 @@
 
     private final CloudOwnerService cloudOwnerService;
 
+    private final AsyncInstantiationRepository asyncInstantiationRepository;
+
     private SessionFactory sessionFactory;
 
     private AaiClientInterface aaiClient;
 
     private FeatureManager featureManager;
 
+    private AuditService auditService;
+
+
     private int maxRetriesGettingFreeNameFromAai = MAX_RETRIES_GETTING_FREE_NAME_FROM_AAI;
 
     private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AsyncInstantiationBusinessLogicImpl.class);
@@ -107,51 +108,34 @@
             .put("pending", JobStatus.IN_PROGRESS)
             .put("pendingmanualtask", JobStatus.PAUSE)
             .put("unlocked", JobStatus.IN_PROGRESS)
+            .put("aborted", JobStatus.COMPLETED_WITH_ERRORS)
+            .put("rolledback", JobStatus.FAILED)
+            .put("rolledbacktoassigned", JobStatus.FAILED)
+            .put("rolledbacktocreated", JobStatus.FAILED)
             .build();
 
 
     @Autowired
-    public AsyncInstantiationBusinessLogicImpl(DataAccessService dataAccessService,
-                                               JobAdapter jobAdapter,
+    public AsyncInstantiationBusinessLogicImpl(JobAdapter jobAdapter,
                                                JobsBrokerService jobService,
                                                SessionFactory sessionFactory,
                                                AaiClientInterface aaiClient,
                                                FeatureManager featureManager,
-                                               CloudOwnerService cloudOwnerService) {
-        this.dataAccessService = dataAccessService;
+                                               CloudOwnerService cloudOwnerService, AsyncInstantiationRepository asyncInstantiationRepository,
+                                               AuditService auditService) {
         this.jobAdapter = jobAdapter;
         this.jobService = jobService;
         this.sessionFactory = sessionFactory;
         this.aaiClient = aaiClient;
         this.featureManager = featureManager;
         this.cloudOwnerService = cloudOwnerService;
+        this.asyncInstantiationRepository = asyncInstantiationRepository;
+        this.auditService = auditService;
     }
 
     @Override
     public List<ServiceInfo> getAllServicesInfo() {
-        return dataAccessService.getList(ServiceInfo.class, filterByCreationDateAndNotDeleted(), orderByCreatedDateAndStatus(), null);
-    }
-
-    private String filterByCreationDateAndNotDeleted() {
-        LocalDateTime minus3Months = LocalDateTime.now().minusMonths(3);
-        Timestamp filterDate = Timestamp.valueOf(minus3Months);
-        return " where" +
-                "   hidden = false" +
-                "   and deleted_at is null" +  // don't fetch deleted
-                "   and created >= '" + filterDate + "' ";
-    }
-
-    private String orderByCreatedDateAndStatus() {
-        return " createdBulkDate DESC ,\n" +
-                "  (CASE jobStatus\n" +
-                "   WHEN 'COMPLETED' THEN 0\n" +
-                "   WHEN 'FAILED' THEN 0\n" +
-                "   WHEN 'COMPLETED_WITH_ERRORS' THEN 0\n" +
-                "   WHEN 'IN_PROGRESS' THEN 1\n" +
-                "   WHEN 'PAUSE' THEN 2\n" +
-                "   WHEN 'PENDING' THEN 3\n" +
-                "   WHEN 'STOPPED' THEN 3 END),\n" +
-                "  statusModifiedDate ";
+        return asyncInstantiationRepository.getAllServicesInfo();
     }
 
     JobType getJobType(ServiceInstantiation request) {
@@ -171,19 +155,26 @@
 
     @Override
     public List<UUID> pushBulkJob(ServiceInstantiation request, String userId) {
+
         List<UUID> uuids = new ArrayList<>();
         Date createdBulkDate = Calendar.getInstance().getTime();
         int bulkSize = request.getBulkSize();
         UUID templateId = UUID.randomUUID();
         for (int i = 0; i < bulkSize; i++) {
-            ServiceInfo.ServiceAction serviceAction = getAction(request);
-            JobType jobType = getJobType(request);
-            final String optimisticUniqueServiceInstanceName = getOptimisticUniqueServiceInstanceName(request);
-            Job job = jobAdapter.createServiceInstantiationJob(jobType, request, templateId, userId, optimisticUniqueServiceInstanceName, i);
-            UUID jobId = jobService.add(job);
-            dataAccessService.saveDomainObject(createServiceInfo(userId, request, jobId, templateId, createdBulkDate, optimisticUniqueServiceInstanceName, serviceAction), DaoUtils.getPropsMap());
-            auditVidStatus(jobId, job.getStatus());
+            ServiceInstantiation requestPerJob = prepareServiceToBeUnique(request);
+            ServiceInfo.ServiceAction serviceAction = getAction(requestPerJob);
+            JobType jobType = getJobType(requestPerJob);
+            final String optimisticUniqueServiceInstanceName = bulkSize>1 ? //only bulk with more than 1 service need to get multiple names
+                    getOptimisticUniqueServiceInstanceName(requestPerJob.getInstanceName()) : requestPerJob.getInstanceName();
+            Job job = jobAdapter.createServiceInstantiationJob(jobType, requestPerJob, templateId, userId, request.getTestApi(), optimisticUniqueServiceInstanceName, i);
+            UUID jobId = job.getUuid();
+
+            asyncInstantiationRepository.saveServiceInfo(createServiceInfo(userId, requestPerJob, jobId, templateId, createdBulkDate, optimisticUniqueServiceInstanceName, serviceAction));
+            asyncInstantiationRepository.addJobRequest(jobId, requestPerJob);
+            auditService.auditVidStatus(jobId, job.getStatus());
             uuids.add(jobId);
+
+            jobService.add(job);
         }
         return uuids;
     }
@@ -197,8 +188,8 @@
     }
 
 
-    private String getOptimisticUniqueServiceInstanceName(ServiceInstantiation request) {
-        return StringUtils.isNotEmpty(request.getInstanceName()) ? getUniqueNameFromDbOnly(request.getInstanceName()) : request.getInstanceName();
+    private String getOptimisticUniqueServiceInstanceName(String instanceName) {
+        return StringUtils.isNotEmpty(instanceName) ? getUniqueNameFromDbOnly(instanceName) : instanceName;
     }
 
     protected ServiceInfo createServiceInfo(String userId, ServiceInstantiation serviceInstantiation, UUID jobId, UUID templateId, Date createdBulkDate, String optimisticUniqueServiceInstanceName, ServiceInfo.ServiceAction serviceAction) {
@@ -224,361 +215,34 @@
                 serviceInstantiation.getModelInfo().getModelName(),
                 serviceInstantiation.getModelInfo().getModelVersion(),
                 createdBulkDate,
-                serviceAction
+                serviceAction,
+                false);
+    }
+
+    @Override
+    public boolean isPartOfBulk(UUID jobId) {
+        if (jobId == null) {
+            return false;
+    }
+        ServiceInfo serviceInfo = asyncInstantiationRepository.getServiceInfoByJobId(jobId);
+        UUID templateId = serviceInfo.getTemplateId();
+        if (templateId != null) {
+            return getNumberOfJobsInBulk(templateId) > 1;
+    }
+        return false;
+
+    }
+
+    private int getNumberOfJobsInBulk(UUID templateId) {
+        String hqlSelectJob = "from JobDaoImpl where templateId = :templateId";
+        return DaoUtils.tryWithSessionAndTransaction(sessionFactory, session ->
+            session.createQuery(hqlSelectJob)
+                    .setText("templateId", templateId.toString())
+                    .list()
+                    .size()
         );
     }
 
-
-    @Override
-    public RequestDetailsWrapper<ServiceInstantiationRequestDetails> generateMacroServiceInstantiationRequest(UUID jobId, ServiceInstantiation payload, String optimisticUniqueServiceInstanceName, String userId) {
-        String serviceInstanceName = generateServiceName(jobId, payload, optimisticUniqueServiceInstanceName);
-
-        List<ServiceInstantiationService> serviceInstantiationServiceList = generateServiceInstantiationServicesList(payload, serviceInstanceName, createServiceInstantiationVnfList(payload));
-
-        RequestParameters requestParameters = new RequestParameters(payload.getSubscriptionServiceType(), false, serviceInstantiationServiceList);
-
-        ServiceInstantiationRequestDetails requestDetails = generateServiceInstantiationRequestDetails(payload,requestParameters,serviceInstanceName, userId);
-
-        RequestDetailsWrapper<ServiceInstantiationRequestDetails> requestDetailsWrapper = new RequestDetailsWrapper<>(requestDetails);
-        debugRequestDetails(requestDetailsWrapper, logger);
-
-        return requestDetailsWrapper;
-    }
-
-    @Override
-    public RequestDetailsWrapper<ServiceInstantiationRequestDetails> generateALaCarteServiceInstantiationRequest(UUID jobId, ServiceInstantiation payload, String optimisticUniqueServiceInstanceName, String userId) {
-        String serviceInstanceName = generateServiceName(jobId, payload, optimisticUniqueServiceInstanceName);
-
-        List<UserParamNameAndValue> userParams = generateUserParamList();
-
-        RequestParameters requestParameters = new RequestParameters(payload.getSubscriptionServiceType(), true, userParams, payload.getTestApi());
-
-        ServiceInstantiationRequestDetails requestDetails = generateServiceInstantiationRequestDetails(payload,requestParameters,serviceInstanceName, userId);
-
-        RequestDetailsWrapper<ServiceInstantiationRequestDetails> requestDetailsWrapper = new RequestDetailsWrapper<>(requestDetails);
-        debugRequestDetails(requestDetailsWrapper, logger);
-        return requestDetailsWrapper;
-    }
-
-
-    @Override
-    public RequestDetailsWrapper<ServiceDeletionRequestDetails> generateALaCarteServiceDeletionRequest(UUID jobId, ServiceInstantiation payload, String userId){
-
-        ServiceDeletionRequestDetails.RequestParameters requestParameters = new ServiceDeletionRequestDetails.RequestParameters( true, payload.getTestApi());
-
-        ServiceDeletionRequestDetails.RequestInfo requestInfo = new ServiceDeletionRequestDetails.RequestInfo(
-                VID_SOURCE,
-                userId);
-
-        ServiceDeletionRequestDetails requestDetails = new ServiceDeletionRequestDetails(payload.getModelInfo(), requestInfo, requestParameters);
-
-        RequestDetailsWrapper<ServiceDeletionRequestDetails> requestDetailsWrapper = new RequestDetailsWrapper<>(requestDetails);
-        debugRequestDetails(requestDetailsWrapper, logger);
-        return requestDetailsWrapper;
-    }
-
-    @Override
-    public RequestDetailsWrapper<VnfInstantiationRequestDetails> generateVnfInstantiationRequest(Vnf vnfDetails, ModelInfo serviceModelInfo, String serviceInstanceId, String userId) {
-
-        VnfInstantiationRequestDetails.RequestInfo requestInfo = new VnfInstantiationRequestDetails.RequestInfo(
-                getUniqueNameIfNeeded(vnfDetails.getInstanceName(), ResourceType.GENERIC_VNF),
-                vnfDetails.getProductFamilyId(),
-                VID_SOURCE,
-                vnfDetails.isRollbackOnFailure(),
-                userId);
-        CloudConfiguration cloudConfiguration = generateCloudConfiguration(vnfDetails.getLcpCloudRegionId(), vnfDetails.getTenantId());
-        VnfInstantiationRequestDetails.Platform platform = new VnfInstantiationRequestDetails.Platform(vnfDetails.getPlatformName());
-        VnfInstantiationRequestDetails.LineOfBusiness lineOfBusiness = new VnfInstantiationRequestDetails.LineOfBusiness(vnfDetails.getLineOfBusiness());
-        VnfInstantiationRequestDetails.RequestParameters requestParameters = new VnfInstantiationRequestDetails.RequestParameters(generateUserParamList());
-        VnfInstantiationRequestDetails.RelatedInstance serviceInstance = new VnfInstantiationRequestDetails.RelatedInstance(serviceModelInfo, serviceInstanceId);
-        List<VnfInstantiationRequestDetails.RelatedInstance> relatedInstanceList = new ArrayList<>();
-        relatedInstanceList.add(serviceInstance);
-        return new RequestDetailsWrapper<>(new VnfInstantiationRequestDetails(vnfDetails.getModelInfo(), cloudConfiguration, requestInfo, platform, lineOfBusiness, relatedInstanceList, requestParameters));
-    }
-
-    @Override
-    public RequestDetailsWrapper<VfModuleInstantiationRequestDetails> generateVfModuleInstantiationRequest(VfModule vfModuleDetails, ModelInfo serviceModelInfo, String serviceInstanceId, ModelInfo vnfModelInfo, String vnfInstanceId, String vgInstanceId, String userId) {
-
-        VfModuleInstantiationRequestDetails.RequestInfo requestInfo = new VfModuleInstantiationRequestDetails.RequestInfo(
-                getUniqueNameIfNeeded(vfModuleDetails.getInstanceName(), ResourceType.VF_MODULE),
-                null,
-                VID_SOURCE,
-                vfModuleDetails.isRollbackOnFailure(),
-                userId);
-
-        //cloud configuration
-        CloudConfiguration cloudConfiguration = generateCloudConfiguration(vfModuleDetails.getLcpCloudRegionId(), vfModuleDetails.getTenantId());
-
-        //request parameters
-        List<UserParamMap<String, String>> userParams = aggregateAllInstanceParams(extractActualInstanceParams(vfModuleDetails.getInstanceParams()), vfModuleDetails.getSupplementaryParams());
-        RequestParametersVfModule requestParameters = new RequestParametersVfModule(userParams, vfModuleDetails.isUsePreload());
-
-        //related instance list
-        VfModuleInstantiationRequestDetails.RelatedInstance serviceInstance = new VfModuleInstantiationRequestDetails.RelatedInstance(serviceModelInfo, serviceInstanceId);
-        VfModuleInstantiationRequestDetails.RelatedInstance vnfInstance = new VfModuleInstantiationRequestDetails.RelatedInstance(vnfModelInfo, vnfInstanceId);
-        List<VfModuleInstantiationRequestDetails.RelatedInstance> relatedInstanceList = new ArrayList<>();
-        relatedInstanceList.add(serviceInstance);
-        relatedInstanceList.add(vnfInstance);
-        if (vgInstanceId != null) {
-            ModelInfo volumeGroupModel = new ModelInfo();
-            volumeGroupModel.setModelType("volumeGroup");
-            VfModuleInstantiationRequestDetails.RelatedInstance volumeGroupInstance = new VfModuleInstantiationRequestDetails.RelatedInstance(volumeGroupModel, vgInstanceId, vfModuleDetails.getVolumeGroupInstanceName());
-            relatedInstanceList.add(volumeGroupInstance);
-        }
-
-        return new RequestDetailsWrapper<>(new VfModuleInstantiationRequestDetails(vfModuleDetails.getModelInfo(), cloudConfiguration, requestInfo, relatedInstanceList, requestParameters));
-    }
-
-    protected CloudConfiguration generateCloudConfiguration(String lcpCloudRegionId, String tenantId) {
-        CloudConfiguration cloudConfiguration = new CloudConfiguration();
-        cloudConfiguration.setLcpCloudRegionId(lcpCloudRegionId);
-        cloudConfiguration.setTenantId(tenantId);
-        cloudOwnerService.enrichCloudConfigurationWithCloudOwner(cloudConfiguration, lcpCloudRegionId);
-        return cloudConfiguration;
-    }
-
-    @Override
-    public RequestDetailsWrapper<VolumeGroupRequestDetails> generateVolumeGroupInstantiationRequest(VfModule vfModuleDetails, ModelInfo serviceModelInfo, String serviceInstanceId, ModelInfo vnfModelInfo, String vnfInstanceId, String userId) {
-        VolumeGroupRequestDetails.RequestInfo requestInfo = new VolumeGroupRequestDetails.RequestInfo(
-                getUniqueNameIfNeeded(vfModuleDetails.getVolumeGroupInstanceName(), ResourceType.VOLUME_GROUP),
-                null,
-                VID_SOURCE,
-                vfModuleDetails.isRollbackOnFailure(),
-                userId);
-        CloudConfiguration cloudConfiguration = generateCloudConfiguration(vfModuleDetails.getLcpCloudRegionId(), vfModuleDetails.getTenantId());
-
-        List<UserParamMap<String, String>> userParams = aggregateAllInstanceParams(extractActualInstanceParams(vfModuleDetails.getInstanceParams()), vfModuleDetails.getSupplementaryParams());
-        RequestParametersVfModule requestParameters = new RequestParametersVfModule(userParams, vfModuleDetails.isUsePreload());
-
-        VfModuleInstantiationRequestDetails.RelatedInstance serviceInstance = new VfModuleInstantiationRequestDetails.RelatedInstance(serviceModelInfo, serviceInstanceId);
-        VfModuleInstantiationRequestDetails.RelatedInstance vnfInstance = new VfModuleInstantiationRequestDetails.RelatedInstance(vnfModelInfo, vnfInstanceId);
-        List<VfModuleInstantiationRequestDetails.RelatedInstance> relatedInstancs = ImmutableList.of(serviceInstance, vnfInstance);
-
-        ModelInfo modelInfo = vfModuleDetails.getModelInfo();
-        modelInfo.setModelType("volumeGroup");
-        return new RequestDetailsWrapper<>(new VolumeGroupRequestDetails(modelInfo, cloudConfiguration, requestInfo, relatedInstancs, requestParameters));
-    }
-
-    protected List<UserParamMap<String, String>> aggregateAllInstanceParams(Map<String, String> instanceParams, Map<String, String> supplementaryParams) {
-        Map<String, String> instanceParamsFinal = defaultIfNull(instanceParams, new HashMap<>());
-        Map<String, String> supplementaryParamsFinal = defaultIfNull(supplementaryParams, new HashMap<>());
-
-        if (!(instanceParamsFinal.isEmpty() && supplementaryParamsFinal.isEmpty())) {
-            //remove duplicate keys from instanceParams if exist in supplementaryParams
-            instanceParamsFinal = instanceParams.entrySet().stream().filter(m->
-                    !supplementaryParamsFinal.containsKey(m.getKey())
-            ).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
-
-            //aggregate the 2 collections and format them as UserParamMap
-            UserParamMap<String, String> aggregatedParams = new UserParamMap<>();
-            aggregatedParams.putAll(instanceParamsFinal);
-            aggregatedParams.putAll(supplementaryParamsFinal);
-
-            return ImmutableList.of(aggregatedParams);
-        }
-
-        return Collections.emptyList();
-    }
-
-    @Override
-    public RequestDetailsWrapper<NetworkInstantiationRequestDetails> generateNetworkInstantiationRequest(Network networkDetails, ModelInfo serviceModelInfo, String serviceInstanceId, String userId) {
-
-        NetworkInstantiationRequestDetails.RequestInfo requestInfo = new NetworkInstantiationRequestDetails.RequestInfo(
-                getUniqueNameIfNeeded(networkDetails.getInstanceName(), ResourceType.L3_NETWORK),
-                networkDetails.getProductFamilyId(),
-                VID_SOURCE,
-                networkDetails.isRollbackOnFailure(),
-                userId);
-        CloudConfiguration cloudConfiguration = generateCloudConfiguration(networkDetails.getLcpCloudRegionId(), networkDetails.getTenantId());
-        NetworkInstantiationRequestDetails.Platform platform = new NetworkInstantiationRequestDetails.Platform(networkDetails.getPlatformName());
-        NetworkInstantiationRequestDetails.LineOfBusiness lineOfBusiness = new NetworkInstantiationRequestDetails.LineOfBusiness(networkDetails.getLineOfBusiness());
-        NetworkInstantiationRequestDetails.RequestParameters requestParameters = new NetworkInstantiationRequestDetails.RequestParameters(generateUserParamList());
-        NetworkInstantiationRequestDetails.RelatedInstance serviceInstance = new NetworkInstantiationRequestDetails.RelatedInstance(serviceModelInfo, serviceInstanceId);
-        List<NetworkInstantiationRequestDetails.RelatedInstance> relatedInstanceList = new ArrayList<>();
-        relatedInstanceList.add(serviceInstance);
-        return new RequestDetailsWrapper<>(new NetworkInstantiationRequestDetails(networkDetails.getModelInfo(), cloudConfiguration, requestInfo, platform, lineOfBusiness, relatedInstanceList, requestParameters));
-    }
-
-    @Override
-    public RequestDetailsWrapper<InstanceGroupInstantiationRequestDetails> generateInstanceGroupInstantiationRequest(InstanceGroup instanceGroupDetails, ModelInfo serviceModelInfo, String serviceInstanceId, String userId) {
-        InstanceGroupInstantiationRequestDetails.RequestInfo requestInfo = new InstanceGroupInstantiationRequestDetails.RequestInfo(
-                getUniqueNameIfNeeded(instanceGroupDetails.getInstanceName(), ResourceType.INSTANCE_GROUP),
-                null,
-                "VID",
-                instanceGroupDetails.isRollbackOnFailure(),
-                userId);
-        InstanceGroupInstantiationRequestDetails.RequestParameters requestParameters = new InstanceGroupInstantiationRequestDetails.RequestParameters(generateUserParamList());
-        InstanceGroupInstantiationRequestDetails.RelatedInstance serviceInstance = new InstanceGroupInstantiationRequestDetails.RelatedInstance(serviceModelInfo, serviceInstanceId);
-        List<InstanceGroupInstantiationRequestDetails.RelatedInstance> relatedInstanceList = ImmutableList.of(serviceInstance);
-        return new RequestDetailsWrapper<>(new InstanceGroupInstantiationRequestDetails(instanceGroupDetails.getModelInfo(), requestInfo, relatedInstanceList, requestParameters));
-    }
-
-    // TODO
-    private List<UserParamNameAndValue> generateUserParamList() {
-        return Collections.emptyList();
-    }
-
-    protected List<ServiceInstantiationService> generateServiceInstantiationServicesList(ServiceInstantiation payload, String serviceInstanceName, ServiceInstantiationVnfList vnfList) {
-        List<ServiceInstantiationService> serviceInstantiationServiceList = new LinkedList<>();
-        List<Map<String, String>> unFilteredInstanceParams = defaultIfNull(payload.getInstanceParams(), Collections.emptyList());
-        List<Map<String, String>> filteredInstanceParams = removeUnNeededParams(unFilteredInstanceParams);
-        ServiceInstantiationService serviceInstantiationService = new ServiceInstantiationService(
-                payload.getModelInfo(),
-                serviceInstanceName,
-                filteredInstanceParams,
-                vnfList
-        );
-        serviceInstantiationServiceList.add(serviceInstantiationService);
-        return serviceInstantiationServiceList;
-    }
-
-    private ServiceInstantiationRequestDetails generateServiceInstantiationRequestDetails(ServiceInstantiation payload, RequestParameters requestParameters, String serviceInstanceName, String userId) {
-        ServiceInstantiationRequestDetails.RequestInfo requestInfo = new ServiceInstantiationRequestDetails.RequestInfo(serviceInstanceName,
-                payload.getProductFamilyId(),
-                VID_SOURCE,
-                payload.isRollbackOnFailure(),
-                userId);
-        ServiceInstantiationOwningEntity owningEntity = new ServiceInstantiationOwningEntity(payload.getOwningEntityId(), payload.getOwningEntityName());
-        SubscriberInfo subscriberInfo = generateSubscriberInfo(payload);
-        Project project = payload.getProjectName() != null ?  new Project(payload.getProjectName()) : null;
-        return new ServiceInstantiationRequestDetails(payload.getModelInfo(), owningEntity, subscriberInfo, project, requestInfo, requestParameters);
-    }
-
-
-    protected SubscriberInfo generateSubscriberInfo(ServiceInstantiation payload) {
-        SubscriberInfo subscriberInfo = new SubscriberInfo();
-        subscriberInfo.setGlobalSubscriberId(payload.getGlobalSubscriberId());
-        return subscriberInfo;
-    }
-
-    protected String generateServiceName(UUID jobId, ServiceInstantiation payload, String optimisticUniqueServiceInstanceName) {
-        String serviceInstanceName = null;
-        if(StringUtils.isNotEmpty(optimisticUniqueServiceInstanceName)) {
-            serviceInstanceName = peekServiceName(jobId, payload, optimisticUniqueServiceInstanceName);
-        }
-        return serviceInstanceName;
-    }
-
-    protected String peekServiceName(UUID jobId, ServiceInstantiation payload, String optimisticUniqueServiceInstanceName) {
-        String serviceInstanceName;
-        // unique name already exist in service info. If it's free in AAI we use it
-        if (isNameFreeInAai(optimisticUniqueServiceInstanceName, ResourceType.SERVICE_INSTANCE)) {
-            serviceInstanceName =  optimisticUniqueServiceInstanceName;
-        }
-        //otherwise we used the original service instance name (from payload) to get a new unique name from DB and AAI
-        else {
-            serviceInstanceName = getUniqueName(payload.getInstanceName(), ResourceType.SERVICE_INSTANCE);
-        }
-
-        //update serviceInfo with new name if needed
-        try {
-            updateServiceInfo(jobId, x -> x.setServiceInstanceName(serviceInstanceName));
-        } catch (Exception e) {
-            logger.error("Failed updating service name {} in serviceInfo", serviceInstanceName, e);
-        }
-
-        return serviceInstanceName;
-    }
-
-    @Override
-    public List<Map<String,String>> buildVnfInstanceParams(List<Map<String, String>> currentVnfInstanceParams, List<VfModuleMacro> vfModules){
-        List<Map<String, String>> filteredVnfInstanceParams = removeUnNeededParams(currentVnfInstanceParams);
-
-        if (!featureManager.isActive(Features.FLAG_SHIFT_VFMODULE_PARAMS_TO_VNF)) {
-            return filteredVnfInstanceParams;
-        }
-
-        Map<String,String> vnfInstanceParams = extractActualInstanceParams(filteredVnfInstanceParams);
-        vfModules.stream()
-                .map(x->extractActualInstanceParams(x.getInstanceParams()))
-                .forEach(vnfInstanceParams::putAll);
-        return vnfInstanceParams.isEmpty() ? Collections.emptyList() : ImmutableList.of(vnfInstanceParams);
-    }
-
-    //Make sure we always get a one Map from InstanceParams
-    private Map<String, String> extractActualInstanceParams(List<Map<String, String>> originalInstanceParams) {
-        if (originalInstanceParams==null || originalInstanceParams.isEmpty() || originalInstanceParams.get(0)==null) {
-            return new HashMap<>();
-        }
-        return originalInstanceParams.get(0);
-    }
-
-    private List<Map<String, String>> removeUnNeededParams(List<Map<String, String>> instanceParams) {
-        List<String> keysToRemove = new ArrayList<>();
-        if (instanceParams == null || instanceParams.isEmpty()) {
-            return Collections.emptyList();
-        }
-
-        for (String key : instanceParams.get(0).keySet()) {
-            for (String paramToIgnore : PARAMS_TO_IGNORE)
-                if ((key.equalsIgnoreCase(paramToIgnore))) {
-                    keysToRemove.add(key);
-                }
-        }
-
-        Map<String, String> result = instanceParams.get(0).entrySet().stream()
-                .filter(entry->!keysToRemove.contains(entry.getKey()))
-                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
-
-        return result.isEmpty() ?  Collections.emptyList() : Collections.singletonList(result);
-    }
-
-    private ServiceInstantiationVnfList createServiceInstantiationVnfList(ServiceInstantiation payload) {
-        CloudConfiguration cloudConfiguration = generateCloudConfiguration(payload.getLcpCloudRegionId(), payload.getTenantId());
-
-        Map<String, Vnf> vnfs = payload.getVnfs();
-        List<ServiceInstantiationVnf> vnfList = new ArrayList<>();
-        for (Vnf vnf : vnfs.values()) {
-            Map<String, Map<String, VfModule>> vfModules = vnf.getVfModules();
-            List<VfModuleMacro> convertedUnFilteredVfModules = convertVfModuleMapToList(vfModules);
-            List<VfModuleMacro> filteredVfModules = filterInstanceParamsFromVfModuleAndUniqueNames(convertedUnFilteredVfModules);
-            ServiceInstantiationVnf serviceInstantiationVnf = new ServiceInstantiationVnf(
-                    vnf.getModelInfo(),
-                    cloudConfiguration,
-                    vnf.getPlatformName(),
-                    vnf.getLineOfBusiness(),
-                    payload.getProductFamilyId(),
-                    buildVnfInstanceParams(vnf.getInstanceParams(), filteredVfModules),
-                    filteredVfModules,
-                    getUniqueNameIfNeeded(vnf.getInstanceName(), ResourceType.GENERIC_VNF)
-            );
-            vnfList.add(serviceInstantiationVnf);
-        }
-
-        return new ServiceInstantiationVnfList(vnfList);
-    }
-
-    private List<VfModuleMacro> convertVfModuleMapToList(Map<String, Map<String, VfModule>> vfModules) {
-        ObjectMapper mapper = new ObjectMapper();
-        return vfModules.values().stream().flatMap(vfModule ->
-                vfModule.values().stream().map(item -> {
-                    List<UserParamMap<String, String>> aggregatedParams = aggregateAllInstanceParams(extractActualInstanceParams(item.getInstanceParams()), item.getSupplementaryParams());
-                    List<Map<String, String>> aggregatedParamsConverted = mapper.convertValue(aggregatedParams, new TypeReference<List<Map>>(){});
-
-                    return new VfModuleMacro(
-                            item.getModelInfo(),
-                            item.getInstanceName(),
-                            item.getVolumeGroupInstanceName(),
-                            aggregatedParamsConverted);
-                    }
-                )
-        ).collect(Collectors.toList());
-    }
-
-    private List<VfModuleMacro> filterInstanceParamsFromVfModuleAndUniqueNames(List<VfModuleMacro> unFilteredVfModules) {
-        return unFilteredVfModules.stream().map(vfModule ->
-                new VfModuleMacro(
-                        vfModule.getModelInfo(),
-                        getUniqueNameIfNeeded(vfModule.getInstanceName(), ResourceType.VF_MODULE),
-                        getUniqueNameIfNeeded(vfModule.getVolumeGroupInstanceName(), ResourceType.VOLUME_GROUP),
-                        removeUnNeededParams(vfModule.getInstanceParams())))
-                .collect(Collectors.toList());
-    }
-
-    private String getUniqueNameIfNeeded(String name, ResourceType resourceType) {
-        return StringUtils.isNotEmpty(name) ? getUniqueName(name, resourceType) : null;
-    }
-
     @Override
     public String getServiceInstantiationPath(ServiceInstantiation serviceInstantiationRequest) {
         //in case pause flag is true - use assign , else - use create.
@@ -600,6 +264,13 @@
     }
 
     @Override
+    public String getVnfDeletionPath(String serviceInstanceId, String vnfInstanceId) {
+        return (MsoBusinessLogicImpl.validateEndpointPath(MsoProperties.MSO_REST_API_VNF_INSTANCE)
+                + '/' + vnfInstanceId)
+                .replaceFirst(SVC_INSTANCE_ID, serviceInstanceId).replaceFirst(VNF_INSTANCE_ID, vnfInstanceId);
+    }
+
+    @Override
     public String getNetworkInstantiationPath(String serviceInstanceId) {
         return MsoBusinessLogicImpl.validateEndpointPath(MsoProperties.MSO_REST_API_NETWORK_INSTANCE).
                 replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
@@ -613,6 +284,24 @@
     }
 
     @Override
+    public String getVfModuleReplacePath(String serviceInstanceId, String vnfInstanceId, String vfModuleInstanceId)
+    {
+        return MsoBusinessLogicImpl.validateEndpointPath(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE)
+                .replaceFirst(SVC_INSTANCE_ID, serviceInstanceId)
+                .replaceFirst(VNF_INSTANCE_ID, vnfInstanceId)
+                + "/" + vfModuleInstanceId
+                + "/replace";
+    }
+
+    @Override
+    public String getVfModuleDeletePath(String serviceInstanceId, String vnfInstanceId, String vfModuleInstanceId) {
+        return MsoBusinessLogicImpl.validateEndpointPath(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE)
+                .replaceFirst(SVC_INSTANCE_ID, serviceInstanceId)
+                .replaceFirst(VNF_INSTANCE_ID, vnfInstanceId)
+                + "/" + vfModuleInstanceId;
+    }
+
+    @Override
     public String getVolumeGroupInstantiationPath(String serviceInstanceId, String vnfInstanceId) {
         return MsoBusinessLogicImpl.validateEndpointPath(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE)
                 .replaceFirst(SVC_INSTANCE_ID, serviceInstanceId)
@@ -625,79 +314,64 @@
     }
 
     @Override
+    public String getInstanceGroupMemberInstantiationPath(String vnfGroupInstanceId) {
+        return MsoBusinessLogicImpl.validateEndpointPath(MsoProperties.MSO_REST_API_INSTANCE_GROUP)
+                + '/' + vnfGroupInstanceId + "/addMembers";
+    }
+
+    @Override
     public String getInstanceGroupDeletePath(String instanceGroupId) {
         return MsoBusinessLogicImpl.validateEndpointPath(MsoProperties.MSO_REST_API_INSTANCE_GROUP)
                 + '/' + instanceGroupId;
     }
 
     @Override
+    public String getInstanceGroupMemberDeletePath(String vnfGroupInstanceId){
+        return MsoBusinessLogicImpl.validateEndpointPath(MsoProperties.MSO_REST_API_INSTANCE_GROUP)
+                + '/' + vnfGroupInstanceId + "/removeMembers";
+    }
+
+    @Override
+    public String getNetworkDeletePath(String serviceInstanceId, String networkInstanceId) {
+        return (MsoBusinessLogicImpl.validateEndpointPath(MsoProperties.MSO_REST_API_NETWORK_INSTANCE)
+                + "/" + networkInstanceId)
+                .replaceFirst(SVC_INSTANCE_ID, serviceInstanceId);
+    }
+
+    @Override
+    public String getResumeRequestPath(String requestId) {
+        return MsoBusinessLogicImpl.validateEndpointPath("mso.restapi.resume.orc.req")
+                .replaceFirst("<request_id>", requestId);
+    }
+
+    @Override
     public String getOrchestrationRequestsPath() {
         return MsoBusinessLogicImpl.validateEndpointPath(MsoProperties.MSO_REST_API_GET_ORC_REQ);
     }
 
     @Override
     public ServiceInfo updateServiceInfo(UUID jobUUID, Consumer<ServiceInfo> serviceUpdater) {
-        ServiceInfo serviceInfo = getServiceInfoByJobId(jobUUID);
+        ServiceInfo serviceInfo = asyncInstantiationRepository.getServiceInfoByJobId(jobUUID);
         serviceUpdater.accept(serviceInfo);
-        dataAccessService.saveDomainObject(serviceInfo, DaoUtils.getPropsMap());
+        asyncInstantiationRepository.saveServiceInfo(serviceInfo);
         return serviceInfo;
     }
 
     @Override
     public ServiceInfo updateServiceInfoAndAuditStatus(UUID jobUuid, JobStatus jobStatus) {
-        auditVidStatus(jobUuid,jobStatus);
+        auditService.auditVidStatus(jobUuid, jobStatus);
         return updateServiceInfo(jobUuid, x -> setServiceInfoStatus(x, jobStatus));
     }
 
+    private boolean isRetryEnabledForStatus(JobStatus jobStatus) {
+        return featureManager.isActive(Features.FLAG_1902_RETRY_JOB) &&
+                (jobStatus==JobStatus.COMPLETED_WITH_ERRORS || jobStatus==JobStatus.FAILED);
+    }
+
     private void setServiceInfoStatus(ServiceInfo serviceInfo, JobStatus jobStatus) {
         serviceInfo.setJobStatus(jobStatus);
         serviceInfo.setStatusModifiedDate(new Date());
-    }
-
-    public ServiceInfo getServiceInfoByJobId(UUID jobUUID) {
-        List<ServiceInfo> serviceInfoList = dataAccessService.getList(ServiceInfo.class, String.format(" where jobId = '%s' ", jobUUID), null, null);
-        if (serviceInfoList.size() != 1) {
-            throw new GenericUncheckedException("Failed to retrieve job with uuid " + jobUUID + " from ServiceInfo table. Instances found: " + serviceInfoList.size());
-        }
-        return serviceInfoList.get(0);
-    }
-
-    public List<JobAuditStatus> getAuditStatuses(UUID jobUUID, JobAuditStatus.SourceStatus source) {
-        return dataAccessService.getList(
-            JobAuditStatus.class,
-            String.format(" where SOURCE = '%s' and JOB_ID = '%s'",source, jobUUID),
-            " CREATED_DATE ", null);
-    }
-
-    private JobAuditStatus getLatestAuditStatus(UUID jobUUID, JobAuditStatus.SourceStatus source){
-        List<JobAuditStatus> list = getAuditStatuses(jobUUID,source);
-        return !list.isEmpty() ? list.get(list.size()-1) : null;
-    }
-
-    @Override
-    public void auditVidStatus(UUID jobUUID, JobStatus jobStatus){
-        JobAuditStatus vidStatus = new JobAuditStatus(jobUUID, jobStatus.toString(), JobAuditStatus.SourceStatus.VID);
-        auditStatus(vidStatus);
-    }
-
-    @Override
-    public void auditMsoStatus(UUID jobUUID, AsyncRequestStatus.Request msoRequestStatus){
-        auditMsoStatus(jobUUID, msoRequestStatus.requestStatus.getRequestState(), msoRequestStatus.requestId, msoRequestStatus.requestStatus.getStatusMessage());
-    }
-
-    @Override
-    public void auditMsoStatus(UUID jobUUID, String jobStatus, String requestId, String additionalInfo){
-        JobAuditStatus msoStatus = new JobAuditStatus(jobUUID, jobStatus, JobAuditStatus.SourceStatus.MSO,
-                requestId != null ? UUID.fromString(requestId) : null,
-                additionalInfo);
-        auditStatus(msoStatus);
-    }
-
-    private void auditStatus(JobAuditStatus jobAuditStatus){
-        JobAuditStatus latestStatus = getLatestAuditStatus(jobAuditStatus.getJobId(), jobAuditStatus.getSource());
-        if (latestStatus == null || !latestStatus.equals(jobAuditStatus))
-            dataAccessService.saveDomainObject(jobAuditStatus, DaoUtils.getPropsMap());
-
+        serviceInfo.setRetryEnabled(isRetryEnabledForStatus(jobStatus));
     }
 
     public Job.JobStatus calcStatus(AsyncRequestStatus asyncRequestStatus) {
@@ -708,13 +382,8 @@
 
     @Override
     public void handleFailedInstantiation(UUID jobUUID) {
-        ServiceInfo serviceInfo = updateServiceInfoAndAuditStatus(jobUUID, JobStatus.FAILED);
-        List<ServiceInfo> serviceInfoList = dataAccessService.getList(
-                ServiceInfo.class,
-                String.format(" where templateId = '%s' and jobStatus = '%s'",
-                        serviceInfo.getTemplateId(),
-                        JobStatus.PENDING),
-                null, null);
+        ServiceInfo serviceInfo = asyncInstantiationRepository.getServiceInfoByJobId(jobUUID);
+        List<ServiceInfo> serviceInfoList = asyncInstantiationRepository.getServiceInfoByTemplateIdAndJobStatus(serviceInfo.getTemplateId(), JobStatus.PENDING);
         serviceInfoList.forEach(si -> updateServiceInfoAndAuditStatus(si.getJobId(), JobStatus.STOPPED));
     }
 
@@ -727,16 +396,16 @@
 
     @Override
     public void hideServiceInfo(UUID jobUUID) {
-        ServiceInfo serviceInfo = getServiceInfoByJobId(jobUUID);
+        ServiceInfo serviceInfo = asyncInstantiationRepository.getServiceInfoByJobId(jobUUID);
         if (!serviceInfo.getJobStatus().isFinal()) {
-            String message = String.format( "jobId %s: Service status does not allow hide service, status = %s",
+            String message = String.format("jobId %s: Service status does not allow hide service, status = %s",
                     serviceInfo.getJobId(),
                     serviceInfo.getJobStatus());
             logger.error(EELFLoggerDelegate.errorLogger, message);
             throw new OperationNotAllowedException(message);
         }
         serviceInfo.setHidden(true);
-        dataAccessService.saveDomainObject(serviceInfo, DaoUtils.getPropsMap());
+        asyncInstantiationRepository.saveServiceInfo(serviceInfo);
     }
 
     @Override
@@ -818,7 +487,84 @@
             }
         }
 
-        throw new MaxRetriesException("find unused name for "+name, getMaxRetriesGettingFreeNameFromAai());
+        throw new MaxRetriesException("can't find unused name for "+name, getMaxRetriesGettingFreeNameFromAai());
+    }
+
+    @Override
+    public ServiceInstantiation prepareServiceToBeUnique(ServiceInstantiation serviceInstantiation) {
+        try {
+            ServiceInstantiation clonedServiceInstantiation = JACKSON_OBJECT_MAPPER.readValue(
+                    JACKSON_OBJECT_MAPPER.writeValueAsBytes(serviceInstantiation), ServiceInstantiation.class);
+            clonedServiceInstantiation.setBulkSize(1);
+            return replaceAllTrackById(clonedServiceInstantiation);
+        } catch (IOException e) {
+            throw new GenericUncheckedException(e);
+        }
+
+    }
+
+    private<T extends BaseResource> T replaceAllTrackById(T resource) {
+        resource.setTrackById(UUID.randomUUID().toString());
+        resource.getChildren().forEach(this::replaceAllTrackById);
+        return resource;
+    }
+
+    @Override
+    public List<UUID> retryJob(ServiceInstantiation request, UUID jobId, String userId ) {
+        updateServiceInfo(jobId, si->si.setRetryEnabled(false));
+        return pushBulkJob(request, userId);
+    }
+
+    @Override
+    public List<UUID> retryJob(UUID jobId, String userId) {
+        ServiceInstantiation serviceInstantiationRequest = asyncInstantiationRepository.getJobRequest(jobId);
+        enrichBulkForRetry(serviceInstantiationRequest, jobId);
+
+        try {
+            logger.debug(EELFLoggerDelegate.debugLogger, "retry ServiceInstantiation request: "+
+                    JACKSON_OBJECT_MAPPER.writeValueAsString(serviceInstantiationRequest));
+        } catch (Exception e) {
+            logger.error(EELFLoggerDelegate.errorLogger, "failed to log retry of ServiceInstantiation request ", e);
+        }
+        return retryJob(serviceInstantiationRequest, jobId, userId);
+    }
+
+    @Override
+    public ServiceInstantiation getBulkForRetry(UUID jobId) {
+         return enrichBulkForRetry( asyncInstantiationRepository.getJobRequest(jobId), jobId);
+    }
+
+    @Override
+    public void addResourceInfo(JobSharedData sharedData, Job.JobStatus jobStatus, String instanceId) {
+        String trackById = ((BaseResource) sharedData.getRequest()).getTrackById();
+        ResourceInfo resourceInfo = new ResourceInfo(trackById, sharedData.getRootJobId(), instanceId, jobStatus, null);
+        asyncInstantiationRepository.saveResourceInfo(resourceInfo);
+    }
+
+    @Override
+    public void addFailedResourceInfo(JobSharedData sharedData, RestObject msoResponse) {
+        String trackById = ((BaseResource) sharedData.getRequest()).getTrackById();
+        String errorMessage = MsoUtil.formatExceptionAdditionalInfo(msoResponse.getStatusCode(), msoResponse.getRaw());
+        AsyncRequestStatus asyncRequestStatus = convertMessageToAsyncRequestStatus(errorMessage);
+        ResourceInfo resourceInfo = new ResourceInfo(trackById, sharedData.getRootJobId(), null, JobStatus.FAILED, asyncRequestStatus);
+
+        asyncInstantiationRepository.saveResourceInfo(resourceInfo);
+    }
+
+    @Override
+    public void updateResourceInfo(JobSharedData sharedData, JobStatus jobStatus, AsyncRequestStatus message) {
+        ResourceInfo resourceInfo = asyncInstantiationRepository.getResourceInfoByTrackId(((BaseResource) sharedData.getRequest()).getTrackById());
+        resourceInfo.setJobStatus(jobStatus);
+        if (jobStatus.isFailure()) {
+            resourceInfo.setErrorMessage(message);
+        }
+        asyncInstantiationRepository.saveResourceInfo(resourceInfo);
+    }
+
+    public AsyncRequestStatus convertMessageToAsyncRequestStatus(String message) {
+        RequestStatus requestStatus = new RequestStatus("FAILED", message, TimeUtils.zonedDateTimeToString(ZonedDateTime.now()));
+        AsyncRequestStatus.Request request = new AsyncRequestStatus.Request(requestStatus);
+        return new AsyncRequestStatus(request);
     }
 
     protected String getUniqueNameFromDbOnly(String name) {
@@ -835,4 +581,35 @@
         return !aaiClient.isNodeTypeExistsByName(name, resourceType);
     }
 
+    @Override
+    public ServiceInstantiation enrichBulkForRetry(ServiceInstantiation serviceInstantiation, UUID jobId){
+        Map<String, ResourceInfo> resourceInfoByTrackId = asyncInstantiationRepository.getResourceInfoByRootJobId(jobId);
+
+        return setResourceStatus(resourceInfoByTrackId, serviceInstantiation);
+    }
+
+    protected String readStatusMsg(ResourceInfo resourceInfo){
+        if(resourceInfo!=null && resourceInfo.getErrorMessage()!=null && resourceInfo.getErrorMessage().request != null &&resourceInfo.getErrorMessage().request.requestStatus != null ) {
+            return resourceInfo.getErrorMessage().request.requestStatus.getStatusMessage();
+        }
+        return null;
+    }
+
+    private<T extends BaseResource> T setResourceStatus(Map<String, ResourceInfo> resourceInfoByTrackId, T resource) {
+        ResourceInfo resourceInfo = resourceInfoByTrackId.get(resource.getTrackById());
+        if(resourceInfo != null) {
+            boolean failed = resourceInfo.getJobStatus().isFailure();
+            resource.setIsFailed(failed);
+            resource.setStatusMessage(readStatusMsg(resourceInfo));
+            if (!failed) {
+                // if(resource.getAction().equals(Action.Delete)){
+                // TODO not yet implemented- completed after delete should remove the node
+                resource.setAction(Action.None);
+                resource.setInstanceId(resourceInfo.getInstanceId());
+            }
+        }
+        resource.getChildren().forEach(child -> setResourceStatus(resourceInfoByTrackId, child));
+        return resource;
+    }
+
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AuditService.java b/vid-app-common/src/main/java/org/onap/vid/services/AuditService.java
index ef60c32..6370b18 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/AuditService.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/AuditService.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,19 +20,31 @@
 
 package org.onap.vid.services;
 
-import org.onap.vid.model.JobAuditStatus;
-
 import java.util.List;
 import java.util.UUID;
+import org.onap.vid.job.Job;
+import org.onap.vid.model.JobAuditStatus;
+import org.onap.vid.mso.rest.AsyncRequestStatus;
 
 public interface AuditService {
 
     void setFailedAuditStatusFromMso(UUID jobUuid, String requestId, int statusCode, String msoResponse);
 
-
     List<JobAuditStatus> getAuditStatusFromMsoByRequestId(UUID jobId, UUID requestId);
 
-    List<JobAuditStatus> getAuditStatusFromMsoByServiceInstanceId(UUID jobId, UUID serviceInstanceId);
+    List<JobAuditStatus> getAuditStatusFromMsoByInstanceId(JobAuditStatus.ResourceTypeFilter resourceTypeFilter, UUID instanceId, UUID jobId);
 
     List<JobAuditStatus> getAuditStatusFromMsoByJobId(UUID jobId);
+
+    void auditVidStatus(UUID jobUUID, Job.JobStatus jobStatus);
+
+    void auditMsoStatus(UUID jobUUID, AsyncRequestStatus.Request msoRequestStatus);
+
+    void auditMsoStatus(UUID jobUUID, String jobStatus, String requestId, String additionalInfo);
+
+    List<AsyncRequestStatus.Request> retrieveRequestsFromMsoByServiceIdAndRequestTypeAndScope(String instanceId, String requestType, String modelType);
+
+    List<JobAuditStatus> getAuditStatuses(UUID jobUUID, JobAuditStatus.SourceStatus source);
+
+    JobAuditStatus getResourceAuditStatus(String trackById);
 }
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AuditServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/AuditServiceImpl.java
index 7fb126e..287a771 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/AuditServiceImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/AuditServiceImpl.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,22 +20,20 @@
 
 package org.onap.vid.services;
 
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.commons.lang3.StringUtils;
-import org.onap.vid.exceptions.GenericUncheckedException;
+import static org.apache.commons.lang3.ObjectUtils.notEqual;
+
+import org.jetbrains.annotations.NotNull;
+import org.onap.vid.dal.AsyncInstantiationRepository;
+import org.onap.vid.job.Job;
 import org.onap.vid.model.JobAuditStatus;
-import org.onap.vid.mso.MsoBusinessLogicImpl;
-import org.onap.vid.mso.MsoProperties;
-import org.onap.vid.mso.RestMsoImplementation;
-import org.onap.vid.mso.RestObject;
+import org.onap.vid.mso.*;
 import org.onap.vid.mso.rest.AsyncRequestStatus;
 import org.onap.vid.mso.rest.AsyncRequestStatusList;
 import org.springframework.stereotype.Service;
 
 import javax.inject.Inject;
-import java.io.IOException;
 import java.util.List;
+import java.util.Objects;
 import java.util.UUID;
 import java.util.stream.Collectors;
 
@@ -43,41 +41,20 @@
 @Service
 public class AuditServiceImpl implements AuditService{
 
-    private final AsyncInstantiationBusinessLogic asyncInstantiationBL;
     private final RestMsoImplementation restMso;
+    private final AsyncInstantiationRepository asyncInstantiationRepository;
 
     @Inject
-    public AuditServiceImpl(AsyncInstantiationBusinessLogic asyncInstantiationBL, RestMsoImplementation restMso) {
-        this.asyncInstantiationBL = asyncInstantiationBL;
+    public AuditServiceImpl(RestMsoImplementation restMso, AsyncInstantiationRepository asyncInstantiationRepository) {
         this.restMso = restMso;
+        this.asyncInstantiationRepository = asyncInstantiationRepository;
     }
 
     @Override
     public void setFailedAuditStatusFromMso(UUID jobUuid, String requestId, int statusCode, String msoResponse){
         final String failedMsoRequestStatus = "FAILED";
-        String additionalInfo = formatExceptionAdditionalInfo(statusCode, msoResponse);
-        asyncInstantiationBL.auditMsoStatus(jobUuid, failedMsoRequestStatus, requestId, additionalInfo);
-    }
-
-    private String formatExceptionAdditionalInfo(int statusCode, String msoResponse) {
-        String errorMsg = "Http Code:" + statusCode;
-        if (!StringUtils.isEmpty(msoResponse)) {
-            String filteredJson;
-            try {
-                ObjectMapper objectMapper = new ObjectMapper();
-                filteredJson = StringUtils.defaultIfEmpty(
-                        objectMapper.readTree(msoResponse).path("serviceException").toString().replaceAll("[\\{\\}]","") ,
-                        msoResponse
-                );
-            } catch (JsonParseException e) {
-                filteredJson = msoResponse;
-            } catch (IOException e) {
-                throw new GenericUncheckedException(e);
-            }
-
-            errorMsg = errorMsg + ", " + filteredJson;
-        }
-        return errorMsg;
+        String additionalInfo = MsoUtil.formatExceptionAdditionalInfo(statusCode, msoResponse);
+        auditMsoStatus(jobUuid, failedMsoRequestStatus, requestId, additionalInfo);
     }
 
     @Override
@@ -87,64 +64,133 @@
     }
 
     @Override
-    public List<JobAuditStatus> getAuditStatusFromMsoByServiceInstanceId(UUID jobId, UUID serviceInstanceId) {
-        String filter = "serviceInstanceId:EQUALS:" + serviceInstanceId;
-        return getAuditStatusFromMso(jobId, filter, serviceInstanceId);
+    public List<JobAuditStatus> getAuditStatusFromMsoByInstanceId(JobAuditStatus.ResourceTypeFilter resourceTypeFilter, UUID instanceId, UUID jobId) {
+        String filter = resourceTypeFilter.getFilterBy() + ":EQUALS:" + instanceId;
+        return getAuditStatusFromMso(jobId, filter, instanceId);
     }
 
     @Override
     public List<JobAuditStatus> getAuditStatusFromMsoByJobId(UUID jobId) {
-        List<JobAuditStatus> auditStatuses = asyncInstantiationBL.getAuditStatuses(jobId, JobAuditStatus.SourceStatus.MSO);
+        List<JobAuditStatus> auditStatuses = getAuditStatuses(jobId, JobAuditStatus.SourceStatus.MSO);
         String instanceName = getInstanceNameFromServiceInfo(jobId);
         auditStatuses.stream().forEach(status ->
-            status.setInstanceName(instanceName)
+                status.setInstanceName(instanceName)
         );
         return auditStatuses;
     }
 
+    @Override
+    public void auditVidStatus(UUID jobUUID, Job.JobStatus jobStatus){
+        JobAuditStatus vidStatus = new JobAuditStatus(jobUUID, jobStatus.toString(), JobAuditStatus.SourceStatus.VID);
+        auditStatus(vidStatus);
+    }
 
+    @Override
+    public void auditMsoStatus(UUID jobUUID, AsyncRequestStatus.Request msoRequestStatus){
+        auditMsoStatus(jobUUID, msoRequestStatus.requestStatus.getRequestState(), msoRequestStatus.requestId, msoRequestStatus.requestStatus.getStatusMessage());
+    }
 
-    private List<JobAuditStatus> getAuditStatusFromMso(UUID jobId, String filter, UUID serviceInstanceId) {
+    @Override
+    public void auditMsoStatus(UUID jobUUID, String jobStatus, String requestId, String additionalInfo){
+        JobAuditStatus msoStatus = new JobAuditStatus(jobUUID, jobStatus, JobAuditStatus.SourceStatus.MSO,
+                requestId != null ? UUID.fromString(requestId) : null,
+                additionalInfo);
+        auditStatus(msoStatus);
+    }
 
+    private void auditStatus(JobAuditStatus jobAuditStatus){
+        JobAuditStatus latestStatus = getLatestAuditStatus(jobAuditStatus.getJobId(), jobAuditStatus.getSource());
+
+        if (notEqual(jobAuditStatus, latestStatus)) {
+            jobAuditStatus.setOrdinal(nextOrdinalAfter(latestStatus));
+            asyncInstantiationRepository.addJobAudiStatus(jobAuditStatus);
+        }
+    }
+
+    protected int nextOrdinalAfter(JobAuditStatus jobAuditStatus) {
+        return jobAuditStatus == null ? 0 : (jobAuditStatus.getOrdinal() + 1);
+    }
+
+    private JobAuditStatus getLatestAuditStatus(UUID jobUUID, JobAuditStatus.SourceStatus source){
+        List<JobAuditStatus> list = getAuditStatuses(jobUUID, source);
+        return !list.isEmpty() ? list.get(list.size()-1) : null;
+    }
+
+    public List<JobAuditStatus> getAuditStatuses(UUID jobUUID, JobAuditStatus.SourceStatus source) {
+        return asyncInstantiationRepository.getAuditStatuses(jobUUID, source);
+    }
+
+    @Override
+    //modelType is requestScope in MSO response
+    public List<AsyncRequestStatus.Request> retrieveRequestsFromMsoByServiceIdAndRequestTypeAndScope(String instanceId, String requestType, String modelType) {
+        String filter = JobAuditStatus.ResourceTypeFilter.SERVICE.getFilterBy() + ":EQUALS:" + instanceId;
+        List<AsyncRequestStatus> msoStatuses = getAsyncRequestStatusListFromMso(filter);
+        return msoStatuses.stream()
+                .filter(x -> Objects.equals(x.request.requestType, requestType) && Objects.equals(x.request.requestScope, modelType))
+                .map(x -> x.request)
+                .collect(Collectors.toList());
+    }
+
+    private List<JobAuditStatus> getAuditStatusFromMso(UUID jobId, String filter, UUID instanceId) {
+
+        List<AsyncRequestStatus> msoStatuses = getAsyncRequestStatusListFromMso(filter);
+
+        //add service name from service info for each audit status (in case that serviceInstanceId is null all statuses belong to service)
+        String userInstanceName = (instanceId == null && jobId != null) ? getInstanceNameFromServiceInfo(jobId) : null;
+        return convertMsoResponseStatusToJobAuditStatus(msoStatuses, userInstanceName);
+    }
+
+    @NotNull
+    private List<AsyncRequestStatus> getAsyncRequestStatusListFromMso(String filter) {
         String path = MsoBusinessLogicImpl.validateEndpointPath(MsoProperties.MSO_REST_API_GET_ORC_REQS) + "filter=" + filter;
         RestObject<AsyncRequestStatusList> msoResponse = restMso.GetForObject(path , AsyncRequestStatusList.class);
         if (msoResponse.getStatusCode() >= 400 || msoResponse.get() == null) {
             throw new BadResponseFromMso(msoResponse);
         }
-
-        //add service name from service info for each audit status (in case that serviceInstanceId is null all statuses belong to service)
-        String userInstanceName = serviceInstanceId == null ? getInstanceNameFromServiceInfo(jobId): null;
-        return convertMsoResponseStatusToJobAuditStatus(msoResponse.get().getRequestList(), userInstanceName);
+        return msoResponse.get().getRequestList();
     }
 
     private String getInstanceNameFromServiceInfo(UUID jobId) {
-        return asyncInstantiationBL.getServiceInfoByJobId(jobId).getServiceInstanceName();
+        return asyncInstantiationRepository.getServiceInfoByJobId(jobId).getServiceInstanceName();
     }
 
     protected List<JobAuditStatus> convertMsoResponseStatusToJobAuditStatus(List<AsyncRequestStatus> msoStatuses, String defaultName){
-        return msoStatuses.stream().map(status -> {
-            UUID requestId = null;
-            String instanceName = defaultName;
-            String jobStatus = null;
-            String additionalInfo = null;
-            String created = null;
-            String instanceType = null;
+        return msoStatuses.stream().map(status ->
+                convertAsyncRequestStatusToJobAuditStatus(status, defaultName)
+        ).collect(Collectors.toList());
+    }
 
-            AsyncRequestStatus.Request request = status.request;
-            if(request != null) {
+    private JobAuditStatus convertAsyncRequestStatusToJobAuditStatus(AsyncRequestStatus status, String defaultName){
+        if (status == null) {
+            return null;
+        }
+
+        UUID requestId = null;
+        String instanceName = defaultName;
+        String jobStatus = null;
+        String additionalInfo = null;
+        String created = null;
+        String instanceType = null;
+
+        AsyncRequestStatus.Request request = status.request;
+        if(request != null) {
+            if (request.requestId != null) {
                 requestId = UUID.fromString(request.requestId);
-                instanceName = extractInstanceName(instanceName, request);
-                instanceType = request.requestScope;
-                if(request.requestStatus != null) {
-                    jobStatus = request.requestStatus.getRequestState();
-                    additionalInfo = request.requestStatus.getStatusMessage();
-                    if(!request.requestStatus.getAdditionalProperties().isEmpty()) {
-                        created = request.requestStatus.getAdditionalProperties().get("finishTime") != null? request.requestStatus.getAdditionalProperties().get("finishTime").toString() : request.requestStatus.getTimestamp();
-                    }
+            }
+            instanceName = extractInstanceName(instanceName, request);
+            instanceType = request.requestScope;
+            if(request.requestStatus != null) {
+                jobStatus = request.requestStatus.getRequestState();
+                additionalInfo = request.requestStatus.getStatusMessage();
+                if(!request.requestStatus.getAdditionalProperties().isEmpty() &&
+                        request.requestStatus.getAdditionalProperties().get("finishTime") != null) {
+                    created = request.requestStatus.getAdditionalProperties().get("finishTime").toString();
+                } else {
+                    created = request.requestStatus.getTimestamp();
                 }
             }
-            return new JobAuditStatus(instanceName, jobStatus, requestId, additionalInfo, created, instanceType);
-        }).collect(Collectors.toList());
+        }
+        return new JobAuditStatus(instanceName, jobStatus, requestId, additionalInfo, created, instanceType);
     }
 
     private String extractInstanceName(String instanceName, AsyncRequestStatus.Request request) {
@@ -154,6 +200,13 @@
         return instanceName;
     }
 
+    @Override
+    public JobAuditStatus getResourceAuditStatus(String trackById) {
+        AsyncRequestStatus asyncRequestStatus = asyncInstantiationRepository.getResourceInfoByTrackId(trackById).getErrorMessage();
+        return convertAsyncRequestStatusToJobAuditStatus(asyncRequestStatus, null);
+    }
+
+
     public static class BadResponseFromMso extends RuntimeException {
         private final RestObject<AsyncRequestStatusList> msoResponse;
 
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/CloudOwnerService.java b/vid-app-common/src/main/java/org/onap/vid/services/CloudOwnerService.java
index 199fff0..f6b82c7 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/CloudOwnerService.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/CloudOwnerService.java
@@ -7,9 +7,9 @@
  * 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.
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/RoleGenaratorServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/RoleGenaratorServiceImpl.java
index 790dbfa..a24a72e 100644
--- a/vid-app-common/src/main/java/org/onap/vid/services/RoleGenaratorServiceImpl.java
+++ b/vid-app-common/src/main/java/org/onap/vid/services/RoleGenaratorServiceImpl.java
@@ -71,7 +71,7 @@
         String availableRoles="";
         HashMap<String,String> servicesNames = new HashMap<>();
         for (Subscriber subscriber: subscribers.customer) {
-            AaiResponse<Services> subscriberResponse = client.getSubscriberData(subscriber.globalCustomerId);
+            AaiResponse<Services> subscriberResponse = client.getSubscriberData(subscriber.globalCustomerId, true);
             for(ServiceSubscription service: subscriberResponse.getT().serviceSubscriptions.serviceSubscription) {
                 servicesNames.put(service.serviceType,"");
                 String roleName = "'" + subscriber.subscriberName + ModelConstants.ROLE_DELIMITER + service.serviceType + "'";
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/VersionService.kt b/vid-app-common/src/main/java/org/onap/vid/services/VersionService.kt
new file mode 100644
index 0000000..2fb3e0c
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/services/VersionService.kt
@@ -0,0 +1,66 @@
+package org.onap.vid.services
+
+import com.fasterxml.jackson.module.kotlin.readValue
+import org.apache.commons.lang3.StringUtils
+import org.apache.commons.lang3.StringUtils.substringAfterLast
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate
+import org.onap.portalsdk.core.util.SystemProperties
+import org.onap.vid.model.VersionAndFeatures
+import org.onap.vid.utils.JACKSON_OBJECT_MAPPER
+import org.springframework.stereotype.Service
+import java.util.regex.Pattern
+import javax.inject.Inject
+import javax.servlet.ServletContext
+
+@Service
+class VersionService
+@Inject
+constructor(internal var servletContext: ServletContext) {
+
+    private val Logger = EELFLoggerDelegate.getLogger(VersionService::class.java)
+
+    private val versionAndFeatures: VersionAndFeatures by lazy {
+        loadVersionAndFeatures()
+    }
+
+    private fun readBuildNumber(): String {
+        val resource = servletContext.getResource("/app/vid/scripts/constants/version.json")
+        return JACKSON_OBJECT_MAPPER.readValue<Map<String, String>>(resource)["Version"]!!
+    }
+
+    //protected so can be easily tested in UT
+    protected fun readFeatureSet(): String {
+        return SystemProperties.getProperty("features.set.filename")
+    }
+
+    //protected so can be easily tested in UT
+    protected fun buildDisplayVersion(features: String, build: String): String {
+        val matcher = Pattern.compile("([^/]+?)(\\.features|$)").matcher(features)
+        val majorByFeatures = if (matcher.find()) matcher.group(1) else features
+
+        val buildByVersion = StringUtils.defaultIfBlank(substringAfterLast(build, "."), build)
+
+        return StringUtils.join(majorByFeatures, ".", buildByVersion)
+    }
+
+    fun retrieveVersionAndFeatures(): VersionAndFeatures {
+        return try {
+            versionAndFeatures
+        } catch (exception: Exception) {
+            Logger.error("Failed to read build number or feature properties settings from version file", exception)
+            VersionAndFeatures.unknown
+        }
+    }
+
+    private fun loadVersionAndFeatures(): VersionAndFeatures {
+        val featureSet = readFeatureSet();
+        val build = readBuildNumber();
+        val displayVersion = buildDisplayVersion(featureSet, build)
+        return VersionAndFeatures(featureSet, build, displayVersion)
+    }
+
+    //might throw an exception
+    fun retrieveBuildNumber(): String {
+        return versionAndFeatures.build
+    }
+}
diff --git a/vid-app-common/src/main/java/org/onap/vid/utils/KotlinUtils.kt b/vid-app-common/src/main/java/org/onap/vid/utils/KotlinUtils.kt
index 6866477..cf53262 100644
--- a/vid-app-common/src/main/java/org/onap/vid/utils/KotlinUtils.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/utils/KotlinUtils.kt
@@ -27,4 +27,4 @@
     return java.lang.Enum.valueOf(E::class.java, (map.getOrDefault(key, defaultValue.name) as String))
 }
 
-val JACKSON_OBJECT_MAPPER: ObjectMapper = jacksonObjectMapper()
+@JvmField val JACKSON_OBJECT_MAPPER: ObjectMapper = jacksonObjectMapper()
diff --git a/vid-app-common/src/main/java/org/onap/vid/utils/Tree.kt b/vid-app-common/src/main/java/org/onap/vid/utils/Tree.kt
index 35e913d..6245375 100644
--- a/vid-app-common/src/main/java/org/onap/vid/utils/Tree.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/utils/Tree.kt
@@ -7,9 +7,9 @@
  * 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.
@@ -41,6 +41,14 @@
         }
     }
 
+    fun getChildrenDepth(): Int {
+        return getMaxDepth(root) - 1
+    }
+
+    private fun getMaxDepth(level:Node<T>): Int {
+        return (level.children.map{getMaxDepth(it.value)}.max() ?: 0) + 1
+    }
+
     fun getSubTree(vararg path: T): Tree<T>? {
         return getSubTree(path.asList())
     }
diff --git a/vid-app-common/src/main/resources/1712_ADIOD.zip b/vid-app-common/src/main/resources/1712_ADIOD.zip
deleted file mode 100644
index de8fa7e..0000000
--- a/vid-app-common/src/main/resources/1712_ADIOD.zip
+++ /dev/null
Binary files differ
diff --git a/vid-app-common/src/main/resources/2f80c596.zip b/vid-app-common/src/main/resources/2f80c596.zip
deleted file mode 100644
index 95161fa..0000000
--- a/vid-app-common/src/main/resources/2f80c596.zip
+++ /dev/null
Binary files differ
diff --git a/vid-app-common/src/main/resources/adiod.zip b/vid-app-common/src/main/resources/adiod.zip
deleted file mode 100644
index 6e02423..0000000
--- a/vid-app-common/src/main/resources/adiod.zip
+++ /dev/null
Binary files differ
diff --git a/vid-app-common/src/main/resources/csar317927061915233480.zip b/vid-app-common/src/main/resources/csar317927061915233480.zip
deleted file mode 100644
index d30f49f..0000000
--- a/vid-app-common/src/main/resources/csar317927061915233480.zip
+++ /dev/null
Binary files differ
diff --git a/vid-app-common/src/main/resources/csar3933948645405128424.zip b/vid-app-common/src/main/resources/csar3933948645405128424.zip
deleted file mode 100644
index 549a521..0000000
--- a/vid-app-common/src/main/resources/csar3933948645405128424.zip
+++ /dev/null
Binary files differ
diff --git a/vid-app-common/src/main/resources/mso_get_manual_task_by_request_id.json b/vid-app-common/src/main/resources/mso_get_manual_task_by_request_id.json
deleted file mode 100644
index 004280b..0000000
--- a/vid-app-common/src/main/resources/mso_get_manual_task_by_request_id.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{  
-   "taskList":[  
-      {  
-         "taskId":"daf4dd84-b77a-42da-a051-3239b7a9392c",
-         "type":"fallout",
-         "nfRole":"vSCP",
-         "subscriptionServiceType":"Mobility",
-         "originalRequestId":"za1234d1-5a33-55df-13ab-12abad84e335",
-         "originalRequestorId":"ss835w",
-         "errorSource":"A&AI",
-         "errorCode":"404",
-         "errorMessage":"Failed in A&AI 404",
-         "buildingBlockName":"DoCreateVfModule",
-         "buildingBlockStep":"invokeA&AI:getTenant",
-         "validResponses":[  
-            "rollback",
-            "abort",
-            "skip",
-            "retry"
-         ]
-      }
-   ]
-}
\ No newline at end of file
diff --git a/vid-app-common/src/main/resources/pnf.zip b/vid-app-common/src/main/resources/pnf.zip
deleted file mode 100644
index 541d89e..0000000
--- a/vid-app-common/src/main/resources/pnf.zip
+++ /dev/null
Binary files differ
diff --git a/vid-app-common/src/main/resources/service-AmpPhSvc-csar.zip b/vid-app-common/src/main/resources/service-AmpPhSvc-csar.zip
deleted file mode 100644
index c1fb9e0..0000000
--- a/vid-app-common/src/main/resources/service-AmpPhSvc-csar.zip
+++ /dev/null
Binary files differ
diff --git a/vid-app-common/src/main/resources/service-David-csar.csar b/vid-app-common/src/main/resources/service-David-csar.csar
deleted file mode 100644
index fcf1c64..0000000
--- a/vid-app-common/src/main/resources/service-David-csar.csar
+++ /dev/null
Binary files differ
diff --git a/vid-app-common/src/main/resources/service-DemoService1-csar.csar b/vid-app-common/src/main/resources/service-DemoService1-csar.csar
deleted file mode 100644
index 0e34dc5..0000000
--- a/vid-app-common/src/main/resources/service-DemoService1-csar.csar
+++ /dev/null
Binary files differ
diff --git a/vid-app-common/src/main/resources/service-VdbeSrv-csar.zip b/vid-app-common/src/main/resources/service-VdbeSrv-csar.zip
deleted file mode 100644
index 0b8db27..0000000
--- a/vid-app-common/src/main/resources/service-VdbeSrv-csar.zip
+++ /dev/null
Binary files differ
diff --git a/vid-app-common/src/main/resources/service-vf-csar.zip b/vid-app-common/src/main/resources/service-vf-csar.zip
deleted file mode 100644
index f0b0a98..0000000
--- a/vid-app-common/src/main/resources/service-vf-csar.zip
+++ /dev/null
Binary files differ
diff --git a/vid-app-common/src/main/resources/service-vf-with-annotations.zip b/vid-app-common/src/main/resources/service-vf-with-annotations.zip
deleted file mode 100644
index 79c5fb0..0000000
--- a/vid-app-common/src/main/resources/service-vf-with-annotations.zip
+++ /dev/null
Binary files differ
diff --git a/vid-app-common/src/main/resources/service-vl-csar.zip b/vid-app-common/src/main/resources/service-vl-csar.zip
deleted file mode 100644
index dfe0b83..0000000
--- a/vid-app-common/src/main/resources/service-vl-csar.zip
+++ /dev/null
Binary files differ
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
index d5040b1..d9bc828 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
@@ -696,8 +696,8 @@
                - lcpCloudRegionId == 'rdm5b'
                - tenantId == '0675e0709bd7444a9e13eba8b40edb3c'
 
-             "url": "https://aai-conexus-e2e.ecomp.cci.att.com:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/0675e0709bd7444a9e13eba8b40edb3c/vservers/vserver/932b330d-733e-427d-a519-14eebd261f70"
-             "url": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/0675e0709bd7444a9e13eba8b40edb3c/vservers/vserver/932b330d-733e-427d-a519-14eebd261f70"
+             "url": "https://aai-conexus-e2e.ecomp.cci.att.com:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/rdm5b/tenants/tenant/0675e0709bd7444a9e13eba8b40edb3c/vservers/vserver/932b330d-733e-427d-a519-14eebd261f70"
+             "url": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/rdm5b/tenants/tenant/0675e0709bd7444a9e13eba8b40edb3c/vservers/vserver/932b330d-733e-427d-a519-14eebd261f70"
              */
 
             var cloudRegionMatch = url.match(/\/cloud-regions\/cloud-region\/[^\/]+\/([^\/]+)/);
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/AAITreeConverterTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/AAITreeConverterTest.java
index 5bdfd12..560e6cb 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/AAITreeConverterTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/AAITreeConverterTest.java
@@ -25,17 +25,16 @@
 import org.mockito.MockitoAnnotations;
 import org.onap.vid.aai.util.AAITreeConverter;
 import org.onap.vid.model.Action;
-import org.onap.vid.model.aaiTree.AAITreeNode;
-import org.onap.vid.model.aaiTree.Network;
+import org.onap.vid.model.aaiTree.*;
 import org.onap.vid.model.aaiTree.ServiceInstance;
-import org.onap.vid.model.aaiTree.VfModule;
-import org.onap.vid.model.aaiTree.Vnf;
+import org.onap.vid.mso.model.CloudConfiguration;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
 import java.util.List;
 
+import static org.hamcrest.CoreMatchers.*;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.emptyOrNullString;
 import static org.hamcrest.Matchers.hasKey;
@@ -43,6 +42,7 @@
 import static org.hamcrest.Matchers.is;
 import static org.hamcrest.Matchers.not;
 import static org.onap.vid.asdc.parser.ToscaParserImpl2.Constants.A_LA_CARTE;
+import static org.testng.Assert.assertNull;
 
 public class AAITreeConverterTest {
 
@@ -59,28 +59,41 @@
 
         AAITreeNode aaiTree = generateAaiTreeToConvert(0, 0);
 
-        ServiceInstance result = aaiTreeConverter.convertTreeToUIModel(aaiTree, "global-customer-id", "service-type", A_LA_CARTE);
+        ServiceInstance result = aaiTreeConverter.convertTreeToUIModel(aaiTree, "global-customer-id", "service-type", A_LA_CARTE, "", "");
 
         assertService(result, 0, 0, true);
     }
 
     @Test
-    public void testConvertTreeToUIModel_MultipleChildren() throws Exception {
+    public void testConvertTreeToUIModel_MultipleChildren() {
 
         AAITreeNode aaiTree = generateAaiTreeToConvert(2, 2);
 
-        ServiceInstance serviceInstance = aaiTreeConverter.convertTreeToUIModel(aaiTree, "global-customer-id", "service-type", null);
+        ServiceInstance serviceInstance = aaiTreeConverter.convertTreeToUIModel(aaiTree, "global-customer-id", "service-type", null, "", "");
 
         assertService(serviceInstance, 2, 2, false);
 
         int nodesCounter = 0;
         assertThat(serviceInstance.getVnfs().entrySet(), hasSize(2));
-        assertVnf(serviceInstance.getVnfs().get("vnf-model-version-id:00"+(nodesCounter++)), 0, 0, false);
-        assertVnf(serviceInstance.getVnfs().get("vnf-model-version-id:00"+(nodesCounter++)), 0, 0, false);
+        assertVnf(serviceInstance.getVnfs().get("vnf-instance-id" + (nodesCounter++)), 0, 0);
+        assertVnf(serviceInstance.getVnfs().get("vnf-instance-id" + (nodesCounter++)), 0, 0);
 
         assertThat(serviceInstance.getNetworks().entrySet(), hasSize(2));
-        assertNetwork(serviceInstance.getNetworks().get("network-model-version-id:00"+(nodesCounter++)), false);
-        assertNetwork(serviceInstance.getNetworks().get("network-model-version-id:00"+(nodesCounter)), false);
+        assertNetwork(serviceInstance.getNetworks().get("network-instance-id" + (nodesCounter++)), false);
+        assertNetwork(serviceInstance.getNetworks().get("network-instance-id" + (nodesCounter++)), false);
+
+        assertThat(serviceInstance.getVnfGroups().size(), equalTo(1));
+        assertThat(serviceInstance.getVnfGroups().get("vnf-group-id" + (nodesCounter++)).getInstanceId(), startsWith("vnf-group-id"));
+
+        assertThat(serviceInstance.getCollectionResources().size(), equalTo(1));
+        CollectionResource cr = serviceInstance.getCollectionResources().get("cr-id" + (nodesCounter++));
+        assertThat(cr.getInstanceId(), startsWith("cr-id"));
+
+        assertThat(cr.getNcfs().size(), equalTo(1));
+        assertThat(cr.getNcfs().get("ncf-id").getInstanceId(), startsWith("ncf-id"));
+
+        assertThat(serviceInstance.getExistingVNFCounterMap().get("vnf-model-customization-id"), equalTo(2L));
+        assertThat(serviceInstance.getExistingNetworksCounterMap().get("network-model-customization-id"), equalTo(2L));
     }
 
     @DataProvider
@@ -99,7 +112,7 @@
         int nodesCounter = 0;
 
         for (Boolean customizationName: vfModules) {
-            vnfTreeNode.getChildren().add(createVfModule(nodesCounter++, customizationName));
+            vnfTreeNode.getChildren().add(createVfModule(customizationName));
         }
 
         for (Boolean customizationName: networks) {
@@ -108,24 +121,21 @@
 
         Vnf actualVnf = Vnf.from(vnfTreeNode);
 
-        assertVnf(actualVnf, vfModules.size(), networks.size(), false);
+        assertVnf(actualVnf, vfModules.size(), networks.size());
 
         nodesCounter = 0;
         for (Boolean customizationName: vfModules) {
             String key = customizationName ? "vfModule key in model" : "vfModule-model-version-id";
 
             assertThat(actualVnf.getVfModules(), hasKey(key));
-            assertThat(actualVnf.getVfModules().get(key), hasKey(key + ":00" + nodesCounter));
-            VfModule actualVfModule = actualVnf.getVfModules().get(key).get(key + ":00" + nodesCounter);
+            assertThat(actualVnf.getVfModules().get(key), hasKey("vfModule-instance-id"));
+            VfModule actualVfModule = actualVnf.getVfModules().get(key).get("vfModule-instance-id");
             assertVfModule(actualVfModule, customizationName);
-            nodesCounter++;
         }
 
         for (Boolean customizationName: networks) {
-            String key = customizationName ? "network key in model" : "network-model-version-id";
-
-            assertThat(actualVnf.getNetworks(), hasKey(key + ":00" + nodesCounter));
-            Network actualNetwork = actualVnf.getNetworks().get(key + ":00" + nodesCounter);
+            assertThat(actualVnf.getNetworks(), hasKey("network-instance-id" + nodesCounter));
+            Network actualNetwork = actualVnf.getNetworks().get("network-instance-id" + nodesCounter);
             assertNetwork(actualNetwork, customizationName);
             nodesCounter++;
         }
@@ -142,45 +152,79 @@
 
     private AAITreeNode createVnf(int uniqueNumber, boolean hasCustomizationName) {
         AAITreeNode vnfTreeNode = new AAITreeNode();
-        vnfTreeNode.setId("vnf-instance-id");
+        vnfTreeNode.setId("vnf-instance-id" + uniqueNumber);
         vnfTreeNode.setName("vnf-instance-name");
-        vnfTreeNode.setType("generic-vnf");
+        vnfTreeNode.setType(NodeType.GENERIC_VNF);
         vnfTreeNode.setModelVersionId("vnf-model-version-id");
+        vnfTreeNode.setModelCustomizationId("vnf-model-customization-id");
         if (hasCustomizationName) {
             vnfTreeNode.setModelCustomizationName("vnf model customization name");
             vnfTreeNode.setKeyInModel("vnf key in model");
         }
-        vnfTreeNode.setUniqueNumber(uniqueNumber);
         return vnfTreeNode;
     }
 
-    private AAITreeNode createVfModule(int uniqueNumber, boolean hasCustomizationName) {
+    private AAITreeNode createVnfGroup(int uniqueNumber) {
+        AAITreeNode treeNode = new AAITreeNode();
+        treeNode.setId("vnf-group-id" + uniqueNumber);
+        treeNode.setType(NodeType.INSTANCE_GROUP);
+        treeNode.getAdditionalProperties().put("instance-group-type", "vnfGroup-type");
+        return treeNode;
+    }
+
+    private AAITreeNode createCollectionResource(int uniqueNumber) {
+        AAITreeNode treeNode = new AAITreeNode();
+        treeNode.setId("cr-id" + uniqueNumber);
+        treeNode.setType(NodeType.COLLECTION_RESOURCE);
+        treeNode.getChildren().add(createNCF());
+        return treeNode;
+    }
+
+    private AAITreeNode createNCF() {
+        AAITreeNode treeNode = new AAITreeNode();
+        treeNode.setId("ncf-id");
+        treeNode.setType(NodeType.INSTANCE_GROUP);
+        treeNode.getAdditionalProperties().put("instance-group-type", "L3-NETWORK");
+        return treeNode;
+    }
+
+    @Test
+    public void givenPlacementIsNull_whenConvertToNetwork_relevantFieldsAreAlsoNull() {
+        AAITreeNode aaiTreeNode = new AAITreeNode();
+        aaiTreeNode.setType(NodeType.NETWORK);
+        Network actualNetwork = Network.from(aaiTreeNode);
+        assertNull(actualNetwork.getCloudOwner());
+        assertNull(actualNetwork.getLcpCloudRegionId());
+        assertNull(actualNetwork.getTenantId());
+    }
+
+    private AAITreeNode createVfModule(boolean hasCustomizationName) {
         AAITreeNode vfModuleTreeNode = new AAITreeNode();
         vfModuleTreeNode.setId("vfModule-instance-id");
         vfModuleTreeNode.setName("vfModule-instance-name");
-        vfModuleTreeNode.setType("vf-module");
+        vfModuleTreeNode.setType(NodeType.VF_MODULE);
         vfModuleTreeNode.setModelVersionId("vfModule-model-version-id");
+        vfModuleTreeNode.setModelCustomizationId("vfModule-model-customization-id");
         if (hasCustomizationName) {
             vfModuleTreeNode.setModelCustomizationName("vfModule model customization name");
             vfModuleTreeNode.setKeyInModel("vfModule key in model");
         }
-        vfModuleTreeNode.setUniqueNumber(uniqueNumber);
-
+        vfModuleTreeNode.setCloudConfiguration(new CloudConfiguration("lcpRegion2", "tenant3", "cloudOwner1"));
         return vfModuleTreeNode;
     }
 
     private AAITreeNode createNetwork(int uniqueNumber, boolean hasCustomizationName) {
         AAITreeNode networkTreeNode = new AAITreeNode();
-        networkTreeNode.setId("network-instance-id");
+        networkTreeNode.setId("network-instance-id" + uniqueNumber);
         networkTreeNode.setName("network-instance-name");
-        networkTreeNode.setType("l3-network");
+        networkTreeNode.setType(NodeType.NETWORK);
         networkTreeNode.setModelVersionId("network-model-version-id");
+        networkTreeNode.setModelCustomizationId("network-model-customization-id");
         if (hasCustomizationName) {
             networkTreeNode.setModelCustomizationName("network model customization name");
             networkTreeNode.setKeyInModel("network key in model");
         }
-        networkTreeNode.setUniqueNumber(uniqueNumber);
-
+        networkTreeNode.setCloudConfiguration(new CloudConfiguration("auk51a", "b530fc990b6d4334bd45518bebca6a51", "att-nc"));
         return networkTreeNode;
     }
 
@@ -196,17 +240,16 @@
         assertThat(serviceInstance.getIsALaCarte(), is(isALaCarte));
     }
 
-    private void assertVnf(Vnf actualVnf, int expectedVfModules, int expectedNetworks, boolean hasCustomizationName) {
-        assertThat(actualVnf.getInstanceId(), is("vnf-instance-id"));
+    private void assertVnf(Vnf actualVnf, int expectedVfModules, int expectedNetworks) {
+        assertThat(actualVnf.getInstanceId(), containsString("vnf-instance-id"));
         assertThat(actualVnf.getInstanceName(), is("vnf-instance-name"));
         assertThat(actualVnf.getAction(), is(Action.None));
         assertThat(actualVnf.getModelInfo().getModelType(), is("vnf"));
         assertThat(actualVnf.getModelInfo().getModelVersionId(), is("vnf-model-version-id"));
         assertThat(actualVnf.getVfModules().entrySet(), hasSize(expectedVfModules));
         assertThat(actualVnf.getNetworks().entrySet(), hasSize(expectedNetworks));
-        assertThat(actualVnf.getTrackById(), is(not(emptyOrNullString())));
-        String expectedCustomizationName = hasCustomizationName ? "vnf model customization name" : null;
-        assertThat(actualVnf.getModelInfo().getModelCustomizationName(), is(expectedCustomizationName));
+        assertThat(actualVnf.getTrackById(), containsString("vnf-instance-id"));
+        assertNull(actualVnf.getModelInfo().getModelCustomizationName());
     }
 
     private void assertVfModule(VfModule actualVfModule, boolean hasCustomizationName) {
@@ -215,20 +258,27 @@
         assertThat(actualVfModule.getAction(), is(Action.None));
         assertThat(actualVfModule.getModelInfo().getModelType(), is("vfModule"));
         assertThat(actualVfModule.getModelInfo().getModelVersionId(), is("vfModule-model-version-id"));
-        assertThat(actualVfModule.getTrackById(), is(not(emptyOrNullString())));
+        assertThat(actualVfModule.getTrackById(), is("vfModule-instance-id"));
         String expectedCustomizationName = hasCustomizationName ? "vfModule model customization name" : null;
         assertThat(actualVfModule.getModelInfo().getModelCustomizationName(), is(expectedCustomizationName));
+        assertThat(actualVfModule.getCloudOwner(), is("cloudOwner1"));
+        assertThat(actualVfModule.getLcpCloudRegionId(), is("lcpRegion2"));
+        assertThat(actualVfModule.getTenantId(), is("tenant3"));
     }
 
     private void assertNetwork(Network actualNetwork, boolean hasCustomizationName) {
-        assertThat(actualNetwork.getInstanceId(), is("network-instance-id"));
+        assertThat(actualNetwork.getInstanceId(), containsString("network-instance-id"));
         assertThat(actualNetwork.getInstanceName(), is("network-instance-name"));
         assertThat(actualNetwork.getAction(), is(Action.None));
         assertThat(actualNetwork.getModelInfo().getModelType(), is("network"));
         assertThat(actualNetwork.getModelInfo().getModelVersionId(), is("network-model-version-id"));
-        assertThat(actualNetwork.getTrackById(), is(not(emptyOrNullString())));
+        assertThat(actualNetwork.getTrackById(), containsString("network-instance-id"));
         String expectedCustomizationName = hasCustomizationName ? "network model customization name" : null;
         assertThat(actualNetwork.getModelInfo().getModelCustomizationName(), is(expectedCustomizationName));
+        assertThat(actualNetwork.getCloudOwner(), is("att-nc"));
+        assertThat(actualNetwork.getLcpCloudRegionId(), is("auk51a"));
+        assertThat(actualNetwork.getTenantId(), is("b530fc990b6d4334bd45518bebca6a51"));
+
     }
 
     private AAITreeNode generateAaiTreeToConvert(int numberOfVnfs, int numberOfNetworks) {
@@ -236,6 +286,7 @@
         AAITreeNode aaiTree = new AAITreeNode();
         aaiTree.setId("service-instance-id");
         aaiTree.setName("service-instance-name");
+        aaiTree.setType(NodeType.SERVICE_INSTANCE);
 
         for (int i = 0; i < numberOfVnfs; i++) {
             aaiTree.getChildren().add(createVnf(counter++, false));
@@ -245,6 +296,9 @@
             aaiTree.getChildren().add(createNetwork(counter++, false));
         }
 
+        aaiTree.getChildren().add(createVnfGroup(counter++));
+        aaiTree.getChildren().add(createCollectionResource(counter++));
+
         return aaiTree;
     }
-}
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/AaiClientTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/AaiClientTest.java
index fdeeb00..b2d8e85 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/AaiClientTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/AaiClientTest.java
@@ -20,9 +20,51 @@
 
 package org.onap.vid.aai;
 
+import static java.util.stream.Collectors.toList;
+import static org.apache.commons.lang3.StringUtils.equalsIgnoreCase;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.either;
+import static org.hamcrest.Matchers.hasProperty;
+import static org.hamcrest.Matchers.instanceOf;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.sameInstance;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.isNull;
+import static org.mockito.ArgumentMatchers.nullable;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
+import static org.onap.vid.utils.Unchecked.toURI;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNull;
+import static org.testng.Assert.fail;
+
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.collect.ImmutableList;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.URI;
+import java.security.cert.CertificateException;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.function.BiConsumer;
+import java.util.function.Function;
+import java.util.stream.Stream;
+import javax.crypto.BadPaddingException;
+import javax.net.ssl.SSLHandshakeException;
+import javax.servlet.ServletContext;
+import javax.ws.rs.ProcessingException;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.core.Response;
 import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import org.apache.commons.lang3.exception.ExceptionUtils;
@@ -32,10 +74,20 @@
 import org.mockito.Mockito;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.portalsdk.core.util.SystemProperties;
-import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.RelatedToProperty;
 import org.onap.vid.aai.model.AaiGetTenatns.GetTenantsResponse;
-import org.onap.vid.aai.model.*;
-import org.onap.vid.aai.util.*;
+import org.onap.vid.aai.model.CustomQuerySimpleResult;
+import org.onap.vid.aai.model.ModelVer;
+import org.onap.vid.aai.model.ModelVersions;
+import org.onap.vid.aai.model.PortDetailsTranslator;
+import org.onap.vid.aai.model.Properties;
+import org.onap.vid.aai.model.RelatedToProperty;
+import org.onap.vid.aai.model.ResourceType;
+import org.onap.vid.aai.model.SimpleResult;
+import org.onap.vid.aai.util.AAIRestInterface;
+import org.onap.vid.aai.util.CacheProvider;
+import org.onap.vid.aai.util.HttpsAuthClient;
+import org.onap.vid.aai.util.ServletRequestHelper;
+import org.onap.vid.aai.util.SystemPropertyHelper;
 import org.onap.vid.controller.LocalWebConfig;
 import org.onap.vid.exceptions.GenericUncheckedException;
 import org.onap.vid.model.Subscriber;
@@ -55,37 +107,6 @@
 import sun.security.provider.certpath.SunCertPathBuilderException;
 import sun.security.validator.ValidatorException;
 
-import javax.crypto.BadPaddingException;
-import javax.net.ssl.SSLHandshakeException;
-import javax.servlet.ServletContext;
-import javax.ws.rs.ProcessingException;
-import javax.ws.rs.client.Client;
-import javax.ws.rs.core.Response;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.URI;
-import java.security.cert.CertificateException;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.function.BiConsumer;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import static org.apache.commons.lang3.StringUtils.equalsIgnoreCase;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.*;
-import static org.mockito.ArgumentMatchers.nullable;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Matchers.argThat;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Matchers.isNull;
-import static org.mockito.Mockito.*;
-import static org.onap.vid.utils.Unchecked.toURI;
-import static org.testng.Assert.*;
-
 @ContextConfiguration(classes = {LocalWebConfig.class, SystemProperties.class})
 @WebAppConfiguration
 public class AaiClientTest {
@@ -345,7 +366,7 @@
 
         Assert.assertTrue(response.t.length> 0);
 
-        Assert.assertEquals(tenants[0].cloudOwner,"att-aic-cloud-owner");
+        Assert.assertEquals(tenants[0].cloudOwner,"irma-aic-cloud-owner");
     }
 
     final String tenantResponseRaw ="" +
@@ -355,10 +376,10 @@
             "\"relationship-list\": {" +
             "\"relationship\": [{" +
             "\"related-to\": \"tenant\"," +
-            "\"related-link\": \"/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/092eb9e8e4b7412e8787dd091bc58e86\"," +
+            "\"related-link\": \"/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/AAIAIC25/tenants/tenant/092eb9e8e4b7412e8787dd091bc58e86\"," +
             "\"relationship-data\": [{" +
             "\"relationship-key\": \"cloud-region.cloud-owner\"," +
-            "\"relationship-value\": \"att-aic-cloud-owner\"" +
+            "\"relationship-value\": \"irma-aic-cloud-owner\"" +
             "}," +
             "{" +
             "\"relationship-key\": \"cloud-region.cloud-region-id\"," +
@@ -427,11 +448,11 @@
             "            {" +
             "                \"related-to\": \"volume-group\"," +
             "                \"relationship-label\": \"org.onap.relationships.inventory.Uses\"," +
-            "                \"related-link\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/volume-groups/volume-group/66013ebe-0c81-44b9-a24f-7c6acba73a39\"," +
+            "                \"related-link\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/rdm5b/volume-groups/volume-group/66013ebe-0c81-44b9-a24f-7c6acba73a39\"," +
             "                \"relationship-data\": [" +
             "                    {" +
             "                        \"relationship-key\": \"cloud-region.cloud-owner\"," +
-            "                        \"relationship-value\": \"att-aic\"" +
+            "                        \"relationship-value\": \"irma-aic\"" +
             "                    }," +
             "                    {" +
             "                        \"relationship-key\": \"cloud-region.cloud-region-id\"," +
@@ -446,11 +467,11 @@
             "            {" +
             "                \"related-to\": \"vserver\"," +
             "                \"relationship-label\": \"org.onap.relationships.inventory.Uses\"," +
-            "                \"related-link\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/db1818f7f2e34862b378bfb2cc520f91/vservers/vserver/5eef9f6d-9933-4bc6-9a1a-862d61309437\"," +
+            "                \"related-link\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/rdm5b/tenants/tenant/db1818f7f2e34862b378bfb2cc520f91/vservers/vserver/5eef9f6d-9933-4bc6-9a1a-862d61309437\"," +
             "                \"relationship-data\": [" +
             "                    {" +
             "                        \"relationship-key\": \"cloud-region.cloud-owner\"," +
-            "                        \"relationship-value\": \"att-aic\"" +
+            "                        \"relationship-value\": \"irma-aic\"" +
             "                    }," +
             "                    {" +
             "                        \"relationship-key\": \"cloud-region.cloud-region-id\"," +
@@ -490,7 +511,7 @@
 
         GetTenantsResponse tenant = aaiClientMock.getHomingDataByVfModule("vnfInstanceId", "vfModuleId");
 
-        Assert.assertEquals(tenant.cloudOwner,"att-aic");
+        Assert.assertEquals(tenant.cloudOwner,"irma-aic" );
         Assert.assertEquals(tenant.cloudRegionID,"rdm5b");
         Assert.assertEquals(tenant.tenantID,"db1818f7f2e34862b378bfb2cc520f91");
 
@@ -601,7 +622,7 @@
                 // double each case to propagateExceptions = true/false, to verify that "don't propagate" really still work
                 ImmutableList.of(l.getLeft(), l.getRight(), true).toArray(),
                 ImmutableList.of(l.getLeft(), l.getRight(), false).toArray()
-        )).collect(Collectors.toList()).toArray(new Object[][]{});
+        )).collect(toList()).toArray(new Object[][]{});
     }
 
     private static UncheckedBiConsumer<HttpsAuthClient, Client> mockExceptionOnClientProvider(Exception e) {
@@ -734,6 +755,83 @@
         };
     }
 
+    @Test
+    public void testGetLatestVersionByInvariantId() throws IOException {
+
+        ModelVersions modelVersions = JACKSON_OBJECT_MAPPER.readValue("" +
+                "{\n" +
+                "    \"results\": [\n" +
+                "        {\n" +
+                "            \"model\": {\n" +
+                "                \"model-invariant-id\": \"f6342be5-d66b-4d03-a1aa-c82c3094c4ea\",\n" +
+                "                \"model-type\": \"service\",\n" +
+                "                \"resource-version\": \"1534274421300\"\n" +
+                "            }\n" +
+                "        },\n" +
+                "        {\n" +
+                "            \"model-ver\": {\n" +
+                "                \"model-version-id\": \"a92f899d-a3ec-465b-baed-1663b0a5aee1\",\n" +
+                "                \"model-name\": \"NCM_VLAN_SVC_ym161f\",\n" +
+                "                \"model-version\": \"bbb\",\n" +
+                "                \"distribution-status\": \"DISTRIBUTION_COMPLETE_OK\",\n" +
+                "                \"model-description\": \"Network Collection service for vLAN tagging\",\n" +
+                "                \"resource-version\": \"1534788756086\"\n" +
+                "            }\n" +
+                "        },\n" +
+                "        {\n" +
+                "            \"model-ver\": {\n" +
+                "                \"model-version-id\": \"d2fda667-e92e-4cfa-9620-5da5de01a319\",\n" +
+                "                \"model-name\": \"NCM_VLAN_SVC_ym161f\",\n" +
+                "                \"model-version\": \"aaa\",\n" +
+                "                \"distribution-status\": \"DISTRIBUTION_COMPLETE_OK\",\n" +
+                "                \"model-description\": \"Network Collection service for vLAN tagging\",\n" +
+                "                \"resource-version\": \"1534444087221\"\n" +
+                "            }\n" +
+                "        }]}", ModelVersions.class);
+
+
+        final AaiClient aaiClient = new AaiClient(null, null, null);
+
+        assertThat(aaiClient.toModelVerStream(modelVersions).collect(toList()),
+                containsInAnyOrder(
+                        hasProperty("modelVersionId", is("a92f899d-a3ec-465b-baed-1663b0a5aee1")),
+                        hasProperty("modelVersionId", is("d2fda667-e92e-4cfa-9620-5da5de01a319"))
+                ));
+
+    }
+
+    @DataProvider
+    public static Object[][]  versionsDataProvider() {
+        return new Object[][] {
+                { Stream.of("10","20","30"), "30" },
+                { Stream.of("10","20","20"), "20" },
+                { Stream.of("c","b","a"), "c" },
+                { Stream.of("1.0","2.0","1.8"), "2.0" },
+                { Stream.of("1.0.7","2.0.2","2.0.9"), "2.0.9" },
+                { Stream.of("0","0","0"), "0" },
+                { Stream.of("","10"), "10" },
+
+        };
+    }
+
+    @Test(dataProvider = "versionsDataProvider")
+    public void maxModelVer(Stream<String> input, String expected) {
+        Stream<ModelVer> modelVerStream = input.map(version -> {
+            ModelVer mv = new ModelVer();
+            mv.setModelVersion(version);
+            return mv;
+        });
+
+        final AaiClient aaiClient = new AaiClient(null, null, null);
+
+        assertThat(aaiClient.maxModelVer(modelVerStream), hasProperty("modelVersion", is(expected)));
+    }
+
+    @Test(expectedExceptions = GenericUncheckedException.class)
+    public void maxModelVerException() {
+        final AaiClient aaiClient = new AaiClient(null, null, null);
+        aaiClient.maxModelVer(Stream.of(new ModelVer()));
+    }
     @Test(dataProvider = "cloudRegionAndTenantDataProvider")
     public void getCloudRegionAndTenantByVnfId(String tenantName, String cloudRegionId) throws JsonProcessingException {
         SimpleResult tenant = new SimpleResult();
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/AaiResponseTranslatorTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/AaiResponseTranslatorTest.java
index 12f7429..0454886 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/AaiResponseTranslatorTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/AaiResponseTranslatorTest.java
@@ -45,9 +45,9 @@
                 "  \"results\": [{" +
                 "      \"id\": \"2979590232\"," +
                 "      \"node-type\": \"cloud-region\"," +
-                "      \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/SDNO-S-BcloudReg-E1802\"," +
+                "      \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/SDNO-S-BcloudReg-E1802\"," +
                 "      \"properties\": {" +
-                "        \"cloud-owner\": \"att-aic\"," +
+                "        \"cloud-owner\": \"irma-aic\"," +
                 "        \"cloud-region-id\": \"THE-EXPECTED-REGION-ID\"," +
                 "        \"sriov-automation\": false," +
                 "        \"resource-version\": \"1513631040564\"" +
@@ -122,7 +122,7 @@
                 "{" +
                 "  \"results\": [{" +
                 "      \"node-type\": \"cloud-region\"," +
-                "      \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/SDNO-S-BcloudReg-E1802\"," +
+                "      \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/SDNO-S-BcloudReg-E1802\"," +
                 "      \"properties\": {" +
                 "        \"resource-version\": \"1513631040564\"" +
                 "      }" +
diff --git a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java
index 91c4805..92d78d4 100644
--- a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java
+++ b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserImpl2Test.java
@@ -20,11 +20,33 @@
 
 package org.onap.vid.asdc.parser;
 
+import static com.google.common.collect.Lists.newArrayList;
+import static org.hamcrest.Matchers.aMapWithSize;
+import static org.hamcrest.Matchers.allOf;
+import static org.hamcrest.Matchers.hasKey;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+import static org.onap.vid.asdc.parser.ToscaParserImpl2.Constants.ECOMP_GENERATED_NAMING_PROPERTY;
+import static org.onap.vid.testUtils.TestUtils.assertJsonStringEqualsIgnoreNulls;
+
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.SerializationFeature;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.UUID;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 import net.javacrumbs.jsonunit.JsonAssert;
 import org.apache.commons.io.IOUtils;
 import org.apache.log4j.LogManager;
@@ -43,7 +65,19 @@
 import org.onap.vid.asdc.AsdcClient;
 import org.onap.vid.asdc.local.LocalAsdcClient;
 import org.onap.vid.controller.ToscaParserMockHelper;
-import org.onap.vid.model.*;
+import org.onap.vid.model.CR;
+import org.onap.vid.model.Network;
+import org.onap.vid.model.NetworkCollection;
+import org.onap.vid.model.Node;
+import org.onap.vid.model.PortMirroringConfig;
+import org.onap.vid.model.ResourceGroup;
+import org.onap.vid.model.Service;
+import org.onap.vid.model.ServiceModel;
+import org.onap.vid.model.ServiceProxy;
+import org.onap.vid.model.VNF;
+import org.onap.vid.model.VfModule;
+import org.onap.vid.model.VidNotions;
+import org.onap.vid.model.VolumeGroup;
 import org.onap.vid.properties.Features;
 import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
@@ -52,22 +86,6 @@
 import org.testng.annotations.Test;
 import org.togglz.core.manager.FeatureManager;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.file.Path;
-import java.util.*;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import static com.google.common.collect.Lists.newArrayList;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-import static org.onap.vid.asdc.parser.ToscaParserImpl2.Constants.ECOMP_GENERATED_NAMING_PROPERTY;
-import static org.onap.vid.testUtils.TestUtils.assertJsonStringEqualsIgnoreNulls;
-
 public class ToscaParserImpl2Test {
 
     private final String myUUID = "myUUID";
@@ -101,7 +119,7 @@
 
     @Test(dataProvider = "expectedServiceModel")
     public void assertEqualsBetweenServices(String uuid, ToscaParserMockHelper mockHelper) throws Exception {
-        Service expectedService = mockHelper.getNewServiceModel().getService();
+        Service expectedService = mockHelper.getServiceModel().getService();
         Service actualService = toscaParserImpl2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getService();
         assertJsonStringEqualsIgnoreNulls(om.writeValueAsString(expectedService), om.writeValueAsString(actualService));
     }
@@ -111,12 +129,12 @@
         final Path csarPath = getCsarPath(mockHelper.getUuid());
         log.info("Comparing for csar " + csarPath);
         ServiceModel actualServiceModel = toscaParserImpl2.makeServiceModel(csarPath, getServiceByUuid(mockHelper.getUuid()));
-        assertJsonStringEqualsIgnoreNulls(om.writeValueAsString(mockHelper.getNewServiceModel()), om.writeValueAsString(actualServiceModel));
+        assertJsonStringEqualsIgnoreNulls(om.writeValueAsString(mockHelper.getServiceModel()), om.writeValueAsString(actualServiceModel));
     }
 
     @Test(dataProvider = "expectedServiceModel")
     public void assertEqualsBetweenNetworkNodes(String uuid, ToscaParserMockHelper mockHelper) throws Exception {
-        Map<String, Network> expectedNetworksMap = mockHelper.getNewServiceModel().getNetworks();
+        Map<String, Network> expectedNetworksMap = mockHelper.getServiceModel().getNetworks();
         Map<String, Network> actualNetworksMap = toscaParserImpl2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getNetworks();
         for (Map.Entry<String, Network> entry : expectedNetworksMap.entrySet()) {
             Network expectedNetwork = entry.getValue();
@@ -130,7 +148,7 @@
     //Because we are not supporting the old flow, the JSON are different by definition.
     @Test(dataProvider = "expectedServiceModel")
     public void assertEqualsBetweenVnfsOfTosca(String uuid, ToscaParserMockHelper mockHelper) throws Exception {
-        Map<String, VNF> expectedVnfsMap = mockHelper.getNewServiceModel().getVnfs();
+        Map<String, VNF> expectedVnfsMap = mockHelper.getServiceModel().getVnfs();
         Map<String, VNF> actualVnfsMap = toscaParserImpl2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getVnfs();
         for (Map.Entry<String, VNF> entry : expectedVnfsMap.entrySet()) {
             VNF expectedVnf = entry.getValue();
@@ -142,10 +160,12 @@
         }
     }
 
+
+
     @Test(dataProvider = "expectedServiceModel")
     public void assertEqualsBetweenCollectionResourcesOfTosca(String uuid, ToscaParserMockHelper mockHelper) throws Exception {
-            Map<String, CR> expectedVnfsMap = mockHelper.getNewServiceModel().getCollectionResource();
-            Map<String, CR> actualCRsMap = toscaParserImpl2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getCollectionResource();
+        Map<String, CR> expectedVnfsMap = mockHelper.getServiceModel().getCollectionResources();
+            Map<String, CR> actualCRsMap = toscaParserImpl2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getCollectionResources();
             if(!actualCRsMap.isEmpty()) {
                 for (Map.Entry<String, CR> entry : expectedVnfsMap.entrySet()) {
                     CR expectedCR = entry.getValue();
@@ -201,28 +221,28 @@
     @Test(dataProvider = "expectedServiceModel")
     public void assertEqualsBetweenVolumeGroups(String uuid, ToscaParserMockHelper mockHelper) throws Exception {
             Map<String, VolumeGroup> actualVolumeGroups = toscaParserImpl2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getVolumeGroups();
-            Map<String, VolumeGroup> expectedVolumeGroups = mockHelper.getNewServiceModel().getVolumeGroups();
+            Map<String, VolumeGroup> expectedVolumeGroups = mockHelper.getServiceModel().getVolumeGroups();
             assertJsonStringEqualsIgnoreNulls(om.writeValueAsString(expectedVolumeGroups), om.writeValueAsString(actualVolumeGroups));
     }
 
     @Test(dataProvider = "expectedServiceModel")
     public void assertEqualsBetweenVfModules(String uuid, ToscaParserMockHelper mockHelper) throws Exception {
             Map<String, VfModule> actualVfModules = toscaParserImpl2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getVfModules();
-            Map<String, VfModule> expectedVfModules = mockHelper.getNewServiceModel().getVfModules();
+            Map<String, VfModule> expectedVfModules = mockHelper.getServiceModel().getVfModules();
             assertJsonStringEqualsIgnoreNulls(om.writeValueAsString(expectedVfModules), om.writeValueAsString(actualVfModules));
     }
 
     @Test(dataProvider = "expectedServiceModel")
     public void assertEqualsBetweenPolicyConfigurationNodes(String uuid, ToscaParserMockHelper mockHelper) throws Exception {
             Map<String, PortMirroringConfig> actualConfigurations = toscaParserImpl2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getConfigurations();
-            Map<String, PortMirroringConfig> expectedConfigurations = mockHelper.getNewServiceModel().getConfigurations();
+            Map<String, PortMirroringConfig> expectedConfigurations = mockHelper.getServiceModel().getConfigurations();
             JsonAssert.assertJsonEquals(actualConfigurations, expectedConfigurations);
     }
 
     @Test
     public void assertEqualsBetweenPolicyConfigurationByPolicyFalse() throws Exception {
         ToscaParserMockHelper mockHelper = new ToscaParserMockHelper(Constants.configurationByPolicyFalseUuid, Constants.configurationByPolicyFalseFilePath);
-        Map<String, PortMirroringConfig> expectedConfigurations = mockHelper.getNewServiceModel().getConfigurations();
+        Map<String, PortMirroringConfig> expectedConfigurations = mockHelper.getServiceModel().getConfigurations();
         Map<String, PortMirroringConfig> actualConfigurations = toscaParserImpl2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getConfigurations();
 
         setPprobeServiceProxy(expectedConfigurations);
@@ -250,7 +270,7 @@
         final ToscaParserMockHelper mockHelper = new ToscaParserMockHelper("90fe6842-aa76-4b68-8329-5c86ff564407", "empty.json");
         final ServiceModel serviceModel = toscaParserImpl2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid()));
 
-        assertJsonStringEqualsIgnoreNulls("{ vfModules: { 201712488_adiodvpe10..201712488AdiodVpe1..ADIOD_vRE_BV..module-1: { inputs: { availability_zone_0: { } } } } }", om.writeValueAsString(serviceModel));
+        assertJsonStringEqualsIgnoreNulls("{ vfModules: { 201712488_pasqualevpe10..201712488PasqualeVpe1..PASQUALE_vRE_BV..module-1: { inputs: { availability_zone_0: { } } } } }", om.writeValueAsString(serviceModel));
     }
 
     @Test
@@ -260,7 +280,7 @@
 
         assertJsonStringEqualsIgnoreNulls("" +
                 "{ vnfs: " +
-                "  { \"201712-488_ADIOD-vPE-1 0\": " +
+                "  { \"201712-488_PASQUALE-vPE-1 0\": " +
                 "    { properties: { " +
                 "      ecomp_generated_naming: \"true\", " +
                 "      nf_naming: \"{naming_policy=SDNC_Policy.Config_MS_1806SRIOV_VPE_ADIoDJson, ecomp_generated_naming=true}\" " +
@@ -278,14 +298,14 @@
     @Test(dataProvider = "expectedServiceModel")
     public void assertEqualsBetweenServiceProxyNodes(String uuid, ToscaParserMockHelper mockHelper) throws Exception {
             Map<String, ServiceProxy> actualServiceProxies = toscaParserImpl2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getServiceProxies();
-            Map<String, ServiceProxy> expectedServiceProxies = mockHelper.getNewServiceModel().getServiceProxies();
+            Map<String, ServiceProxy> expectedServiceProxies = mockHelper.getServiceModel().getServiceProxies();
             JsonAssert.assertJsonEquals(actualServiceProxies, expectedServiceProxies);
     }
 
     @Test(dataProvider = "expectedServiceModel")
     public void assertEqualsBetweenVnfGroups(String uuid, ToscaParserMockHelper mockHelper) throws Exception {
         Map<String, ResourceGroup> actualVnfGroups = toscaParserImpl2.makeServiceModel(getCsarPath(mockHelper.getUuid()), getServiceByUuid(mockHelper.getUuid())).getVnfGroups();
-        Map<String, ResourceGroup> expectedVnfGroups = mockHelper.getNewServiceModel().getVnfGroups();
+        Map<String, ResourceGroup> expectedVnfGroups = mockHelper.getServiceModel().getVnfGroups();
         JsonAssert.assertJsonEquals(actualVnfGroups, expectedVnfGroups);
     }
 
@@ -342,7 +362,7 @@
         static final String vfWithAnnotationUuid = "f4d84bb4-a416-4b4e-997e-0059973630b9";
         static final String vlUuid = "cb49608f-5a24-4789-b0f7-2595473cb997";
         static final String crUuid = "76f27dfe-33e5-472f-8e0b-acf524adc4f0";
-        static final String vfWithVfcGroup = "6bce7302-70bd-4057-b48e-8d5b99e686ca"; //service-VdbeSrv-csar.zip
+        static final String vfWithVfcGroup = "6bce7302-70bd-4057-b48e-8d5b99e686ca"; //service-VdorotheaSrv-csar.zip
         //        public static final String PNFUuid = "68101369-6f08-4e99-9a28-fa6327d344f3";
         static final String vfFilePath = "vf-csar.JSON";
         static final String vlFilePath = "vl-csar.JSON";
@@ -358,6 +378,8 @@
         //public static final String vnfGroupingUuid = "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc";
         //public static final String vnfGroupingFilePath = "vnf-grouping-csar.json";
 
+        public static final String QUANTITY = "quantity";
+
     }
 
 
diff --git a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserInflatorTest.java b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserInflatorTest.java
index 4c5cc97..d6c080d 100644
--- a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserInflatorTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/ToscaParserInflatorTest.java
@@ -20,7 +20,16 @@
 
 package org.onap.vid.asdc.parser;
 
+import static java.util.Collections.emptyMap;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
 import com.google.common.collect.ImmutableMap;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Path;
+import java.util.Map;
+import java.util.UUID;
 import org.apache.commons.io.IOUtils;
 import org.apache.log4j.LogManager;
 import org.apache.log4j.Logger;
@@ -41,16 +50,6 @@
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.file.Path;
-import java.util.Map;
-import java.util.UUID;
-
-import static java.util.Collections.emptyMap;
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-
 public class ToscaParserInflatorTest {
 
     private static final Logger log = LogManager.getLogger(ToscaParserInflatorTest.class);
@@ -83,15 +82,15 @@
 
     @Test
     public void inflateFabricConfigurationModel_allIdsAreGiven() throws Exception {
-        final String fabricConfigurationUuid = "90fe6842-aa76-4b68-8329-5c86ff564407";
+        final String fabricConfigurationUuid = "12344bb4-a416-4b4e-997e-0059973630b9";
         final Map<String, Names> inflated = inflateModelByUuid(fabricConfigurationUuid);
 
         // see vf-with-annotation-csar.json
         assertThat(inflated, is(ImmutableMap.of(
-                "8df1892c-377d-460b-8a8d-fc8a116e9d92", doubleName("201712-488_ADIOD-vPE-1 0"),
-                "8d521692-7661-4296-b77e-a2058bb62e87", new Names("201712488AdiodVpe1..ADIOD_vRE_BV..module-1", "201712488_adiodvpe10..201712488AdiodVpe1..ADIOD_vRE_BV..module-1"),
-                "79fbee20-7fba-4166-ae4b-b94c869e7d8b", new Names("201712488AdiodVpe1..ADIOD_vPFE_BV..module-2","201712488_adiodvpe10..201712488AdiodVpe1..ADIOD_vPFE_BV..module-2"),
-                "806505b8-7a7c-47a2-acef-b4d26fe95a92", new Names("201712488AdiodVpe1..ADIOD_base_vPE_BV..module-0","201712488_adiodvpe10..201712488AdiodVpe1..ADIOD_base_vPE_BV..module-0")
+                "ea81d6f7-0861-44a7-b7d5-d173b562c350", doubleName("2017-488_PASQUALE-vPE 0"),
+                "a5d8df05-11cb-4351-96e0-b6d4168ea4df", new Names("2017488PasqualeVpe..PASQUALE_vRE_BV..module-1", "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1"),
+                "b3e8b26e-cff0-49fc-a4e6-f3e16c8440fe", new Names("2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2","2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2"),
+                "040e591e-5d30-4e0d-850f-7266e5a8e013", new Names("2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0","2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0")
         )));
     }
 
diff --git a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/VidNotionsBuilderTest.java b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/VidNotionsBuilderTest.java
index 788f780..edaf712 100644
--- a/vid-app-common/src/test/java/org/onap/vid/asdc/parser/VidNotionsBuilderTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/asdc/parser/VidNotionsBuilderTest.java
@@ -7,9 +7,9 @@
  * 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.
@@ -30,28 +30,35 @@
 import org.mockito.MockitoAnnotations;
 import org.onap.sdc.tosca.parser.api.ISdcCsarHelper;
 import org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException;
-import org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory;
 import org.onap.sdc.toscaparser.api.NodeTemplate;
 import org.onap.sdc.toscaparser.api.Property;
 import org.onap.sdc.toscaparser.api.elements.Metadata;
 import org.onap.vid.model.*;
 import org.onap.vid.properties.Features;
+import org.onap.vid.testUtils.TestUtils;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 import org.togglz.core.manager.FeatureManager;
 
-import java.util.LinkedHashMap;
-import java.util.UUID;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.*;
 import java.util.function.BiConsumer;
 
+import static java.util.Collections.emptyList;
+import static java.util.Collections.emptyMap;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.hasProperty;
 import static org.hamcrest.Matchers.is;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
-import static org.testng.Assert.assertEquals;
+import static org.onap.vid.model.VidNotions.*;
+import static org.testng.AssertJUnit.assertEquals;
 
 public class VidNotionsBuilderTest {
 
@@ -61,6 +68,10 @@
     @Mock
     private FeatureManager featureManagerMock;
 
+    private ServiceModel serviceModel;
+
+    private ISdcCsarHelper csarHelper;
+
     @BeforeClass
     public void initMocks() {
         MockitoAnnotations.initMocks(this);
@@ -75,12 +86,12 @@
     public void VLNetworkWithPropertyNetworkTechnologyOVS_UIHintIsPositive() {
         ISdcCsarHelper csarHelper = mockForNonLegacyInstantiationUI();
 
-        assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper), is(VidNotions.InstantiationUI.NETWORK_WITH_PROPERTY_NETWORK_TECHNOLOGY_EQUALS_STANDARD_SRIOV_OR_OVS));
-        assertThat(vidNotionsBuilder.suggestModelCategory(csarHelper) , is(VidNotions.ModelCategory.IS_5G_PROVIDER_NETWORK_MODEL));
+        assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel), is(InstantiationUI.NETWORK_WITH_PROPERTY_NETWORK_TECHNOLOGY_EQUALS_STANDARD_SRIOV_OR_OVS));
+        assertThat(vidNotionsBuilder.suggestModelCategory(csarHelper, serviceModel) , is(ModelCategory.IS_5G_PROVIDER_NETWORK_MODEL));
     }
 
     @NotNull
-    protected ISdcCsarHelper mockForNonLegacyInstantiationUI() {
+    private ISdcCsarHelper mockForNonLegacyInstantiationUI() {
         ISdcCsarHelper csarHelper = ToscaParserImpl2Test.getMockedSdcCsarHelper(UUID.randomUUID().toString());
 
         NodeTemplate nodeTemplate = mock(NodeTemplate.class);
@@ -98,15 +109,16 @@
     @DataProvider
     public static Object[][] anyAlacarteDataProvider() {
         return new Object[][] {
-                {"A-La-Carte", VidNotions.InstantiationUI.ANY_ALACARTE_NEW_UI},
-                {"Macro", VidNotions.InstantiationUI.LEGACY},
+                {"A-La-Carte", InstantiationUI.ANY_ALACARTE_NEW_UI},
+                {"Macro", InstantiationUI.LEGACY},
         };
     }
 
     @Test(dataProvider = "anyAlacarteDataProvider")
-    public void FLAG_EXP_ANY_ALACARTE_NEW_INSTANTIATION_UI_is_active_UIHintIsPositive(String instantiationType, VidNotions.InstantiationUI expectedInstantiationUI) {
+    public void FLAG_EXP_ANY_ALACARTE_NEW_INSTANTIATION_UI_is_active_UIHintIsPositive(String instantiationType, InstantiationUI expectedInstantiationUI) {
+        initServiceModelAndscarHelperWithMocks();
+
         when(featureManagerMock.isActive(Features.FLAG_EXP_ANY_ALACARTE_NEW_INSTANTIATION_UI)).thenReturn(true);
-        ISdcCsarHelper csarHelper = ToscaParserImpl2Test.getMockedSdcCsarHelper(UUID.randomUUID().toString());
         when(csarHelper.getServiceMetadata()).thenReturn(new Metadata(ImmutableMap.of(
                 "instantiationType", instantiationType
         )));
@@ -119,12 +131,12 @@
 
         when(csarHelper.getServiceVlList()).thenReturn(ImmutableList.of(nodeTemplate));
 
-        assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper), is(expectedInstantiationUI));
+        assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel), is(expectedInstantiationUI));
     }
 
     @Test
     public void VLNetworkWithPropertyNetworkTechnologyNot5G_UIHintIsNegative() {
-        ISdcCsarHelper csarHelper = ToscaParserImpl2Test.getMockedSdcCsarHelper(UUID.randomUUID().toString());
+        initServiceModelAndscarHelperWithMocks();
 
         NodeTemplate nodeTemplate = mock(NodeTemplate.class);
 
@@ -135,85 +147,91 @@
 
         when(csarHelper.getServiceVlList()).thenReturn(ImmutableList.of(nodeTemplate));
 
-        assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper), is(VidNotions.InstantiationUI.LEGACY));
-        assertThat(vidNotionsBuilder.suggestModelCategory(csarHelper) , is(VidNotions.ModelCategory.OTHER));
+        assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel), is(InstantiationUI.LEGACY));
+        assertThat(vidNotionsBuilder.suggestModelCategory(csarHelper, serviceModel) , is(ModelCategory.OTHER));
     }
 
     @Test
-    public void withoutMocks_givenZippedToscaFile_hasAnyNetworkWithPropertyEqualsToAnyOfYieldsTrue() throws SdcToscaParserException {
-        SdcToscaParserFactory factory = SdcToscaParserFactory.getInstance();
-        ISdcCsarHelper csarHelper = factory.getSdcCsarHelper(getClass().getClassLoader().getResource("service-vl-csar.zip").getPath(),false);
-
+    public void withoutMocks_givenZippedToscaFile_hasAnyNetworkWithPropertyEqualsToAnyOfYieldsTrue() throws SdcToscaParserException, IOException {
+        initServiceModelAndscarHelperWithRealCsar("/csars/service-vl-csar.zip");
         assertThat(vidNotionsBuilder.isALaCarte(csarHelper), is(false));
         assertThat(vidNotionsBuilder.hasAnyNetworkWithPropertyEqualsToAnyOf(csarHelper, "unexpected_property_name"), is(false));
         assertThat(vidNotionsBuilder.hasAnyNetworkWithPropertyEqualsToAnyOf(csarHelper, "network_technology","Standard-SR-IOV"), is(true));
-        assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper), is(VidNotions.InstantiationUI.LEGACY));
+        assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel), is(InstantiationUI.LEGACY));
     }
 
-    //@Test
-    //public void withoutMocks_givenZippedToscaFile_hasFabricConfigurationYieldsTrue() throws SdcToscaParserException {
-    //    SdcToscaParserFactory factory = SdcToscaParserFactory.getInstance();
-    //    ISdcCsarHelper csarHelper = factory.getSdcCsarHelper(getClass().getClassLoader().getResource("service-fabric-configuration.zip").getPath(),false);
-    //
-    //    assertThat(vidNotionsBuilder.isALaCarte(csarHelper), is(false));
-    //    assertThat(vidNotionsBuilder.hasFabricConfiguration(csarHelper), is(true));
-    //    assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper), is(VidNotions.InstantiationUI.LEGACY));
-    //}
+    @Test
+    public void withoutMocks_givenZippedToscaFile_hasFabricConfigurationYieldsTrue() throws SdcToscaParserException, IOException {
+        initServiceModelAndscarHelperWithRealCsar("/csars/service-fabric-configuration.zip");
+        assertThat(vidNotionsBuilder.isALaCarte(csarHelper), is(false));
+        assertThat(vidNotionsBuilder.hasFabricConfiguration(csarHelper), is(true));
+        assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel), is(InstantiationUI.LEGACY));
+    }
 
+    @Test(dataProvider = "trueAndFalse", dataProviderClass = TestUtils.class)
+    public void withoutMocks_givenZippedToscaFileOfTransportService_InstantiationUIAndCategoryAreRight(boolean flagValue) throws SdcToscaParserException, IOException {
+        initServiceModelAndscarHelperWithRealCsar("/csars/csarTransportWithPnfs.zip");
+
+        when(featureManagerMock.isActive(Features.FLAG_1908_TRANSPORT_SERVICE_NEW_INSTANTIATION_UI)).thenReturn(flagValue);
+
+        assertThat(vidNotionsBuilder.isALaCarte(csarHelper), is(false));
+        assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel), is(flagValue ? InstantiationUI.TRANSPORT_SERVICE : InstantiationUI.LEGACY));
+        assertThat(vidNotionsBuilder.suggestModelCategory(csarHelper, serviceModel), is(ModelCategory.Transport));
+    }
+
+    @Test(dataProvider = "trueAndFalse", dataProviderClass = TestUtils.class)
+    public void withoutMocks_givenZippedToscaFileOfInfraStructureVpn_InstantiationUIIsRight(boolean flagValue) throws SdcToscaParserException, IOException {
+        initServiceModelAndscarHelperWithRealCsar("/csars/service-Infravpn-csar.zip");
+        when(featureManagerMock.isActive(Features.FLAG_1908_INFRASTRUCTURE_VPN)).thenReturn(flagValue);
+        assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel), is(flagValue ? InstantiationUI.INFRASTRUCTURE_VPN : InstantiationUI.LEGACY));
+        assertThat(vidNotionsBuilder.suggestModelCategory(csarHelper, serviceModel), is(ModelCategory.INFRASTRUCTURE_VPN));
+    }
 
     @Test
     public void uuidIsExactly1ffce89fEtc_UIHintIsPositive() {
-        ISdcCsarHelper csarHelper = ToscaParserImpl2Test.getMockedSdcCsarHelper(UUID.randomUUID().toString());
+        initServiceModelAndscarHelperWithMocks();
 
         when(csarHelper.getServiceMetadata()).thenReturn(new Metadata(ImmutableMap.of(
                 "UUID", "95eb2c44-bff2-4e8b-ad5d-8266870b7717"
         )));
         when(featureManagerMock.isActive(Features.FLAG_5G_IN_NEW_INSTANTIATION_UI)).thenReturn(true);
-        assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper), is(VidNotions.InstantiationUI.SERVICE_UUID_IS_1ffce89f_ef3f_4cbb_8b37_82134590c5de));
+        assertThat(vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel), is(InstantiationUI.SERVICE_UUID_IS_1ffce89f_ef3f_4cbb_8b37_82134590c5de));
     }
 
-
-    @DataProvider
-    public static Object[][] trueAndFalse() {
-        return new Object[][] {{true}, {false}};
-    }
-
-    @Test(dataProvider = "trueAndFalse")
+    @Test(dataProvider = "trueAndFalse", dataProviderClass = TestUtils.class)
     public void buildVidNotions_nullByFlag(boolean flagValue) {
-        ISdcCsarHelper csarHelper = ToscaParserImpl2Test.getMockedSdcCsarHelper(UUID.randomUUID().toString());
+        initServiceModelAndscarHelperWithMocks();
 
         when(featureManagerMock.isActive(Features.FLAG_5G_IN_NEW_INSTANTIATION_UI)).thenReturn(flagValue);
-        assertThat(vidNotionsBuilder.buildVidNotions(csarHelper, null), hasProperty("instantiationUI", is(VidNotions.InstantiationUI.LEGACY)));
+        assertThat(vidNotionsBuilder.buildVidNotions(csarHelper, serviceModel), hasProperty("instantiationUI", is(InstantiationUI.LEGACY)));
     }
 
     @DataProvider
     public static Object[][] ServiceRoleTypesDataProvider() {
         return new Object[][] {
-                {"gROUPING", VidNotions.InstantiationUI.SERVICE_WITH_VNF_GROUPING},
-                {"", VidNotions.InstantiationUI.LEGACY},
+                {"gROUPING", InstantiationUI.SERVICE_WITH_VNF_GROUPING},
+                {"", InstantiationUI.LEGACY},
         };
     }
 
     @Test(dataProvider = "ServiceRoleTypesDataProvider")
-    public void testGetViewEditUITypeForResourceGroup(String serviceRole, VidNotions.InstantiationUI expectedViewEditUI) {
-        when(featureManagerMock.isActive(Features.FLAG_ASYNC_INSTANTIATION)).thenReturn(true);
+    public void testGetViewEditUITypeForResourceGroup(String serviceRole, InstantiationUI expectedViewEditUI) {
+        initServiceModelAndscarHelperWithMocks();
         when(featureManagerMock.isActive(Features.FLAG_1902_VNF_GROUPING)).thenReturn(true);
-        ISdcCsarHelper csarHelper = ToscaParserImpl2Test.getMockedSdcCsarHelper(UUID.randomUUID().toString());
         when(csarHelper.getServiceMetadata()).thenReturn(new Metadata(ImmutableMap.of(
                 "serviceRole", serviceRole
         )));
 
-        assertThat(vidNotionsBuilder.suggestViewEditUI(csarHelper, null), is(expectedViewEditUI));
+        assertThat(vidNotionsBuilder.suggestViewEditUI(csarHelper, serviceModel), is(expectedViewEditUI));
     }
 
     @DataProvider
     public static Object[][] macroToViewEditDataProvider() {
         return new Object[][] {
-                {"macro service + not excluded + needed flags are open", true, false, true, true, VidNotions.InstantiationUI.MACRO_SERVICE},
-                {"not macro service", false, false, true, true, VidNotions.InstantiationUI.LEGACY},
-                {"macro that shall be excluded because it has pnf", true, true, true, true, VidNotions.InstantiationUI.LEGACY},
-                {"macro service + FLAG_ASYNC_INSTANTIATION off", true, false, false, true, VidNotions.InstantiationUI.LEGACY},
-                {"macro service + FLAG_1902_NEW_VIEW_EDIT off", true, false, true, false, VidNotions.InstantiationUI.LEGACY},
+                {"macro service + not excluded + needed flags are open", true, false, true, InstantiationUI.MACRO_SERVICE},
+                {"not macro service", false, true, true, InstantiationUI.LEGACY},
+                {"macro that shall be excluded because it has pnf", true, true, true, InstantiationUI.LEGACY},
+                {"macro service + FLAG_1902_NEW_VIEW_EDIT off", true, false, false, InstantiationUI.LEGACY},
         };
     }
 
@@ -222,19 +240,16 @@
             String testDescription,
             boolean isMacro,
             boolean isExcluded,
-            boolean isFlagAsyncInstantiationActive,
             boolean isFlag1902NewViewEdit,
-            VidNotions.InstantiationUI expectedViewEditUi) {
+            InstantiationUI expectedViewEditUi) {
 
-        ISdcCsarHelper csarHelper = mock(ISdcCsarHelper.class);
-        ServiceModel serviceModel = mock(ServiceModel.class);
+        initServiceModelAndscarHelperWithMocks();
 
         //mock for is Macro
         String instantiationType = isMacro ? ToscaParserImpl2.Constants.MACRO : ToscaParserImpl2.Constants.A_LA_CARTE;
         Service service = mock(Service.class);
         when(serviceModel.getService()).thenReturn(service);
         when(service.getInstantiationType()).thenReturn(instantiationType);
-        when(featureManagerMock.isActive(Features.FLAG_ASYNC_INSTANTIATION)).thenReturn(isFlagAsyncInstantiationActive);
         when(featureManagerMock.isActive(Features.FLAG_1902_NEW_VIEW_EDIT)).thenReturn(isFlag1902NewViewEdit);
 
         //mock for isExcluded
@@ -242,17 +257,16 @@
             when(serviceModel.getPnfs()).thenReturn(ImmutableMap.of("a", mock(Node.class)));
         }
 
-        VidNotions.InstantiationUI result = vidNotionsBuilder.suggestViewEditUI(csarHelper, serviceModel);
+        InstantiationUI result = vidNotionsBuilder.suggestViewEditUI(csarHelper, serviceModel);
         assertEquals(expectedViewEditUi, result);
     }
 
     @DataProvider
     public static Object[][] instantiationUIToViewEditDataProvider() {
         return new Object[][] {
-                {"network cloud(5G) service + needed flags are open", true, true, true, VidNotions.InstantiationUI.NETWORK_WITH_PROPERTY_NETWORK_TECHNOLOGY_EQUALS_STANDARD_SRIOV_OR_OVS},
-                {"mocked service + needed flags are open", false, true, true, VidNotions.InstantiationUI.LEGACY},
-                {"network cloud(5G) service + FLAG_ASYNC_INSTANTIATION is off", true, false, true, VidNotions.InstantiationUI.LEGACY},
-                {"network cloud(5G) service + FLAG_1902_NEW_VIEW_EDIT is off", true, true, false, VidNotions.InstantiationUI.LEGACY},
+                {"network cloud(5G) service + needed flags are open", true, true, InstantiationUI.NETWORK_WITH_PROPERTY_NETWORK_TECHNOLOGY_EQUALS_STANDARD_SRIOV_OR_OVS},
+                {"mocked service + needed flags are open", false, true, InstantiationUI.LEGACY},
+                {"network cloud(5G) service + FLAG_1902_NEW_VIEW_EDIT is off", true, false, InstantiationUI.LEGACY},
         };
     }
 
@@ -261,12 +275,10 @@
     public void whenInstantiationUIIsNotLegacy_viewEditIsRight(
             String testDescription,
             boolean isInstantiationUINotLegacy,
-            boolean isFlagAsyncInstantiationActive,
             boolean isFlag1902NewViewEdit,
-            VidNotions.InstantiationUI expectedViewEditUi) {
+            InstantiationUI expectedViewEditUi) {
 
         ISdcCsarHelper csarHelper = isInstantiationUINotLegacy ?  mockForNonLegacyInstantiationUI() : mock(ISdcCsarHelper.class);
-        when(featureManagerMock.isActive(Features.FLAG_ASYNC_INSTANTIATION)).thenReturn(isFlagAsyncInstantiationActive);
         when(featureManagerMock.isActive(Features.FLAG_1902_NEW_VIEW_EDIT)).thenReturn(isFlag1902NewViewEdit);
 
         ServiceModel serviceModel = mock(ServiceModel.class);
@@ -274,7 +286,7 @@
         when(serviceModel.getService()).thenReturn(service);
         when(service.getInstantiationType()).thenReturn(ToscaParserImpl2.Constants.A_LA_CARTE);
 
-        VidNotions.InstantiationUI result = vidNotionsBuilder.suggestViewEditUI(csarHelper, serviceModel);
+        InstantiationUI result = vidNotionsBuilder.suggestViewEditUI(csarHelper, serviceModel);
         assertEquals(expectedViewEditUi, result);
     }
 
@@ -282,7 +294,7 @@
     public static Object[][] mockerForMacroExcluded() {
         return new Object[][] {
                 {"service with pnfs", (BiConsumer<ServiceModel, FeatureManager>) (serviceModel, fm)->when(serviceModel.getPnfs()).thenReturn(ImmutableMap.of("a", mock(Node.class))), true},
-                {"service with collection resource", (BiConsumer<ServiceModel, FeatureManager>) (serviceModel, fm)->when(serviceModel.getCollectionResource()).thenReturn(ImmutableMap.of("a", mock(CR.class))), true},
+                {"service with collection resource", (BiConsumer<ServiceModel, FeatureManager>) (serviceModel, fm) -> when(serviceModel.getCollectionResources()).thenReturn(ImmutableMap.of("a", mock(CR.class))), true},
                 {"service with network + FLAG_NETWORK_TO_ASYNC_INSTANTIATION false ", (BiConsumer<ServiceModel, FeatureManager>) (serviceModel, fm)->{
                     when(serviceModel.getNetworks()).thenReturn(ImmutableMap.of("a", mock(Network.class)));
                     when(fm.isActive(Features.FLAG_NETWORK_TO_ASYNC_INSTANTIATION)).thenReturn(false);}
@@ -290,7 +302,7 @@
                 {"service with network + FLAG_NETWORK_TO_ASYNC_INSTANTIATION true", (BiConsumer<ServiceModel, FeatureManager>) (serviceModel, fm)->{
                     when(serviceModel.getNetworks()).thenReturn(ImmutableMap.of("a", mock(Network.class)));
                     when(fm.isActive(Features.FLAG_NETWORK_TO_ASYNC_INSTANTIATION)).thenReturn(true);}
-                    , false},
+                        , false},
                 {"empty service + FLAG_NETWORK_TO_ASYNC_INSTANTIATION false", (BiConsumer<ServiceModel, FeatureManager>) (serviceModel, fm)->when(fm.isActive(Features.FLAG_NETWORK_TO_ASYNC_INSTANTIATION)).thenReturn(false), false},
         };
     }
@@ -302,9 +314,197 @@
         assertEquals(shallBeExcluded, vidNotionsBuilder.isMacroExcludedFromAsyncFlow(serviceModel));
     }
 
+    @DataProvider
+    public static Object[][] toscaParserInstantiationTypeToVidNotion() {
+        return new Object[][] {
+                {ToscaParserImpl2.Constants.MACRO, InstantiationType.Macro},
+                {ToscaParserImpl2.Constants.A_LA_CARTE, InstantiationType.ALaCarte},
+                {ToscaParserImpl2.Constants.CLIENT_CONFIG, InstantiationType.ClientConfig},
+                {"I dont know", InstantiationType.ClientConfig},
+                {"", InstantiationType.ClientConfig}
+        };
+    }
 
+    @Test(dataProvider="toscaParserInstantiationTypeToVidNotion")
+    public void testSuggestInstantiationTypeWhenInstantiationUiLegacy(String toscaParserInstantiationType, InstantiationType expectedInstantiationType) {
+        ServiceModel serviceModel = mock(ServiceModel.class);
+        Service service = mock(Service.class);
+        when(serviceModel.getService()).thenReturn(service);
+        when(service.getInstantiationType()).thenReturn(toscaParserInstantiationType);
+        assertEquals(expectedInstantiationType, vidNotionsBuilder.suggestInstantiationType(serviceModel, ModelCategory.OTHER));
+    }
 
+    @DataProvider
+    public static Object[][] instantiationUIAndFeatureFlagsForInstantiationType() {
+        return new Object[][] {
+                {ModelCategory.Transport, Features.FLAG_1908_TRANSPORT_SERVICE_NEW_INSTANTIATION_UI, true, InstantiationType.Macro},
+                {ModelCategory.Transport, Features.FLAG_1908_TRANSPORT_SERVICE_NEW_INSTANTIATION_UI, false, InstantiationType.ALaCarte},
+                {ModelCategory.INFRASTRUCTURE_VPN, Features.FLAG_1908_INFRASTRUCTURE_VPN, true, InstantiationType.Macro},
+                {ModelCategory.INFRASTRUCTURE_VPN, Features.FLAG_1908_INFRASTRUCTURE_VPN, false, InstantiationType.ALaCarte},
+                {ModelCategory.OTHER, Features.FLAG_1908_INFRASTRUCTURE_VPN, true, InstantiationType.ALaCarte}, //not mapped InstantiationUI
+        };
+    }
 
+    @Test(dataProvider="instantiationUIAndFeatureFlagsForInstantiationType")
+    public void testSuggestInstantiationTypeByModelCategoryAndFeatureFlags(
+            ModelCategory instantiationUI,
+            Features featureFlag,
+            boolean isFeatureOn,
+            InstantiationType expectedInstantiationType) {
+        ServiceModel serviceModel = mock(ServiceModel.class);
+        Service service = mock(Service.class);
+        when(serviceModel.getService()).thenReturn(service);
+        when(service.getInstantiationType()).thenReturn(ToscaParserImpl2.Constants.A_LA_CARTE);
+        when(featureManagerMock.isActive(featureFlag)).thenReturn(isFeatureOn);
+        assertEquals(expectedInstantiationType, vidNotionsBuilder.suggestInstantiationType(serviceModel, instantiationUI));
+    }
 
+    @DataProvider
+    public static Object[][] FLAG_1908_COLLECTION_RESOURCE_NEW_INSTANTIATION_UIValueAndCollectionResourceForVidNotions() {
+        return new Object[][] {
+                {true, ImmutableMap.of("Some string", mock(CR.class)), InstantiationUI.SERVICE_WITH_COLLECTION_RESOURCE, ModelCategory.SERVICE_WITH_COLLECTION_RESOURCE},
+                {true, Collections.EMPTY_MAP, InstantiationUI.LEGACY, ModelCategory.OTHER},
+                {true, null, InstantiationUI.LEGACY, ModelCategory.OTHER},
+                {false, ImmutableMap.of("Some string", mock(CR.class)), InstantiationUI.LEGACY, ModelCategory.SERVICE_WITH_COLLECTION_RESOURCE},
+                {false, Collections.EMPTY_MAP, InstantiationUI.LEGACY, ModelCategory.OTHER},
+                {false, null, InstantiationUI.LEGACY, ModelCategory.OTHER}
+        };
+    }
 
-}
+    @Test(dataProvider="FLAG_1908_COLLECTION_RESOURCE_NEW_INSTANTIATION_UIValueAndCollectionResourceForVidNotions")
+    public void testSuggestInstantiationUiAndModelCategoryByCollectionResourceAndFeatureFlag_FLAG_1908_COLLECTION_RESOURCE_NEW_INSTANTIATION_UI(
+            boolean featureFlagValue,
+            Map<String, CR> collectionResource,
+            VidNotions.InstantiationUI expectedInstantiationUi,
+            VidNotions.ModelCategory expectedModelCategory) {
+        initServiceModelAndscarHelperWithMocks();
+
+        Service service = mock(Service.class);
+        when(service.getInstantiationType()).thenReturn(ToscaParserImpl2.Constants.MACRO);
+        when(serviceModel.getService()).thenReturn(service);
+        when(serviceModel.getCollectionResources()).thenReturn(collectionResource);
+        when(featureManagerMock.isActive(Features.FLAG_1908_COLLECTION_RESOURCE_NEW_INSTANTIATION_UI)).thenReturn(featureFlagValue);
+        VidNotions vidNotions = vidNotionsBuilder.buildVidNotions(csarHelper, serviceModel);
+        assertEquals(expectedInstantiationUi, vidNotions.getInstantiationUI());
+        assertEquals(expectedModelCategory, vidNotions.getModelCategory());
+        assertEquals(InstantiationUI.LEGACY, vidNotions.getViewEditUI());
+        assertEquals(InstantiationType.Macro, vidNotions.getInstantiationType());
+    }
+
+    @DataProvider
+    public static Object[][] givenCollectionResourceServiceDataProvider() {
+        return new Object[][]{
+                {false, true, InstantiationUI.LEGACY},
+                {true, false, InstantiationUI.LEGACY},
+                {true, true, InstantiationUI.SERVICE_WITH_COLLECTION_RESOURCE}
+        };
+    }
+
+    @Test(dataProvider = "givenCollectionResourceServiceDataProvider")
+    public void givenCollectionResourceService_whenSuggestViewEdit_thenResultAccordingFeatureFlag(
+            boolean crFlag, boolean resumeFlag, VidNotions.InstantiationUI expectedViewEditUi) {
+
+        //mock service with CR
+        ServiceModel mockServiceModel = mock(ServiceModel.class);
+        when(mockServiceModel.getCollectionResources()).thenReturn(ImmutableMap.of("a", mock(CR.class)));
+
+        //mock feature flags
+        when(featureManagerMock.isActive(Features.FLAG_1908_COLLECTION_RESOURCE_NEW_INSTANTIATION_UI)).thenReturn(crFlag);
+        when(featureManagerMock.isActive(Features.FLAG_1908_RESUME_MACRO_SERVICE)).thenReturn(resumeFlag);
+
+        assertEquals(expectedViewEditUi, vidNotionsBuilder.suggestViewEditUI(mock(ISdcCsarHelper.class), mockServiceModel));
+    }
+
+    @Test
+    public void whenServiceModelIsNull_thenInstantiationTypeIsClientConfig() {
+        assertEquals( InstantiationType.ClientConfig, vidNotionsBuilder.suggestInstantiationType(null, ModelCategory.OTHER));
+    }
+
+    @Test
+    public void whenServiceInServiceModelIsNull_thenInstantiationTypeIsClientConfig() {
+        assertEquals( InstantiationType.ClientConfig, vidNotionsBuilder.suggestInstantiationType(mock(ServiceModel.class), ModelCategory.OTHER));
+    }
+
+    @Test
+    public void whenInstantiationTypeInServiceModelIsNull_thenInstantiationTypeIsClientConfig() {
+        initServiceModelAndscarHelperWithMocks();
+        Service service = mock(Service.class);
+        when(serviceModel.getService()).thenReturn(service);
+        when(service.getInstantiationType()).thenReturn(null);
+        assertEquals( InstantiationType.ClientConfig, vidNotionsBuilder.suggestInstantiationType(serviceModel, ModelCategory.OTHER));
+    }
+
+    private void initServiceModelAndscarHelperWithRealCsar(String path) throws SdcToscaParserException, IOException {
+        Path csarPath = Paths.get(new File(getClass().getResource(path).getPath()).getCanonicalPath());
+        ToscaParserImpl2 toscaParser = new ToscaParserImpl2(vidNotionsBuilder);
+        org.onap.vid.asdc.beans.Service asdcServiceMetadata = mock(org.onap.vid.asdc.beans.Service.class);
+        when(asdcServiceMetadata.getVersion()).thenReturn("versions");
+        serviceModel = toscaParser.makeServiceModel(csarPath, asdcServiceMetadata);
+        csarHelper = toscaParser.getSdcCsarHelper(csarPath);
+    }
+
+    private void initServiceModelAndscarHelperWithMocks() {
+        csarHelper = ToscaParserImpl2Test.getMockedSdcCsarHelper(UUID.randomUUID().toString());
+        serviceModel = mock(ServiceModel.class);
+    }
+
+    @DataProvider
+    public static Object[][] VnfNcIndicationDataProvider() {
+        return new Object[][] {
+                {true, "VNF",  InstantiationUI.A_LA_CARTE_VNF_SERVICE_ROLE},
+                {false, "VNF", InstantiationUI.LEGACY},
+                {false, "notVNF", InstantiationUI.LEGACY},
+                {true, null, InstantiationUI.LEGACY},
+                {true, "notVNF", InstantiationUI.LEGACY},
+                {true, "vnf", InstantiationUI.A_LA_CARTE_VNF_SERVICE_ROLE},
+        };
+    }
+
+    @Test (dataProvider = "VnfNcIndicationDataProvider")
+    public void whenServiceRoleVnf_thenInstantiationTypeNewUI(boolean flagOn, String serviceRole, InstantiationUI expectedViewEditUi){
+        initServiceModelAndscarHelperWithMocks();
+
+        when(featureManagerMock.isActive(Features.FLAG_1908_A_LA_CARTE_VNF_NEW_INSTANTIATION_UI)).thenReturn(flagOn);
+
+        when(csarHelper.getServiceMetadata()).thenReturn(new Metadata(serviceRole == null ?
+                emptyMap() : ImmutableMap.of(ToscaParserImpl2.Constants.SERVICE_ROLE, serviceRole)
+        ));
+
+        assertEquals(expectedViewEditUi, vidNotionsBuilder.suggestInstantiationUI(csarHelper, serviceModel));
+    }
+
+    private static NodeTemplate mockNodeTemplateChild(boolean withFabricConfiguration) {
+        NodeTemplate child = mock(NodeTemplate.class);
+        when(child.getType()).thenReturn(withFabricConfiguration ? ToscaParserImpl2.Constants.FABRIC_CONFIGURATION_TYPE : "nothing");
+        return child;
+    }
+
+    private static ISdcCsarHelper mockServiceNodeTemplates(ISdcCsarHelper csarHelper, ImmutableList<NodeTemplate> children) {
+        when(csarHelper.getNodeTemplateChildren(any())).thenReturn(children);
+
+        NodeTemplate parent = mock(NodeTemplate.class);
+        List<NodeTemplate> nodeTemplates = ImmutableList.of(parent);
+
+        when(csarHelper.getServiceNodeTemplates()).thenReturn(nodeTemplates);
+        return csarHelper;
+    }
+
+    @DataProvider
+    public static Object[][] csarHelpersForFabricConfiguration() {
+        ISdcCsarHelper csarHelperWithNoNodes = mock(ISdcCsarHelper.class);
+        when(csarHelperWithNoNodes.getServiceNodeTemplates()).thenReturn(emptyList());
+
+        return new Object[][] {
+                { "zero nodes", false, csarHelperWithNoNodes },
+                { "single node with no child", false, mockServiceNodeTemplates(mock(ISdcCsarHelper.class), ImmutableList.of()) },
+                { "single node with single fabric child", true, mockServiceNodeTemplates(mock(ISdcCsarHelper.class), ImmutableList.of(mockNodeTemplateChild(true))) },
+                { "single node with single fabric child and single non-fabric", true, mockServiceNodeTemplates(mock(ISdcCsarHelper.class), ImmutableList.of(
+                        mockNodeTemplateChild(true), mockNodeTemplateChild(true))) },
+        };
+    }
+
+    @Test (dataProvider = "csarHelpersForFabricConfiguration")
+    public void hasFabricConfiguration(String desc, boolean shouldHaveFabricConfiguration, ISdcCsarHelper csarHelper) {
+        assertThat(desc, vidNotionsBuilder.hasFabricConfiguration(csarHelper), is(shouldHaveFabricConfiguration));
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/changeManagement/WorkflowRequestDetailTest.java b/vid-app-common/src/test/java/org/onap/vid/changeManagement/WorkflowRequestDetailTest.java
index 38f15d7..fbaa763 100644
--- a/vid-app-common/src/test/java/org/onap/vid/changeManagement/WorkflowRequestDetailTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/changeManagement/WorkflowRequestDetailTest.java
@@ -19,15 +19,17 @@
  */
 package org.onap.vid.changeManagement;
 
-import org.testng.annotations.Test;
-
 import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSetters;
 import static org.hamcrest.MatcherAssert.assertThat;
 
+import org.onap.vid.testUtils.TestUtils;
+import org.testng.annotations.Test;
+
 public class WorkflowRequestDetailTest {
 
     @Test
     public void shouldHaveProperSettersAndGetters() {
+        TestUtils.registerCloudConfigurationValueGenerator();
         assertThat(WorkflowRequestDetail.class, hasValidGettersAndSetters());
     }
 }
diff --git a/vid-app-common/src/test/java/org/onap/vid/config/DataSourceConfig.java b/vid-app-common/src/test/java/org/onap/vid/config/DataSourceConfig.java
index 43adc8c..15f849a 100644
--- a/vid-app-common/src/test/java/org/onap/vid/config/DataSourceConfig.java
+++ b/vid-app-common/src/test/java/org/onap/vid/config/DataSourceConfig.java
@@ -63,7 +63,7 @@
         Resource[] mappingLocations = {
                 new ClassPathResource("WEB-INF/fusion/orm/Fusion.hbm.xml"),
                 new ClassPathResource("WEB-INF/fusion/orm/Workflow.hbm.xml"),
-                new ClassPathResource("WEB-INF/fusion/orm/RNoteBookIntegration.hbm.xml")
+//                new ClassPathResource("WEB-INF/fusion/orm/RNoteBookIntegration.hbm.xml")
         };
 
         sessionFactory.setHibernateProperties(properties);
diff --git a/vid-app-common/src/test/java/org/onap/vid/config/JobAdapterConfig.java b/vid-app-common/src/test/java/org/onap/vid/config/JobAdapterConfig.java
index 7462a32..149fad3 100644
--- a/vid-app-common/src/test/java/org/onap/vid/config/JobAdapterConfig.java
+++ b/vid-app-common/src/test/java/org/onap/vid/config/JobAdapterConfig.java
@@ -7,9 +7,9 @@
  * 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.
@@ -21,33 +21,26 @@
 package org.onap.vid.config;
 
 
-import org.hibernate.SessionFactory;
+import org.mockito.Mockito;
 import org.onap.vid.job.JobAdapter;
-import org.onap.vid.job.JobsBrokerService;
 import org.onap.vid.job.impl.JobAdapterImpl;
-import org.onap.vid.job.impl.JobsBrokerServiceInDatabaseImpl;
-import org.onap.vid.properties.VidProperties;
-import org.onap.portalsdk.core.service.DataAccessService;
-import org.onap.portalsdk.core.util.SystemProperties;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
+import org.togglz.core.manager.FeatureManager;
 
 @Configuration
 @EnableTransactionManagement
 public class JobAdapterConfig {
 
     @Bean
-    public JobAdapter jobAdapter() {
-        return new JobAdapterImpl();
+    public FeatureManager featureManager() {
+        return Mockito.mock(FeatureManager.class);
     }
 
     @Bean
-    public JobsBrokerService jobsBrokerService(DataAccessService dataAccessService, SessionFactory sessionFactory) {
-        int maxOpenedInstantiationRequestsToMso = Integer.parseInt(SystemProperties.getProperty(VidProperties.MSO_MAX_OPENED_INSTANTIATION_REQUESTS));
-        int pollingIntervalSeconds = Integer.parseInt(SystemProperties.getProperty(VidProperties.MSO_ASYNC_POLLING_INTERVAL_SECONDS));
-
-        return new JobsBrokerServiceInDatabaseImpl(dataAccessService, sessionFactory, maxOpenedInstantiationRequestsToMso, pollingIntervalSeconds);
+    public JobAdapter jobAdapter(FeatureManager featureManager) {
+        return new JobAdapterImpl(featureManager);
     }
 
-}
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/config/JobCommandsConfigWithMockedMso.java b/vid-app-common/src/test/java/org/onap/vid/config/JobCommandsConfigWithMockedMso.java
index 1fc46ee..c4f7886 100644
--- a/vid-app-common/src/test/java/org/onap/vid/config/JobCommandsConfigWithMockedMso.java
+++ b/vid-app-common/src/test/java/org/onap/vid/config/JobCommandsConfigWithMockedMso.java
@@ -28,6 +28,7 @@
 import org.onap.vid.aai.util.SSLContextProvider;
 import org.onap.vid.aai.util.ServletRequestHelper;
 import org.onap.vid.aai.util.SystemPropertyHelper;
+import org.onap.vid.dal.AsyncInstantiationRepository;
 import org.onap.vid.job.JobAdapter;
 import org.onap.vid.job.JobsBrokerService;
 import org.onap.vid.job.command.*;
@@ -52,8 +53,13 @@
     }
 
     @Bean
-    public JobsBrokerService jobsBrokerService(DataAccessService dataAccessService, SessionFactory sessionFactory) {
-        return new JobsBrokerServiceInDatabaseImpl(dataAccessService, sessionFactory, 200, 0);
+    public VersionService versionService() {
+        return Mockito.mock(VersionService.class);
+    }
+
+    @Bean
+    public JobsBrokerService jobsBrokerService(DataAccessService dataAccessService, SessionFactory sessionFactory, VersionService versionService) {
+        return new JobsBrokerServiceInDatabaseImpl(dataAccessService, sessionFactory, 200, 0,versionService);
     }
 
     @Bean
@@ -76,9 +82,10 @@
         return new HttpsAuthClient("some random path", systemPropertyHelper, sslContextProvider, featureManager);
     }
 
+
     @Bean
-    public JobAdapter jobAdapter() {
-        return new JobAdapterImpl();
+    public JobAdapter jobAdapter(FeatureManager featureManager) {
+        return new JobAdapterImpl(featureManager);
     }
 
     @Bean
@@ -100,119 +107,159 @@
     }
 
     @Bean
-    public AsyncInstantiationBusinessLogic asyncInstantiationBusinessLogic(DataAccessService dataAccessService,
-                                                                           JobAdapter jobAdapter,
+    public MsoRequestBuilder msoRequestHandlerService(AsyncInstantiationBusinessLogic asyncInstantiationBusinessLogic,
+                                                      CloudOwnerService cloudOwnerService,
+                                                      AaiClientInterface aaiClient,
+                                                      FeatureManager featureManager) {
+        return new MsoRequestBuilder(asyncInstantiationBusinessLogic, cloudOwnerService, aaiClient, featureManager);
+    }
+    @Bean
+    public AsyncInstantiationRepository asyncInstantiationRepository(DataAccessService dataAccessService) {
+        return new AsyncInstantiationRepository(dataAccessService);
+    }
+
+    @Bean
+    public AsyncInstantiationBusinessLogic asyncInstantiationBusinessLogic(JobAdapter jobAdapter,
                                                                            JobsBrokerService jobsBrokerService,
                                                                            SessionFactory sessionFactory,
                                                                            AaiClientInterface aaiClient,
                                                                            FeatureManager featureManager,
-                                                                           CloudOwnerService cloudOwnerService) {
-        return new AsyncInstantiationBusinessLogicImpl(dataAccessService, jobAdapter, jobsBrokerService, sessionFactory, aaiClient, featureManager, cloudOwnerService);
+                                                                           CloudOwnerService cloudOwnerService,
+                                                                           AsyncInstantiationRepository asyncInstantiationRepository,
+                                                                           AuditService auditService) {
+        return new AsyncInstantiationBusinessLogicImpl(jobAdapter, jobsBrokerService, sessionFactory, aaiClient, featureManager, cloudOwnerService, asyncInstantiationRepository, auditService);
     }
 
-    @Bean
-    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-    public MacroServiceInstantiationCommand serviceInstantiationCommand() {
-        return new MacroServiceInstantiationCommand();
-    }
-
-    @Bean
-    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-    public ServiceInProgressStatusCommand inProgressStatusCommand() {
-        return new ServiceInProgressStatusCommand();
-    }
-
-    @Bean
-    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-    public ALaCarteServiceInstantiationCommand aLaCarteServiceInstantiationCommand() {
-        return new ALaCarteServiceInstantiationCommand();
-    }
 
     @Bean
     @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
     public ALaCarteServiceCommand aLaCarteServiceCommand(
             AsyncInstantiationBusinessLogic asyncInstantiationBusinessLogic,
             JobsBrokerService jobsBrokerService,
+            MsoRequestBuilder msoRequestBuilder,
             MsoResultHandlerService msoResultHandlerService,
             JobAdapter jobAdapter,
             InProgressStatusService inProgressStatusService,
             WatchChildrenJobsBL watchChildrenJobsBL,
-            RestMsoImplementation restMso) {
-        return new ALaCarteServiceCommand(inProgressStatusService, watchChildrenJobsBL, asyncInstantiationBusinessLogic, jobsBrokerService, msoResultHandlerService, jobAdapter, restMso);
+            RestMsoImplementation restMso,
+            AuditService auditService) {
+        return new ALaCarteServiceCommand(inProgressStatusService, watchChildrenJobsBL, asyncInstantiationBusinessLogic, jobsBrokerService, msoRequestBuilder, msoResultHandlerService, jobAdapter, restMso, auditService);
     }
 
     @Bean
     @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+    public MacroServiceCommand macroServiceCommand(
+            AsyncInstantiationBusinessLogic asyncInstantiationBusinessLogic,
+            JobsBrokerService jobsBrokerService,
+            MsoRequestBuilder msoRequestBuilder,
+            MsoResultHandlerService msoResultHandlerService,
+            JobAdapter jobAdapter,
+            InProgressStatusService inProgressStatusService,
+            WatchChildrenJobsBL watchChildrenJobsBL,
+            RestMsoImplementation restMso,
+            AuditService auditService) {
+        return new MacroServiceCommand(inProgressStatusService, watchChildrenJobsBL, asyncInstantiationBusinessLogic, jobsBrokerService, msoRequestBuilder, msoResultHandlerService, jobAdapter, restMso, auditService);
+    }
+
+
+    @Bean
+    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+    public NetworkCommand networkCommand(
+            AsyncInstantiationBusinessLogic asyncInstantiationBusinessLogic,
+            RestMsoImplementation restMso,
+            MsoRequestBuilder msoRequestBuilder,
+            MsoResultHandlerService msoResultHandlerService,
+            InProgressStatusService inProgressStatusService,
+            WatchChildrenJobsBL watchChildrenJobsBL,
+            JobsBrokerService jobsBrokerService,
+            JobAdapter jobAdapter) {
+        return new NetworkCommand(asyncInstantiationBusinessLogic, restMso, msoRequestBuilder, msoResultHandlerService,
+                inProgressStatusService, watchChildrenJobsBL, jobsBrokerService, jobAdapter);
+    }
+    @Bean
+    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
     public InstanceGroupCommand instanceGroupCommand(
             AsyncInstantiationBusinessLogic asyncInstantiationBusinessLogic,
-            MsoResultHandlerService msoResultHandlerService, InProgressStatusService inProgressStatusService,
+            MsoRequestBuilder msoRequestBuilder,
+            MsoResultHandlerService msoResultHandlerService,
+            InProgressStatusService inProgressStatusService,
             WatchChildrenJobsBL watchChildrenJobsBL,
-            RestMsoImplementation restMso) {
-        return new InstanceGroupCommand(asyncInstantiationBusinessLogic, restMso, msoResultHandlerService, inProgressStatusService, watchChildrenJobsBL);
+            RestMsoImplementation restMso,
+            JobsBrokerService jobsBrokerService,
+            JobAdapter jobAdapter) {
+        return new InstanceGroupCommand(asyncInstantiationBusinessLogic, restMso, msoRequestBuilder, msoResultHandlerService, inProgressStatusService, watchChildrenJobsBL, jobsBrokerService, jobAdapter);
     }
 
     @Bean
     @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-    public VnfInstantiationCommand vnfInstantiationCommand() {
-        return new VnfInstantiationCommand();
+    public InstanceGroupMemberCommand instanceGroupMemberCommand (
+            AsyncInstantiationBusinessLogic asyncInstantiationBusinessLogic,
+            MsoRequestBuilder msoRequestBuilder,
+            MsoResultHandlerService msoResultHandlerService,
+            InProgressStatusService inProgressStatusService,
+            WatchChildrenJobsBL watchChildrenJobsBL,
+            RestMsoImplementation restMso,
+            JobsBrokerService jobsBrokerService,
+            JobAdapter jobAdapter) {
+        return new InstanceGroupMemberCommand(asyncInstantiationBusinessLogic, restMso, msoRequestBuilder, msoResultHandlerService, inProgressStatusService,
+                watchChildrenJobsBL, jobsBrokerService, jobAdapter);
+    }
+
+
+    @Bean
+    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+    public VnfCommand VnfCommand(
+            AsyncInstantiationBusinessLogic asyncInstantiationBusinessLogic,
+            RestMsoImplementation restMso,
+            MsoRequestBuilder msoRequestBuilder,
+            MsoResultHandlerService msoResultHandlerService,
+            InProgressStatusService inProgressStatusService,
+            WatchChildrenJobsBL watchChildrenJobsBL,
+            JobsBrokerService jobsBrokerService,
+            JobAdapter jobAdapter,
+            FeatureManager featureManager) {
+        return new VnfCommand(asyncInstantiationBusinessLogic, restMso, msoRequestBuilder, msoResultHandlerService,
+                inProgressStatusService, watchChildrenJobsBL, jobsBrokerService ,jobAdapter,
+                featureManager);
     }
 
     @Bean
     @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-    public VolumeGroupInstantiationCommand volumeGroupInstantiationCommand() {
-        return new VolumeGroupInstantiationCommand();
+    public VolumeGroupCommand volumeGroupCommand(
+            AsyncInstantiationBusinessLogic asyncInstantiationBusinessLogic,
+            RestMsoImplementation restMso,
+            MsoRequestBuilder msoRequestBuilder,
+            MsoResultHandlerService msoResultHandlerService,
+            InProgressStatusService inProgressStatusService,
+            WatchChildrenJobsBL watchChildrenJobsBL,
+            JobsBrokerService jobsBrokerService,
+            JobAdapter jobAdapter) {
+        return new VolumeGroupCommand(asyncInstantiationBusinessLogic, restMso, msoRequestBuilder, msoResultHandlerService,
+                inProgressStatusService, watchChildrenJobsBL, jobsBrokerService ,jobAdapter);
     }
 
     @Bean
     @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-    public WatchingCommandBaseModule watchingCommandBaseModule() {
-        return new WatchingCommandBaseModule();
+    public VfmoduleCommand VfmoduleCommand(
+            AsyncInstantiationBusinessLogic asyncInstantiationBusinessLogic,
+            RestMsoImplementation restMso,
+            MsoRequestBuilder msoRequestBuilder,
+            MsoResultHandlerService msoResultHandlerService,
+            InProgressStatusService inProgressStatusService,
+            WatchChildrenJobsBL watchChildrenJobsBL,
+            JobsBrokerService jobsBrokerService,
+            JobAdapter jobAdapter) {
+        return new VfmoduleCommand(asyncInstantiationBusinessLogic, restMso, msoRequestBuilder, msoResultHandlerService,
+                inProgressStatusService, watchChildrenJobsBL, jobsBrokerService, jobAdapter);
+    }
+    @Bean
+    public AuditService auditService(RestMsoImplementation msoClient, AsyncInstantiationRepository asyncInstantiationRepository) {
+        return new AuditServiceImpl(msoClient, asyncInstantiationRepository);
     }
 
     @Bean
-    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-    public VolumeGroupInProgressStatusCommand volumeGroupInProgressStatusCommand() {
-        return new VolumeGroupInProgressStatusCommand();
-    }
-
-    @Bean
-    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-    public VfmoduleInstantiationCommand vfmoduleInstantiationCommand() {
-        return new VfmoduleInstantiationCommand();
-    }
-
-    @Bean
-    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-    public WatchingCommand watchingCommandCommand() {
-        return new WatchingCommand();
-    }
-
-    @Bean
-    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-    public ResourceInProgressStatusCommand resourceInProgressStatusCommand() {
-        return new ResourceInProgressStatusCommand();
-    }
-
-    @Bean
-    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-    public VnfInProgressStatusCommand vnfInProgressStatusCommand() {
-        return new VnfInProgressStatusCommand();
-    }
-
-    @Bean
-    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-    public InstanceGroupInstantiationCommand instanceGroupInstantiationCommand() {
-        return new InstanceGroupInstantiationCommand();
-    }
-
-    @Bean
-    public AuditService auditService(AsyncInstantiationBusinessLogic asyncInstantiationBL, RestMsoImplementation msoClient) {
-        return new AuditServiceImpl(asyncInstantiationBL, msoClient);
-    }
-
-    @Bean
-    public InProgressStatusService inProgressStatusService(AsyncInstantiationBusinessLogic asyncInstantiationBL, RestMsoImplementation restMso, AuditService auditService) {
-        return new InProgressStatusService(asyncInstantiationBL, restMso, auditService);
+    public InProgressStatusService inProgressStatusService(AsyncInstantiationBusinessLogic asyncInstantiationBL, RestMsoImplementation restMso, AuditService auditService, FeatureManager featureManager) {
+        return new InProgressStatusService(asyncInstantiationBL, restMso, auditService, featureManager);
     }
 
     @Bean
diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java b/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java
index a60aa7e..2377c80 100644
--- a/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java
@@ -21,8 +21,14 @@
 
 package org.onap.vid.controller;
 
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.booleanThat;
 import static org.mockito.BDDMockito.given;
 import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
 import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
 import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
@@ -34,13 +40,16 @@
 import com.google.common.collect.ImmutableMultimap;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Multimap;
+import java.io.IOException;
 import java.util.Map;
 import java.util.UUID;
+import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.core.Response;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.onap.vid.aai.AaiResponse;
 import org.onap.vid.aai.AaiResponseTranslator.PortMirroringConfigData;
@@ -53,14 +62,18 @@
 import org.onap.vid.aai.model.PortDetailsTranslator.PortDetailsError;
 import org.onap.vid.aai.model.PortDetailsTranslator.PortDetailsOk;
 import org.onap.vid.aai.util.AAIRestInterface;
+import org.onap.vid.properties.Features;
+import org.onap.vid.roles.Role;
 import org.onap.vid.model.VersionByInvariantIdsRequest;
 import org.onap.vid.roles.RoleProvider;
+import org.onap.vid.roles.RoleValidator;
 import org.onap.vid.services.AaiService;
 import org.onap.vid.utils.SystemPropertiesWrapper;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.togglz.core.manager.FeatureManager;
 
 @RunWith(MockitoJUnitRunner.class)
 public class AaiControllerTest {
@@ -76,12 +89,16 @@
     private RoleProvider roleProvider;
     @Mock
     private SystemPropertiesWrapper systemPropertiesWrapper;
+
+    @Mock
+    private FeatureManager featureManager;
+
     private MockMvc mockMvc;
     private AaiController aaiController;
 
     @Before
     public void setUp() {
-        aaiController = new AaiController(aaiService, aaiRestInterface, roleProvider, systemPropertiesWrapper);
+        aaiController = new AaiController(aaiService, aaiRestInterface, roleProvider, systemPropertiesWrapper, featureManager);
         mockMvc = MockMvcBuilders.standaloneSetup(aaiController).build();
     }
 
@@ -248,5 +265,42 @@
             .andExpect(status().isOk())
             .andExpect(content().string(expectedResponse));
     }
+
+    @Test
+    public void getSubscriberDetailsOmitServiceInstances_reduceDepthEnabledAndOmitQueryParam() throws IOException {
+        getSubscriberDetailsOmitServiceInstances("some subscriber id",
+                true, true, true);
+    }
+
+    @Test
+    public void getSubscriberDetailsOmitServiceInstances_reduceDepthDisabledAndOmitQueryParam() throws IOException {
+        getSubscriberDetailsOmitServiceInstances("another-subscriber-id-123",
+                false, true, false);
+    }
+
+    @Test
+    public void getSubscriberDetailsOmitServiceInstances_reduceDepthDisabled() throws IOException {
+        getSubscriberDetailsOmitServiceInstances("123-456-789-123-345-567-6",
+                false,  false,  false);
+    }
+
+    @Test
+    public void getSubscriberDetailsOmitServiceInstances_reduceDepthEnabled() throws IOException {
+        getSubscriberDetailsOmitServiceInstances("0000000000000000000000000",
+                true, false,  false);
+    }
+
+    private void getSubscriberDetailsOmitServiceInstances(String subscriberId, boolean isFlag1906AaiSubDetailsReduceDepthEnabled,
+        boolean omitServiceInstancesQueryParam, boolean omitServiceInstancesExpectedGetSubscriberDataParam) throws IOException {
+        when(featureManager.isActive(Features.FLAG_1906_AAI_SUB_DETAILS_REDUCE_DEPTH)).thenReturn(isFlag1906AaiSubDetailsReduceDepthEnabled);
+        HttpServletRequest request = mock(HttpServletRequest.class);
+        when(roleProvider.getUserRoles(request)).thenReturn(ImmutableList.of(mock(Role.class), mock(Role.class)));
+        AaiResponse subscriberData = mock(AaiResponse.class);
+        when(subscriberData.getT()).thenReturn(null);
+        when(subscriberData.getHttpCode()).thenReturn(200);
+        when(aaiService.getSubscriberData(any(), any(), anyBoolean())).thenReturn(subscriberData);
+        aaiController.getSubscriberDetails(request, subscriberId, omitServiceInstancesQueryParam);
+        verify(aaiService).getSubscriberData(argThat(subscriberId::equals), any(RoleValidator.class), booleanThat(b -> omitServiceInstancesExpectedGetSubscriberDataParam == b));
+    }
 }
 
diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/AaiServiceInstanceStandardQueryControllerTest.java b/vid-app-common/src/test/java/org/onap/vid/controller/AaiServiceInstanceStandardQueryControllerTest.java
index 2a8db96..b036b47 100644
--- a/vid-app-common/src/test/java/org/onap/vid/controller/AaiServiceInstanceStandardQueryControllerTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/controller/AaiServiceInstanceStandardQueryControllerTest.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,18 +20,20 @@
 
 package org.onap.vid.controller;
 
-import org.mockito.Answers;
+import com.google.common.collect.ImmutableList;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
-import org.onap.vid.aai.util.ServiceInstanceStandardQuery;
 import org.onap.vid.asdc.AsdcCatalogException;
 import org.onap.vid.model.Service;
 import org.onap.vid.model.ServiceModel;
 import org.onap.vid.model.VidNotions;
 import org.onap.vid.model.VidNotions.ModelCategory;
+import org.onap.vid.model.aaiTree.AAITreeNode;
 import org.onap.vid.properties.Features;
+import org.onap.vid.services.AAIServiceTree;
 import org.onap.vid.services.VidService;
+import org.springframework.http.HttpMethod;
 import org.springframework.mock.web.MockHttpServletRequest;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeClass;
@@ -56,8 +58,9 @@
     @Mock
     private VidService sdcService;
 
-    @Mock(answer = Answers.RETURNS_MOCKS)
-    private ServiceInstanceStandardQuery serviceInstanceStandardQuery;
+    @Mock
+    private AAIServiceTree aaiServiceTree;
+
 
     //Don't use initMocks with @BeforeMethod
     //because AaiServiceInstanceStandardQueryController contains final members that can not be injected twice
@@ -69,7 +72,7 @@
 
     @AfterMethod
     public void resetMocks() {
-        reset(sdcService, featureManager, serviceInstanceStandardQuery);
+        reset(sdcService, featureManager);
     }
 
     @Test
@@ -80,13 +83,14 @@
         //  - assert that AAI was accessed
 
         when(featureManager.isActive(Features.FLAG_PRESENT_PROVIDER_NETWORKS_ASSOCIATIONS)).thenReturn(true);
+        when(aaiServiceTree.buildAAITree(any(), any(), any(HttpMethod.class), any(), anyBoolean())).thenReturn(ImmutableList.of(mock(AAITreeNode.class)));
 
         final UUID randomModelUuid = UUID.randomUUID();
         mockServiceModel(ModelCategory.IS_5G_PROVIDER_NETWORK_MODEL, randomModelUuid);
 
         doGetNetworksToVlansByServiceInstance(randomModelUuid);
 
-        verify(serviceInstanceStandardQuery).fetchServiceInstance(any(), any(), any());
+        verify(aaiServiceTree).buildAAITree(any(), any(), any(HttpMethod.class), any(), anyBoolean());
     }
 
     @Test
@@ -103,7 +107,7 @@
         mockServiceModel(ModelCategory.OTHER, randomModelUuid);
 
         assertThat(doGetNetworksToVlansByServiceInstance(randomModelUuid).serviceNetworks, hasSize(0));
-        verifyZeroInteractions(serviceInstanceStandardQuery);
+        verifyZeroInteractions(aaiServiceTree);
     }
 
     @Test
@@ -123,7 +127,7 @@
         Service mockedService = mock(Service.class);
         when(mockedModel.getService()).thenReturn(mockedService);
         when(mockedService.getVidNotions()).thenReturn(
-                new VidNotions(instantiationUI, modelCategory, VidNotions.InstantiationUI.LEGACY)
+                new VidNotions(instantiationUI, modelCategory, VidNotions.InstantiationUI.LEGACY, VidNotions.InstantiationType.ALaCarte)
         );
 
         when(sdcService.getService(randomModelUuid.toString())).thenReturn(mockedModel);
@@ -137,4 +141,4 @@
                 "my service type",
                 "my instance id");
     }
-}
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/LocalWebConfig.java b/vid-app-common/src/test/java/org/onap/vid/controller/LocalWebConfig.java
index 7e50c89..701f1c6 100644
--- a/vid-app-common/src/test/java/org/onap/vid/controller/LocalWebConfig.java
+++ b/vid-app-common/src/test/java/org/onap/vid/controller/LocalWebConfig.java
@@ -44,6 +44,7 @@
 
 import javax.servlet.ServletContext;
 import java.io.File;
+import java.util.concurrent.ExecutorService;
 
 @Configuration
 public class LocalWebConfig {
@@ -66,8 +67,8 @@
 
     @Bean
     public AaiService getAaiService(AaiClientInterface aaiClient, AaiOverTLSClientInterface aaiOverTLSClient,
-        AaiResponseTranslator aaiResponseTranslator, AAITreeNodeBuilder aaiTreeNode, AAIServiceTree aaiServiceTree) {
-        return new AaiServiceImpl(aaiClient, aaiOverTLSClient, aaiResponseTranslator, aaiTreeNode, aaiServiceTree);
+        AaiResponseTranslator aaiResponseTranslator, AAITreeNodeBuilder aaiTreeNode, AAIServiceTree aaiServiceTree, ExecutorService executorService) {
+        return new AaiServiceImpl(aaiClient, aaiOverTLSClient, aaiResponseTranslator, aaiTreeNode, aaiServiceTree, executorService);
     }
 
     @Bean
diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/MsoControllerNewTest.java b/vid-app-common/src/test/java/org/onap/vid/controller/MsoControllerNewTest.java
index a5222dd..43edeeb 100644
--- a/vid-app-common/src/test/java/org/onap/vid/controller/MsoControllerNewTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/controller/MsoControllerNewTest.java
@@ -20,24 +20,24 @@
 
 package org.onap.vid.controller;
 
+import static org.mockito.Mockito.mock;
+
+import javax.servlet.http.HttpServletRequest;
 import org.junit.Test;
 import org.onap.vid.mso.MsoBusinessLogicImpl;
 import org.onap.vid.mso.MsoInterface;
+import org.onap.vid.mso.rest.MsoRestClientNew;
 import org.onap.vid.mso.rest.RequestDetails;
 import org.onap.vid.mso.rest.RequestDetailsWrapper;
 import org.onap.vid.services.CloudOwnerServiceImpl;
 import org.springframework.http.ResponseEntity;
-import org.togglz.core.manager.FeatureManager;
-
-import javax.servlet.http.HttpServletRequest;
-
-import static org.mockito.Mockito.mock;
 
 public class MsoControllerNewTest {
 
     private MsoController createTestSubject() {
         try {
-            return new MsoController(new MsoBusinessLogicImpl(mock(MsoInterface.class),mock(FeatureManager.class)), new CloudOwnerServiceImpl(null, null));
+            return new MsoController(new MsoBusinessLogicImpl(mock(MsoInterface.class)), mock(MsoRestClientNew.class),
+                new CloudOwnerServiceImpl(null, null));
         } catch (Exception e) {
             return null;
         }
diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/MsoControllerTest.java b/vid-app-common/src/test/java/org/onap/vid/controller/MsoControllerTest.java
index 02ab287..a1b4559 100644
--- a/vid-app-common/src/test/java/org/onap/vid/controller/MsoControllerTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/controller/MsoControllerTest.java
@@ -46,6 +46,7 @@
 import org.junit.Test;
 import org.onap.vid.mso.MsoBusinessLogic;
 import org.onap.vid.mso.MsoResponseWrapper;
+import org.onap.vid.mso.rest.MsoRestClientNew;
 import org.onap.vid.mso.rest.Request;
 import org.onap.vid.mso.rest.RequestDetails;
 import org.onap.vid.mso.rest.Task;
@@ -66,12 +67,14 @@
     private MockMvc mockMvc;
     private MsoBusinessLogic msoBusinessLogic;
     private CloudOwnerService cloudService;
+    private MsoRestClientNew msoRestClient;
 
     @Before
     public void setUp() {
         msoBusinessLogic = mock(MsoBusinessLogic.class);
         cloudService = mock(CloudOwnerService.class);
-        MsoController msoController = new MsoController(msoBusinessLogic, cloudService);
+        msoRestClient = mock(MsoRestClientNew.class);
+        MsoController msoController = new MsoController(msoBusinessLogic, msoRestClient, cloudService);
 
         mockMvc = MockMvcBuilders.standaloneSetup(msoController).build();
     }
diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/ToscaParserMockHelper.java b/vid-app-common/src/test/java/org/onap/vid/controller/ToscaParserMockHelper.java
index 2eedee9..9e77e99 100644
--- a/vid-app-common/src/test/java/org/onap/vid/controller/ToscaParserMockHelper.java
+++ b/vid-app-common/src/test/java/org/onap/vid/controller/ToscaParserMockHelper.java
@@ -22,25 +22,21 @@
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.module.kotlin.KotlinModule;
-import org.apache.commons.io.IOUtils;
-import org.apache.log4j.LogManager;
-import org.apache.log4j.Logger;
-import org.onap.vid.model.NewServiceModel;
-
 import java.io.IOException;
 import java.io.InputStream;
 import java.nio.charset.StandardCharsets;
+import org.apache.commons.io.IOUtils;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.onap.vid.model.ServiceModel;
 
-/**
- * Created by moriya1 on 04/07/2017.
- */
 public class ToscaParserMockHelper {
     private static final Logger logger = LogManager.getLogger(ToscaParserMockHelper.class);
 
     private static final ObjectMapper om = new ObjectMapper();
     private final String uuid;
     private final String filePath;
-    private final NewServiceModel newServiceModel;
+    private final ServiceModel serviceModel;
 
     public ToscaParserMockHelper(String uuid, String filePath) throws IOException {
         this.uuid = uuid;
@@ -50,7 +46,7 @@
         logger.info(jsonFile);
         String expectedJsonAsString = IOUtils.toString(jsonFile, StandardCharsets.UTF_8.name());
         om.registerModule(new KotlinModule());
-        this.newServiceModel = om.readValue(expectedJsonAsString, NewServiceModel.class);
+        this.serviceModel = om.readValue(expectedJsonAsString, ServiceModel.class);
     }
 
     public String getUuid() {
@@ -61,7 +57,7 @@
         return filePath;
     }
 
-    public NewServiceModel getNewServiceModel() {
-        return newServiceModel;
+    public ServiceModel getServiceModel() {
+        return serviceModel;
     }
 }
diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/VidControllerTest.java b/vid-app-common/src/test/java/org/onap/vid/controller/VidControllerTest.java
index 39d3cdd..484f4a0 100644
--- a/vid-app-common/src/test/java/org/onap/vid/controller/VidControllerTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/controller/VidControllerTest.java
@@ -178,7 +178,7 @@
     private ServiceModel createServiceModel(int i) {
         ServiceModel model = new ServiceModel();
 
-        model.setCollectionResource(ImmutableMap.of("resKey" + i, new CR()));
+        model.setCollectionResources(ImmutableMap.of("resKey" + i, new CR()));
         model.setNetworks(ImmutableMap.of("network" + i, new Network()));
         model.setPnfs(ImmutableMap.of("pnf" + i, new Node()));
         model.setServiceProxies(ImmutableMap.of("servProxy" + i, new ServiceProxy()));
diff --git a/vid-app-common/src/test/java/org/onap/vid/dal/AsyncInstantiationRepositoryTest.java b/vid-app-common/src/test/java/org/onap/vid/dal/AsyncInstantiationRepositoryTest.java
new file mode 100644
index 0000000..be5a44e
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/dal/AsyncInstantiationRepositoryTest.java
@@ -0,0 +1,103 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.dal;
+
+import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals;
+import static net.javacrumbs.jsonunit.core.Option.IGNORING_ARRAY_ORDER;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
+import static org.hamcrest.core.IsEqual.equalTo;
+
+import com.google.common.collect.ImmutableList;
+import java.time.ZonedDateTime;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.stream.Collectors;
+import javax.inject.Inject;
+import org.onap.portalsdk.core.service.DataAccessService;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.vid.config.DataSourceConfig;
+import org.onap.vid.config.MockedAaiClientAndFeatureManagerConfig;
+import org.onap.vid.job.Job;
+import org.onap.vid.model.ResourceInfo;
+import org.onap.vid.model.serviceInstantiation.ServiceInstantiation;
+import org.onap.vid.mso.rest.AsyncRequestStatus;
+import org.onap.vid.mso.rest.RequestStatus;
+import org.onap.vid.services.AsyncInstantiationBaseTest;
+import org.onap.vid.utils.TimeUtils;
+import org.springframework.test.context.ContextConfiguration;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+@ContextConfiguration(classes = {DataSourceConfig.class, SystemProperties.class, MockedAaiClientAndFeatureManagerConfig.class})
+public class AsyncInstantiationRepositoryTest extends AsyncInstantiationBaseTest {
+
+    @Inject
+    private DataAccessService dataAccessService;
+
+    @BeforeClass
+    void initServicesInfoService() {
+        createInstanceParamsMaps();
+    }
+
+    @Test
+    public void whenSaveNewRequest_thenRequestIsRetrieved() {
+        AsyncInstantiationRepository underTest = new AsyncInstantiationRepository(dataAccessService);
+        ServiceInstantiation serviceInstantiation = generateALaCarteWithVnfsServiceInstantiationPayload();
+        UUID jobUuid = UUID.randomUUID();
+        underTest.addJobRequest(jobUuid, serviceInstantiation);
+        ServiceInstantiation stored = underTest.getJobRequest(jobUuid);
+        assertThat(stored, jsonEquals(serviceInstantiation).when(IGNORING_ARRAY_ORDER));
+    }
+
+    private AsyncRequestStatus createAsyncRequestStatus(String message, String requestState){
+        RequestStatus requestStatus = new RequestStatus(requestState, message, TimeUtils.zonedDateTimeToString(ZonedDateTime.now()));
+        AsyncRequestStatus.Request request = new AsyncRequestStatus.Request(requestStatus);
+        return new AsyncRequestStatus(request);
+    }
+
+    @Test
+    public void getResourceInfoByRootJobId_returnsMapOfjobIdResources(){
+        AsyncInstantiationRepository underTest = new AsyncInstantiationRepository(dataAccessService);
+        UUID jobId1= UUID.randomUUID();
+        UUID jobId2= UUID.randomUUID();
+        AsyncRequestStatus errorMessage= createAsyncRequestStatus("MSO failed resource", "FAILED");
+        List<ResourceInfo> requestInfoList= ImmutableList.of(
+                new ResourceInfo("aaaaaa",jobId1, "64f3123a-f9a8-4591-b481-d662134bcb52", Job.JobStatus.COMPLETED, null),
+                new ResourceInfo("bbbbbb",jobId1, "65f3123a-f9a8-4591-b481-kodj9ig87gdu", Job.JobStatus.COMPLETED_WITH_ERRORS, null),
+                new ResourceInfo("dddddd",jobId1, null, Job.JobStatus.FAILED, null),
+                new ResourceInfo("cccccc",jobId1, null, Job.JobStatus.FAILED, errorMessage),
+                new ResourceInfo("eeeeee",jobId2, null, Job.JobStatus.FAILED, null),
+                new ResourceInfo("ffffff",jobId2, "66f3123a-f9a8-4591-b481-ghfgh6767567", Job.JobStatus.COMPLETED, null)
+        );
+        for(ResourceInfo info: requestInfoList){
+            underTest.saveResourceInfo(info);
+        }
+        Map<String, ResourceInfo> storedByTrackId = underTest.getResourceInfoByRootJobId(jobId1);
+        assertThat(storedByTrackId.values(), hasSize(4));
+        assertThat(storedByTrackId.get("aaaaaa").getInstanceId(), equalTo("64f3123a-f9a8-4591-b481-d662134bcb52"));
+        assertThat(storedByTrackId.get("cccccc").getErrorMessage().request.requestStatus.getStatusMessage(), equalTo("MSO failed resource"));
+        assertThat(storedByTrackId.get("cccccc").getErrorMessage().request.requestStatus.getRequestState(), equalTo("FAILED"));
+        assertThat(storedByTrackId.get("dddddd").getErrorMessage(), equalTo(null));
+        assertThat(storedByTrackId.values(),  jsonEquals(requestInfoList.stream().filter(i-> i.getRootJobId().equals(jobId1)).collect(Collectors.toList())).when(IGNORING_ARRAY_ORDER));
+    }
+}
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/command/CommandUtilsTest.java b/vid-app-common/src/test/java/org/onap/vid/job/command/CommandUtilsTest.java
index da300bf..ee43d1f 100644
--- a/vid-app-common/src/test/java/org/onap/vid/job/command/CommandUtilsTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/job/command/CommandUtilsTest.java
@@ -7,9 +7,9 @@
  * 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.
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/command/InProgressStatusServiceTest.java b/vid-app-common/src/test/java/org/onap/vid/job/command/InProgressStatusServiceTest.java
index c8772ee..125d2ed 100644
--- a/vid-app-common/src/test/java/org/onap/vid/job/command/InProgressStatusServiceTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/job/command/InProgressStatusServiceTest.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,8 +20,10 @@
 
 package org.onap.vid.job.command;
 
+import org.jetbrains.annotations.NotNull;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
+import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
 import org.onap.vid.job.Job;
 import org.onap.vid.job.impl.JobSharedData;
@@ -29,11 +31,16 @@
 import org.onap.vid.mso.RestMsoImplementation;
 import org.onap.vid.mso.RestObject;
 import org.onap.vid.mso.rest.AsyncRequestStatus;
-import org.onap.vid.services.AsyncInstantiationBaseTest;
+import org.onap.vid.properties.Features;
 import org.onap.vid.services.AsyncInstantiationBusinessLogic;
+import org.onap.vid.services.AuditService;
+import org.onap.vid.services.AsyncInstantiationBaseTest;
+import org.onap.vid.testUtils.TestUtils;
 import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
+import org.togglz.core.manager.FeatureManager;
 
 import java.util.UUID;
 import java.util.stream.Stream;
@@ -51,6 +58,12 @@
     @Mock
     private AsyncInstantiationBusinessLogic asyncInstantiationBL;
 
+    @Mock
+    private AuditService auditService;
+
+    @Mock
+    private FeatureManager featureManager;
+
     @InjectMocks
     private InProgressStatusService inProgressStatusService;
 
@@ -59,10 +72,16 @@
         MockitoAnnotations.initMocks(this);
     }
 
+    @BeforeMethod
+    public void resetMocks() {
+        Mockito.reset(restMso);
+        Mockito.reset(asyncInstantiationBL);
+    }
+
     @DataProvider
     public static Object[][] jobStatuses() {
         return Stream.of(Job.JobStatus.values())
-                .map(student -> new Object[] { student })
+                .map(status -> new Object[] { status })
                 .toArray(Object[][]::new);
     }
 
@@ -71,16 +90,14 @@
 
         UUID jobUuid = UUID.randomUUID();
         String userId = "mockedUserID";
+        String testApi = "mockedTestApi";
         String requestId = UUID.randomUUID().toString();
         ServiceInstantiation serviceInstantiation = mock(ServiceInstantiation.class);
 
         when(asyncInstantiationBL.getOrchestrationRequestsPath()).thenReturn("");
 
-        RestObject<AsyncRequestStatus> msoResponse = mock(RestObject.class);
         AsyncRequestStatus requestStatus = AsyncInstantiationBaseTest.asyncRequestStatusResponse("");
-
-        when(msoResponse.getStatusCode()).thenReturn(200);
-        when(msoResponse.get()).thenReturn(requestStatus);
+        RestObject<AsyncRequestStatus> msoResponse = createMockedAsyncRequestStatus(requestStatus, 200);
         when(restMso.GetForObject(contains(requestId), eq(AsyncRequestStatus.class))).thenReturn(msoResponse);
 
         when(asyncInstantiationBL.calcStatus(any())).thenReturn(expectedJobStatus);
@@ -88,16 +105,60 @@
         ExpiryChecker expiryChecker = mock(ExpiryChecker.class);
         when(expiryChecker.isExpired(any())).thenReturn(false);
 
-        JobSharedData sharedData = new JobSharedData(jobUuid, userId, serviceInstantiation);
+        JobSharedData sharedData = new JobSharedData(jobUuid, userId, serviceInstantiation, testApi);
         Job.JobStatus actualJobStatus = inProgressStatusService.call(expiryChecker, sharedData, requestId);
         assertEquals(expectedJobStatus, actualJobStatus);
 
-        verify(asyncInstantiationBL).auditMsoStatus(eq(jobUuid), same(requestStatus.request));
-
+        verify(auditService).auditMsoStatus(eq(jobUuid), same(requestStatus.request));
+        verify(asyncInstantiationBL).updateResourceInfo(eq(sharedData), eq(expectedJobStatus), eq(requestStatus));
         //verify we don't update service info during this case, which shall stay in_progress
         verify(asyncInstantiationBL, never()).updateServiceInfo(any(), any());
+    }
 
+    @NotNull
+    protected RestObject<AsyncRequestStatus> createMockedAsyncRequestStatus(AsyncRequestStatus requestStatus, int statusCode) {
+        RestObject<AsyncRequestStatus> msoResponse = mock(RestObject.class);
+        when(msoResponse.getStatusCode()).thenReturn(statusCode);
+        when(msoResponse.get()).thenReturn(requestStatus);
+        return msoResponse;
+    }
 
+    @Test(dataProvider = "trueAndFalse", dataProviderClass = TestUtils.class)
+    public void whenGetAsyncRequestStatus_thenRightResponseReturned(boolean isResumeFlagActive) {
+        String requestId = "abcRequest";
+        String baseMso = "/fakeBase/v15";
+
+        when(asyncInstantiationBL.getOrchestrationRequestsPath()).thenReturn(baseMso);
+        when(featureManager.isActive(Features.FLAG_1908_RESUME_MACRO_SERVICE)).thenReturn(isResumeFlagActive);
+
+        AsyncRequestStatus requestStatus = AsyncInstantiationBaseTest.asyncRequestStatusResponse("");
+        RestObject<AsyncRequestStatus> mockedResponse = createMockedAsyncRequestStatus(requestStatus, 399);
+        String path = baseMso + "/" + requestId + (isResumeFlagActive ? "?format=detail" : "");
+        when(restMso.GetForObject(eq(path), eq(AsyncRequestStatus.class))).thenReturn(mockedResponse);
+
+        assertEquals(mockedResponse, inProgressStatusService.getAsyncRequestStatus(requestId));
+    }
+
+    @DataProvider
+    public static Object[][] getAsyncReturnErrorDataProvider() {
+        return new Object[][]{
+                {AsyncInstantiationBaseTest.asyncRequestStatusResponse("xyz"), 400},
+                {AsyncInstantiationBaseTest.asyncRequestStatusResponse("xyz"), 401},
+                {AsyncInstantiationBaseTest.asyncRequestStatusResponse("xyz"), 500},
+                {null, 200},
+        };
+    }
+
+    @Test(dataProvider = "getAsyncReturnErrorDataProvider", expectedExceptions = InProgressStatusService.BadResponseFromMso.class)
+    public void whenGetAsyncReturnError_thenExceptionIsThrown(AsyncRequestStatus requestStatus, int statusCode) {
+        String requestId = "abcRequest";
+        String baseMso = "/fakeBase/v15";
+        when(asyncInstantiationBL.getOrchestrationRequestsPath()).thenReturn(baseMso);
+
+        RestObject<AsyncRequestStatus> mockedResponse = createMockedAsyncRequestStatus(requestStatus, statusCode);
+        when(restMso.GetForObject(eq(baseMso + "/" + requestId), eq(AsyncRequestStatus.class))).thenReturn(mockedResponse);
+
+        inProgressStatusService.getAsyncRequestStatus(requestId);
     }
 
 }
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/command/InstanceGroupCommandTest.java b/vid-app-common/src/test/java/org/onap/vid/job/command/InstanceGroupCommandTest.java
index b4a5c64..c68c5f7 100644
--- a/vid-app-common/src/test/java/org/onap/vid/job/command/InstanceGroupCommandTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/job/command/InstanceGroupCommandTest.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,29 +20,35 @@
 
 package org.onap.vid.job.command;
 
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.only;
-import static org.mockito.Mockito.same;
-import static org.mockito.Mockito.verify;
-
 import com.google.common.collect.ImmutableMap;
-import java.util.Optional;
+import org.apache.commons.beanutils.BeanUtils;
 import org.mockito.Answers;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
+import org.onap.vid.job.JobAdapter;
+import org.onap.vid.job.JobsBrokerService;
 import org.onap.vid.job.impl.JobSharedData;
+import org.onap.vid.model.Action;
 import org.onap.vid.model.RequestReferencesContainer;
 import org.onap.vid.model.serviceInstantiation.InstanceGroup;
 import org.onap.vid.mso.RestMsoImplementation;
 import org.onap.vid.mso.model.ModelInfo;
 import org.onap.vid.services.AsyncInstantiationBusinessLogic;
-import org.onap.vid.testUtils.TestUtils;
 import org.springframework.http.HttpMethod;
 import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
+import java.util.Optional;
+import java.util.Set;
+
+import static java.util.function.Function.identity;
+import static java.util.stream.Collectors.toMap;
+import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.*;
+
 public class InstanceGroupCommandTest {
 
     @Mock(answer = Answers.RETURNS_MOCKS)
@@ -53,11 +59,20 @@
     @Mock(answer = Answers.RETURNS_MOCKS)
     MsoResultHandlerService msoResultHandlerService;
 
+    @Mock(answer = Answers.RETURNS_MOCKS)
+    MsoRequestBuilder msoRequestBuilder;
+
     @Mock WatchChildrenJobsBL watchChildrenJobsBL;
 
     @Mock(answer = Answers.RETURNS_MOCKS)
     AsyncInstantiationBusinessLogic asyncInstantiationBL;
 
+    @Mock(answer = Answers.RETURNS_MOCKS)
+    JobsBrokerService jobsBrokerService;
+
+    @Mock(answer = Answers.RETURNS_MOCKS)
+    JobAdapter jobAdapter;
+
     @Mock InProgressStatusService inProgressStatusService;
 
     @InjectMocks
@@ -68,29 +83,41 @@
         command = null;
         MockitoAnnotations.initMocks(this);
     }
-
-    @Test
-    public void createMyself_callsMso() {
-        final ModelInfo serviceModelInfo = setStrings(new ModelInfo());
+    @DataProvider
+    public static Object[][] testApis() {
+        return new Object[][]{
+                {"VNF_API"}, {null}};
+    }
+    @Test(dataProvider = "testApis")
+    public void createMyself_callsMso(String testApi) {
+        final ModelInfo serviceModelInfo = setRandomStrings(new ModelInfo());
         final String serviceInstanceId = "service-instance-id";
         final String userId = "ff3223";
 
-        command.init(new JobSharedData(
-                null, userId, instanceGroupRequest
-        ), ImmutableMap.of(
+        when(instanceGroupRequest.getAction()).thenReturn(Action.Delete);
+
+        JobSharedData sharedData = new JobSharedData(
+                null, userId, instanceGroupRequest, testApi);
+        command.init(sharedData, ImmutableMap.of(
                 "resourceModelInfos", ImmutableMap.of("SERVICE_MODEL_INFO", serviceModelInfo),
                 "resourceInstancesIds", ImmutableMap.of("SERVICE_INSTANCE_ID", serviceInstanceId)
         ));
 
         command.createMyself();
 
-        verify(asyncInstantiationBL).generateInstanceGroupInstantiationRequest(
-                same(instanceGroupRequest), eq(serviceModelInfo), eq(serviceInstanceId), eq(userId));
+        verify(msoRequestBuilder).generateInstanceGroupInstantiationRequest(
+                same(instanceGroupRequest), eq(serviceModelInfo), eq(serviceInstanceId), eq(userId), eq(testApi));
         verify(restMso, only()).restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), any(), eq(Optional.empty()));
-
     }
 
-    private ModelInfo setStrings(ModelInfo object) {
-        return TestUtils.setStringsInStringProperties(object);
+    private ModelInfo setRandomStrings(ModelInfo object) {
+        try {
+            Set<String> fields = BeanUtils.describe(object).keySet();
+            BeanUtils.populate(object,
+                    fields.stream().collect(toMap(identity(), s -> randomAlphanumeric(4))));
+            return object;
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
     }
 }
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/command/JobCommandFactoryTest.java b/vid-app-common/src/test/java/org/onap/vid/job/command/JobCommandFactoryTest.java
index d7389ad..72336e5 100644
--- a/vid-app-common/src/test/java/org/onap/vid/job/command/JobCommandFactoryTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/job/command/JobCommandFactoryTest.java
@@ -7,9 +7,9 @@
  * 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.
@@ -105,7 +105,7 @@
 
         final UUID uuid = UUID.randomUUID();
         final Map<String, Object> data = ImmutableMap.of("foo", "bar");
-        final JobSharedData sharedData = new JobSharedData(uuid, "userid", new MockedRequest(1,"a"));
+        final JobSharedData sharedData = new JobSharedData(uuid, "userid", new MockedRequest(1,"a"), "testApi");
 
         when(job.getType()).thenReturn(jobType);
         when(job.getUuid()).thenReturn(uuid);
@@ -119,4 +119,4 @@
         assertThat(command, equalTo(mockCommand));
     }
 
-}
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/command/MacroServiceCommandTest.java b/vid-app-common/src/test/java/org/onap/vid/job/command/MacroServiceCommandTest.java
new file mode 100644
index 0000000..e477161
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/job/command/MacroServiceCommandTest.java
@@ -0,0 +1,136 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.job.command;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+import static org.onap.vid.model.VidNotions.ModelCategory.INFRASTRUCTURE_VPN;
+import static org.onap.vid.model.VidNotions.ModelCategory.IS_5G_FABRIC_CONFIGURATION_MODEL;
+import static org.onap.vid.model.VidNotions.ModelCategory.IS_5G_PROVIDER_NETWORK_MODEL;
+import static org.onap.vid.model.VidNotions.ModelCategory.OTHER;
+import static org.onap.vid.model.VidNotions.ModelCategory.SERVICE_WITH_COLLECTION_RESOURCE;
+import static org.onap.vid.model.VidNotions.ModelCategory.Transport;
+import static org.testng.AssertJUnit.assertEquals;
+
+import com.google.common.collect.ImmutableList;
+import java.util.Collections;
+import java.util.List;
+import java.util.UUID;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.onap.vid.job.Job;
+import org.onap.vid.job.JobAdapter;
+import org.onap.vid.job.JobsBrokerService;
+import org.onap.vid.job.impl.JobSharedData;
+import org.onap.vid.model.Action;
+import org.onap.vid.model.VidNotions;
+import org.onap.vid.model.serviceInstantiation.BaseResource;
+import org.onap.vid.model.serviceInstantiation.ServiceInstantiation;
+import org.onap.vid.mso.RestMsoImplementation;
+import org.onap.vid.mso.rest.AsyncRequestStatus;
+import org.onap.vid.services.AsyncInstantiationBusinessLogic;
+import org.onap.vid.services.AuditService;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+public class MacroServiceCommandTest {
+
+    @Mock
+    private InProgressStatusService inProgressStatusService;
+
+    @Mock
+    private WatchChildrenJobsBL watchChildrenJobsB;
+
+    @Mock
+    private AsyncInstantiationBusinessLogic asyncInstantiationBL;
+
+    @Mock
+    private JobsBrokerService jobsBrokerService;
+
+    @Mock
+    private MsoRequestBuilder msoRequestBuilder;
+
+    @Mock
+    private MsoResultHandlerService msoResultHandlerService;
+
+    @Mock
+    private JobAdapter jobAdapter;
+
+    @Mock
+    private RestMsoImplementation restMso;
+
+    @Mock
+    private AuditService auditService;
+
+    @InjectMocks
+    private MacroServiceCommand macroServiceCommand;
+
+    @DataProvider
+    public static Object[][] modelCategoryPre1806DataProvider() {
+        return new Object[][]{
+                {IS_5G_PROVIDER_NETWORK_MODEL, false},
+                {IS_5G_FABRIC_CONFIGURATION_MODEL, false},
+                {Transport, true},
+                {SERVICE_WITH_COLLECTION_RESOURCE, true},
+                {INFRASTRUCTURE_VPN, true},
+                {OTHER, false},
+        };
+    }
+
+    @BeforeClass
+    public void initMocks() {
+        MockitoAnnotations.initMocks(this);
+    }
+
+    @Test(dataProvider = "modelCategoryPre1806DataProvider")
+    public void testShouldUsePre1806Request(VidNotions.ModelCategory modelCategory, boolean expectedResult) {
+        ServiceInstantiation serviceInstantiation = mock(ServiceInstantiation.class);
+        VidNotions vidNotions = mock(VidNotions.class);
+        when(serviceInstantiation.getVidNotions()).thenReturn(vidNotions);
+        when(vidNotions.getModelCategory()).thenReturn(modelCategory);
+        assertEquals(macroServiceCommand.shouldUsePre1806Request(serviceInstantiation), expectedResult);
+    }
+
+    @DataProvider
+    public static Object[][] MsoFilteredRequestsDataProvider() {
+        return new Object[][]{
+                {Collections.EMPTY_LIST},
+                {ImmutableList.of(new AsyncRequestStatus.Request())}
+        };
+    }
+
+    @Test(dataProvider = "MsoFilteredRequestsDataProvider")
+    public void givenResumeAction_whenCantRetrieveRequestIdFromMSO_thenJobIsFailed(List<AsyncRequestStatus.Request> requests) {
+        String instanceId = UUID.randomUUID().toString();
+        BaseResource baseResource = mock(BaseResource.class);
+        when(baseResource.getInstanceId()).thenReturn(instanceId);
+        when(baseResource.getAction()).thenReturn(Action.Resume);
+        macroServiceCommand.init(new JobSharedData(null, null, baseResource, null));
+        when(auditService.retrieveRequestsFromMsoByServiceIdAndRequestTypeAndScope(eq(instanceId), any(), any()))
+                .thenReturn(requests);
+        assertEquals(macroServiceCommand.resumeMyself(), Job.JobStatus.FAILED);
+    }
+
+}
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/command/MsoResultHandlerServiceTest.java b/vid-app-common/src/test/java/org/onap/vid/job/command/MsoResultHandlerServiceTest.java
new file mode 100644
index 0000000..5f95801
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/job/command/MsoResultHandlerServiceTest.java
@@ -0,0 +1,95 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.job.command;
+
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.verify;
+import static org.onap.vid.job.impl.AsyncInstantiationIntegrationTest.createResponse;
+import static org.testng.AssertJUnit.assertEquals;
+
+import java.util.UUID;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.onap.vid.job.Job;
+import org.onap.vid.job.impl.JobSharedData;
+import org.onap.vid.model.RequestReferencesContainer;
+import org.onap.vid.mso.RestObject;
+import org.onap.vid.services.AsyncInstantiationBusinessLogic;
+import org.onap.vid.services.AuditService;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+public class MsoResultHandlerServiceTest {
+
+    @Mock
+    private AsyncInstantiationBusinessLogic asyncInstantiationBusinessLogic;
+
+    @Mock
+    private AuditService auditService;
+
+    @InjectMocks
+    private MsoResultHandlerService underTest;
+
+    @BeforeClass
+    public void initMocks() {
+        MockitoAnnotations.initMocks(this);
+    }
+
+    @DataProvider
+    public static Object[][] okStatusCodes() {
+        return new Object[][]{
+                {200}, {202} , {300}, {399}
+        };
+    }
+
+    @Test(dataProvider = "okStatusCodes")
+    public void whenOkResponseFromMso_getResultsWithIdsAndCompleteWithNoAction(int statusCode) {
+        String instanceId = UUID.randomUUID().toString();
+        String requestId = UUID.randomUUID().toString();
+        JobSharedData sharedData = new JobSharedData();
+        RestObject<RequestReferencesContainer> msoResponse = createResponse(statusCode, instanceId, requestId);
+        MsoResult expectedResult = new MsoResult(Job.JobStatus.COMPLETED_WITH_NO_ACTION, new MsoResourceIds(requestId, instanceId));
+        MsoResult actualMsoResult = underTest.handleResponse(sharedData, msoResponse, "test desc");
+        assertEquals(expectedResult, actualMsoResult);
+        verify(asyncInstantiationBusinessLogic).addResourceInfo(eq(sharedData), eq(Job.JobStatus.IN_PROGRESS), eq(instanceId));
+    }
+
+    @DataProvider
+    public static Object[][] notOkStatusCodes() {
+        return new Object[][]{
+                {199}, {400} , {404}, {500}
+        };
+    }
+
+    @Test(dataProvider = "notOkStatusCodes")
+    public void whenNotOkFromMso_getResultsWithFailedStatus(int statusCode) {
+        Mockito.reset(asyncInstantiationBusinessLogic);
+        JobSharedData sharedData = new JobSharedData();
+        RestObject<RequestReferencesContainer> msoResponse = createResponse(statusCode);
+        MsoResult expectedResult = new MsoResult(Job.JobStatus.FAILED);
+        MsoResult actualMsoResult = underTest.handleResponse(new JobSharedData(), msoResponse, "test desc");
+        assertEquals(expectedResult, actualMsoResult);
+        verify(asyncInstantiationBusinessLogic).addFailedResourceInfo(eq(sharedData), eq(msoResponse));
+    }
+}
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/command/ResourceCommandTest.java b/vid-app-common/src/test/java/org/onap/vid/job/command/ResourceCommandTest.java
index 9f252c5..2780e15 100644
--- a/vid-app-common/src/test/java/org/onap/vid/job/command/ResourceCommandTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/job/command/ResourceCommandTest.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,29 +20,38 @@
 
 package org.onap.vid.job.command;
 
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import org.jetbrains.annotations.NotNull;
+import org.onap.vid.exceptions.AbortingException;
 import org.onap.vid.exceptions.GenericUncheckedException;
+import org.onap.vid.exceptions.TryAgainException;
 import org.onap.vid.job.Job;
 import org.onap.vid.job.JobAdapter;
+import org.onap.vid.job.JobsBrokerService;
 import org.onap.vid.job.NextCommand;
 import org.onap.vid.job.impl.JobSharedData;
 import org.onap.vid.model.Action;
-import org.onap.vid.model.serviceInstantiation.BaseResource;
+import org.onap.vid.model.serviceInstantiation.*;
 import org.onap.vid.mso.RestMsoImplementation;
+import org.onap.vid.mso.model.ModelInfo;
 import org.springframework.http.HttpMethod;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
 import javax.ws.rs.ProcessingException;
-import java.util.Collections;
-import java.util.Optional;
+import java.util.*;
+import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import static java.util.Collections.emptyList;
+import static org.mockito.AdditionalAnswers.returnsFirstArg;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.*;
 import static org.onap.vid.job.command.ResourceCommandKt.ACTION_PHASE;
 import static org.onap.vid.job.command.ResourceCommandKt.INTERNAL_STATE;
+import static org.onap.vid.job.command.ResourceCommandTest.FakeResourceCreator.*;
+import static org.onap.vid.model.Action.*;
 import static org.onap.vid.utils.Logging.getMethodCallerName;
 import static org.testng.Assert.assertNull;
 import static org.testng.Assert.assertTrue;
@@ -54,20 +63,34 @@
     public static class MockCommand extends ResourceCommand {
 
         public MockCommand(InternalState mockState, Action mockPhase, Job.JobStatus mockedJobStatus) {
-            super(mock(RestMsoImplementation.class, RETURNS_MOCKS), mock(InProgressStatusService.class), mock(MsoResultHandlerService.class, RETURNS_MOCKS), mock(WatchChildrenJobsBL.class));
+            this(mockState, mockPhase, mockedJobStatus, false);
+        }
 
+        public MockCommand(InternalState mockState, Action mockPhase, Job.JobStatus mockedJobStatus, boolean lateInit) {
+            super(
+                    mock(RestMsoImplementation.class, RETURNS_MOCKS),
+                    mock(InProgressStatusService.class),
+                    mock(MsoResultHandlerService.class, RETURNS_MOCKS),
+                    mock(WatchChildrenJobsBL.class),
+                    mock(JobsBrokerService.class, RETURNS_MOCKS),
+                    mock(JobAdapter.class, RETURNS_MOCKS));
             this.mockedJobStatus = mockedJobStatus;
             this.mockState = mockState;
             this.mockPhase = mockPhase;
-            if (mockState==InternalState.INITIAL) {
-                init(mock(JobSharedData.class), Collections.emptyMap());
-            }
-            else {
-                init(mock(JobSharedData.class), ImmutableMap.of(INTERNAL_STATE, mockState.name(), ACTION_PHASE, mockPhase.name()));
+            if (!lateInit) {
+                init();
             }
             when(this.getWatchChildrenJobsBL().cumulateJobStatus(any(), any())).thenReturn(mockedJobStatus);
         }
 
+        protected void init() {
+            if (mockState == InternalState.INITIAL) {
+                init(mock(JobSharedData.class), Collections.emptyMap());
+            } else {
+                init(mock(JobSharedData.class), ImmutableMap.of(INTERNAL_STATE, mockState.name(), ACTION_PHASE, mockPhase.name()));
+            }
+        }
+
         private final Job.JobStatus mockedJobStatus;
         private final InternalState mockState;
         private final Action mockPhase;
@@ -76,7 +99,7 @@
         @NotNull
         @Override
         public Job.JobStatus createChildren() {
-            if (mockState == InternalState.CREATING_CHILDREN || (mockState == InternalState.INITIAL && mockPhase== Action.Delete))
+            if (mockState == InternalState.CREATING_CHILDREN || (mockState == InternalState.INITIAL && mockPhase== Delete))
                 return mockedJobStatus;
             throw (new RuntimeException("Not expected to call "+getMethodCallerName()));
         }
@@ -95,7 +118,7 @@
 
         @NotNull
         @Override
-        public MsoRestCallPlan planCreateMyselfRestCall(@NotNull CommandParentData commandParentData, @NotNull JobAdapter.AsyncJobRequest request, @NotNull String userId) {
+        public MsoRestCallPlan planCreateMyselfRestCall(@NotNull CommandParentData commandParentData, @NotNull JobAdapter.AsyncJobRequest request, @NotNull String userId, String testApi) {
             return mockedPlanOrThrow(InternalState.CREATE_MYSELF);
         }
 
@@ -109,16 +132,19 @@
     public static class MockCommandTestingStateMachine extends MockCommand {
 
         private final JobSharedData sharedData;
+        private final boolean isDescendantHasAction;
 
         public MockCommandTestingStateMachine(InternalState mockState, Action mockPhase, Job.JobStatus mockedJobStatus, boolean mockedNeedToDeleteMySelf) {
-            this(mockState, mockPhase, mockedJobStatus, mockedNeedToDeleteMySelf, false);
+            this(mockState, mockPhase, mockedJobStatus, mockedNeedToDeleteMySelf, false, true);
         }
 
-        public MockCommandTestingStateMachine(InternalState mockState, Action mockPhase, Job.JobStatus mockedJobStatus, boolean mockedNeedToDeleteMySelf, boolean isService) {
-            super(mockState, mockPhase, mockedJobStatus);
+        public MockCommandTestingStateMachine(InternalState mockState, Action mockPhase, Job.JobStatus mockedJobStatus, boolean mockedNeedToDeleteMySelf, boolean isService, boolean isDescendantHasAction) {
+            super(mockState, mockPhase, mockedJobStatus, true);
             this.mockedNeedToDeleteMySelf = mockedNeedToDeleteMySelf;
             this.isService = isService;
             this.sharedData = mock(JobSharedData.class, RETURNS_MOCKS);
+            this.isDescendantHasAction = isDescendantHasAction;
+            init();
         }
 
         protected final boolean mockedNeedToDeleteMySelf;
@@ -150,6 +176,11 @@
         public JobSharedData getSharedData() {
             return sharedData;
         }
+
+        @Override
+        protected boolean isDescendantHasAction(@NotNull Action phase) {
+            return isDescendantHasAction;
+        }
     }
 
     @DataProvider
@@ -171,28 +202,28 @@
             InternalState internalState, Job.JobStatus jobStatus, InternalState expectedState) {
 
         //there is no meaning to the constructor inputs here
-        MockCommandTestingStateMachine underTest = new MockCommandTestingStateMachine(InternalState.TERMINAL, Action.Delete, Job.JobStatus.FAILED, true);
+        MockCommandTestingStateMachine underTest = new MockCommandTestingStateMachine(InternalState.TERMINAL, Delete, Job.JobStatus.FAILED, true);
         assertEquals(expectedState, underTest.calcNextStateDeletePhase(jobStatus, internalState));
     }
 
     @Test
     public void whenNoNeedToDeleteMyself_internalStateMovesFromWatchingToTerminal() {
-        MockCommandTestingStateMachine underTest = new MockCommandTestingStateMachine(InternalState.WATCHING, Action.Delete, Job.JobStatus.COMPLETED, false);
+        MockCommandTestingStateMachine underTest = new MockCommandTestingStateMachine(InternalState.WATCHING, Delete, Job.JobStatus.COMPLETED, false);
         assertEquals(InternalState.TERMINAL, underTest.calcNextStateDeletePhase(Job.JobStatus.COMPLETED, InternalState.WATCHING));
     }
 
     @DataProvider
     public static Object[][] testShallStopJobDataProvider() {
         return new Object[][]{
-                {Job.JobStatus.IN_PROGRESS, Action.None, false, false},
-                {Job.JobStatus.COMPLETED_WITH_NO_ACTION, Action.None, false, false},
-                {Job.JobStatus.COMPLETED, Action.None, false, false},
-                {Job.JobStatus.FAILED, Action.None, false, true},
-                {Job.JobStatus.COMPLETED_WITH_ERRORS, Action.None, false, true},
-                {Job.JobStatus.COMPLETED_WITH_ERRORS, Action.None, true, false},
-                {Job.JobStatus.FAILED, Action.None, true, false},
-                {Job.JobStatus.FAILED, Action.Delete, true, true},
-                {Job.JobStatus.FAILED, Action.Create, true, true},
+                {Job.JobStatus.IN_PROGRESS, None, false, false},
+                {Job.JobStatus.COMPLETED_WITH_NO_ACTION, None, false, false},
+                {Job.JobStatus.COMPLETED, None, false, false},
+                {Job.JobStatus.FAILED, None, false, true},
+                {Job.JobStatus.COMPLETED_WITH_ERRORS, None, false, true},
+                {Job.JobStatus.COMPLETED_WITH_ERRORS, None, true, false},
+                {Job.JobStatus.FAILED, None, true, false},
+                {Job.JobStatus.FAILED, Delete, true, true},
+                {Job.JobStatus.FAILED, Create, true, true},
         };
     }
 
@@ -200,7 +231,7 @@
     @Test(dataProvider = "testShallStopJobDataProvider")
     public void testShallStopJob(Job.JobStatus jobStatus, Action action, boolean isService, boolean expectedResult) {
         //in this test, there is no meaning to constructor parameters besides isService
-        MockCommandTestingStateMachine underTest = new MockCommandTestingStateMachine(InternalState.WATCHING, Action.Delete, Job.JobStatus.COMPLETED, false, isService);
+        MockCommandTestingStateMachine underTest = new MockCommandTestingStateMachine(InternalState.WATCHING, Delete, Job.JobStatus.COMPLETED, false, isService, true);
 
         BaseResource mockedRequest = mock(BaseResource.class);
         when(underTest.getSharedData().getRequest()).thenReturn(mockedRequest);
@@ -209,6 +240,94 @@
         assertEquals(expectedResult, underTest.shallStopJob(jobStatus));
     }
 
+    public static class FakeResourceCreator {
+
+        public static<T> Map<String, T> convertToMap(List<T> list) {
+            if (list==null) {
+                return null;
+            }
+            return list.stream().collect(Collectors.toMap(x-> UUID.randomUUID().toString(), x->x));
+        }
+
+        static ServiceInstantiation createService(List<Vnf> vnfs, List<Network> networks, List<InstanceGroup> vnfGroups) {
+            return new ServiceInstantiation(mock(ModelInfo.class), null, null, null, null, null, null, null, null, null, null, null, null, null, null,
+                    convertToMap(vnfs),
+                    convertToMap(networks),
+                    convertToMap(vnfGroups),
+                    null,
+                    null, false, 1, false,false,null, null, null, null, null, null, null);
+        }
+
+        public static ServiceInstantiation createServiceWith2InstancesInEachLevel(Action action) {
+            return createService(
+                    ImmutableList.of(
+                            createVnf(ImmutableList.of(createVfModule(action), createVfModule(action)), action),
+                            createVnf(ImmutableList.of(createVfModule(action), createVfModule(action)), action)),
+                    ImmutableList.of(
+                            createNetwork(action),
+                            createNetwork(action)),
+                    ImmutableList.of(
+                            createGroup(ImmutableList.of(createMember(action), createMember(action)), action),
+                            createGroup(ImmutableList.of(createMember(action), createMember(action)), action))
+                    );
+        }
+
+        static InstanceGroup createGroup(List<InstanceGroupMember> groupMembers, Action action) {
+            return new InstanceGroup(mock(ModelInfo.class), null, action.name(), false, null, convertToMap(groupMembers), null, null, null);
+        }
+
+        static InstanceGroupMember createMember(Action action) {
+            return new InstanceGroupMember(null, action.toString(), null, null, null);
+        }
+
+        static Vnf createVnf(List<VfModule> vfModules, Action action) {
+            Map<String, Map<String, VfModule>> vfModulesMap = new HashMap<>();
+            vfModulesMap.put("abc",convertToMap(vfModules));
+
+            return new Vnf(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, null, vfModulesMap, null, null, null);
+        }
+
+        static Vnf createVnf(Action action) {
+            return new Vnf(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, null,null, null, null, null);
+        }
+
+        static VfModule createVfModule(Action action) {
+            return new VfModule(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, false, false, null, null, null, null);
+        }
+
+        static Network createNetwork(Action action) {
+            return new Network(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, null, null, null, null);
+        }
+    }
+
+    @DataProvider
+    public static Object[][] testIsDescendantHasActionDataProvider() {
+        return new Object[][]{
+                {"empty service", Create, false, createService(emptyList(), emptyList(), emptyList())},
+                {"instance group with None", Create, false, createService(emptyList(), emptyList(), ImmutableList.of(createGroup(emptyList(), None)))},
+                {"instance group with Create", Create, true, createService(emptyList(), emptyList(), ImmutableList.of(createGroup(emptyList(), Create)))},
+                {"instance group None + member Delete", Delete, true, createService(emptyList(), emptyList(), ImmutableList.of(createGroup(ImmutableList.of(createMember(Delete)), None)))},
+                {"instance group None + member Create", Delete, false, createService(emptyList(), emptyList(), ImmutableList.of(createGroup(ImmutableList.of(createMember(Create)), None)))},
+                {"instance group None + member Create + member Delete", Delete, true,
+                        createService(emptyList(), emptyList(), ImmutableList.of(createGroup(ImmutableList.of(createMember(Create), createMember(Delete)), None)))},
+                {"vnf Create", Delete, false, createService(ImmutableList.of(createVnf(emptyList(), Create)), emptyList(),emptyList())},
+                {"vnf Create", Create, true, createService(ImmutableList.of(createVnf(emptyList(), Create)), emptyList(),emptyList())},
+                {"vnf Create null VfModules internal map", Create, false, createService(ImmutableList.of(createVnf(null, Delete)), emptyList(),emptyList())},
+                {"vnf Delete with null VfModules", Create, false, createService(ImmutableList.of(createVnf(Delete)), emptyList(),emptyList())},
+                {"vnf None + VfModule Create", Create, true, createService(ImmutableList.of(createVnf(ImmutableList.of(createVfModule(Create)), None)), emptyList(),emptyList())},
+                {"vnf None + VfModule None", Create, false, createService(ImmutableList.of(createVnf(ImmutableList.of(createVfModule(None)), None)), emptyList(),emptyList())},
+                {"network Create", Create, true, createService(emptyList(), ImmutableList.of(createNetwork(Create)), emptyList())},
+                {"network Delete", Create, false, createService(emptyList(), ImmutableList.of(createNetwork(Delete)), emptyList())},
+        };
+    }
+
+    @Test(dataProvider = "testIsDescendantHasActionDataProvider")
+    public void testIsDescendantHasAction(String desc, Action action, boolean expectedResult, BaseResource request) {
+        //in this test, there is no meaning to constructor parameters
+        MockCommand underTest = new MockCommand(InternalState.WATCHING, Delete, Job.JobStatus.COMPLETED);
+        assertEquals(expectedResult, underTest.isDescendantHasAction(request, action));
+    }
+
     @DataProvider
     public static Object[][] testCallDataProvider() {
         return new Object[][]{
@@ -235,7 +354,7 @@
             String description, InternalState internalState, Job.JobStatus currentStateResult,
             InternalState expectedNextState, Job.JobStatus expectedNextStatus) {
 
-        MockCommandTestingStateMachine underTest = new MockCommandTestingStateMachine(internalState, Action.Delete, currentStateResult, true);
+        MockCommandTestingStateMachine underTest = new MockCommandTestingStateMachine(internalState, Delete, currentStateResult, true);
         NextCommand nextCommand = underTest.call();
         assertEquals(expectedNextStatus, nextCommand.getStatus());
 
@@ -250,12 +369,6 @@
         }
     }
 
-    @Test(expectedExceptions = IllegalStateException.class)
-    public void whenCommandInUnMappedState_exceptionIsThrown() {
-        MockCommandTestingStateMachine underTest = new MockCommandTestingStateMachine(InternalState.TERMINAL, Action.Delete, Job.JobStatus.COMPLETED, true);
-        underTest.call();
-    }
-
     @DataProvider
     public static Object[][] InProgressDataProvider() {
         return Stream.of(Job.JobStatus.values())
@@ -266,7 +379,7 @@
     @Test(dataProvider = "InProgressDataProvider")
     public void whenGetResultFromMso_InProgressReturnThem(Job.JobStatus mockedJobStatus) {
         Job.JobStatus expectedJobStatus = (mockedJobStatus== Job.JobStatus.PAUSE) ? Job.JobStatus.IN_PROGRESS : mockedJobStatus;
-        MockCommand underTest = new MockCommand(InternalState.IN_PROGRESS, Action.Delete, mockedJobStatus);
+        MockCommand underTest = new MockCommand(InternalState.IN_PROGRESS, Delete, mockedJobStatus);
         when(underTest.getInProgressStatusService().call(any(), any(), any())).thenReturn(mockedJobStatus);
         assertEquals(expectedJobStatus, underTest.inProgress());
     }
@@ -282,22 +395,22 @@
 
     @Test(dataProvider = "InProgressExceptionsDataProvider")
     public void whenInProgressStatusServiceThrowException_InProgressReturnStatus(Exception exception, Job.JobStatus expectedJobStatus) {
-        MockCommand underTest = new MockCommand(InternalState.IN_PROGRESS, Action.Delete, expectedJobStatus);
+        MockCommand underTest = new MockCommand(InternalState.IN_PROGRESS, Delete, expectedJobStatus);
         when(underTest.getInProgressStatusService().call(any(), any(), any())).thenThrow(exception);
         assertEquals(expectedJobStatus, underTest.inProgress());
     }
 
     @DataProvider
     public static Object[][] testIsNeedToDeleteMySelfDataProvider() {
-        return Stream.of(Action.values())
+        return Stream.of(values())
                 .map(status -> new Object[] { status })
                 .toArray(Object[][]::new);
     }
 
     @Test(dataProvider = "testIsNeedToDeleteMySelfDataProvider")
     public void testIsNeedToDeleteMySelf(Action action) {
-        boolean expectedResult = (action== Action.Delete);
-        MockCommand underTest = new MockCommand(InternalState.DELETE_MYSELF, Action.Delete, Job.JobStatus.IN_PROGRESS);
+        boolean expectedResult = (action== Delete);
+        MockCommand underTest = new MockCommand(InternalState.DELETE_MYSELF, Delete, Job.JobStatus.IN_PROGRESS);
         BaseResource mockedBaseResource = mock(BaseResource.class);
         when(underTest.getSharedData().getRequest()).thenReturn(mockedBaseResource);
         when(mockedBaseResource.getAction()).thenReturn(action);
@@ -315,9 +428,74 @@
 
     @Test(dataProvider = "testWatchingDataProvider")
     public void testWatching(String desc, Job.JobStatus childrenJobsStatus, Job.JobStatus expectedJobStatus) {
-        MockCommand underTest = new MockCommand(InternalState.WATCHING, Action.Delete, Job.JobStatus.IN_PROGRESS);
+        MockCommand underTest = new MockCommand(InternalState.WATCHING, Delete, Job.JobStatus.IN_PROGRESS);
         when(underTest.getWatchChildrenJobsBL().retrieveChildrenJobsStatus(any())).thenReturn(childrenJobsStatus);
         assertEquals(expectedJobStatus, underTest.watchChildren());
     }
 
+    @DataProvider
+    public static Object[][] testCalcInitialStateDataProvider() {
+        return new Object[][]{
+                {Delete, true, Delete, InternalState.CREATING_CHILDREN},
+                {Delete, false, Delete, InternalState.DELETE_MYSELF},
+                {Delete, false, Create, InternalState.TERMINAL},
+                {Delete, true, Create, InternalState.CREATING_CHILDREN},
+                {Create, true, Create, InternalState.CREATE_MYSELF},
+                {Create, false, Create, InternalState.CREATE_MYSELF},
+                {Create, false, Delete, InternalState.TERMINAL},
+                {Create, true, Delete, InternalState.CREATING_CHILDREN},
+                {Create, true, Resume, InternalState.RESUME_MYSELF},
+                {Delete, false, Resume, InternalState.TERMINAL},
+        };
+    }
+
+    @Test(dataProvider = "testCalcInitialStateDataProvider")
+    public void testCalcInitialState(Action phase, boolean isDescendantHasAction, Action action, InternalState expectedState) {
+        ResourceCommand underTest = mock(ResourceCommand.class);
+        when(underTest.calcInitialState(any(), any())).thenCallRealMethod();
+        when(underTest.isDescendantHasAction(eq(phase))).thenReturn(isDescendantHasAction);
+        when(underTest.getActionType()).thenReturn(action);
+        when(underTest.isNeedToDeleteMyself()).thenCallRealMethod();
+        when(underTest.isNeedToCreateMyself()).thenCallRealMethod();
+        when(underTest.isNeedToResumeMySelf()).thenCallRealMethod();
+
+        Map<String, String> commandData = ImmutableMap.of(INTERNAL_STATE, InternalState.INITIAL.name());
+        assertEquals(expectedState, underTest.calcInitialState(commandData, phase));
+    }
+
+
+    //throw exception when call to create children
+    //create children is just example, it could be any other method that called by ResourceCommand.invokeCommand
+    public static class MockCommandThrowExceptionOnCreateChildren extends MockCommandTestingStateMachine {
+
+        private final RuntimeException exceptionToThrow;
+
+        public MockCommandThrowExceptionOnCreateChildren(RuntimeException exceptionToThrow) {
+            super(InternalState.CREATING_CHILDREN, Delete, Job.JobStatus.COMPLETED, true);
+            this.exceptionToThrow = exceptionToThrow;
+            doAnswer(returnsFirstArg()).when(this.getWatchChildrenJobsBL()).cumulateJobStatus(any(), any());
+        }
+
+        @NotNull
+        @Override
+        public Job.JobStatus createChildren() {
+            throw exceptionToThrow;
+        }
+    }
+
+    @DataProvider
+    public static Object[][] exceptionAndStateProvider() {
+        return new Object[][]{
+                {new TryAgainException(new Exception()), Job.JobStatus.RESOURCE_IN_PROGRESS},
+                {new AbortingException(new Exception()), Job.JobStatus.FAILED},
+        };
+    }
+
+    @Test(dataProvider = "exceptionAndStateProvider")
+    public void whenKnownExceptionThrownInCommandInvocation_thenStateIsAsExpected(RuntimeException exception, Job.JobStatus expectedNextStatus) {
+        MockCommandTestingStateMachine underTest = new MockCommandThrowExceptionOnCreateChildren(exception);
+        NextCommand nextCommand = underTest.call();
+        assertEquals(expectedNextStatus, nextCommand.getStatus());
+    }
+
 }
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/command/ResourceInProgressStatusCommandTest.java b/vid-app-common/src/test/java/org/onap/vid/job/command/ResourceInProgressStatusCommandTest.java
deleted file mode 100644
index 5b036f5..0000000
--- a/vid-app-common/src/test/java/org/onap/vid/job/command/ResourceInProgressStatusCommandTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.mockito.InjectMocks;
-import org.mockito.MockitoAnnotations;
-import org.onap.vid.job.Job;
-import org.onap.vid.job.NextCommand;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.core.Is.is;
-
-
-public class ResourceInProgressStatusCommandTest {
-
-    @InjectMocks
-    private ResourceInProgressStatusCommand commandUnderTest = new ResourceInProgressStatusCommand();
-
-    @BeforeMethod
-    public void initMocks() {
-        MockitoAnnotations.initMocks(this);
-    }
-
-    @DataProvider
-    public static Object[][] givenStatusToExpectedStatus() {
-        return new Object[][]{
-                {Job.JobStatus.IN_PROGRESS, Job.JobStatus.IN_PROGRESS},
-                {Job.JobStatus.FAILED, Job.JobStatus.FAILED},
-                {Job.JobStatus.COMPLETED, Job.JobStatus.COMPLETED}
-        };
-    }
-
-    @Test(dataProvider = "givenStatusToExpectedStatus")
-    public void whenGetStatusFromMso_returnExpectedNextCommand(Job.JobStatus jobStatus, Job.JobStatus expectedNextStatus) {
-        NextCommand nextCommand = commandUnderTest.processJobStatus(jobStatus);
-        assertThat(nextCommand.getStatus(), is(expectedNextStatus));
-        assertThat(nextCommand.getCommand(), is(commandUnderTest));
-    }
-}
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/command/ServiceInProgressStatusCommandTest.java b/vid-app-common/src/test/java/org/onap/vid/job/command/ServiceInProgressStatusCommandTest.java
index 31dbc9f..787ff60 100644
--- a/vid-app-common/src/test/java/org/onap/vid/job/command/ServiceInProgressStatusCommandTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/job/command/ServiceInProgressStatusCommandTest.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,22 +20,22 @@
 
 package org.onap.vid.job.command;
 
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import org.mockito.ArgumentCaptor;
-import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
-import org.onap.portalsdk.core.util.SystemProperties;
 import org.onap.vid.job.*;
 import org.onap.vid.job.impl.JobSharedData;
+import org.onap.vid.model.Action;
 import org.onap.vid.model.serviceInstantiation.Network;
 import org.onap.vid.model.serviceInstantiation.ServiceInstantiation;
 import org.onap.vid.model.serviceInstantiation.Vnf;
-import org.onap.vid.mso.model.ModelInfo;
+import org.onap.vid.mso.RestMsoImplementation;
 import org.onap.vid.properties.Features;
 import org.onap.vid.properties.VidProperties;
 import org.onap.vid.services.AsyncInstantiationBusinessLogic;
-import org.springframework.core.env.Environment;
+import org.onap.vid.services.AuditService;
 import org.testng.Assert;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
@@ -47,10 +47,9 @@
 import java.time.ZonedDateTime;
 import java.time.temporal.ChronoUnit;
 import java.util.Arrays;
-import java.util.Map;
-import java.util.TreeMap;
 import java.util.UUID;
 
+import static java.util.Collections.emptyList;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.containsInAnyOrder;
 import static org.hamcrest.core.Is.is;
@@ -58,7 +57,11 @@
 import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.*;
 import static org.onap.vid.job.Job.JobStatus.*;
+import static org.onap.vid.job.command.ResourceCommandKt.*;
+import static org.onap.vid.job.command.ResourceCommandTest.FakeResourceCreator.*;
+import static org.onap.vid.model.Action.Create;
 import static org.onap.vid.testUtils.TestUtils.testWithSystemProperty;
+import static org.testng.AssertJUnit.assertEquals;
 
 public class ServiceInProgressStatusCommandTest {
 
@@ -79,44 +82,28 @@
     private JobSharedData sharedData;
 
     @Mock
-    private Environment environment;
-
-    @Mock
     private ServiceInstantiation request;
 
     @Mock
     private InProgressStatusService inProgressStatusService;
 
-    @InjectMocks
-    private ServiceInProgressStatusCommand command = new ServiceInProgressStatusCommand();
+    @Mock
+    private WatchChildrenJobsBL watchChildrenJobsBL;
 
-    @DataProvider
-    public static Object[][] isNeedToCreateChildJobsDataProvider() {
-        return new Object[][]{
-                {new TreeMap<String,Vnf>() ,                 true, true, false},
-                {null ,                                      true, true, false},
-                {ImmutableMap.of("a",mock(Vnf.class)),   false, true, false},
-                {ImmutableMap.of("a",mock(Vnf.class)),   true, false, false},
-                {ImmutableMap.of("a",mock(Vnf.class)),   true, true, true},
-        };
-    }
+    @Mock
+    private MsoResultHandlerService msoResultHandlerService;
 
-    @DataProvider
-    public static Object[][] processJobStatusData() {
-        return new Object[][]{
-                /* {MSO jobStatus, jobStartTime, isNeedToCreateChildJobs(), property vid.job.max.hoursInProgress, expected nextCommand.getStatus() } */
-                {IN_PROGRESS,           false, IN_PROGRESS},
-                {FAILED,                false, FAILED},
-                {PAUSE,                 false, IN_PROGRESS},
-                {COMPLETED,             false, COMPLETED},
-                {COMPLETED,             true,  IN_PROGRESS},
-                {RESOURCE_IN_PROGRESS,  false, RESOURCE_IN_PROGRESS},
-                {PENDING,               false, PENDING},
-                {STOPPED,               false, STOPPED},
-                {COMPLETED_WITH_ERRORS, false, COMPLETED_WITH_ERRORS},
-                {CREATING,              false, CREATING}
-        };
-    }
+    @Mock
+    private MsoRequestBuilder msoRequestBuilder;
+
+    @Mock
+    private RestMsoImplementation restMsoImplementation;
+
+    @Mock
+    private AuditService auditService;
+
+    private ALaCarteServiceCommand command;
+
 
     @DataProvider
     public static Object[][] isExpiredJobStatusData() {
@@ -138,32 +125,31 @@
     @BeforeMethod
     public void initMocks() {
         MockitoAnnotations.initMocks(this);
-    }
-
-    @Test(dataProvider = "isNeedToCreateChildJobsDataProvider" )
-    public void testIsNeedToCreateChildJobs(Map<String, Vnf> serviceVnfs, boolean isALaCarte,
-                                            boolean isFeatureEnabled, boolean expected) {
-        MockitoAnnotations.initMocks(this);
-        ServiceInstantiation serviceInstantiation = mock(ServiceInstantiation.class);
-        when(serviceInstantiation.getVnfs()).thenReturn(serviceVnfs);
-        when(serviceInstantiation.isALaCarte()).thenReturn(isALaCarte);
-        when(featureManager.isActive(Features.FLAG_ASYNC_ALACARTE_VNF)).thenReturn(isFeatureEnabled);
-        assertThat(command.isNeedToCreateChildJobs(serviceInstantiation), is(expected));
+        command = new ALaCarteServiceCommand(
+                inProgressStatusService,
+                watchChildrenJobsBL,
+                asyncInstantiationBL,
+                jobsBrokerService,
+                msoRequestBuilder,
+                msoResultHandlerService,
+                jobAdapter,
+                restMsoImplementation,
+                auditService
+        );
     }
 
     @Test
     public void whenGetFromMsoCompletedAndALaCarte_generateNewJobsForVnfs() {
         UUID uuid = UUID.randomUUID();
         String userId = "mockedUserID";
-        Vnf vnf1 = mock(Vnf.class);
-        Vnf vnf2 = mock(Vnf.class);
-        Network network1 = mock(Network.class);
-        ServiceInstantiation serviceInstantiation = mock(ServiceInstantiation.class);
-        when(serviceInstantiation.getVnfs()).thenReturn(ImmutableMap.of("a", vnf1, "b", vnf2));
-        when(serviceInstantiation.getNetworks()).thenReturn(ImmutableMap.of("c", network1));
-        when(serviceInstantiation.isALaCarte()).thenReturn(true);
-        when(serviceInstantiation.getModelInfo()).thenReturn(new ModelInfo());
-
+        String testApi = "VNF_API";
+        Vnf vnf1 = createVnf(emptyList(), Create);
+        Vnf vnf2 = createVnf(emptyList(), Create);
+        Network network = createNetwork(Create);
+        ServiceInstantiation serviceInstantiation = createService(
+                ImmutableList.of(vnf1, vnf2),
+                ImmutableList.of(network),
+                emptyList());
         when(featureManager.isActive(Features.FLAG_ASYNC_ALACARTE_VNF)).thenReturn(true);
 
         UUID uuid1 = UUID.fromString("12345678-1234-1234-1234-123456789012");
@@ -171,15 +157,25 @@
         UUID uuid3 = UUID.fromString("12345678-1234-1234-1234-123456789014");
         when(jobsBrokerService.add(any())).thenReturn(uuid1).thenReturn(uuid2).thenReturn(uuid3);
 
-        JobSharedData sharedData = new JobSharedData(uuid, userId, serviceInstantiation);
-        command.init(sharedData, "", "");
+        JobSharedData sharedData = new JobSharedData(uuid, userId, serviceInstantiation, testApi);
+        command.init(sharedData, ImmutableMap.of(
+                ACTION_PHASE, Action.Create.name(),
+                INTERNAL_STATE, InternalState.IN_PROGRESS.name()
+                ));
         when(inProgressStatusService.call(any(), eq(sharedData), any())).thenReturn(Job.JobStatus.COMPLETED);
+        when(watchChildrenJobsBL.cumulateJobStatus(Job.JobStatus.COMPLETED, COMPLETED_WITH_NO_ACTION)).thenReturn(COMPLETED);
+        when(watchChildrenJobsBL.cumulateJobStatus(Job.JobStatus.COMPLETED_WITH_NO_ACTION, COMPLETED)).thenReturn(COMPLETED);
+        when(msoResultHandlerService.getRequest(eq(sharedData))).thenReturn(serviceInstantiation);
         NextCommand nextCommand = command.call();
+        assertEquals(IN_PROGRESS,  nextCommand.getStatus());
+        nextCommand = nextCommand.getCommand().call();
 
         ArgumentCaptor<JobAdapter.AsyncJobRequest> argumentCaptor = ArgumentCaptor.forClass(JobAdapter.AsyncJobRequest.class);
-        verify(jobAdapter, times(2)).createChildJob(eq(JobType.VnfInstantiation), eq(Job.JobStatus.CREATING), argumentCaptor.capture(), eq(sharedData), any());
-        verify(jobAdapter, times(1)).createChildJob(eq(JobType.NetworkInstantiation), eq(Job.JobStatus.CREATING), argumentCaptor.capture(), eq(sharedData), any());
-        assertThat(argumentCaptor.getAllValues(), containsInAnyOrder(vnf1, vnf2, network1));
+        verify(jobAdapter, times(1)).createChildJob(eq(JobType.NetworkInstantiation), argumentCaptor.capture(), eq(sharedData), any(), eq(0));
+        verify(jobAdapter, times(1)).createChildJob(eq(JobType.VnfInstantiation), argumentCaptor.capture(), eq(sharedData), any(), eq(1));
+        verify(jobAdapter, times(1)).createChildJob(eq(JobType.VnfInstantiation), argumentCaptor.capture(), eq(sharedData), any(), eq(2));
+
+        assertThat(argumentCaptor.getAllValues(), containsInAnyOrder(vnf1, vnf2, network));
 
         verify(jobsBrokerService, times(3)).add(any());
 
@@ -187,41 +183,14 @@
         verify(asyncInstantiationBL, never()).updateServiceInfo(any(), any());
 
         assertThat(nextCommand.getStatus(), is(Job.JobStatus.IN_PROGRESS));
-        assertThat(nextCommand.getCommand().getType(), is(new WatchingCommand().getType()));
-        assertThat(nextCommand.getCommand().getData().get("childrenJobs"), is(Arrays.asList(uuid1.toString(), uuid2.toString(), uuid3.toString())));
-        assertThat(nextCommand.getCommand().getData().get("isService"), is(true));
-    }
-
-    @Test(dataProvider = "processJobStatusData")
-    public void processJobStatusTest(Job.JobStatus jobStatus, boolean isNeedToCreateChildJobs, Job.JobStatus expectedStatus) {
-
-        when(featureManager.isActive(Features.FLAG_ASYNC_ALACARTE_VNF)).thenReturn(true);
-        // All mocks under are used for isNeedToCreateChildJobs=true case
-        when(sharedData.getRequest()).thenReturn(request);
-        when(request.isALaCarte()).thenReturn(true);
-        Map vnfs = mock(Map.class);
-        ModelInfo modelInfo = mock(ModelInfo.class);
-      
-        // if vnfs.isEmpty -> isNeedToCreateChildJobs will return false
-        when(vnfs.isEmpty()).thenReturn(!isNeedToCreateChildJobs);
-      
-        when(request.getVnfs()).thenReturn(vnfs);
-        when(request.getModelInfo()).thenReturn(modelInfo);
-        command.instanceId = "MockInstId";
-
-        NextCommand nextCommand = command.processJobStatus(jobStatus);
-        Assert.assertEquals(nextCommand.getStatus(), expectedStatus);
-        if (isNeedToCreateChildJobs) {
-            Assert.assertEquals(nextCommand.getCommand().getClass(), WatchingCommand.class);
-        } else {
-            Assert.assertEquals(nextCommand.getCommand(), command);
-        }
+        assertThat(nextCommand.getCommand().getType(), is(JobType.ALaCarteService));
+        assertThat(nextCommand.getCommand().getData().get(CHILD_JOBS), is(Arrays.asList(uuid1.toString(), uuid2.toString(), uuid3.toString())));
     }
 
     @Test(dataProvider = "isExpiredJobStatusData")
     public void isExpiredJobStatusTest(ZonedDateTime jobStartTime, String configValue, boolean expectedResult) throws Exception {
         testWithSystemProperty(VidProperties.VID_JOB_MAX_HOURS_IN_PROGRESS, configValue, ()->
-            Assert.assertEquals(command.getExpiryChecker().isExpired(jobStartTime), expectedResult)
+                Assert.assertEquals(command.getExpiryChecker().isExpired(jobStartTime), expectedResult)
         );
     }
 }
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/command/WatchChildrenJobsBLTest.java b/vid-app-common/src/test/java/org/onap/vid/job/command/WatchChildrenJobsBLTest.java
index 630c464..a9a961d 100644
--- a/vid-app-common/src/test/java/org/onap/vid/job/command/WatchChildrenJobsBLTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/job/command/WatchChildrenJobsBLTest.java
@@ -7,9 +7,9 @@
  * 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.
@@ -23,10 +23,10 @@
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
-import org.onap.portalsdk.core.service.DataAccessService;
 import org.onap.vid.job.Job.JobStatus;
 import org.onap.vid.job.impl.JobDaoImpl;
 import org.onap.vid.utils.DaoUtils;
+import org.onap.portalsdk.core.service.DataAccessService;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/command/WatchingCommandTest.java b/vid-app-common/src/test/java/org/onap/vid/job/command/WatchingCommandTest.java
deleted file mode 100644
index cc0e660..0000000
--- a/vid-app-common/src/test/java/org/onap/vid/job/command/WatchingCommandTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.job.command;
-
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.onap.portalsdk.core.service.DataAccessService;
-import org.onap.vid.job.Job;
-import org.onap.vid.job.NextCommand;
-import org.onap.vid.job.impl.JobSharedData;
-import org.onap.vid.model.serviceInstantiation.ServiceInstantiation;
-import org.onap.vid.services.AsyncInstantiationBusinessLogic;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-import java.util.List;
-import java.util.UUID;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.core.Is.is;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.*;
-
-public class WatchingCommandTest {
-
-    @Mock
-    private AsyncInstantiationBusinessLogic asyncInstantiationBL;
-
-    @Mock
-    private DataAccessService dataAccessService;
-
-    @Mock
-    private WatchChildrenJobsBL watchChildrenJobsBL;
-
-    @InjectMocks
-    private WatchingCommand watchingCommand = new WatchingCommand();
-
-
-
-    @BeforeClass
-    public void initMocks() {
-        MockitoAnnotations.initMocks(this);
-    }
-
-    @DataProvider
-    public static Object[][] testWatchingDataProvider() {
-        return new Object[][]{
-                {"all children final, no failed child, is service", Job.JobStatus.COMPLETED, true, Job.JobStatus.COMPLETED},
-                {"all children final, there is failed child, is service", Job.JobStatus.COMPLETED_WITH_ERRORS, true, Job.JobStatus.COMPLETED_WITH_ERRORS},
-                {"not all children final, is service", Job.JobStatus.IN_PROGRESS, true, Job.JobStatus.IN_PROGRESS},
-                {"all children final, no failed child, not service", Job.JobStatus.COMPLETED, false, Job.JobStatus.COMPLETED},
-                {"all children final, there is failed child, not service", Job.JobStatus.COMPLETED_WITH_ERRORS, false, Job.JobStatus.COMPLETED_WITH_ERRORS},
-                {"not all children final, not service", Job.JobStatus.IN_PROGRESS, false, Job.JobStatus.RESOURCE_IN_PROGRESS},
-        };
-    }
-
-
-
-    @Test(dataProvider = "testWatchingDataProvider")
-    public void whenGetChildrenStatus_thenJobStatusAsExpected(String desc, Job.JobStatus childrenComulativeStatus, boolean isService, Job.JobStatus expectedCommandStatus) {
-        UUID jobUUID = UUID.randomUUID();
-        JobSharedData sharedData = new JobSharedData(jobUUID, "mockedUserID", mock(ServiceInstantiation.class));
-        List<String> uuids = mock(List.class);
-        watchingCommand.init(sharedData, uuids, isService);
-        when(watchChildrenJobsBL.retrieveChildrenJobsStatus(eq(uuids))).thenReturn(childrenComulativeStatus);
-        when(watchChildrenJobsBL.cumulateJobStatus(eq(childrenComulativeStatus),eq(Job.JobStatus.COMPLETED))).thenReturn(childrenComulativeStatus);
-
-        //execute command and verify
-        NextCommand nextCommand = watchingCommand.call();
-        assertThat(nextCommand.getStatus(), is(expectedCommandStatus));
-        if (!expectedCommandStatus.equals(Job.JobStatus.IN_PROGRESS) && isService) {
-            verify(asyncInstantiationBL).updateServiceInfoAndAuditStatus(jobUUID, expectedCommandStatus);
-        } else {
-            verify(asyncInstantiationBL, never()).updateServiceInfoAndAuditStatus(jobUUID, expectedCommandStatus);
-        }
-    }
-}
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/impl/AsyncInstantiationIntegrationTest.java b/vid-app-common/src/test/java/org/onap/vid/job/impl/AsyncInstantiationIntegrationTest.java
index 0b1fff3..498708d 100644
--- a/vid-app-common/src/test/java/org/onap/vid/job/impl/AsyncInstantiationIntegrationTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/job/impl/AsyncInstantiationIntegrationTest.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,43 +20,55 @@
 
 package org.onap.vid.job.impl;
 
+import com.fasterxml.jackson.databind.JsonNode;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.mutable.MutableInt;
+import org.jetbrains.annotations.NotNull;
+import org.mockito.ArgumentCaptor;
 import org.mockito.Mockito;
+import org.mockito.hamcrest.MockitoHamcrest;
 import org.onap.portalsdk.core.service.DataAccessService;
 import org.onap.portalsdk.core.util.SystemProperties;
 import org.onap.vid.asdc.AsdcCatalogException;
-import org.onap.vid.config.DataSourceConfig;
-import org.onap.vid.config.JobCommandsConfigWithMockedMso;
-import org.onap.vid.config.MockedAaiClientAndFeatureManagerConfig;
+import org.onap.vid.changeManagement.RequestDetailsWrapper;
 import org.onap.vid.job.Job;
 import org.onap.vid.job.Job.JobStatus;
 import org.onap.vid.job.JobType;
 import org.onap.vid.job.JobsBrokerService;
 import org.onap.vid.job.command.CommandUtils;
 import org.onap.vid.job.command.InternalState;
-import org.onap.vid.model.Action;
-import org.onap.vid.model.NameCounter;
-import org.onap.vid.model.RequestReferencesContainer;
-import org.onap.vid.model.ServiceInfo;
+import org.onap.vid.model.*;
+import org.onap.vid.model.serviceInstantiation.BaseResource;
+import org.onap.vid.model.serviceInstantiation.InstanceGroup;
 import org.onap.vid.model.serviceInstantiation.ServiceInstantiation;
 import org.onap.vid.mso.RestMsoImplementation;
 import org.onap.vid.mso.RestObject;
 import org.onap.vid.mso.model.RequestReferences;
 import org.onap.vid.mso.rest.AsyncRequestStatus;
+import org.onap.vid.mso.rest.AsyncRequestStatusList;
 import org.onap.vid.properties.Features;
-import org.onap.vid.services.AsyncInstantiationBaseTest;
 import org.onap.vid.services.AsyncInstantiationBusinessLogic;
+import org.onap.vid.services.AuditService;
+import org.onap.vid.services.VersionService;
 import org.onap.vid.utils.DaoUtils;
+import org.onap.vid.config.DataSourceConfig;
+import org.onap.vid.config.JobCommandsConfigWithMockedMso;
+import org.onap.vid.config.MockedAaiClientAndFeatureManagerConfig;
+import org.onap.vid.services.AsyncInstantiationBaseTest;
+import org.onap.vid.testUtils.TestUtils;
+import org.springframework.http.HttpMethod;
 import org.springframework.test.context.ContextConfiguration;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
 import org.togglz.core.manager.FeatureManager;
 
 import javax.inject.Inject;
 import javax.ws.rs.ProcessingException;
+import java.io.IOException;
 import java.lang.reflect.Method;
 import java.util.*;
 import java.util.function.BiConsumer;
@@ -66,7 +78,8 @@
 import java.util.stream.Stream;
 
 import static java.util.stream.Collectors.*;
-import static net.javacrumbs.jsonunit.JsonMatchers.jsonPartEquals;
+import static net.javacrumbs.jsonunit.JsonAssert.assertJsonEquals;
+import static net.javacrumbs.jsonunit.JsonMatchers.*;
 import static org.hamcrest.CoreMatchers.*;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.hasProperty;
@@ -77,7 +90,7 @@
 import static org.mockito.ArgumentMatchers.*;
 import static org.mockito.Mockito.*;
 import static org.onap.vid.job.Job.JobStatus.*;
-import static org.onap.vid.model.JobAuditStatus.SourceStatus.MSO;
+import static org.onap.vid.job.impl.JobSchedulerInitializer.WORKERS_TOPICS;
 import static org.onap.vid.model.JobAuditStatus.SourceStatus.VID;
 import static org.testng.AssertJUnit.*;
 
@@ -97,6 +110,9 @@
     public static String SERVICE_INSTANCE_ID = UUID.randomUUID().toString();
 
     @Inject
+    private VersionService versionService;
+
+    @Inject
     private JobsBrokerService jobsBrokerService;
 
     @Inject
@@ -109,6 +125,9 @@
     private AsyncInstantiationBusinessLogic asyncInstantiationBL;
 
     @Inject
+    private AuditService auditService;
+
+    @Inject
     private RestMsoImplementation restMso;
 
     @Inject
@@ -120,6 +139,7 @@
     @BeforeClass
     void initServicesInfoService() {
         createInstanceParamsMaps();
+        when(versionService.retrieveBuildNumber()).thenReturn("fakeBuild");
     }
 
     @BeforeMethod
@@ -131,10 +151,12 @@
 
     @BeforeMethod
     void defineMocks() {
+        Mockito.reset(restMso);
+        Mockito.reset(aaiClient);
         mockAaiClientAnyNameFree();
     }
 
-    //@Test
+    @Test
     public void whenPushNewBulk_thenAllServicesAreInPending() {
 
         pushMacroBulk();
@@ -144,8 +166,8 @@
 
     private List<UUID> pushMacroBulk() {
         ServiceInstantiation serviceInstantiation = generateMockMacroServiceInstantiationPayload(false,
-                createVnfList(instanceParamsMapWithoutParams, Collections.EMPTY_LIST, true),
-                3, true,PROJECT_NAME, true);
+            createVnfList(instanceParamsMapWithoutParams, Collections.EMPTY_LIST, true),
+            3, true,PROJECT_NAME, true);
         return asyncInstantiationBL.pushBulkJob(serviceInstantiation, USER_ID);
     }
 
@@ -167,6 +189,10 @@
         return createResponse(statusCode, SERVICE_INSTANCE_ID, REQUEST_ID);
     }
 
+    public static RestObject<RequestReferencesContainer> createResponseRandomIds(int statusCode) {
+        return createResponse(statusCode, UUID.randomUUID().toString(), UUID.randomUUID().toString());
+    }
+
     public static RestObject<RequestReferencesContainer> createResponse(int statusCode, String instanceId, String requestId) {
         RequestReferences requestReferences = new RequestReferences();
         requestReferences.setRequestId(requestId);
@@ -180,7 +206,7 @@
 
     ImmutableList<String> statusesToStrings(JobStatus... jobStatuses) {
         return Stream.of(jobStatuses).map(
-                Enum::toString).collect(ImmutableList.toImmutableList());
+            Enum::toString).collect(ImmutableList.toImmutableList());
     }
 
     /*
@@ -190,81 +216,85 @@
     Make sure service state is Completed successfully once we got from MSO complete, and that next job is peeked.
     Once a service in the bulk is failed, other services moved to Stopped, and no other jobs from the bulk are peeked.
     */
-    //@Test
+    @Test
     public void testStatusesOfMacroServiceInBulkDuringBulkLifeCycle() {
-        when(restMso.PostForObject(any(), any(), eq(RequestReferencesContainer.class))).thenReturn(createResponse(200));
+
+        final String SERVICE_REQUEST_ID = UUID.randomUUID().toString();
+        final String SERVICE_INSTANCE_ID = UUID.randomUUID().toString();
+        final String SERVICE2_REQUEST_ID = UUID.randomUUID().toString();
+        final String SERVICE2_INSTANCE_ID = UUID.randomUUID().toString();
+
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), any(), eq(Optional.empty())))
+            .thenReturn(createResponse(200, SERVICE_INSTANCE_ID, SERVICE_REQUEST_ID));
+
         ImmutableList<ImmutableList<String>> expectedStatusesForVid = ImmutableList.of(
-                statusesToStrings(PENDING, IN_PROGRESS, COMPLETED),
-                statusesToStrings(PENDING, IN_PROGRESS, FAILED),
-                statusesToStrings(PENDING, STOPPED)
+            statusesToStrings(PENDING, IN_PROGRESS, COMPLETED),
+            statusesToStrings(PENDING, IN_PROGRESS, FAILED),
+            statusesToStrings(PENDING, STOPPED)
         );
 
         ImmutableList<ImmutableList<String>> expectedStatusesForMso = ImmutableList.of(
-                ImmutableList.of(REQUESTED, IN_PROGRESS_STR, "not a state", FAILED_STR ,COMPLETE_STR),
-                ImmutableList.of(REQUESTED, FAILED_STR),
-                ImmutableList.of()
+            ImmutableList.of(REQUESTED, IN_PROGRESS_STR, "not a state", FAILED_STR ,COMPLETE_STR),
+            ImmutableList.of(REQUESTED, FAILED_STR),
+            ImmutableList.of()
         );
 
         List<UUID> uuids = pushMacroBulk();
-        pullPendingJobAndAssertJobStatus(JobStatus.IN_PROGRESS, PENDING);
-
+        UUID firstJobUuid = uuids.get(0);
+        UUID secondJobUuid = uuids.get(1);
         //assert that when get ProcessingException from restMso, status remain the same
-        when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).thenThrow(new ProcessingException("fake message"));
-        Job job =  pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, JobStatus.IN_PROGRESS);
-        UUID firstHandledJobUUID = job.getUuid();
-        listServicesAndAssertStatus(JobStatus.IN_PROGRESS, PENDING, job);
+        when(restMso.GetForObject(endsWith(SERVICE_REQUEST_ID), eq(AsyncRequestStatus.class))).thenThrow(new ProcessingException("fake message"));
+        processJobsCountTimesAndAssertStatus(firstJobUuid, 10, IN_PROGRESS, PENDING);
 
         //assert that when get IN_PROGRESS status from restMso, status remain IN_PROGRESS
-        when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).thenReturn(asyncRequestStatusResponseAsRestObject(IN_PROGRESS_STR));
-        job =  pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, JobStatus.IN_PROGRESS);
-        listServicesAndAssertStatus(JobStatus.IN_PROGRESS, PENDING, job);
+        when(restMso.GetForObject(endsWith(SERVICE_REQUEST_ID), eq(AsyncRequestStatus.class))).thenReturn(asyncRequestStatusResponseAsRestObject(IN_PROGRESS_STR));
+        processJobsCountTimesAndAssertStatus(firstJobUuid, 10, IN_PROGRESS, PENDING);
 
         //assert that when get unrecognized status from restMso, status remain IN_PROGRESS
-        when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).thenReturn(asyncRequestStatusResponseAsRestObject("not a state"));
-        job =  pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, JobStatus.IN_PROGRESS);
-        listServicesAndAssertStatus(JobStatus.IN_PROGRESS, PENDING, job);
+        when(restMso.GetForObject(endsWith(SERVICE_REQUEST_ID), eq(AsyncRequestStatus.class))).thenReturn(asyncRequestStatusResponseAsRestObject("not a state"));
+        processJobsCountTimesAndAssertStatus(firstJobUuid, 10, IN_PROGRESS, PENDING);
 
         //assert that when get non 200 status code during IN_PROGRESS, status remain IN_PROGRESS
-        when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR, 404));
-        job =  pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, JobStatus.IN_PROGRESS);
-        listServicesAndAssertStatus(JobStatus.IN_PROGRESS, PENDING, job);
+        when(restMso.GetForObject(endsWith(SERVICE_REQUEST_ID), eq(AsyncRequestStatus.class))).thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR, 404));
+        processJobsCountTimesAndAssertStatus(firstJobUuid, 10, IN_PROGRESS, PENDING);
 
         //when get job COMPLETE from MSO, service status become COMPLETED
-        when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).
-                thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
-        job = pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, COMPLETED);
-        List<ServiceInfo> serviceInfoList = listServicesAndAssertStatus(COMPLETED, PENDING, job);
-        
-        
+        when(restMso.GetForObject(endsWith(SERVICE_REQUEST_ID), eq(AsyncRequestStatus.class))).thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
+        pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, COMPLETED);
+        List<ServiceInfo> serviceInfoList = listServicesAndAssertStatus(COMPLETED, PENDING, firstJobUuid);
+
+
         //for use later in the test
         Map<UUID, JobStatus> expectedJobStatusMap = serviceInfoList.stream().collect(
-                Collectors.toMap(ServiceInfo::getJobId, x-> PENDING));
-        expectedJobStatusMap.put(job.getUuid(), COMPLETED);
+            Collectors.toMap(ServiceInfo::getJobId, x-> PENDING));
+        expectedJobStatusMap.put(firstJobUuid, COMPLETED);
 
         //when handling another PENDING job, statuses are : COMPLETED, IN_PROGRESS, PENDING
-        job =  pullJobProcessAndPushBack(PENDING, JobStatus.IN_PROGRESS);
-        assertThat(job.getUuid(), not(equalTo(firstHandledJobUUID))); //assert different job was handled now
-        expectedJobStatusMap.put(job.getUuid(), JobStatus.IN_PROGRESS);
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), any(), eq(Optional.empty())))
+            .thenReturn(createResponse(200, SERVICE2_INSTANCE_ID, SERVICE2_REQUEST_ID));
+        when(restMso.GetForObject(endsWith(SERVICE2_REQUEST_ID), eq(AsyncRequestStatus.class))).thenReturn(asyncRequestStatusResponseAsRestObject(IN_PROGRESS_STR));
+        processJobsCountTimes(10);
+
+        expectedJobStatusMap.put(secondJobUuid, JobStatus.IN_PROGRESS);
         listServicesAndAssertStatus(expectedJobStatusMap);
 
+
         //when get FAILED status from MSO statuses are : COMPLETED, FAILED, STOPPED
-        when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).
-                thenReturn(asyncRequestStatusResponseAsRestObject(FAILED_STR));
-        job =  pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, JobStatus.FAILED);
-        expectedJobStatusMap.put(job.getUuid(), JobStatus.FAILED);
+        when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).thenReturn(asyncRequestStatusResponseAsRestObject(FAILED_STR));
+        pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, JobStatus.FAILED);
+        expectedJobStatusMap.put(secondJobUuid, JobStatus.FAILED);
         expectedJobStatusMap = expectedJobStatusMap.entrySet().stream().collect(Collectors.toMap(
-                e -> e.getKey(), e -> e.getValue() == PENDING ? JobStatus.STOPPED : e.getValue()
+            e -> e.getKey(), e -> e.getValue() == PENDING ? JobStatus.STOPPED : e.getValue()
         ));
 
         listServicesAndAssertStatus(expectedJobStatusMap);
         IntStream.range(0, uuids.size()).forEach(i -> {
             UUID uuid = uuids.get(i);
-            List<String> msoStatuses = asyncInstantiationBL.getAuditStatuses(uuid, MSO).stream().map(x -> x.getJobStatus()).collect(Collectors.toList());
-            List<String> vidStatuses = asyncInstantiationBL.getAuditStatuses(uuid, VID).stream().map(x -> x.getJobStatus()).collect(Collectors.toList());
-            assertThat(msoStatuses, is(expectedStatusesForMso.get(i)));
+            List<String> vidStatuses = auditService.getAuditStatuses(uuid, VID).stream().map(x -> x.getJobStatus()).collect(Collectors.toList());
             assertThat(vidStatuses, is(expectedStatusesForVid.get(i)));
         });
-        //
+
+        //assert no more jobs to pull
         assertFalse(jobsBrokerService.pull(PENDING, randomUuid()).isPresent());
         assertFalse(jobsBrokerService.pull(JobStatus.IN_PROGRESS, randomUuid()).isPresent());
     }
@@ -273,8 +303,8 @@
     @DataProvider
     public static Object[][] AlaCarteStatuses(Method test) {
         return new Object[][]{
-                {COMPLETE_STR, JobStatus.COMPLETED, JobStatus.COMPLETED},
-                {FAILED_STR, JobStatus.COMPLETED_WITH_ERRORS, JobStatus.FAILED},
+            {COMPLETE_STR, JobStatus.COMPLETED},
+            {FAILED_STR, JobStatus.COMPLETED_WITH_ERRORS},
         };
     }
 
@@ -285,8 +315,8 @@
     Make sure service state is Completed successfully once we got from MSO complete for the vnf job.
     status Creating
      */
-    //@Test(dataProvider = "AlaCarteStatuses")
-    public void testStatusesOfServiceDuringALaCarteLifeCycleIgnoringVfModules(String msoVnfStatus, JobStatus expectedServiceStatus,  JobStatus expectedVnfStatus) {
+    @Test(dataProvider = "AlaCarteStatuses")
+    public void testStatusesOfServiceDuringALaCarteLifeCycleIgnoringVfModules(String msoVnfStatus, JobStatus expectedServiceStatus) {
         /*
             [v]  + push alacarte with 1 vnf
             [v]    verify STATUS pending
@@ -305,6 +335,7 @@
 
            * not looking on audit (yet)
         */
+        reset(restMso);
         when(featureManager.isActive(Features.FLAG_ASYNC_ALACARTE_VNF)).thenReturn(true);
         when(featureManager.isActive(Features.FLAG_ASYNC_ALACARTE_VFMODULE)).thenReturn(false);
         final String SERVICE_REQUEST_ID = UUID.randomUUID().toString();
@@ -315,39 +346,22 @@
         //push alacarte with 1 vnf, verify STATUS pending
         UUID uuid = pushALaCarteWithVnf();
         singleServicesAndAssertStatus(JobStatus.PENDING, uuid);
-
         //mock mso to answer 200 of create service instance request, verify STATUS in progress
-        when(restMso.PostForObject(any(), endsWith("serviceInstances"), eq(RequestReferencesContainer.class))).thenReturn(
-                createResponse(200, SERVICE_INSTANCE_ID, SERVICE_REQUEST_ID));
-        pullJobProcessAndPushBackWithTypeAssertion(JobStatus.PENDING, JobStatus.IN_PROGRESS, JobType.InProgressStatus);
-        singleServicesAndAssertStatus(JobStatus.IN_PROGRESS, uuid);
-
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), endsWith("serviceInstances"), any())).thenReturn(
+            createResponse(200, SERVICE_INSTANCE_ID, SERVICE_REQUEST_ID));
         //mock mso to answer COMPLETE for service instance create, job status shall remain IN_PROGRESS and type shall be Watching
-        reset(restMso);
         when(restMso.GetForObject(endsWith(SERVICE_REQUEST_ID), eq(AsyncRequestStatus.class))).
-                thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
-        pullJobProcessAndPushBackWithTypeAssertion(JobStatus.IN_PROGRESS, JobStatus.IN_PROGRESS, JobType.Watching);
-        singleServicesAndAssertStatus(JobStatus.IN_PROGRESS, uuid);
-
+            thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
         //mock mso to answer 200 of create vnf instance request, pull+execute vnf job, STATUS resource in progress
-        reset(restMso);
-        when(restMso.PostForObject(any(), endsWith(SERVICE_INSTANCE_ID + "/vnfs"), eq(RequestReferencesContainer.class))).thenReturn(
-                createResponse(200, UUID.randomUUID().toString(), VNF_REQUEST_ID));
-        pullJobProcessAndPushBackWithTypeAssertion(JobStatus.CREATING, JobStatus.RESOURCE_IN_PROGRESS, JobType.VnfInProgressStatus);
-
-        //verify service job  STATUS in progress
-        pullJobProcessAndPushBackWithTypeAssertion(JobStatus.IN_PROGRESS, JobStatus.IN_PROGRESS, JobType.Watching);
-        singleServicesAndAssertStatus(JobStatus.IN_PROGRESS, uuid);
-
-        //mock mso to answer msoVnfStatus (COMPLETE/FAILED) for vnf creation status,
-        //job status shall be final (COMPLETE/COMPLETE_WITH_ERRORS)
-        reset(restMso);
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), endsWith(SERVICE_INSTANCE_ID + "/vnfs"), any())).thenReturn(
+            createResponse(200, UUID.randomUUID().toString(), VNF_REQUEST_ID));
         when(restMso.GetForObject(endsWith(VNF_REQUEST_ID), eq(AsyncRequestStatus.class))).thenReturn(
-                asyncRequestStatusResponseAsRestObject(msoVnfStatus));
-        pullJobProcessAndPushBack(JobStatus.RESOURCE_IN_PROGRESS, expectedVnfStatus, false);
-        singleServicesAndAssertStatus(JobStatus.IN_PROGRESS, uuid);
-        pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, expectedServiceStatus, true);
-        singleServicesAndAssertStatus(expectedServiceStatus, uuid);
+            asyncRequestStatusResponseAsRestObject(msoVnfStatus));
+
+        processJobsCountTimesAndAssertStatus(uuid, 100, expectedServiceStatus);
+        verify(restMso, times(1)).restCall(eq(HttpMethod.POST), any(), any(), eq("/serviceInstantiation/v7/serviceInstances"), any());
+        verify(restMso, times(1)).restCall(eq(HttpMethod.POST), any(), any(), endsWith(SERVICE_INSTANCE_ID + "/vnfs"), any());
+        verify(restMso, times(2)).GetForObject(any(), any());
 
     }
 
@@ -361,13 +375,11 @@
     And union these tests to single one.
      */
 
-    //@Test
+    @Test
     public void testALaCarteLifeCycle1Vnf2VfModules() {
 
 
         String msoVnfStatus = COMPLETE_STR;
-        JobStatus expectedServiceStatus = IN_PROGRESS;
-        JobStatus expectedVnfStatus = RESOURCE_IN_PROGRESS;
         when(featureManager.isActive(Features.FLAG_ASYNC_ALACARTE_VNF)).thenReturn(true);
         when(featureManager.isActive(Features.FLAG_ASYNC_ALACARTE_VFMODULE)).thenReturn(true);
         final String SERVICE_REQUEST_ID = UUID.randomUUID().toString();
@@ -383,39 +395,27 @@
         //push alacarte with 1 vnf, verify STATUS pending
         UUID uuid = pushALaCarteWithVnf();
         singleServicesAndAssertStatus(JobStatus.PENDING, uuid);
+        reset(restMso);
 
         /*---------- service -----------*/
 
         //mock mso to answer 200 of create service instance request, verify STATUS in progress
-        when(restMso.PostForObject(any(), endsWith("serviceInstances"), eq(RequestReferencesContainer.class))).thenReturn(
-                createResponse(200, SERVICE_INSTANCE_ID, SERVICE_REQUEST_ID));
-        pullJobProcessAndPushBackWithTypeAssertion(JobStatus.PENDING, JobStatus.IN_PROGRESS, JobType.InProgressStatus);
-        singleServicesAndAssertStatus(JobStatus.IN_PROGRESS, uuid);
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), endsWith("serviceInstances"), any())).thenReturn(
+            createResponse(200, SERVICE_INSTANCE_ID, SERVICE_REQUEST_ID));
 
-        //mock mso to answer COMPLETE for service instance create, job status shall remain IN_PROGRESS and type shall be Watching
-        reset(restMso);
+        //mock mso to answer COMPLETE for service instance create
         when(restMso.GetForObject(endsWith(SERVICE_REQUEST_ID), eq(AsyncRequestStatus.class))).
-                thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
-        pullJobProcessAndPushBackWithTypeAssertion(JobStatus.IN_PROGRESS, JobStatus.IN_PROGRESS, JobType.Watching);
-        singleServicesAndAssertStatus(JobStatus.IN_PROGRESS, uuid);
+            thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
 
         /*---------- vnf -----------*/
 
-        //mock mso to answer 200 of create vnf instance request, pull+execute vnf job, STATUS resource in progress
-        reset(restMso);
-        when(restMso.PostForObject(any(), endsWith(SERVICE_INSTANCE_ID + "/vnfs"), eq(RequestReferencesContainer.class))).thenReturn(
-                createResponse(200, VNF_INSTANCE_ID, VNF_REQUEST_ID));
-        pullJobProcessAndPushBackWithTypeAssertion(JobStatus.CREATING, JobStatus.RESOURCE_IN_PROGRESS, JobType.VnfInProgressStatus);
-
-        //verify service job  STATUS in progress
-        pullJobProcessAndPushBackWithTypeAssertion(JobStatus.IN_PROGRESS, JobStatus.IN_PROGRESS, JobType.Watching);
-        singleServicesAndAssertStatus(JobStatus.IN_PROGRESS, uuid);
+        //mock mso to answer 200 of create vnf instance request
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), endsWith(SERVICE_INSTANCE_ID + "/vnfs"), any())).thenReturn(
+            createResponse(200, VNF_INSTANCE_ID, VNF_REQUEST_ID));
 
         //mock mso to answer msoVnfStatus (COMPLETE/FAILED) for vnf creation status,
-        //job status shall be final (COMPLETE/COMPLETE_WITH_ERRORS)
-        reset(restMso);
         when(restMso.GetForObject(endsWith(VNF_REQUEST_ID), eq(AsyncRequestStatus.class))).
-                thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
+            thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
 
         try {
             reset(commandUtils);
@@ -425,113 +425,164 @@
 
         }
 
-        pullJobProcessAndPushBackWithTypeAssertion(JobStatus.RESOURCE_IN_PROGRESS, JobStatus.RESOURCE_IN_PROGRESS, JobType.WatchingBaseModule);
-        singleServicesAndAssertStatus(JobStatus.IN_PROGRESS, uuid);
-        pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, JobStatus.IN_PROGRESS, true);
-        singleServicesAndAssertStatus(JobStatus.IN_PROGRESS, uuid);
-
         /*---------- vf Module without volume group name (base) -----------*/
 
-        //vg name not exist, so vf module created immediately
-        pullJobProcessAndPushBackWithTypeAssertion(JobStatus.CREATING, JobStatus.RESOURCE_IN_PROGRESS, JobType.Watching);
-
-        //verify vnf/volumeGroup job  STATUS still watching with resource in progress
-        pullMultipleJobsFindExpectedProcessAndPushBack(JobStatus.RESOURCE_IN_PROGRESS, JobType.Watching, JobStatus.RESOURCE_IN_PROGRESS, JobType.Watching);
-
         //mock mso to answer 200 of create vfModule instance request, pull+execute volumeGroup job, STATUS resource in progress
-        reset(restMso);
-        when(restMso.PostForObject(any(), endsWith(SERVICE_INSTANCE_ID + "/vnfs/" + VNF_INSTANCE_ID + "/vfModules"), eq(RequestReferencesContainer.class))).thenReturn(
-                createResponse(200, UUID.randomUUID().toString(), VF_MODULE_REQUEST_ID));
-        pullJobProcessAndPushBackWithTypeAssertion(JobStatus.CREATING, JobStatus.RESOURCE_IN_PROGRESS, JobType.ResourceInProgressStatus);
-
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), endsWith(SERVICE_INSTANCE_ID + "/vnfs/" + VNF_INSTANCE_ID + "/vfModules"), any())).thenReturn(
+            createResponse(200, UUID.randomUUID().toString(), VG_REQUEST_ID));
         //mock mso to answer for vf module orchestration request
-        reset(restMso);
         when(restMso.GetForObject(endsWith(VF_MODULE_REQUEST_ID), eq(AsyncRequestStatus.class))).thenReturn(
-                asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
-        pullMultipleJobsFindExpectedProcessAndPushBack(JobStatus.RESOURCE_IN_PROGRESS, JobType.ResourceInProgressStatus, JobStatus.COMPLETED, JobType.ResourceInProgressStatus);
+            asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
 
-        //verify volume group become completed
-        pullMultipleJobsFindExpectedProcessAndPushBack(JobStatus.RESOURCE_IN_PROGRESS, JobType.Watching, JobStatus.COMPLETED, JobType.Watching);
-
-        //vnf become watching after volume group completed, and new volume group created
-        pullMultipleJobsFindExpectedProcessAndPushBack(JobStatus.RESOURCE_IN_PROGRESS, JobType.WatchingBaseModule, JobStatus.RESOURCE_IN_PROGRESS, JobType.Watching);
-
-        /*---------- volume group & vf module (non base) -----------*/
-
-        /*---------- volume group -----------*/
-
-        //mock mso to answer 200 of create volumeGroup instance request, pull+execute volumeGroup job, STATUS resource in progress
-        reset(restMso);
-        when(restMso.PostForObject(any(), endsWith(SERVICE_INSTANCE_ID + "/vnfs/" + VNF_INSTANCE_ID + "/volumeGroups"), eq(RequestReferencesContainer.class))).thenReturn(
-                createResponse(200, VG_INSTANCE_ID, VG_REQUEST_ID));
-        pullJobProcessAndPushBackWithTypeAssertion(JobStatus.CREATING, JobStatus.RESOURCE_IN_PROGRESS, JobType.VolumeGroupInProgressStatus);
-
-        //verify vnf job  STATUS still watching with resource in progress
-        pullMultipleJobsFindExpectedProcessAndPushBack(JobStatus.RESOURCE_IN_PROGRESS, JobType.Watching, JobStatus.RESOURCE_IN_PROGRESS, JobType.Watching);
-
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), endsWith(SERVICE_INSTANCE_ID + "/vnfs/" + VNF_INSTANCE_ID + "/volumeGroups"), any())).thenReturn(
+            createResponse(200, VG_INSTANCE_ID, VG_REQUEST_ID));
         //mock mso to answer for volume group orchestration request
-        reset(restMso);
         when(restMso.GetForObject(endsWith(VG_REQUEST_ID), eq(AsyncRequestStatus.class))).thenReturn(
-                asyncRequestStatusResponseAsRestObject(msoVnfStatus));
-        pullMultipleJobsFindExpectedProcessAndPushBack(JobStatus.RESOURCE_IN_PROGRESS, JobType.VolumeGroupInProgressStatus, JobStatus.RESOURCE_IN_PROGRESS, JobType.Watching);
+            asyncRequestStatusResponseAsRestObject(msoVnfStatus));
 
         /*---------- vfModule -----------*/
 
         //mock mso to answer 200 of create vfModule instance request, pull+execute volumeGroup job, STATUS resource in progress
-        reset(restMso);
-        when(restMso.PostForObject(any(), endsWith(SERVICE_INSTANCE_ID + "/vnfs/" + VNF_INSTANCE_ID + "/vfModules"), eq(RequestReferencesContainer.class))).thenReturn(
-                createResponse(200, UUID.randomUUID().toString(), VF_MODULE_REQUEST_ID2));
-        pullJobProcessAndPushBackWithTypeAssertion(JobStatus.CREATING, JobStatus.RESOURCE_IN_PROGRESS, JobType.ResourceInProgressStatus);
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), endsWith(SERVICE_INSTANCE_ID + "/vnfs/" + VNF_INSTANCE_ID + "/vfModules"), any())).thenReturn(
+            createResponse(200, UUID.randomUUID().toString(), VF_MODULE_REQUEST_ID2));
 
         //mock mso to answer for vf module orchestration request
-        reset(restMso);
         when(restMso.GetForObject(endsWith(VF_MODULE_REQUEST_ID2), eq(AsyncRequestStatus.class))).thenReturn(
-                asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
-        pullMultipleJobsFindExpectedProcessAndPushBack(JobStatus.RESOURCE_IN_PROGRESS, JobType.ResourceInProgressStatus, JobStatus.COMPLETED, JobType.ResourceInProgressStatus);
+            asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
 
-        //execute twice - 1 for parent volume group, 1 for parent vnf
-        pullAllJobProcessAndPushBackByType(JobStatus.RESOURCE_IN_PROGRESS, JobType.Watching , JobStatus.COMPLETED);
-
-        singleServicesAndAssertStatus(JobStatus.IN_PROGRESS, uuid);
-        pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, JobStatus.COMPLETED, true);
-        singleServicesAndAssertStatus(JobStatus.COMPLETED, uuid);
+        processJobsCountTimesAndAssertStatus(uuid, 200, COMPLETED);
+        verify(restMso, times(1)).restCall(eq(HttpMethod.POST), any(), any(), eq("/serviceInstantiation/v7/serviceInstances"), any());
+        verify(restMso, times(1)).restCall(eq(HttpMethod.POST), any(), any(), endsWith(SERVICE_INSTANCE_ID + "/vnfs"), any());
+        verify(restMso, times(1)).restCall(eq(HttpMethod.POST), any(), any(), endsWith(SERVICE_INSTANCE_ID + "/vnfs/" + VNF_INSTANCE_ID + "/volumeGroups"), any());
+        verify(restMso, times(2)).restCall(eq(HttpMethod.POST), any(), any(), endsWith(SERVICE_INSTANCE_ID + "/vnfs/" + VNF_INSTANCE_ID + "/vfModules"), any());
+        verify(restMso, times(5)).GetForObject(any(), any());
     }
 
-    //@Test
+    @Test
+    public void testALaCarteLifeCycle2Networks() {
+
+        //Create Service with 2 networks, and make sure they created in sequence (and not in parallel)
+        //Config MSO to response 200 only to first network creation. And answer 500 for second one.
+        //Then MSO return in_progress some times (like 10 times), and then return COMPLETE.
+        //Only when MSO return COMPLETE for first network, config MSO to return 200 for second network creation
+
+        final String SERVICE_REQUEST_ID = UUID.randomUUID().toString();
+        final String SERVICE_INSTANCE_ID = UUID.randomUUID().toString();
+        final String NETWORK_REQUEST_ID1 = UUID.randomUUID().toString();
+        final String NETWORK_INSTANCE_ID1 = UUID.randomUUID().toString();
+        //TODO use them later for different networks
+        final String NETWORK_REQUEST_ID2 = UUID.randomUUID().toString();
+        final String NETWORK_INSTANCE_ID2 = UUID.randomUUID().toString();
+
+
+        NetworkDetails networkDetails1 = new NetworkDetails("LukaDoncic", "1");
+        NetworkDetails networkDetails2 = new NetworkDetails("KevinDurant", "2");
+
+        reset(restMso);
+
+        /*---------- service -----------*/
+
+        //mock mso to answer 200 of create service instance request, verify STATUS in progress
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), endsWith("serviceInstances"), any())).thenReturn(
+            createResponse(200, SERVICE_INSTANCE_ID, SERVICE_REQUEST_ID));
+
+        //mock mso to answer COMPLETE for service instance create
+        when(restMso.GetForObject(endsWith(SERVICE_REQUEST_ID), eq(AsyncRequestStatus.class))).
+            thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
+
+        final MutableInt secondNetworkCode = new MutableInt(500);
+        final MutableInt inProgressCount = new MutableInt(0);
+
+        /*---------- network 1-----------*/
+
+        //mock mso to answer 200 of first create network instance request
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class),
+            MockitoHamcrest.argThat(jsonPartMatches("requestDetails.requestInfo.instanceName", equalTo(networkDetails1.name))) ,
+            endsWith(SERVICE_INSTANCE_ID + "/networks"), any())).thenReturn(
+            createResponse(200, NETWORK_INSTANCE_ID1, NETWORK_REQUEST_ID1));
+
+        //mock mso to answer IN_PROGRESS 10 times, and only then COMPLETE for first network
+        //Once COMPLETE, second network creation will return 200
+        when(restMso.GetForObject(endsWith(NETWORK_REQUEST_ID1), eq(AsyncRequestStatus.class))).
+            thenAnswer(x->{
+                String status;
+                if (inProgressCount.getValue()<10) {
+                    status = IN_PROGRESS_STR;
+                } else {
+                    secondNetworkCode.setValue(200);
+                    status = COMPLETE_STR;
+                }
+                inProgressCount.add(1);
+                return asyncRequestStatusResponseAsRestObject(status);
+            });
+
+        /*---------- network 2-----------*/
+
+        //mock MSO to return status code of secondNetworkCode (500 and 200 after first one COMPLETED)
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class),
+            MockitoHamcrest.argThat(jsonPartMatches("requestDetails.requestInfo.instanceName", equalTo(networkDetails2.name))) ,
+            endsWith(SERVICE_INSTANCE_ID + "/networks"), any())).thenAnswer(x->
+            createResponse(secondNetworkCode.intValue(), NETWORK_INSTANCE_ID2, NETWORK_REQUEST_ID2));
+
+//        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any() , endsWith(SERVICE_INSTANCE_ID + "/networks"), any())).thenReturn(
+//                createResponse(200, NETWORK_INSTANCE_ID1, NETWORK_REQUEST_ID1));
+        //mock mso to answer COMPLETE for network creation status,
+
+        when(restMso.GetForObject(endsWith(NETWORK_REQUEST_ID2), eq(AsyncRequestStatus.class))).
+            thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
+
+
+        /*---------- Create request and process it -----------*/
+        //push alacarte with 2 networks, verify STATUS pending
+        when(featureManager.isActive(Features.FLAG_EXP_CREATE_RESOURCES_IN_PARALLEL)).thenReturn(false);
+        ServiceInstantiation serviceInstantiation = generateALaCarteWithNetworksPayload(ImmutableList.of(networkDetails1, networkDetails2));
+        UUID uuid = asyncInstantiationBL.pushBulkJob(serviceInstantiation, USER_ID).get(0);
+        singleServicesAndAssertStatus(JobStatus.PENDING, uuid);
+
+        processJobsCountTimesAndAssertStatus(uuid, 200, COMPLETED);
+
+        //validate the mso request id is the right one
+        List<ServiceInfo> serviceInfoList = asyncInstantiationBL.getAllServicesInfo();
+        ServiceInfo serviceInfo = serviceInfoList.get(0);
+        assertThat(serviceInfo.getMsoRequestId(), is(UUID.fromString(SERVICE_REQUEST_ID)));
+
+        /*---------- verify -----------*/
+        verify(restMso, times(1)).restCall(eq(HttpMethod.POST), any(), any(), eq("/serviceInstantiation/v7/serviceInstances"), any());
+        verify(restMso, times(2)).restCall(eq(HttpMethod.POST), any(), any(), endsWith(SERVICE_INSTANCE_ID + "/networks"), any());
+        //get status
+        verify(restMso, times(1)).GetForObject(endsWith(SERVICE_REQUEST_ID), any());
+        verify(restMso, times(11)).GetForObject(endsWith(NETWORK_REQUEST_ID1), any());
+        verify(restMso, times(1)).GetForObject(endsWith(NETWORK_REQUEST_ID2), any());
+    }
+
+    @Test
     public void testBadAaiResponseForSearchNamesAndBackToNormal() {
         when(aaiClient.isNodeTypeExistsByName(any(), any())).thenThrow(aaiNodeQueryBadResponseException());
-        pushMacroBulk();        //JOB shall become IN_PROGRESS but service info is still pending
-        Job job = pullJobProcessAndPushBack(PENDING, JobStatus.IN_PROGRESS, true);
-        listServicesAndAssertStatus(PENDING, PENDING, job);
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), any(), eq(Optional.empty()))).thenReturn(createResponse(200));
+        when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).
+            thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
 
-        //JOB shall remain in IN_PROGRESS
-        job = pullJobProcessAndPushBack( JobStatus.IN_PROGRESS, JobStatus.IN_PROGRESS, true);
-        //make sure the job command is still ServiceInstantiation
-        assertThat(job.getType(), is(JobType.MacroServiceInstantiation));
-        listServicesAndAssertStatus(PENDING, PENDING, job);
+        List<UUID> uuids = pushMacroBulk();
+        processJobsCountTimesAndAssertStatus(uuids.get(0), 5, IN_PROGRESS, PENDING);  //JOB shall become IN_PROGRESS but service info is still pending
 
         //simulate AAI back to normal, AAI return name is free, and MSO return good response
         Mockito.reset(aaiClient); // must forget the "thenThrow"
         when(aaiClient.isNodeTypeExistsByName(any(), any())).thenReturn(false);
-        when(restMso.PostForObject(any(),any(), eq(RequestReferencesContainer.class))).thenReturn(createResponse(200));
-        job = pullJobProcessAndPushBack( JobStatus.IN_PROGRESS, JobStatus.IN_PROGRESS, true);
-        listServicesAndAssertStatus(JobStatus.IN_PROGRESS, PENDING, job);
+        processJobsCountTimesAndAssertStatus(uuids.get(0), 30, COMPLETED, COMPLETED);
 
-        //when get job COMPLETE from MSO, service status become COMPLETED
-        when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).
-                thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
-        job = pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, COMPLETED);
-        listServicesAndAssertStatus(COMPLETED, PENDING, job);
     }
 
-    //@Test
+    @Test
     public void testAaiResponseNameUsedTillMaxRetries() {
         when(aaiClient.isNodeTypeExistsByName(any(), any())).thenReturn(true);
+        //simulate MSO to return good result, for making sure we failed because of AAI error
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), any(), eq(Optional.empty()))).thenReturn(createResponse(200));
+        when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).
+            thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
+
         asyncInstantiationBL.setMaxRetriesGettingFreeNameFromAai(10);
-        pushMacroBulk();
-        //JOB shall become IN_PROGRESS but service info is still pending
-        Job job = pullJobProcessAndPushBack(PENDING, JobStatus.FAILED, true);
-        listServicesAndAssertStatus(JobStatus.FAILED, JobStatus.STOPPED, job);
+        List<UUID> uuids = pushMacroBulk();
+        processJobsCountTimesAndAssertStatus(uuids.get(0), 20, FAILED, STOPPED);
     }
 
     private Job pullJobProcessAndPushBack(JobStatus topic, JobStatus expectedNextJobStatus) {
@@ -559,22 +610,23 @@
         return job.get();
     }
 
+    private void simplePullJobProcessAndPushBack(JobStatus topic) {
+        Optional<Job> optionalJob =  jobsBrokerService.pull(topic, randomUuid());
+        optionalJob.ifPresent(job->{
+            Job nextJob = jobWorker.executeJobAndGetNext(job);
+            jobsBrokerService.pushBack(nextJob);
+        });
+    }
+
     private Job pullJobProcessAndPushBackWithTypeAssertion(JobStatus topic, JobStatus expectedNextJobStatus,
-                                                           JobType expectedNextJobType) {
+        JobType expectedNextJobType) {
         Job job = pullJobProcessAndPushBack(topic, expectedNextJobStatus, false);
         assertThat("job not ok: " + job.getData(), job.getType(), is(expectedNextJobType));
         return job;
     }
 
     private Job pullJobProcessAndPushBackWithTypeAssertion(JobStatus topic, JobStatus expectedNextJobStatus,
-                                                           JobType expectedNextJobType, int retries) {
-        return retryWithAssertionsLimit(retries, () -> {
-            return pullJobProcessAndPushBackWithTypeAssertion(topic, expectedNextJobStatus, expectedNextJobType);
-        });
-    }
-
-    private Job pullJobProcessAndPushBackWithTypeAssertion(JobStatus topic, JobStatus expectedNextJobStatus,
-                                                           JobType expectedNextJobType, Action actionPhase, InternalState internalState, int retries) {
+        JobType expectedNextJobType, Action actionPhase, InternalState internalState, int retries) {
         return retryWithAssertionsLimit(retries, () -> {
             Job job = pullJobProcessAndPushBackWithTypeAssertion(topic, expectedNextJobStatus, expectedNextJobType);
             assertThat("job not ok: " + job.getData(), job.getData(), is(jsonPartEquals("actionPhase", actionPhase.name())));
@@ -598,49 +650,11 @@
 
         // No success:
         throw new AssertionError("No luck while all of these assertion errors: " + history.stream()
-                .map(Throwable::getMessage)
-                .map(s -> s.replace('\n', ' '))
-                .map(s -> s.replaceAll("\\s{2,}"," "))
-                .distinct()
-                .collect(joining("\n   ", "\n   ", "")), history.peek());
-    }
-
-    private Job pullMultipleJobsFindExpectedProcessAndPushBack(JobStatus topic, JobType expectedCurrentJobType, JobStatus expectedNextJobStatus,
-                                                               JobType expectedNextJobType) {
-        List<Job> pulledJobs = new ArrayList<>();
-        Job lastJob = null;
-        while (lastJob == null || lastJob.getType() != expectedCurrentJobType) {
-            lastJob = pullJob(topic, false).get();
-            if (lastJob.getType() != expectedCurrentJobType) {
-                pulledJobs.add(lastJob);
-            }
-        }
-
-        Job nextJob = jobWorker.executeJobAndGetNext(lastJob);
-        assertThat(nextJob.getStatus(), is(expectedNextJobStatus));
-        assertThat(nextJob.getType(), is(expectedNextJobType));
-
-        jobsBrokerService.pushBack(nextJob);
-        assertThat(jobsBrokerService.peek(nextJob.getUuid()).getStatus(), is(expectedNextJobStatus));
-
-        pulledJobs.forEach(job ->
-                jobsBrokerService.pushBack(job)
-        );
-
-        return nextJob;
-    }
-
-    private void pullAllJobProcessAndPushBackByType(JobStatus topic, JobType commandType, JobStatus expectedFinalStatus) {
-        Map<UUID, JobStatus> jobStatusMap = new HashMap<>();
-        Optional<Job> job = pullJob(topic, false);
-        for (int i=0; i<1000 && job.isPresent() && job.get().getType() == commandType; i++) {
-            Job nextJob = jobWorker.executeJobAndGetNext(job.get());
-            jobStatusMap.put(nextJob.getUuid(), nextJob.getStatus());
-            jobsBrokerService.pushBack(nextJob);
-            job = jobsBrokerService.pull(topic, UUID.randomUUID().toString());
-        }
-        assertThat(jobStatusMap.values(), everyItem(is(expectedFinalStatus)));
-
+            .map(Throwable::getMessage)
+            .map(s -> s.replace('\n', ' '))
+            .map(s -> s.replaceAll("\\s{2,}"," "))
+            .distinct()
+            .collect(joining("\n   ", "\n   ", "")), history.peek());
     }
 
     private Optional<Job> pullJob(JobStatus topic, boolean pullingAssertion) {
@@ -665,49 +679,37 @@
     }
 
 
-    //@Test
+    @Test
     public void whenPushNewBulk_andGetNoResponseFromMsoOnCreation_thenServiceMoveToFailedAndOtherToStopped() {
-        when(restMso.PostForObject(any(), any(), eq(RequestReferencesContainer.class))).thenReturn(createResponse(500));
-        pushBulkPullPendingJobAndAssertJobStatus(JobStatus.FAILED, JobStatus.STOPPED);
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), any(), eq(Optional.empty()))).thenReturn(createResponse(500));
+        //assert that when get ProcessingException from restMso, status remain the same
+        List<UUID> uuids = pushMacroBulk();
+        processJobsCountTimesAndAssertStatus(uuids.get(0), 30, JobStatus.FAILED, JobStatus.STOPPED);
     }
 
-    //@Test
+    @Test
     public void whenMsoStatusIsPendingManualTask_ThenJobStatusIsPaused() {
-        when(restMso.PostForObject(any(), any(), eq(RequestReferencesContainer.class))).thenReturn(createResponse(200));
-
-        Job firstJob = pushBulkPullPendingJobAndAssertJobStatus(JobStatus.IN_PROGRESS, PENDING);
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), any(), eq(Optional.empty()))).thenReturn(createResponse(200));
+        when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).
+            thenReturn(asyncRequestStatusResponseAsRestObject(PENDING_MANUAL_TASK));
 
         //assert that when get ProcessingException from restMso, status remain the same
-        when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).
-                thenReturn(asyncRequestStatusResponseAsRestObject(PENDING_MANUAL_TASK));
-        Job job =  pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, JobStatus.IN_PROGRESS);
-        listServicesAndAssertStatus(PAUSE, PENDING, job);
+        List<UUID> uuids = pushMacroBulk();
+        processJobsCountTimesAndAssertStatus(uuids.get(0), 30, PAUSE, PENDING);
 
-        //The paused job is pulled and remain in pause state. Other jobs from bulk remain pending
-        job =  pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, JobStatus.IN_PROGRESS);
-        listServicesAndAssertStatus(PAUSE, PENDING, job);
 
         //the job get IN_PROGRESS response (simulate activate operation) and status changed to IN_PROGRESS
         when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).
-                thenReturn(asyncRequestStatusResponseAsRestObject(IN_PROGRESS_STR));
-        job =  pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, JobStatus.IN_PROGRESS);
-        listServicesAndAssertStatus(JobStatus.IN_PROGRESS, PENDING, job);
+            thenReturn(asyncRequestStatusResponseAsRestObject(IN_PROGRESS_STR));
+        processJobsCountTimesAndAssertStatus(uuids.get(0), 30, IN_PROGRESS, PENDING);
 
+        //the job get COMPLETE response this job is copmpleted and then also other jobs
         when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).
-                thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
-        job =  pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, COMPLETED);
-        listServicesAndAssertStatus(COMPLETED, PENDING, job);
-
-        //Pulling PENDING job return another job
-        assertThat(jobsBrokerService.pull(PENDING, randomUuid()).get().getUuid(), not(equalTo(job.getUuid())));
-
-
-        ImmutableList<String> expectedStatusesForMso = ImmutableList.of(REQUESTED, PENDING_MANUAL_TASK, IN_PROGRESS_STR, COMPLETE_STR);
-        List<String> msoStatuses = asyncInstantiationBL.getAuditStatuses(firstJob.getUuid(), MSO).stream().map(x -> x.getJobStatus()).collect(Collectors.toList());
-        assertThat(msoStatuses, is(expectedStatusesForMso));
+            thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
+        processJobsCountTimesAndAssertStatus(uuids.get(0), 200, COMPLETED, COMPLETED);
 
         ImmutableList<String> expectedStatusesForVid = statusesToStrings(PENDING, IN_PROGRESS, PAUSE, IN_PROGRESS, COMPLETED);
-        List<String> vidStatuses = asyncInstantiationBL.getAuditStatuses(firstJob.getUuid(), VID).stream().map(x -> x.getJobStatus()).collect(Collectors.toList());
+        List<String> vidStatuses = auditService.getAuditStatuses(uuids.get(0), VID).stream().map(x -> x.getJobStatus()).collect(Collectors.toList());
         assertThat(vidStatuses, is(expectedStatusesForVid));
     }
 
@@ -718,65 +720,76 @@
 
     private Job pullPendingJobAndAssertJobStatus(JobStatus pulledJobStatus, JobStatus otherJobsStatus) {
         Job job = pullJobProcessAndPushBack(PENDING, pulledJobStatus, false);
-        listServicesAndAssertStatus(pulledJobStatus, otherJobsStatus, job);
+        listServicesAndAssertStatus(pulledJobStatus, otherJobsStatus, job.getUuid());
         return job;
     }
 
-    //@Test
+    @Test
     public void test2BulksLifeCyclesAreIndependent() {
-        pushMacroBulk();
-        when(restMso.PostForObject(any(), any(), eq(RequestReferencesContainer.class))).thenReturn(createResponse(200));
-        //push 2nd job, then when pulling first job the job become in_progress, other jobs (from 2 bulks) remain pending
-        Job firstJob = pushBulkPullPendingJobAndAssertJobStatus(JobStatus.IN_PROGRESS, PENDING);
 
-        //assert we can pull another job from pending from other template id
-        Job secondJob = pullJobProcessAndPushBack(PENDING, JobStatus.IN_PROGRESS, false);
-        assertThat(firstJob.getTemplateId(), not(equalTo(secondJob.getTemplateId())));
+        final String SERVICE1_REQUEST_ID = UUID.randomUUID().toString();
+        final String SERVICE1_INSTANCE_ID = UUID.randomUUID().toString();
+        final String SERVICE2_REQUEST_ID = UUID.randomUUID().toString();
+        final String SERVICE2_INSTANCE_ID = UUID.randomUUID().toString();
+        final String SERVICE3_4_REQUEST_ID = UUID.randomUUID().toString();
+        final String SERVICE3_4_INSTANCE_ID = UUID.randomUUID().toString();
 
-        //assert no more PENDING jobs to pull
-        assertFalse(jobsBrokerService.pull(PENDING, randomUuid()).isPresent());
 
-        //when get FAILED status from MSO statuses for failed bulk are: FAILED, STOPPED, for other bulk: IN_PROGRESS, 2 pending
-        when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).
-                thenReturn(asyncRequestStatusResponseAsRestObject(FAILED_STR));
-        Job failedJob = pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, JobStatus.FAILED, false);
+        //create first bulk and make one job in progress
+        List<UUID> firstBulksIDs = pushMacroBulk();
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), any(), eq(Optional.empty())))
+            .thenReturn(createResponse(200, SERVICE1_INSTANCE_ID, SERVICE1_REQUEST_ID));
+        when(restMso.GetForObject(endsWith(SERVICE1_REQUEST_ID), eq(AsyncRequestStatus.class))).
+            thenReturn(asyncRequestStatusResponseAsRestObject(IN_PROGRESS_STR));
+        processJobsCountTimesAndAssertStatus(firstBulksIDs.get(0), 30, IN_PROGRESS, PENDING);
+
+        //create 2nd bulk, then when pulling first job the job become in_progress, other jobs (from 2 bulks) remain pending
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), any(), eq(Optional.empty())))
+            .thenReturn(createResponse(200, SERVICE2_INSTANCE_ID, SERVICE2_REQUEST_ID));
+        when(restMso.GetForObject(endsWith(SERVICE2_REQUEST_ID), eq(AsyncRequestStatus.class))).
+            thenReturn(asyncRequestStatusResponseAsRestObject(IN_PROGRESS_STR));
+        List<UUID> secondBulksIDs = pushMacroBulk();
+        processJobsCountTimes(30);
+        Map<JobStatus, Long> statusCount = getJobStatusesCount();
+        assertThat(statusCount.get(IN_PROGRESS), is(2L));
+        assertThat(statusCount.get(PENDING), is(4L));
+
+        //return failed to first job
+        //first bulk statuses shall be: FAILED, STOPPED, STOPPED
+        //second bulk statuses shall be: IN_PROGRESS, PENDING, PENDING
+        when(restMso.GetForObject(endsWith(SERVICE1_REQUEST_ID), eq(AsyncRequestStatus.class))).
+            thenReturn(asyncRequestStatusResponseAsRestObject(FAILED_STR));
+        processJobsCountTimes(30);
         Map<UUID, List<ServiceInfo>> servicesByTemplateId =
-                asyncInstantiationBL.getAllServicesInfo()
-                        .stream().collect(groupingBy(ServiceInfo::getTemplateId));
-        assertServicesStatus(servicesByTemplateId.get(failedJob.getTemplateId()), JobStatus.FAILED, JobStatus.STOPPED, failedJob);
-        Job successJob = failedJob.getUuid().equals(firstJob.getUuid()) ? secondJob : firstJob;
-        assertServicesStatus(servicesByTemplateId.get(successJob.getTemplateId()), JobStatus.IN_PROGRESS, PENDING, successJob);
+            asyncInstantiationBL.getAllServicesInfo()
+                .stream().collect(groupingBy(ServiceInfo::getTemplateId));
+        ServiceInfo failedJob = asyncInstantiationBL.getAllServicesInfo().stream().filter(x->x.getJobId().equals(firstBulksIDs.get(0))).findFirst().get();
+        assertServicesStatus(servicesByTemplateId.get(failedJob.getTemplateId()), JobStatus.FAILED, JobStatus.STOPPED, failedJob.getJobId());
+        ServiceInfo successJob = asyncInstantiationBL.getAllServicesInfo().stream().filter(x->x.getJobId().equals(secondBulksIDs.get(0))).findFirst().get();
+        assertServicesStatus(servicesByTemplateId.get(successJob.getTemplateId()), JobStatus.IN_PROGRESS, PENDING, successJob.getJobId());
 
-        //yet no more PENDING jobs to pull
-        assertFalse(jobsBrokerService.pull(PENDING, randomUuid()).isPresent());
+        //return completed to all other jobs
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), any(), eq(Optional.empty())))
+            .thenReturn(createResponse(200, SERVICE3_4_INSTANCE_ID, SERVICE3_4_REQUEST_ID));
+        when(restMso.GetForObject(endsWith(SERVICE2_REQUEST_ID), eq(AsyncRequestStatus.class))).
+            thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
+        when(restMso.GetForObject(endsWith(SERVICE3_4_REQUEST_ID), eq(AsyncRequestStatus.class))).
+            thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
 
-        //assert that job from non failed bulk can progress.
-        //When completed,  failed bulk statuses: FAILED, STOPPED. Succeeded bulk statuses are : COMPLETED, 2 pending
-        when(restMso.GetForObject(any(), eq(AsyncRequestStatus.class))).
-                thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
-        pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, COMPLETED, false);
-        servicesByTemplateId =
-                asyncInstantiationBL.getAllServicesInfo()
-                        .stream().collect(groupingBy(ServiceInfo::getTemplateId));
-        assertServicesStatus(servicesByTemplateId.get(failedJob.getTemplateId()), JobStatus.FAILED, JobStatus.STOPPED, failedJob);
-        assertServicesStatus(servicesByTemplateId.get(successJob.getTemplateId()), COMPLETED, PENDING, successJob);
-
-        //advance other jobs of succeeded bulk till al of them reach to COMPLETED
-        pullJobProcessAndPushBack(PENDING, JobStatus.IN_PROGRESS, false);
-        pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, COMPLETED, false);
-        pullJobProcessAndPushBack(PENDING, JobStatus.IN_PROGRESS, false);
-        pullJobProcessAndPushBack(JobStatus.IN_PROGRESS, COMPLETED, false);
-        servicesByTemplateId =
-                asyncInstantiationBL.getAllServicesInfo()
-                        .stream().collect(groupingBy(ServiceInfo::getTemplateId));
-        assertServicesStatus(servicesByTemplateId.get(failedJob.getTemplateId()), JobStatus.FAILED, JobStatus.STOPPED, failedJob);
-        assertServicesStatus(servicesByTemplateId.get(successJob.getTemplateId()), COMPLETED, COMPLETED, successJob);
-
+        processJobsCountTimes(30);
+        servicesByTemplateId = asyncInstantiationBL.getAllServicesInfo().stream().collect(groupingBy(ServiceInfo::getTemplateId));
+        assertServicesStatus(servicesByTemplateId.get(failedJob.getTemplateId()), JobStatus.FAILED, JobStatus.STOPPED, failedJob.getJobId());
+        assertServicesStatus(servicesByTemplateId.get(successJob.getTemplateId()), COMPLETED, COMPLETED, successJob.getJobId());
         //assert no more PENDING jobs nor IN_PROGRESS jobs to pull
         assertFalse(jobsBrokerService.pull(PENDING, randomUuid()).isPresent());
         assertFalse(jobsBrokerService.pull(JobStatus.IN_PROGRESS, randomUuid()).isPresent());
     }
 
+    protected Map<JobStatus, Long> getJobStatusesCount() {
+        return asyncInstantiationBL.getAllServicesInfo().stream().collect(groupingBy(ServiceInfo::getJobStatus, counting()));
+    }
+
+    @Test
     public void deploy2NewGroupsToServiceWith1ExistingGroup() {
 
         /*
@@ -795,18 +808,7 @@
         [v]  + pull+execute  (should NOT post to MSO)
         [v]    verify STATUS in progress; TYPE watching
                ...
-        [v]    verify job#2 *new* GROUP job STATUS completed with no action TYPE group INTERNAL STATE terminal PHASE delete
-        [v]    verify job#3 *new* GROUP job STATUS completed with no action TYPE group INTERNAL STATE terminal PHASE delete
-        [v]    verify job#4 *new* GROUP job STATUS completed with no action TYPE group INTERNAL STATE terminal PHASE delete
 
-        [v]  + pull+execute job#1 (should NOT post to MSO)
-        [v]    verify STATUS in progress; TYPE watching
-        [v]    verify job#5 *new* GROUP job STATUS creating TYPE group INTERNAL STATE initial PHASE create
-        [v]    verify job#6 *new* GROUP job STATUS creating TYPE group INTERNAL STATE initial PHASE create
-        [v]    verify job#7 *new* GROUP job STATUS creating TYPE group INTERNAL STATE initial PHASE create
-
-        [v]  + pull+execute job#5 (should NOT post to MSO)
-        [v]    verify job#5 STATUS completed with no action TYPE group INTERNAL STATE terminal PHASE create
         [v]  + pull+execute job#1
         [v]    verify job#1 STATUS in progress; TYPE watching
 
@@ -845,70 +847,265 @@
         singleServicesAndAssertStatus(PENDING, uuid);
 
         // take from pending, put in-progress -> 3 delete-child were born
-        pullJobProcessAndPushBackWithTypeAssertion(PENDING, IN_PROGRESS, JobType.ALaCarteService, Action.Delete, InternalState.WATCHING, 1);
+        pullJobProcessAndPushBackWithTypeAssertion(PENDING, IN_PROGRESS, JobType.ALaCarteService, Action.Create, InternalState.INITIAL, 1);
         verifyQueueSizes(ImmutableMap.of(
-                IN_PROGRESS, 1, CREATING, 3
-        ));
-
-        Stream.of(1, 2, 3).forEach(i -> {
-            // take each child creating, put in-progress
-            verify_Job1InProgress.accept(Action.Delete, IN_PROGRESS);
-            pullJobProcessAndPushBackWithTypeAssertion(CREATING, RESOURCE_IN_PROGRESS, JobType.InstanceGroup, Action.Delete, null, 1);
-
-            // execute each in-progress -> job is completed
-            verify_Job1InProgress.accept(Action.Delete, IN_PROGRESS);
-            pullJobProcessAndPushBackWithTypeAssertion(RESOURCE_IN_PROGRESS, COMPLETED/*_WITH_NO_ACTION*/, JobType.InstanceGroup,1);
-        });
-        verifyQueueSizes(ImmutableMap.of(
-                IN_PROGRESS, 1, COMPLETED, 3
+            IN_PROGRESS, 1
         ));
 
         // take job #1 from phase delete to phase create -> 3 create-child were born
         verify_Job1InProgress.accept(Action.Create, IN_PROGRESS);
         verifyQueueSizes(ImmutableMap.of(
-                IN_PROGRESS, 1, CREATING, 3, COMPLETED, 3
+            IN_PROGRESS, 1, PENDING_RESOURCE, 3
         ));
 
         // prepare MSO mock
-        when(restMso.PostForObject(any(), endsWith("instanceGroups"), eq(RequestReferencesContainer.class)))
-                .thenReturn(createResponse(200, GROUP1_INSTANCE_ID, GROUP1_REQUEST_ID))
-                .thenReturn(createResponse(200, GROUP2_INSTANCE_ID, GROUP2_REQUEST_ID))
-                .thenReturn(null);
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), endsWith("instanceGroups"), eq(Optional.empty())))
+            .thenReturn(createResponse(200, GROUP1_INSTANCE_ID, GROUP1_REQUEST_ID))
+            .thenReturn(createResponse(200, GROUP2_INSTANCE_ID, GROUP2_REQUEST_ID))
+            .thenReturn(null);
         when(restMso.GetForObject(argThat(uri -> StringUtils.endsWithAny(uri, GROUP1_REQUEST_ID, GROUP2_REQUEST_ID)), eq(AsyncRequestStatus.class))).
-                thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
+            thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
 
-        // take first "none" child from creating to completed
+        // take first "none" child from creating to COMPLETED_WITH_NO_ACTION
         // note there's no concrete mechanism that makes the first child be
-        // the "action=None" case, but that's what happens, and following line
+        // the "action=None" case, but that's what happens, and following lines
         // relies on that fact.
-        pullJobProcessAndPushBackWithTypeAssertion(CREATING, COMPLETED_WITH_NO_ACTION, JobType.InstanceGroupInstantiation, 1);
+        pullJobProcessAndPushBackWithTypeAssertion(PENDING_RESOURCE, COMPLETED_WITH_NO_ACTION, JobType.InstanceGroup, Action.Create, null, 1);
 
         // take each of next two children from creating to in-progress, then to completed
         // verify job #1 is watching, and MSO is getting requests
         Stream.of(1, 2).forEach(i -> {
             verify_Job1InProgress.accept(Action.Create, IN_PROGRESS);
-            pullJobProcessAndPushBackWithTypeAssertion(CREATING, RESOURCE_IN_PROGRESS, JobType.ResourceInProgressStatus);
-            verify(restMso, times(i)).PostForObject(any(), any(), any());
+            pullJobProcessAndPushBackWithTypeAssertion(PENDING_RESOURCE, RESOURCE_IN_PROGRESS, JobType.InstanceGroup, Action.Create, InternalState.IN_PROGRESS, 1);
+            verify(restMso, times(i)).restCall(any(), any(), any(), any(), any());
 
             verify_Job1InProgress.accept(Action.Create, IN_PROGRESS);
-            pullJobProcessAndPushBackWithTypeAssertion(RESOURCE_IN_PROGRESS, COMPLETED, JobType.ResourceInProgressStatus);
+            pullJobProcessAndPushBackWithTypeAssertion(RESOURCE_IN_PROGRESS, COMPLETED, JobType.InstanceGroup, Action.Create, null, 3);
             verify(restMso, times(i)).GetForObject(any(), any());
         });
 
         // job #1 is done as all children are done
         verify_Job1InProgress.accept(Action.Create, COMPLETED);
-        verifyQueueSizes(ImmutableMap.of(COMPLETED, 7));
+        verifyQueueSizes(ImmutableMap.of(COMPLETED, 3, COMPLETED_WITH_NO_ACTION, 1));
     }
 
+    @DataProvider
+    public static Object[][] createAndDeleteIntegrationTestDataProvider(Method test) {
+        return new Object[][]{
+            {"create and delete both bad http code", createResponse(400), createResponse(500), null, null, FAILED, 0},
+            {"create and delete success and status is success ", createResponseRandomIds(202), createResponseRandomIds(202),
+                asyncRequestStatusResponseAsRestObject(COMPLETE_STR), asyncRequestStatusResponseAsRestObject(COMPLETE_STR), COMPLETED, 2},
+            {"create and delete success, create status FAILED, delete status COMPLETED", createResponseRandomIds(202), createResponseRandomIds(202),
+                asyncRequestStatusResponseAsRestObject(FAILED_STR), asyncRequestStatusResponseAsRestObject(COMPLETE_STR), COMPLETED_WITH_ERRORS, 2},
+            {"create and delete success, create status FAILED, delete status FAILED", createResponseRandomIds(202), createResponseRandomIds(202),
+                asyncRequestStatusResponseAsRestObject(FAILED_STR), asyncRequestStatusResponseAsRestObject(FAILED_STR), FAILED, 2},
+            {"create success but delete failed and status is success ", createResponseRandomIds(202), createResponseRandomIds(400),
+                asyncRequestStatusResponseAsRestObject(COMPLETE_STR), null, COMPLETED_WITH_ERRORS, 1},
+            {"delete success but create failed and status is success ", createResponseRandomIds(400), createResponseRandomIds(202),
+                null, asyncRequestStatusResponseAsRestObject(COMPLETE_STR), COMPLETED_WITH_ERRORS, 1},
+            {"delete success but create failed and status of delete is FAILED ", createResponseRandomIds(400), createResponseRandomIds(202),
+                null, asyncRequestStatusResponseAsRestObject(FAILED_STR), FAILED, 1}
+        };
+    }
+
+    //this test is going along with AsyncInstantiationALaCarteApiTest.viewEditVnfGroup__verifyStatusAndAudit API test
+    //The API test has only the happy flow scenario, while this test also test additional MSO responses (mostly non happy)
+    @Test(dataProvider="createAndDeleteIntegrationTestDataProvider")
+    public void vnfGropingIntegrationTest(
+        String desc,
+        RestObject<RequestReferencesContainer> createGroupResponse,
+        RestObject<RequestReferencesContainer> deleteGroupResponse,
+        RestObject<AsyncRequestStatus> createStatusResponse,
+        RestObject<AsyncRequestStatus> deleteStatusResponse,
+        JobStatus expectedJobStatus,
+        int getStatusCounter) throws IOException {
+
+        UUID jobUUID = createAndDeleteIntegrationTest("/payload_jsons/VnfGroupCreate1Delete1None1Request.json",
+            "/serviceInstantiation/v7/instanceGroups",
+            createGroupResponse,
+            "/serviceInstantiation/v7/instanceGroups/VNF_GROUP1_INSTANCE_ID",
+            deleteGroupResponse,
+            createStatusResponse,
+            deleteStatusResponse,
+            expectedJobStatus,
+            getStatusCounter);
+
+        ServiceInstantiation bulkForRetry = asyncInstantiationBL.getBulkForRetry(jobUUID);
+        InstanceGroup vnfGroupShouldBeDeleted = bulkForRetry.getVnfGroups().get("groupingservicefortest..ResourceInstanceGroup..0:001");
+        InstanceGroup vnfGroupShouldBeCreated = bulkForRetry.getVnfGroups().get("groupingservicefortest..ResourceInstanceGroup..0");
+
+        if (deleteStatusResponse == null || deleteStatusResponse.get().request.requestStatus.getRequestState().equals(FAILED_STR)) {
+            assertThat(vnfGroupShouldBeDeleted.getAction(), equalTo(Action.Delete));
+            assertErrorForResource(vnfGroupShouldBeDeleted, deleteGroupResponse, deleteStatusResponse);
+        }
+
+        if (createStatusResponse == null || createStatusResponse.get().request.requestStatus.getRequestState().equals(FAILED_STR)) {
+            assertThat(vnfGroupShouldBeCreated.getAction(), equalTo(Action.Create));
+            assertErrorForResource(vnfGroupShouldBeCreated, createGroupResponse, createStatusResponse);
+        }
+    }
+
+    //this test is going along with AsyncInstantiationALaCarteApiTest3.delete1Create1VnfFromService API test
+    //The API test has only the happy flow scenario, while this test also test additional MSO responses (mostly non happy)
+    @Test(dataProvider="createAndDeleteIntegrationTestDataProvider")
+    public void vnfsIntegrationTest(
+        String desc,
+        RestObject<RequestReferencesContainer> createVnfResponse,
+        RestObject<RequestReferencesContainer> deleteVnfResponse,
+        RestObject<AsyncRequestStatus> createStatusResponse,
+        RestObject<AsyncRequestStatus> deleteStatusResponse,
+        JobStatus expectedJobStatus,
+        int getStatusCounter) throws IOException {
+
+        createAndDeleteIntegrationTest("/payload_jsons/vnfDelete1Create1Request.json",
+            "/serviceInstantiation/v7/serviceInstances/f8791436-8d55-4fde-b4d5-72dd2cf13cfb/vnfs",
+            createVnfResponse,
+            "/serviceInstantiation/v7/serviceInstances/f8791436-8d55-4fde-b4d5-72dd2cf13cfb/vnfs/VNF_INSTANCE_ID",
+            deleteVnfResponse,
+            createStatusResponse,
+            deleteStatusResponse,
+            expectedJobStatus,
+            getStatusCounter);
+    }
+
+    @Test(dataProvider="createAndDeleteIntegrationTestDataProvider")
+    public void vfModulesIntegrationTest(
+        String desc,
+        RestObject<RequestReferencesContainer> createVfModuleResponse,
+        RestObject<RequestReferencesContainer> deleteVfModuleResponse,
+        RestObject<AsyncRequestStatus> createStatusResponse,
+        RestObject<AsyncRequestStatus> deleteStatusResponse,
+        JobStatus expectedJobStatus,
+        int getStatusCounter) throws IOException, AsdcCatalogException {
+
+        when(featureManager.isActive(Features.FLAG_ASYNC_ALACARTE_VFMODULE)).thenReturn(true);
+        reset(commandUtils);
+        when(commandUtils.isVfModuleBaseModule("6b528779-44a3-4472-bdff-9cd15ec93450", "f8360508-3f17-4414-a2ed-6bc71161e8db")).thenReturn(true);
+        when(commandUtils.isVfModuleBaseModule("6b528779-44a3-4472-bdff-9cd15ec93450", "25284168-24bb-4698-8cb4-3f509146eca5")).thenReturn(false);
+
+        createAndDeleteIntegrationTest("/payload_jsons/vfModuleDelete1Create1None1Request.json",
+            "/serviceInstantiation/v7/serviceInstances/f8791436-8d55-4fde-b4d5-72dd2cf13cfb/vnfs/VNF_INSTANCE_ID/vfModules",
+            createVfModuleResponse,
+            "/serviceInstantiation/v7/serviceInstances/f8791436-8d55-4fde-b4d5-72dd2cf13cfb/vnfs/VNF_INSTANCE_ID/vfModules/VF_MODULE_INSTANCE_ID",
+            deleteVfModuleResponse,
+            createStatusResponse,
+            deleteStatusResponse,
+            expectedJobStatus,
+            getStatusCounter);
+    }
+
+    //this test is going along with AsyncInstantiationALaCarteApiTest.delete1Create1NetworkFromService API test
+    //The API test has only the happy flow scenario, while this test also test additional MSO responses (mostly non happy)
+    @Test(dataProvider="createAndDeleteIntegrationTestDataProvider")
+    public void networksIntegrationTest(
+        String desc,
+        RestObject<RequestReferencesContainer> createNetworkResponse,
+        RestObject<RequestReferencesContainer> deleteNetworkResponse,
+        RestObject<AsyncRequestStatus> createStatusResponse,
+        RestObject<AsyncRequestStatus> deleteStatusResponse,
+        JobStatus expectedJobStatus,
+        int getStatusCounter) throws IOException {
+
+        createAndDeleteIntegrationTest("/payload_jsons/networkDelete1Create1Request.json",
+            "/serviceInstantiation/v7/serviceInstances/f8791436-8d55-4fde-b4d5-72dd2cf13cfb/networks",
+            createNetworkResponse,
+            "/serviceInstantiation/v7/serviceInstances/f8791436-8d55-4fde-b4d5-72dd2cf13cfb/networks/NETWORK_INSTANCE_ID",
+            deleteNetworkResponse,
+            createStatusResponse,
+            deleteStatusResponse,
+            expectedJobStatus,
+            getStatusCounter);
+    }
+
+    private UUID createAndDeleteIntegrationTest(String payload,
+        String createPath,
+        RestObject<RequestReferencesContainer> createResponse,
+        String deletePath,
+        RestObject<RequestReferencesContainer> deleteResponse,
+        RestObject<AsyncRequestStatus> createStatusResponse,
+        RestObject<AsyncRequestStatus> deleteStatusResponse,
+        JobStatus expectedJobStatus,
+        int getStatusCounter) throws IOException {
+        UUID jobUUID = asyncInstantiationBL.pushBulkJob(
+            TestUtils.readJsonResourceFileAsObject(payload, ServiceInstantiation.class), "userId")
+            .get(0);
+
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), eq(createPath), any())).thenReturn(createResponse);
+        when(restMso.restCall(eq(HttpMethod.DELETE), eq(RequestReferencesContainer.class), any(), eq(deletePath), any())).thenReturn(deleteResponse);
+        if  (createStatusResponse!=null) {
+            when(restMso.GetForObject(endsWith(createResponse.get().getRequestReferences().getRequestId()), eq(AsyncRequestStatus.class))).thenReturn(createStatusResponse);
+        }
+        if  (deleteStatusResponse!=null) {
+            when(restMso.GetForObject(endsWith(deleteResponse.get().getRequestReferences().getRequestId()), eq(AsyncRequestStatus.class))).thenReturn(deleteStatusResponse);
+        }
+
+        processJobsCountTimesAndAssertStatus(jobUUID, 40, expectedJobStatus);
+
+        verify(restMso, times(1)).restCall(eq(HttpMethod.POST), any(), any(), eq(createPath), any());
+        verify(restMso, times(1)).restCall(eq(HttpMethod.DELETE), any(), any(), eq(deletePath), any());
+        verify(restMso, times(getStatusCounter)).GetForObject(any(), any());
+
+        return jobUUID;
+    }
+
+    @Test
+    public void whenCreateTransportService_thanExpectedPre1806MacroRequestSent() throws IOException {
+        UUID jobUUID = asyncInstantiationBL.pushBulkJob(generatePre1806MacroTransportServiceInstantiationPayload(null, null),"az2016").get(0);
+        RestObject<RequestReferencesContainer> createResponse = createResponseRandomIds(202);
+
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), eq("/serviceInstantiation/v7/serviceInstances"), any()))
+            .thenReturn(createResponse);
+        when(restMso.GetForObject(endsWith(createResponse.get().getRequestReferences().getRequestId()), eq(AsyncRequestStatus.class)))
+            .thenReturn(asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
+        processJobsCountTimesAndAssertStatus(jobUUID, 20, COMPLETED);
+
+        JsonNode expectedJson = TestUtils.readJsonResourceFileAsObject("/payload_jsons/pre_1806_macro_without_cloudConfiguration.json", JsonNode.class);
+        ArgumentCaptor<RequestDetailsWrapper> requestCaptor = ArgumentCaptor.forClass(RequestDetailsWrapper.class);
+        verify(restMso).restCall(any(), any(), requestCaptor.capture(), any(), any());
+        requestCaptor.getAllValues().forEach(x->assertJsonEquals(expectedJson, x));
+    }
+
+    private void assertErrorForResource(BaseResource resource,
+        RestObject<RequestReferencesContainer> deleteOrCreateResponse,
+        RestObject<AsyncRequestStatus> statusResponse) {
+        JobAuditStatus auditStatus = auditService.getResourceAuditStatus(resource.getTrackById());
+        assertThat(auditStatus, is(notNullValue()));
+        assertThat(auditStatus.getJobStatus(), equalTo(FAILED_STR));
+        if (statusResponse == null) {
+            String errorMessage = "Http Code:" + deleteOrCreateResponse.getStatusCode() + ", " + RAW_DATA_FROM_MSO;
+            assertThat(auditStatus.getAdditionalInfo(), equalTo(errorMessage));
+            assertThat(auditStatus.getRequestId(), is(nullValue()));
+        } else {
+            assertThat(auditStatus.getRequestId().toString(), equalTo(statusResponse.get().request.requestId));
+        }
+    }
+
+    protected void processJobsCountTimesAndAssertStatus(UUID serviceJobId, int times, JobStatus expectedStatus) {
+        processJobsCountTimes(times);
+        singleServicesAndAssertStatus(expectedStatus, serviceJobId);
+    }
+
+    private void processJobsCountTimes(int times) {
+        for (int i = 0; i < times; i++) {
+            WORKERS_TOPICS.forEach(this::simplePullJobProcessAndPushBack);
+        }
+    }
+
+    protected void processJobsCountTimesAndAssertStatus(UUID serviceJobId, int times, JobStatus expectedStatus, JobStatus otherJobsStatus) {
+        processJobsCountTimes(times);
+        listServicesAndAssertStatus(expectedStatus, otherJobsStatus, serviceJobId);
+    }
+
+
     private void verifyQueueSizes(ImmutableMap<JobStatus, Integer> expected) {
         final Collection<Job> peek = jobsBrokerService.peek();
         final Map<JobStatus, Long> jobTypes = peek.stream().collect(groupingBy(Job::getStatus, counting()));
-        assertThat(jobTypes, is(expected));
+        assertThat(jobTypes, jsonEquals(expected));
     }
 
-    private List<ServiceInfo> listServicesAndAssertStatus(JobStatus pulledJobStatus, JobStatus otherJobsStatus, Job job) {
+    private List<ServiceInfo> listServicesAndAssertStatus(JobStatus pulledJobStatus, JobStatus otherJobsStatus, UUID jobUUID) {
         List<ServiceInfo> serviceInfoList = asyncInstantiationBL.getAllServicesInfo();
-        assertServicesStatus(serviceInfoList, pulledJobStatus, otherJobsStatus, job);
+        assertServicesStatus(serviceInfoList, pulledJobStatus, otherJobsStatus, jobUUID);
 
         return serviceInfoList;
     }
@@ -922,9 +1119,15 @@
         return serviceInfo;
     }
 
-    private void assertServicesStatus(List<ServiceInfo> serviceInfoList, JobStatus pulledJobStatus, JobStatus otherJobsStatus, Job job) {
+    private boolean isServiceOnStatus(JobStatus expectedStatus) {
+        List<ServiceInfo> serviceInfoList = asyncInstantiationBL.getAllServicesInfo();
+        assertEquals(1, serviceInfoList.size());
+        return serviceInfoList.get(0).getJobStatus()==expectedStatus;
+    }
+
+    private void assertServicesStatus(List<ServiceInfo> serviceInfoList, JobStatus pulledJobStatus, JobStatus otherJobsStatus, UUID jobUUID) {
         serviceInfoList.forEach(si->{
-            if (si.getJobId().equals(job.getUuid())) {
+            if (si.getJobId().equals(jobUUID)) {
                 assertThat(si.getJobStatus(), is(pulledJobStatus));
             }
             else {
@@ -935,11 +1138,104 @@
 
     private void listServicesAndAssertStatus(Map<UUID, JobStatus> expectedJobStatusMap) {
         Map<UUID, JobStatus> actualStatuses = asyncInstantiationBL.getAllServicesInfo()
-                .stream().collect(Collectors.toMap(ServiceInfo::getJobId, ServiceInfo::getJobStatus));
+            .stream().collect(Collectors.toMap(ServiceInfo::getJobId, ServiceInfo::getJobStatus));
         assertThat(actualStatuses.entrySet(), equalTo(expectedJobStatusMap.entrySet()));
     }
 
     private String randomUuid() {
         return UUID.randomUUID().toString();
     }
+
+    @Test
+    public void whenResumeService_thanExpectedResumeRequestSent() throws IOException {
+        String instanceId = "a565e6ad-75d1-4493-98f1-33234b5c17e2"; //from feRequestResumeMacroService.json
+        String originalRequestId = "894089b8-f7f4-418d-81da-34186fd32670"; //from msoResponseGetRequestsOfServiceInstance.json
+        String resumeRequestId = randomUuid();
+        String userId = TestUtils.generateRandomAlphaNumeric(6);
+
+        //prepare mocks for get all requests for instance id
+        RestObject<AsyncRequestStatusList> getRequestByIdResponse = createAsyncRequestStatusListByInstanceId();
+        when(restMso.GetForObject(
+            eq("/orchestrationRequests/v7?filter=serviceInstanceId:EQUALS:" + instanceId),
+            eq(AsyncRequestStatusList.class)))
+            .thenReturn(getRequestByIdResponse);
+
+        //prepare mocks resume request
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), isNull(), eq(String.format("/orchestrationRequests/v7/%s/resume", originalRequestId)), eq(Optional.of(userId))))
+            .thenReturn(createResponse(202, instanceId, resumeRequestId));
+
+        //prepare mocks for get resume status
+        when(restMso.GetForObject(eq("/orchestrationRequests/v7/" + resumeRequestId), eq(AsyncRequestStatus.class)))
+            .thenReturn(asyncRequestStatusResponseAsRestObject(IN_PROGRESS_STR),
+                asyncRequestStatusResponseAsRestObject(IN_PROGRESS_STR),
+                asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
+
+
+        UUID jobUUID = asyncInstantiationBL.pushBulkJob(generateResumeMacroPayload(), userId).get(0);
+        processJobsCountTimesAndAssertStatus(jobUUID, 20, COMPLETED);
+        verify(restMso).GetForObject(
+            eq("/orchestrationRequests/v7?filter=serviceInstanceId:EQUALS:" + instanceId),
+            eq(AsyncRequestStatusList.class));
+        verify(restMso).restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), isNull(), eq(String.format("/orchestrationRequests/v7/%s/resume", originalRequestId)), eq(Optional.of(userId)));
+        verify(restMso, times(3)).GetForObject(eq("/orchestrationRequests/v7/" + resumeRequestId), eq(AsyncRequestStatus.class));
+    }
+
+    @Test
+    public void givenResumeRequest_whenMsoReturnBadResponse_thanJobIsFailed() throws IOException {
+        //there is no mocks for restMSO which means restMso return bad response...
+        UUID jobUUID = asyncInstantiationBL.pushBulkJob(generateResumeMacroPayload(), "abc").get(0);
+        processJobsCountTimesAndAssertStatus(jobUUID, 20, FAILED);
+    }
+
+    @NotNull
+    private RestObject<AsyncRequestStatusList> createAsyncRequestStatusListByInstanceId() throws IOException {
+        AsyncRequestStatusList asyncRequestStatusList = TestUtils.readJsonResourceFileAsObject(
+            "/payload_jsons/resume/msoResponseGetRequestsOfServiceInstance.json",
+            AsyncRequestStatusList.class);
+        RestObject<AsyncRequestStatusList> getRequestByIdResponse = new RestObject<>();
+        getRequestByIdResponse.set(asyncRequestStatusList);
+        getRequestByIdResponse.setStatusCode(200);
+        return getRequestByIdResponse;
+    }
+
+    private ServiceInstantiation generateResumeMacroPayload() throws IOException {
+        return TestUtils.readJsonResourceFileAsObject("/payload_jsons/resume/feRequestResumeMacroService.json", ServiceInstantiation.class);
+    }
+
+    @Test
+    public void whenUpgradingAvfModule_thanExpectedReplaceRequestSent() throws IOException {
+        String instanceId = "5d49c3b1-fc90-4762-8c98-e800170baa55"; //from feRequestResumeMacroService.json
+        String replaceRequestId = randomUuid();
+        String userId = "az2016";
+
+
+        //prepare mocks resume request
+        when(restMso.restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), any(), eq("/serviceInstantiation/v7/serviceInstances/e9993045-cc96-4f3f-bf9a-71b2a400a956/vnfs/5c9c2896-1fe6-4055-b7ec-d0a01e5f9bf5/vfModules/5d49c3b1-fc90-4762-8c98-e800170baa55/replace"), eq(Optional.of(userId))))
+            .thenReturn(createResponse(202, instanceId, replaceRequestId));
+
+
+        when(restMso.GetForObject(eq("/orchestrationRequests/v7/" + replaceRequestId), eq(AsyncRequestStatus.class)))
+            .thenReturn(asyncRequestStatusResponseAsRestObject(IN_PROGRESS_STR),
+                asyncRequestStatusResponseAsRestObject(IN_PROGRESS_STR),
+                asyncRequestStatusResponseAsRestObject(COMPLETE_STR));
+
+        ///orchestrationRequests/v7/0174b25a-dd81-45b7-b4af-0057bcc30857
+
+        when(featureManager.isActive(Features.FLAG_ASYNC_ALACARTE_VFMODULE)).thenReturn(true);
+        enableAddCloudOwnerOnMsoRequest();
+
+        UUID jobUUID = asyncInstantiationBL.pushBulkJob(generateReplaceVfModulePayload(), userId).get(0);
+        processJobsCountTimesAndAssertStatus(jobUUID, 20, COMPLETED);
+
+
+
+        JsonNode expectedJson = TestUtils.readJsonResourceFileAsObject("/payload_jsons/vfmodule/replace_vfmodule.json", JsonNode.class);
+        ArgumentCaptor<RequestDetailsWrapper> requestCaptor = ArgumentCaptor.forClass(RequestDetailsWrapper.class);
+        verify(restMso).restCall(eq(HttpMethod.POST), eq(RequestReferencesContainer.class), requestCaptor.capture(), eq("/serviceInstantiation/v7/serviceInstances/e9993045-cc96-4f3f-bf9a-71b2a400a956/vnfs/5c9c2896-1fe6-4055-b7ec-d0a01e5f9bf5/vfModules/5d49c3b1-fc90-4762-8c98-e800170baa55/replace"), eq(Optional.of(userId)));
+        requestCaptor.getAllValues().forEach(x->assertJsonEquals(expectedJson, x));
+    }
+
+    private ServiceInstantiation generateReplaceVfModulePayload() throws IOException {
+        return TestUtils.readJsonResourceFileAsObject("/payload_jsons/vfmodule/replace_vfmodule_fe_input.json", ServiceInstantiation.class);
+    }
 }
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/impl/DeleteOldJobsSchedulerInitializerTest.java b/vid-app-common/src/test/java/org/onap/vid/job/impl/DeleteOldJobsSchedulerInitializerTest.java
new file mode 100644
index 0000000..4944efa
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/job/impl/DeleteOldJobsSchedulerInitializerTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.job.impl;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.matchesPattern;
+import static org.mockito.Mockito.mock;
+import static org.onap.vid.testUtils.TestUtils.testWithSystemProperty;
+import static org.testng.Assert.assertEquals;
+
+import org.onap.vid.job.JobsBrokerService;
+import org.quartz.JobDetail;
+import org.quartz.impl.triggers.CronTriggerImpl;
+import org.testng.annotations.Test;
+
+public class DeleteOldJobsSchedulerInitializerTest {
+
+    @Test
+    public void testCreateJobDetail() throws Exception {
+        testWithSystemProperty("vid.asyncJob.howLongToKeepOldJobsInDays", "7", ()-> {
+            JobsBrokerService mockBroker = mock(JobsBrokerService.class);
+            DeleteOldJobsSchedulerInitializer underTest = new DeleteOldJobsSchedulerInitializer(mockBroker, null);
+            JobDetail jobDetail = underTest.createJobDetail();
+            assertEquals(DeleteOldJobsWorker.class, jobDetail.getJobClass());
+            assertEquals(mockBroker, jobDetail.getJobDataMap().get("jobsBrokerService"));
+            assertEquals(604800L, jobDetail.getJobDataMap().get("secondsAgo"));
+        });
+    }
+
+    @Test
+    public void testCreateTrigger() {
+        DeleteOldJobsSchedulerInitializer underTest = new DeleteOldJobsSchedulerInitializer(null, null);
+        CronTriggerImpl trigger = (CronTriggerImpl) underTest.createTrigger();
+        assertThat(trigger.getCronExpression(), matchesPattern("0 [1-5]?[0-9] 6 \\? \\* \\*"));
+    }
+
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/impl/DeleteOldJobsWorkerTest.java b/vid-app-common/src/test/java/org/onap/vid/job/impl/DeleteOldJobsWorkerTest.java
new file mode 100644
index 0000000..229e0ca
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/job/impl/DeleteOldJobsWorkerTest.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.vid.job.impl;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import org.onap.vid.job.JobsBrokerService;
+import org.quartz.JobExecutionException;
+import org.testng.annotations.Test;
+
+public class DeleteOldJobsWorkerTest {
+
+    @Test
+    public void whenExecuteInternal_thenCallToDeleteOldFinalJobs() throws JobExecutionException {
+        JobsBrokerService mockBroker = mock(JobsBrokerService.class);
+        long secondsAgo = 42L;
+        DeleteOldJobsWorker underTest = new DeleteOldJobsWorker();
+        underTest.setJobsBrokerService(mockBroker);
+        underTest.setSecondsAgo(secondsAgo);
+        underTest.executeInternal(null);
+        verify(mockBroker).deleteOldFinalJobs(secondsAgo);
+    }
+
+}
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/impl/JobAdapterTest.java b/vid-app-common/src/test/java/org/onap/vid/job/impl/JobAdapterTest.java
index f6785c3..4e11b7e 100644
--- a/vid-app-common/src/test/java/org/onap/vid/job/impl/JobAdapterTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/job/impl/JobAdapterTest.java
@@ -7,9 +7,9 @@
  * 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.
@@ -26,10 +26,15 @@
 import org.onap.vid.job.JobAdapter;
 import org.onap.vid.job.JobType;
 import org.onap.vid.job.command.JobCommandFactoryTest;
+import org.onap.vid.properties.Features;
+import org.onap.vid.testUtils.TestUtils;
 import org.testng.annotations.Test;
+import org.togglz.core.manager.FeatureManager;
 
 import java.util.UUID;
 
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNotEquals;
 import static org.testng.AssertJUnit.assertNotNull;
@@ -38,12 +43,14 @@
 
     @Test
     public void testCreateServiceInstantiationJob() {
-        JobAdapter jobAdapter = new JobAdapterImpl();
+        FeatureManager featureManager = mock(FeatureManager.class);
+        JobAdapter jobAdapter = new JobAdapterImpl(featureManager);
 
         JobType jobType = JobType.NoOp;
         JobAdapter.AsyncJobRequest request = new JobCommandFactoryTest.MockedRequest(42,"nothing");
         UUID templateId = UUID.randomUUID();
         String userId = "ou012t";
+        String testApi = "VNF_API";
         String optimisticUniqueServiceInstanceName = "optimisticUniqueServiceInstanceName";
         int indexInBulk = RandomUtils.nextInt();
         Job job = jobAdapter.createServiceInstantiationJob(
@@ -51,6 +58,7 @@
                 request,
                 templateId,
                 userId,
+                testApi,
                 optimisticUniqueServiceInstanceName,
                 indexInBulk
                 );
@@ -59,6 +67,7 @@
         assertEquals(job.getSharedData().getRequest(), request);
         assertEquals(job.getSharedData().getRequestType(), request.getClass());
         assertEquals(job.getSharedData().getUserId(), userId);
+        assertEquals(job.getSharedData().getTestApi(), testApi);
         assertEquals(job.getSharedData().getJobUuid(), job.getUuid());
         assertEquals(job.getSharedData().getRootJobId(), job.getUuid());
         assertNotNull(job.getUuid());
@@ -68,13 +77,16 @@
         assertEquals(job.getStatus(), Job.JobStatus.PENDING);
     }
 
-    @Test
-    public void testCreateChildJob() {
-
-        JobAdapter jobAdapter = new JobAdapterImpl();
+    @Test(dataProvider = "trueAndFalse", dataProviderClass = TestUtils.class)
+    public void testCreateChildJob(boolean isFlagExpCreateResourcesInParallel) {
+        FeatureManager featureManager = mock(FeatureManager.class);
+        when(featureManager.isActive(Features.FLAG_EXP_CREATE_RESOURCES_IN_PARALLEL)).thenReturn(isFlagExpCreateResourcesInParallel);
+        Job.JobStatus expectedJobStatus = isFlagExpCreateResourcesInParallel ? Job.JobStatus.CREATING : Job.JobStatus.PENDING_RESOURCE;
+        JobAdapter jobAdapter = new JobAdapterImpl(featureManager);
 
         UUID templateId = UUID.randomUUID();
         String userId = "ou012t";
+        String testApi = "VNF_API";
         String optimisticUniqueServiceInstanceName = "optimisticUniqueServiceInstanceName";
         int indexInBulk = RandomUtils.nextInt();
         Job grandJob = jobAdapter.createServiceInstantiationJob(
@@ -82,39 +94,44 @@
                 new JobCommandFactoryTest.MockedRequest(99, "anything"),
                 templateId,
                 userId,
+                testApi,
                 optimisticUniqueServiceInstanceName,
                 indexInBulk
         );
 
-        Job.JobStatus jobStatus = Job.JobStatus.PAUSE;
         JobType jobType = JobType.NoOp;
         JobAdapter.AsyncJobRequest request = new JobCommandFactoryTest.MockedRequest(42,"nothing");
-        Job parentJob = jobAdapter.createChildJob(jobType, jobStatus, request, grandJob.getSharedData(), ImmutableMap.of());
+        Job parentJob = jobAdapter.createChildJob(jobType, request, grandJob.getSharedData(), ImmutableMap.of(), 1);
 
         assertEquals(parentJob.getType(), jobType);
         assertEquals(parentJob.getSharedData().getRequest(), request);
         assertEquals(parentJob.getSharedData().getRequestType(), request.getClass());
         assertEquals(parentJob.getSharedData().getUserId(), userId);
+        assertEquals(parentJob.getSharedData().getTestApi(), testApi);
         assertEquals(parentJob.getSharedData().getJobUuid(), parentJob.getUuid());
         assertNotNull(parentJob.getUuid());
         assertNotEquals(parentJob.getUuid(), grandJob.getUuid());
-        assertEquals(parentJob.getStatus(), jobStatus);
+        assertEquals(parentJob.getStatus(), expectedJobStatus);
+        assertEquals(parentJob.getTemplateId(), grandJob.getUuid());
+        assertEquals(parentJob.getIndexInBulk().intValue(), 1);
         assertEquals(parentJob.getSharedData().getRootJobId(), grandJob.getUuid());
 
-        Job.JobStatus jobStatus2 = Job.JobStatus.IN_PROGRESS;
         JobType jobType2 = JobType.AggregateState;
         JobAdapter.AsyncJobRequest request2 = new JobCommandFactoryTest.MockedRequest(66,"abc");
-        Job job = jobAdapter.createChildJob(jobType2, jobStatus2, request2, parentJob.getSharedData(), ImmutableMap.of());
+        Job job = jobAdapter.createChildJob(jobType2, request2, parentJob.getSharedData(), ImmutableMap.of(), 0);
 
         assertEquals(job.getType(), jobType2);
         assertEquals(job.getSharedData().getRequest(), request2);
         assertEquals(job.getSharedData().getRequestType(), request2.getClass());
         assertEquals(job.getSharedData().getUserId(), userId);
+        assertEquals(job.getSharedData().getTestApi(), testApi);
         assertEquals(job.getSharedData().getJobUuid(), job.getUuid());
         assertNotNull(job.getUuid());
         assertNotEquals(job.getUuid(), parentJob.getUuid());
-        assertEquals(job.getStatus(), jobStatus2);
+        assertEquals(job.getStatus(), expectedJobStatus);
         assertEquals(job.getSharedData().getRootJobId(), grandJob.getUuid());
+        assertEquals(job.getTemplateId(), parentJob.getUuid());
+        assertEquals(job.getIndexInBulk().intValue(), 0);
 
     }
 }
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/impl/JobWorkerTest.java b/vid-app-common/src/test/java/org/onap/vid/job/impl/JobWorkerTest.java
index dc44d15..e234ee9 100644
--- a/vid-app-common/src/test/java/org/onap/vid/job/impl/JobWorkerTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/job/impl/JobWorkerTest.java
@@ -7,9 +7,9 @@
  * 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.
@@ -33,6 +33,7 @@
 import org.onap.vid.job.command.JobCommandFactory;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
+import org.togglz.core.manager.FeatureManager;
 
 import java.util.Map;
 import java.util.UUID;
@@ -51,6 +52,9 @@
     @Mock
     private JobCommandFactory jobCommandFactory;
 
+    @Mock
+    private FeatureManager featureManager;
+
     private final JobCommand jobCommand = mock(JobCommand.class);
     private Job jobUnderTest;
     private JobAdapter.AsyncJobRequest originalData;
@@ -68,11 +72,12 @@
         };
 
         originalType = JobType.MacroServiceInstantiation;
-        jobUnderTest = new JobAdapterImpl().createServiceInstantiationJob(
+        jobUnderTest = new JobAdapterImpl(featureManager).createServiceInstantiationJob(
                 originalType,
                 originalData,
                 UUID.randomUUID(),
                 "my user id",
+                "VNF_API",
                 "optimisticUniqueServiceInstanceName",
                 RandomUtils.nextInt()
         );
@@ -119,4 +124,4 @@
         assertThat(nextJob, jobMatcher);
         assertThat(jobAfter, equalTo(jobBefore));
     }
-}
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/model/JobAuditStatusTest.java b/vid-app-common/src/test/java/org/onap/vid/model/JobAuditStatusTest.java
index 2c41120..2f9e31e 100644
--- a/vid-app-common/src/test/java/org/onap/vid/model/JobAuditStatusTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/model/JobAuditStatusTest.java
@@ -35,11 +35,11 @@
     @DataProvider
     public static Object[][] AdditionalInfoSizes() {
         return new Object[][]{
-                {5, 5},
-                {1999,1999},
-                {2000, 2000},
-                {2001, 2000},
-                {10000, 2000}
+            {5, 5},
+            {1999,1999},
+            {2000, 2000},
+            {2001, 2000},
+            {10000, 2000}
         };
     }
 
@@ -53,7 +53,7 @@
     @Test(dataProvider = "AdditionalInfoSizes")
     public void testAdditionalInfoMaxLengthInConstructor(int originalSize, int finalSize) {
         final String additionalInfo = StringUtils.repeat("a", originalSize);
-        JobAuditStatus jobAuditStatus = new JobAuditStatus(UUID.randomUUID(), "myJobStatus", JobAuditStatus.SourceStatus.MSO, UUID.randomUUID(), additionalInfo, new Date());
+        JobAuditStatus jobAuditStatus = JobAuditStatus.createForTest(UUID.randomUUID(), "myJobStatus", JobAuditStatus.SourceStatus.MSO, UUID.randomUUID(), additionalInfo, new Date());
         assertThat(jobAuditStatus.getAdditionalInfo().length(), is(finalSize));
     }
 
diff --git a/vid-app-common/src/test/java/org/onap/vid/model/aaiTree/VpnBindingKtTest.kt b/vid-app-common/src/test/java/org/onap/vid/model/aaiTree/VpnBindingKtTest.kt
new file mode 100644
index 0000000..90c61d7
--- /dev/null
+++ b/vid-app-common/src/test/java/org/onap/vid/model/aaiTree/VpnBindingKtTest.kt
@@ -0,0 +1,16 @@
+package org.onap.vid.model.aaiTree
+
+import org.testng.Assert.assertEquals
+import org.testng.annotations.Test
+
+class VpnBindingKtTest {
+
+    @Test
+    fun whenFailedToParseRouteTarget_DefaultValuesAreReturned() {
+        val aaiTreeNode = AAITreeNode();
+        aaiTreeNode.type = NodeType.VPN_BINDING
+        aaiTreeNode.additionalProperties["route-targets"] = 3 //just an object that can't be parsed into list of route targets
+        val vpnBinding = from(aaiTreeNode);
+        assertEquals(vpnBinding.routeTargets, listOf(RouteTarget("ParsingFailure", "ParsingFailure")))
+    }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/MsoBusinessLogicImplTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/MsoBusinessLogicImplTest.java
index 207e635..4ddbc0f 100644
--- a/vid-app-common/src/test/java/org/onap/vid/mso/MsoBusinessLogicImplTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/MsoBusinessLogicImplTest.java
@@ -21,49 +21,33 @@
 
 package org.onap.vid.mso;
 
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
+import static org.assertj.core.api.Assertions.tuple;
+import static org.hamcrest.Matchers.allOf;
+import static org.hamcrest.Matchers.hasEntry;
+import static org.junit.Assert.assertEquals;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.endsWith;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.isA;
+import static org.mockito.BDDMockito.given;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.onap.vid.controller.MsoController.CONFIGURATION_ID;
+import static org.onap.vid.controller.MsoController.REQUEST_TYPE;
+import static org.onap.vid.controller.MsoController.SVC_INSTANCE_ID;
+import static org.onap.vid.controller.MsoController.VNF_INSTANCE_ID;
+import static org.onap.vid.mso.MsoBusinessLogicImpl.validateEndpointPath;
+
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.collect.Lists;
 import com.google.gson.Gson;
 import io.joshworks.restclient.http.HttpResponse;
-import org.apache.commons.io.IOUtils;
-import org.jetbrains.annotations.NotNull;
-import org.mockito.hamcrest.MockitoHamcrest;
-import org.onap.vid.changeManagement.WorkflowRequestDetail;
-import org.onap.vid.model.SOWorkflowList;
-import org.onap.vid.model.probes.ExternalComponentStatus;
-import org.onap.vid.mso.rest.RequestList;
-import org.onap.vid.mso.rest.RequestWrapper;
-import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-import org.mockito.ArgumentMatcher;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.onap.portalsdk.core.util.SystemProperties;
-import org.onap.vid.changeManagement.ChangeManagementRequest;
-import org.onap.vid.controller.OperationalEnvironmentController;
-import org.onap.vid.exceptions.GenericUncheckedException;
-import org.onap.vid.model.RequestReferencesContainer;
-import org.onap.vid.model.SoftDeleteRequest;
-import org.onap.vid.mso.model.CloudConfiguration;
-import org.onap.vid.mso.model.ModelInfo;
-import org.onap.vid.mso.model.OperationalEnvironmentActivateInfo;
-import org.onap.vid.mso.model.OperationalEnvironmentDeactivateInfo;
-import org.onap.vid.mso.model.RequestInfo;
-import org.onap.vid.mso.model.RequestParameters;
-import org.onap.vid.mso.model.RequestReferences;
-import org.onap.vid.mso.rest.OperationalEnvironment.OperationEnvironmentRequestDetails;
-import org.onap.vid.mso.rest.Request;
-import org.onap.vid.mso.rest.RequestDetails;
-import org.onap.vid.mso.rest.RequestDetailsWrapper;
-import org.onap.vid.mso.rest.Task;
-import org.onap.vid.properties.Features;
-import org.springframework.http.HttpStatus;
-import org.springframework.test.context.ContextConfiguration;
-import org.togglz.core.manager.FeatureManager;
-
-import javax.ws.rs.BadRequestException;
 import java.io.IOException;
 import java.net.URL;
 import java.nio.file.Path;
@@ -74,29 +58,40 @@
 import java.util.Map;
 import java.util.UUID;
 import java.util.stream.Collectors;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.tuple;
-import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
-import static org.hamcrest.Matchers.allOf;
-import static org.hamcrest.Matchers.hasEntry;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyBoolean;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.ArgumentMatchers.argThat;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.ArgumentMatchers.isA;
-import static org.mockito.ArgumentMatchers.endsWith;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.mock;
-import static org.onap.vid.controller.MsoController.CONFIGURATION_ID;
-import static org.onap.vid.controller.MsoController.REQUEST_TYPE;
-import static org.onap.vid.controller.MsoController.SVC_INSTANCE_ID;
-import static org.onap.vid.controller.MsoController.VNF_INSTANCE_ID;
-import static org.onap.vid.mso.MsoBusinessLogicImpl.validateEndpointPath;
+import javax.ws.rs.BadRequestException;
+import org.apache.commons.io.IOUtils;
+import org.jetbrains.annotations.NotNull;
+import org.mockito.ArgumentMatcher;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.mockito.hamcrest.MockitoHamcrest;
+import org.onap.portalsdk.core.util.SystemProperties;
+import org.onap.vid.changeManagement.ChangeManagementRequest;
+import org.onap.vid.changeManagement.WorkflowRequestDetail;
+import org.onap.vid.controller.OperationalEnvironmentController;
+import org.onap.vid.exceptions.GenericUncheckedException;
+import org.onap.vid.model.SOWorkflowList;
+import org.onap.vid.model.SoftDeleteRequest;
+import org.onap.vid.model.probes.ExternalComponentStatus;
+import org.onap.vid.mso.model.CloudConfiguration;
+import org.onap.vid.mso.model.ModelInfo;
+import org.onap.vid.mso.model.OperationalEnvironmentActivateInfo;
+import org.onap.vid.mso.model.OperationalEnvironmentDeactivateInfo;
+import org.onap.vid.mso.model.RequestInfo;
+import org.onap.vid.mso.model.RequestParameters;
+import org.onap.vid.mso.rest.OperationalEnvironment.OperationEnvironmentRequestDetails;
+import org.onap.vid.mso.rest.Request;
+import org.onap.vid.mso.rest.RequestDetails;
+import org.onap.vid.mso.rest.RequestDetailsWrapper;
+import org.onap.vid.mso.rest.RequestList;
+import org.onap.vid.mso.rest.RequestWrapper;
+import org.onap.vid.mso.rest.Task;
+import org.springframework.http.HttpStatus;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
 
 @ContextConfiguration(classes = {SystemProperties.class})
 public class MsoBusinessLogicImplTest extends AbstractTestNGSpringContextTests {
@@ -104,9 +99,6 @@
     private static final ObjectMapper objectMapper = new ObjectMapper();
 
     @Mock
-    private FeatureManager featureManager;
-
-    @Mock
     private MsoInterface msoInterface;
 
     @Mock
@@ -126,7 +118,7 @@
     @BeforeClass
     public void setUp() {
         MockitoAnnotations.initMocks(this);
-        msoBusinessLogic = new MsoBusinessLogicImpl(msoInterface, featureManager);
+        msoBusinessLogic = new MsoBusinessLogicImpl(msoInterface);
     }
 
     @Test
@@ -282,39 +274,48 @@
         assertThat(response).isEqualToComparingFieldByField(expectedResponse);
     }
 
-    @Test
-    public void shouldProperlyDeleteSvcInstanceWithProperParametersAndFalseFeatureFlag() {
+    @DataProvider
+    public Object[][] deleteSvcInstanceShouldDelete() {
+        return new Object[][]{{"Active"}, {"unexpected-status"}};
+    }
+
+    @DataProvider
+    public Object[][] deleteSvcInstanceShouldUnassign() {
+        return new Object[][]{{"Created"}, {"Pendingdelete"}, {"pending-Delete"}, {"Assigned"}};
+    }
+
+
+    @Test(dataProvider = "deleteSvcInstanceShouldDelete")
+    public void shouldProperlyDeleteSvcInstanceWithProperParametersShouldDelete(String status) {
         // given
-        String endpointTemplate = "/serviceInstances/v5/%s";
+        String endpointTemplate = "/serviceInstantiation/v7/serviceInstances/%s";
         String serviceInstanceId = "3f93c7cb-2fd0-4557-9514-e189b7b04f9d";
         String svcEndpoint = String.format(endpointTemplate, serviceInstanceId);
         RequestDetails requestDetails = new RequestDetails();
         MsoResponseWrapper expectedResponse = createOkResponse();
         given(msoInterface.deleteSvcInstance(requestDetails, svcEndpoint)).willReturn(expectedResponse);
-        given(featureManager.isActive(Features.FLAG_UNASSIGN_SERVICE)).willReturn(false);
 
         // when
         MsoResponseWrapper msoResponseWrapper = msoBusinessLogic
-                .deleteSvcInstance(requestDetails, serviceInstanceId, "unAssignOrDeleteParams");
+                .deleteSvcInstance(requestDetails, serviceInstanceId, status);
 
         // then
         assertThat(msoResponseWrapper).isEqualToComparingFieldByField(expectedResponse);
     }
 
-    @Test
-    public void shouldProperlyDeleteSvcInstanceWithProperParametersAndTrueFeatureFlag() {
+    @Test(dataProvider = "deleteSvcInstanceShouldUnassign")
+    public void shouldProperlyDeleteSvcInstanceWithProperParametersShouldUnassign(String status) {
         // given
-        String endpointTemplate = "/serviceInstantiation/v5/serviceInstances/%s/unassign";
+        String endpointTemplate = "/serviceInstantiation/v7/serviceInstances/%s/unassign";
         String serviceInstanceId = "3f93c7cb-2fd0-4557-9514-e189b7b04f9d";
         String svcEndpoint = String.format(endpointTemplate, serviceInstanceId);
         RequestDetails requestDetails = new RequestDetails();
         MsoResponseWrapper expectedResponse = createOkResponse();
         given(msoInterface.unassignSvcInstance(requestDetails, svcEndpoint)).willReturn(expectedResponse);
-        given(featureManager.isActive(Features.FLAG_UNASSIGN_SERVICE)).willReturn(true);
 
         // when
         MsoResponseWrapper msoResponseWrapper = msoBusinessLogic
-                .deleteSvcInstance(requestDetails, serviceInstanceId, "assigned");
+                .deleteSvcInstance(requestDetails, serviceInstanceId, status);
 
         // then
         assertThat(msoResponseWrapper).isEqualToComparingFieldByField(expectedResponse);
@@ -323,7 +324,7 @@
     @Test
     public void shouldProperlyDeleteVnfWithProperParameters() {
         // when
-        String endpointTemplate = "/serviceInstances/v5/%s/vnfs/%s";
+        String endpointTemplate = "/serviceInstantiation/v7/serviceInstances/%s/vnfs/%s";
         String serviceInstanceId = "3f93c7cb-2fd0-4557-9514-e189b7b04f9d";
         String vnfInstanceId = "testVnfInstanceTempId";
         String vnfEndpoint = String.format(endpointTemplate, serviceInstanceId, vnfInstanceId);
@@ -342,7 +343,7 @@
     @Test
     public void shouldProperlyDeleteVfModuleWithProperParameters() {
         // when
-        String endpointTemplate = "/serviceInstances/v7/%s/vnfs/%s/vfModules/%s";
+        String endpointTemplate = "/serviceInstantiation/v7/serviceInstances/%s/vnfs/%s/vfModules/%s";
         String serviceInstanceId = "3f93c7cb-2fd0-4557-9514-e189b7b04f9d";
         String vnfInstanceId = "testVnfInstanceTempId";
         String vfModuleId = "testVfModuleId";
@@ -906,58 +907,6 @@
     }
 
     @Test
-    public void shouldProperlyDeactivateAndCloudDeleteWithProperParameters() {
-        //  given
-        String serviceInstanceId = "testServiceId";
-        String vnfInstanceId = "testVnfInstanceId";
-        String vfModuleInstanceId = "testVfModuleInstanceId";
-        RequestDetails requestDetails = new RequestDetails();
-
-        String path = msoBusinessLogic.getDeactivateAndCloudDeletePath(serviceInstanceId, vnfInstanceId, vfModuleInstanceId);
-
-        RequestReferences requestReferences = new RequestReferences();
-        requestReferences.setInstanceId("testInstance");
-        requestReferences.setRequestId("testRequest");
-
-        HttpResponse<RequestReferencesContainer> expectedResponse = HttpResponse.fallback(new RequestReferencesContainer(requestReferences));
-
-        MsoResponseWrapper2 responseWrapped = new MsoResponseWrapper2<>(expectedResponse);
-
-        given(msoInterface.post(eq(path), any(RequestDetails.class), eq(RequestReferencesContainer.class))).willReturn(expectedResponse);
-
-        //  when
-        MsoResponseWrapper2 response = msoBusinessLogic.deactivateAndCloudDelete(serviceInstanceId, vnfInstanceId, vfModuleInstanceId, requestDetails);
-
-        //  then
-        assertThat(response).isEqualToComparingFieldByField(responseWrapped);
-    }
-
-    @Test
-    public void shouldProperlyActivateFabricConfigurationWithProperParameters() {
-        //  given
-        String serviceInstanceId = "testServiceId";
-        RequestDetails requestDetails = new RequestDetails();
-
-        String path = msoBusinessLogic.getActivateFabricConfigurationPath(serviceInstanceId);
-
-        RequestReferences requestReferences = new RequestReferences();
-        requestReferences.setInstanceId("testInstance");
-        requestReferences.setRequestId("testRequest");
-
-        HttpResponse<RequestReferencesContainer> expectedResponse = HttpResponse.fallback(new RequestReferencesContainer(requestReferences));
-
-        MsoResponseWrapper2 responseWrapped = new MsoResponseWrapper2<>(expectedResponse);
-
-        given(msoInterface.post(eq(path), any(RequestDetails.class), eq(RequestReferencesContainer.class))).willReturn(expectedResponse);
-
-        //  when
-        MsoResponseWrapper2 response = msoBusinessLogic.activateFabricConfiguration(serviceInstanceId, requestDetails);
-
-        //  then
-        assertThat(response).isEqualToComparingFieldByField(responseWrapped);
-    }
-
-    @Test
     public void shouldProperlyUpdateVnfSoftwareWithProperParameters() {
         //  given
         String serviceInstanceId = "testServiceId";
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/MsoOperationalEnvironmentTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/MsoOperationalEnvironmentTest.java
index 891192c..0ea5f29 100644
--- a/vid-app-common/src/test/java/org/onap/vid/mso/MsoOperationalEnvironmentTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/MsoOperationalEnvironmentTest.java
@@ -25,6 +25,13 @@
 import com.fasterxml.jackson.databind.SerializationFeature;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableListMultimap;
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 import org.apache.commons.io.IOUtils;
 import org.apache.log4j.LogManager;
 import org.apache.log4j.Logger;
@@ -40,17 +47,9 @@
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
 public class MsoOperationalEnvironmentTest {
 
-    private MsoBusinessLogic msoBusinessLogic = new MsoBusinessLogicImpl(null,null);
+    private MsoBusinessLogic msoBusinessLogic = new MsoBusinessLogicImpl(null);
     private static final Logger logger = LogManager.getLogger(MsoOperationalEnvironmentTest.class);
 
     @Test(dataProvider = "getOperationalEnvironmentActivationPermutations")
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java
index d4abfae..6cf7d48 100644
--- a/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/rest/MsoRestClientNewTest.java
@@ -38,8 +38,8 @@
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.Properties;
 import java.util.UUID;
+import org.apache.commons.configuration.PropertiesConfiguration;
 import org.glassfish.grizzly.http.util.HttpStatus;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -61,7 +61,7 @@
 
     private static StubServer server;
     private static StubServer securedServer;
-    private static Properties props = new Properties();
+    private static PropertiesConfiguration props = new PropertiesConfiguration();
     private static String msoCreateServiceInstanceJson;
     private static String msoScaleOutVfModule;
     private final static String CREATE_INSTANCE_RESPONSE_STR =
@@ -76,7 +76,7 @@
 
 
     @BeforeClass
-    public static void start() throws IOException {
+    public static void start() throws Exception {
         server = new StubServer().run();
         securedServer = new StubServer().secured().run();
 
@@ -109,7 +109,7 @@
 
     @Test
     public void testCreateSvcInstance() throws Exception {
-        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_CONFIGURATIONS);
+        String endpoint = props.getString(MsoProperties.MSO_REST_API_CONFIGURATIONS);
         endpoint = endpoint.replace(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
         try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
                 server,
@@ -122,7 +122,7 @@
 
     @Test
     public void testCreateVnf() throws Exception {
-        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_VNF_INSTANCE);
+        String endpoint = props.getString(MsoProperties.MSO_REST_API_VNF_INSTANCE);
         endpoint = endpoint.replace(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
         try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
                 server,
@@ -136,7 +136,7 @@
 
     @Test
     public void testCreateNwInstance() throws Exception {
-        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_NETWORK_INSTANCE);
+        String endpoint = props.getString(MsoProperties.MSO_REST_API_NETWORK_INSTANCE);
         String nw_endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
         try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
                 server,
@@ -149,7 +149,7 @@
 
     @Test
     public void testCreateVolumeGroupInstance() throws Exception {
-        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE);
+        String endpoint = props.getString(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE);
         String vnf_endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
         vnf_endpoint = vnf_endpoint.replaceFirst(MsoController.VNF_INSTANCE_ID, SAMPLE_VNF_INSTANCE_ID);
         try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
@@ -163,7 +163,7 @@
 
     @Test
     public void testCreateVfModuleInstance() throws Exception {
-        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE);
+        String endpoint = props.getString(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE);
         String partial_endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
         String vf_module_endpoint =
                 partial_endpoint.replaceFirst(MsoController.VNF_INSTANCE_ID, SAMPLE_VNF_INSTANCE_ID);
@@ -195,7 +195,7 @@
     @Ignore
     @Test
     public void testDeleteSvcInstance() throws Exception {
-        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_SVC_INSTANCE);
+        String endpoint = props.getString(MsoProperties.MSO_REST_API_SVC_INSTANCE);
         endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
 
 
@@ -211,7 +211,7 @@
     @Ignore
     @Test
     public void testDeleteVnf() throws Exception {
-        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_VNF_INSTANCE);
+        String endpoint = props.getString(MsoProperties.MSO_REST_API_VNF_INSTANCE);
         endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
 
         try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
@@ -226,7 +226,7 @@
     @Ignore
     @Test
     public void testDeleteVfModule() throws Exception {
-        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE);
+        String endpoint = props.getString(MsoProperties.MSO_REST_API_VF_MODULE_INSTANCE);
         String part_endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
         String vf_modules_endpoint = part_endpoint.replaceFirst(MsoController.VNF_INSTANCE_ID, SAMPLE_VNF_INSTANCE_ID);
         String delete_vf_endpoint = vf_modules_endpoint + '/' + SAMPLE_VNF_MODULE_ID;
@@ -243,7 +243,7 @@
     @Ignore
     @Test
     public void testDeleteVolumeGroupInstance() throws Exception {
-        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE);
+        String endpoint = props.getString(MsoProperties.MSO_REST_API_VOLUME_GROUP_INSTANCE);
         String svc_endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
         String vnf_endpoint = svc_endpoint.replaceFirst(MsoController.VNF_INSTANCE_ID, SAMPLE_VNF_INSTANCE_ID);
         String delete_volume_group_endpoint = vnf_endpoint + "/" + SAMPLE_VNF_MODULE_ID;
@@ -260,7 +260,7 @@
     @Ignore
     @Test
     public void testDeleteNwInstance() throws Exception {
-        String endpoint = props.getProperty(MsoProperties.MSO_REST_API_NETWORK_INSTANCE);
+        String endpoint = props.getString(MsoProperties.MSO_REST_API_NETWORK_INSTANCE);
         String svc_endpoint = endpoint.replaceFirst(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
         String delete_nw_endpoint = svc_endpoint + "/" + SAMPLE_NETWORK_INSTANCE_ID;
 
@@ -275,7 +275,7 @@
 
     @Test
     public void testGetOrchestrationRequest() {
-        String p = props.getProperty(MsoProperties.MSO_REST_API_GET_ORC_REQ);
+        String p = props.getString(MsoProperties.MSO_REST_API_GET_ORC_REQ);
         String path = p + "/" + SAMPLE_REQUEST_ID;
 
         try(MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
@@ -289,7 +289,7 @@
 
     @Test
     public void testGetManualTasksByRequestId() {
-        String p = props.getProperty(MsoProperties.MSO_REST_API_GET_ORC_REQ);
+        String p = props.getString(MsoProperties.MSO_REST_API_GET_ORC_REQ);
         String path = p + "/" + UUID.randomUUID();
         String validResponse = "" 
             + "{ "
@@ -376,7 +376,7 @@
 
     @Test
     public void testSetConfigurationActiveStatus() throws Exception {
-        String endpoint = "/serviceInstances/v5/<service_instance_id>/configurations/<configuration_id>";
+        String endpoint = "/serviceInstances/v7/<service_instance_id>/configurations/<configuration_id>";
         endpoint = endpoint.replace(MsoController.SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
         endpoint = endpoint.replace(MsoController.CONFIGURATION_ID, SAMPLE_CONFIGURATION_ID);
         endpoint = endpoint + "/activate";
@@ -448,7 +448,7 @@
 
     @Test
     public void testRemoveRelationshipFromServiceInstance() throws Exception {
-        String serviceEndpoint = props.getProperty(MsoProperties.MSO_REST_API_SVC_INSTANCE);
+        String serviceEndpoint = props.getString(MsoProperties.MSO_REST_API_SVC_INSTANCE);
         String removeRelationshipsPath = serviceEndpoint + "/" + SERVICE_INSTANCE_ID + "/removeRelationships";
 
         try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
@@ -476,7 +476,7 @@
     }
     @Test
     public void testScaleOutVfModule() throws IOException {
-        String serviceEndpoint = props.getProperty(MsoProperties.MSO_REST_API_VF_MODULE_SCALE_OUT);
+        String serviceEndpoint = props.getString(MsoProperties.MSO_REST_API_VF_MODULE_SCALE_OUT);
         String partial_endpoint = serviceEndpoint.replaceFirst(SVC_INSTANCE_ID, SERVICE_INSTANCE_ID);
         String vf_module_endpoint = partial_endpoint.replaceFirst(VNF_INSTANCE_ID, SAMPLE_VNF_INSTANCE_ID);
         try (MsoRestClientTestUtil closure = new MsoRestClientTestUtil(
diff --git a/vid-app-common/src/test/java/org/onap/vid/mso/rest/RequestDetailsTest.java b/vid-app-common/src/test/java/org/onap/vid/mso/rest/RequestDetailsTest.java
index 575ceab..7f30b0f 100644
--- a/vid-app-common/src/test/java/org/onap/vid/mso/rest/RequestDetailsTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/mso/rest/RequestDetailsTest.java
@@ -20,23 +20,24 @@
 
 package org.onap.vid.mso.rest;
 
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import org.assertj.core.api.AssertionsForClassTypes;
-import org.onap.vid.exceptions.NotFoundException;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
 import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEqualsExcluding;
 import static com.google.code.beanmatchers.BeanMatchers.hasValidGettersAndSettersExcluding;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.testng.AssertJUnit.assertEquals;
 
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import org.assertj.core.api.AssertionsForClassTypes;
+import org.onap.vid.exceptions.NotFoundException;
+import org.onap.vid.testUtils.TestUtils;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
 
 public class RequestDetailsTest {
 
@@ -48,6 +49,10 @@
 	private static final ImmutableList<String> LCP_CLOUD_REGION_ID_PATH =
 			ImmutableList.of("requestDetails", "cloudConfiguration", "lcpCloudRegionId");
 
+	@BeforeClass
+	public static void registerValueGenerator() {
+		TestUtils.registerCloudConfigurationValueGenerator();
+	}
 
 	@BeforeMethod
 	public void setUp() {
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/AAITreeNodeBuilderTest.java b/vid-app-common/src/test/java/org/onap/vid/services/AAITreeNodeBuilderTest.java
index 9cd9eba..c2a3f5d 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/AAITreeNodeBuilderTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/AAITreeNodeBuilderTest.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,77 +20,100 @@
 
 package org.onap.vid.services;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.util.concurrent.MoreExecutors;
+
+import org.apache.commons.lang3.tuple.Pair;
+import org.jetbrains.annotations.NotNull;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
+import org.mockito.stubbing.Answer;
 import org.onap.vid.aai.AaiClientInterface;
+import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship;
+import org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.RelationshipList;
+import org.onap.vid.exceptions.GenericUncheckedException;
 import org.onap.vid.model.aaiTree.AAITreeNode;
+import org.onap.vid.model.aaiTree.NodeType;
+import org.onap.vid.mso.model.CloudConfiguration;
+import org.onap.vid.utils.Tree;
 import org.onap.vid.utils.Unchecked;
-import org.testng.Assert;
-import org.testng.annotations.BeforeTest;
+import org.onap.vid.testUtils.TestUtils;
+import org.springframework.http.HttpMethod;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
 import java.io.IOException;
 import java.util.HashMap;
-import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
 import java.util.concurrent.ConcurrentSkipListSet;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
 import static java.util.Comparator.comparing;
+import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals;
+import static net.javacrumbs.jsonunit.core.Option.IGNORING_ARRAY_ORDER;
+import static net.javacrumbs.jsonunit.core.Option.IGNORING_EXTRA_FIELDS;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.empty;
+import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertEquals;
 import static org.mockito.Mockito.when;
 import static org.onap.vid.services.AAIServiceTree.AAI_TREE_PATHS;
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
+import static org.testng.Assert.assertNull;
+import static org.testng.Assert.assertTrue;
 
 public class AAITreeNodeBuilderTest {
 
-    AAITreeNodeBuilder aaiTreeNodeBuilder;
+    private AAITreeNodeBuilder aaiTreeNodeBuilder;
 
     @Mock
-    AaiClientInterface aaiClientMock;
+    private AaiClientInterface aaiClientMock;
 
-    @Mock
-    ThreadPoolExecutor threadPoolMock;
+    private ExecutorService executorService;
 
+    private static final ObjectMapper mapper = new ObjectMapper();
 
-    @BeforeTest
+    @BeforeClass
     public void initMocks() {
         MockitoAnnotations.initMocks(this);
         aaiTreeNodeBuilder = new AAITreeNodeBuilder(aaiClientMock);
+        executorService = MoreExecutors.newDirectExecutorService();
+    }
+
+    private void buildNodeAndAssert(JsonNode inputNode, AAITreeNode expectedNode, NodeType nodeType){
+        ConcurrentSkipListSet<AAITreeNode> nodesAccumulator = new ConcurrentSkipListSet<>(comparing(AAITreeNode::getUniqueNodeKey));
+        when(aaiClientMock.typedAaiRest(Unchecked.toURI("anyUrl"), JsonNode.class, null, HttpMethod.GET, false)).thenReturn(inputNode);
+        AAITreeNode actualNode = aaiTreeNodeBuilder.buildNode(
+                nodeType,
+                "anyUrl",
+                null,
+                HttpMethod.GET,
+                nodesAccumulator,
+                executorService,
+                AAI_TREE_PATHS.getSubTree(new AAIServiceTree.AaiRelationship(nodeType))
+        ).get(0);
+        assertThat(actualNode, jsonEquals(expectedNode).when(IGNORING_ARRAY_ORDER, IGNORING_EXTRA_FIELDS).whenIgnoringPaths("relationshipList","children[0].relationshipList"));
     }
 
     @Test
-    public void buildNode_buildGroupNode_NodeIsAsExpected(){
-        ConcurrentSkipListSet<AAITreeNode> nodesAccumulator = new ConcurrentSkipListSet<>(comparing(AAITreeNode::getUniqueNodeKey));
-        ConcurrentLinkedQueue<String> visitedNodes = new ConcurrentLinkedQueue<>();
-        when(aaiClientMock.typedAaiGet(Unchecked.toURI("anyUrl"), JsonNode.class)).thenReturn(createGroupJson());
-
-        AAITreeNode groupNode = aaiTreeNodeBuilder.buildNode("instance-group",
-                "anyUrl",
-                nodesAccumulator,
-                threadPoolMock,
-                visitedNodes,
-                new AtomicInteger(0),
-                AAI_TREE_PATHS).get(0);
-
-        AAITreeNode expectedGroupNode = createExpectedGroupNode();
-        assertNodeIsAsExpected(expectedGroupNode,groupNode);
-    }
-
-    private void assertNodeIsAsExpected(AAITreeNode expectedGroupNode, AAITreeNode groupNode) {
-        Assert.assertEquals(groupNode.getId(), expectedGroupNode.getId());
-        Assert.assertEquals(groupNode.getType(), expectedGroupNode.getType());
-        Assert.assertEquals(groupNode.getName(), expectedGroupNode.getName());
-        Assert.assertEquals(groupNode.getModelVersionId(), expectedGroupNode.getModelVersionId());
-        Assert.assertEquals(groupNode.getModelInvariantId(), expectedGroupNode.getModelInvariantId());
-        Assert.assertEquals(groupNode.getInMaint(), expectedGroupNode.getInMaint());
-        Assert.assertEquals(groupNode.getAdditionalProperties(), expectedGroupNode.getAdditionalProperties());
+    public void buildNode_buildGroupNode_NodeIsAsExpected() {
+        buildNodeAndAssert(createGroupJson(), createExpectedGroupNode(), NodeType.INSTANCE_GROUP);
     }
 
     private AAITreeNode createExpectedGroupNode() {
         AAITreeNode expectedNode = new AAITreeNode();
         expectedNode.setId("c4fcf022-31a0-470a-b5b8-c18335b7af32");
-        expectedNode.setType("instance-group");
+        expectedNode.setType(NodeType.INSTANCE_GROUP);
         expectedNode.setName("Test vE-Flex");
         expectedNode.setModelVersionId("Test vE-Flex");
         expectedNode.setModelInvariantId("dd182d7d-6949-4b90-b3cc-5befe400742e");
@@ -103,8 +126,6 @@
         additionalProperties.put("resource-version","1533315433086");
         additionalProperties.put("instance-group-function","vTSBC Customer Landing Network Collection");
         expectedNode.setAdditionalProperties(additionalProperties);
-
-
         return expectedNode;
     }
 
@@ -125,22 +146,7 @@
                     "      \"inMaint\": \"false\"," +
                     "      \"instance-group-function\": \"vTSBC Customer Landing Network Collection\"," +
                     "      \"relationship-list\": {" +
-                    "      \"relationship\": [{" +
-                    "       \"related-to\": \"generic-vnf\"," +
-                    "       \"relationship-label\": \"org.onap.relationships.inventory.MemberOf\" ," +
-                    "       \"related-link\": \"/aai/v14/network/generic-vnfs/generic-vnf/8c54c369-2876-4423-9b33-80f783f29082\" ," +
-                    "       \"relationship-data\": [{" +
-                    "        \"relationship-key\": \"generic-vnf.vnf-id\"," +
-                    "        \"relationship-value\": \"8c54c369-2876-4423-9b33-80f783f29082\"" +
-                    "      }" +
-                    "    ]," +
-                    "      \"related-to-property\": [{" +
-                    "      \"property-key\": \"generic-vnf.vnf-name\"," +
-                    "      \"property-value\": \"zrdm5bffad01\"" +
-                    "    }" +
-                    "    ]" +
-                    "    }" +
-                    "    ]" +
+                    "      \"relationship\": []" +
                     "    }" +
                     "    }");
         } catch (IOException e) {
@@ -148,4 +154,363 @@
         }
         return groupNode;
     }
+
+    @Test
+    public void whenReadNetworkNode_thenNodeIsAsExpected() throws IOException {
+        JsonNode mockedAaiResponse = TestUtils.readJsonResourceFileAsObject("/getTopology/network.json", JsonNode.class);
+
+        AAITreeNode expectedNetworkNode = new AAITreeNode();
+        expectedNetworkNode.setId("94c86b39-bbbf-4027-8120-ff37c6d2493a");
+        expectedNetworkNode.setName("AUK51a_oam_calea_net_1");
+        expectedNetworkNode.setOrchestrationStatus("Assigned");
+        expectedNetworkNode.setModelInvariantId("b9a9b549-0ee4-49fc-b4f2-5edc6701da68");
+        expectedNetworkNode.setModelVersionId("77010093-df36-4dcb-8428-c3d02bf3f88d");
+        expectedNetworkNode.setModelCustomizationId("e5f33853-f84c-4cdd-99f2-93846957aa18");
+        expectedNetworkNode.setType(NodeType.NETWORK);
+        expectedNetworkNode.setCloudConfiguration(new CloudConfiguration("auk51a", "b530fc990b6d4334bd45518bebca6a51", "att-nc"));
+
+        buildNodeAndAssert(mockedAaiResponse, expectedNetworkNode, NodeType.NETWORK);
+    }
+
+    @Test
+    public void whenCloudRegionMissing_otherPlacementFieldsReadAsExpected() throws IOException {
+
+        AAITreeNode node = new AAITreeNode();
+        Optional<Relationship> tenantRelationShip = Optional.of(
+                JACKSON_OBJECT_MAPPER.readValue("{" +
+                        "      \"related-to\": \"tenant\"," +
+                        "      \"relationship-label\": \"org.onap.relationships.inventory.Uses\"," +
+                        "      \"related-link\": \"/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/att-nc/auk51a/tenants/tenant/b530fc990b6d4334bd45518bebca6a51\"," +
+                        "      \"relationship-data\": [{" +
+                        "        \"relationship-key\": \"cloud-region.cloud-owner\"," +
+                        "        \"relationship-value\": \"att-nc\"" +
+                        "      }, {" +
+                        "        \"relationship-key\": \"tenant.tenant-id\"," +
+                        "        \"relationship-value\": \"b530fc990b6d4334bd45518bebca6a51\"" +
+                        "      }" +
+                        "      ]," +
+                        "      \"related-to-property\": [{" +
+                        "        \"property-key\": \"tenant.tenant-name\"," +
+                        "        \"property-value\": \"ecomp_ispt\"" +
+                        "      }" +
+                        "      ]" +
+                        "    }", Relationship.class)
+        );
+        aaiTreeNodeBuilder.enrichPlacementDataUsingTenantInfo(node, tenantRelationShip);
+        assertEquals(new CloudConfiguration(null, "b530fc990b6d4334bd45518bebca6a51", "att-nc"), node.getCloudConfiguration());
+    }
+
+    @Test
+    public void whenTenantMissing_otherPlacementFieldsReadAsExpected() throws IOException {
+
+        AAITreeNode node = new AAITreeNode();
+        Optional<Relationship> tenantRelationShip = Optional.of(
+                JACKSON_OBJECT_MAPPER.readValue("{" +
+                        "      \"related-to\": \"tenant\"," +
+                        "      \"relationship-label\": \"org.onap.relationships.inventory.Uses\"," +
+                        "      \"related-link\": \"/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/att-nc/auk51a/tenants/tenant/b530fc990b6d4334bd45518bebca6a51\"," +
+                        "      \"relationship-data\": [{" +
+                        "        \"relationship-key\": \"cloud-region.cloud-owner\"," +
+                        "        \"relationship-value\": \"att-nc\"" +
+                        "      }, {" +
+                        "        \"relationship-key\": \"cloud-region.cloud-region-id\"," +
+                        "        \"relationship-value\": \"auk51a\"" +
+                        "      }" +
+                        "      ]," +
+                        "      \"related-to-property\": [{" +
+                        "        \"property-key\": \"tenant.tenant-name\"," +
+                        "        \"property-value\": \"ecomp_ispt\"" +
+                        "      }" +
+                        "      ]" +
+                        "    }", Relationship.class)
+        );
+        aaiTreeNodeBuilder.enrichPlacementDataUsingTenantInfo(node, tenantRelationShip);
+        assertEquals(new CloudConfiguration("auk51a", null, "att-nc"), node.getCloudConfiguration());
+    }
+
+    @Test
+    public void whenCloudOwnerMissing_otherPlacementFieldsReadAsExpected() throws IOException {
+
+        AAITreeNode node = new AAITreeNode();
+        Optional<Relationship> tenantRelationShip = Optional.of(
+                JACKSON_OBJECT_MAPPER.readValue("{" +
+                        "      \"related-to\": \"tenant\"," +
+                        "      \"relationship-label\": \"org.onap.relationships.inventory.Uses\"," +
+                        "      \"related-link\": \"/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/att-nc/auk51a/tenants/tenant/b530fc990b6d4334bd45518bebca6a51\"," +
+                        "      \"relationship-data\": [{" +
+                        "        \"relationship-key\": \"tenant.tenant-id\"," +
+                        "        \"relationship-value\": \"b530fc990b6d4334bd45518bebca6a51\"" +
+                        "      }, {" +
+                        "        \"relationship-key\": \"cloud-region.cloud-region-id\"," +
+                        "        \"relationship-value\": \"auk51a\"" +
+                        "      }" +
+                        "      ]," +
+                        "      \"related-to-property\": [{" +
+                        "        \"property-key\": \"tenant.tenant-name\"," +
+                        "        \"property-value\": \"ecomp_ispt\"" +
+                        "      }" +
+                        "      ]" +
+                        "    }", Relationship.class)
+        );
+        aaiTreeNodeBuilder.enrichPlacementDataUsingTenantInfo(node, tenantRelationShip);
+        assertEquals(new CloudConfiguration("auk51a", "b530fc990b6d4334bd45518bebca6a51",  null), node.getCloudConfiguration());
+    }
+
+    @Test
+    public void whenThereIsNoTenantRelationship_thenPlacementIsNull() throws IOException {
+        AAITreeNode node = new AAITreeNode();
+        aaiTreeNodeBuilder.enrichPlacementData(node);
+        assertNull(node.getCloudConfiguration());
+    }
+
+
+    @Test
+    public void whenReadVnfNodeWithVfModule_thenNodeIsAsExpected() throws IOException {
+        JsonNode mockedAaiGetVnfResponse = TestUtils.readJsonResourceFileAsObject("/getTopology/vnf.json", JsonNode.class);
+
+        //add mock for vfModule of the VNF
+        JsonNode mockedAaiGetVfModuleResponse = TestUtils.readJsonResourceFileAsObject("/getTopology/vfModule.json", JsonNode.class);
+        when(aaiClientMock.typedAaiGet(Unchecked.toURI("anyUrl/vf-modules"), JsonNode.class)).thenReturn(mockedAaiGetVfModuleResponse);
+
+        CloudConfiguration expectedCloudConfiguration = new CloudConfiguration("dyh3b", "c8035f5ee95d4c62bbc8074c044122b9", "irma-aic");
+
+        AAITreeNode expectedVnfNode = createExpectedVnfTreeNode(expectedCloudConfiguration);
+
+        AAITreeNode expectedVfModule = new AAITreeNode();
+        expectedVfModule.setId("2cb6d41e-2bef-4cb2-80ce-c7815bcdcf4e");
+        expectedVfModule.setName("dyh3brarf8000v_base");
+        expectedVfModule.setOrchestrationStatus("Active");
+        expectedVfModule.setModelInvariantId("3ecca473-b0c0-46ae-b0b7-bd2969d8b79f");
+        expectedVfModule.setModelVersionId("5c35b764-e266-4498-af87-a88c4ba92dc4");
+        expectedVfModule.setModelCustomizationId("06b4ece0-f6f8-4003-b445-653418292101");
+        expectedVfModule.setType(NodeType.VF_MODULE);
+        expectedVfModule.setInMaint(false);
+        expectedVfModule.setCloudConfiguration(expectedCloudConfiguration);
+
+        expectedVnfNode.addChildren(ImmutableList.of(expectedVfModule));
+
+        buildNodeAndAssert(mockedAaiGetVnfResponse, expectedVnfNode, NodeType.GENERIC_VNF);
+    }
+
+    @NotNull
+    public static AAITreeNode createExpectedVnfTreeNode(CloudConfiguration expectedCloudConfiguration) {
+        AAITreeNode expectedVnfNode = new AAITreeNode();
+        expectedVnfNode.setId("9a7a4dc1-8e5f-43fe-a360-7734c5f51382");
+        expectedVnfNode.setName("dyh3brarf8000v");
+        expectedVnfNode.setOrchestrationStatus("Active");
+        expectedVnfNode.setModelInvariantId("b711997f-36b3-4a9b-8b37-71a0fc2ebd6d");
+        expectedVnfNode.setModelVersionId("7f23e4f7-e44c-44df-b066-4cedc6950bfe");
+        expectedVnfNode.setModelCustomizationId("401350be-0f56-481c-86d8-f32d573fec26");
+        expectedVnfNode.setType(NodeType.GENERIC_VNF);
+        expectedVnfNode.setInMaint(true);
+        expectedVnfNode.setProvStatus("PREPROV");
+        expectedVnfNode.setCloudConfiguration(expectedCloudConfiguration);
+        return expectedVnfNode;
+    }
+
+    @DataProvider
+    public static Object[][] isArrayDataProvider() {
+        return new Object[][] {
+                {"Json Array", buildArrayJson(NodeType.GENERIC_VNF), true},
+                {"Json Object", buildOneLevelJson(NodeType.GENERIC_VNF), false},
+                {"Json Array with another node type", buildArrayJson(NodeType.SERVICE_INSTANCE), false},
+                {"null json", null, false}
+        };
+    }
+
+    @Test(dataProvider = "isArrayDataProvider")
+    public void IsArrayType(String description, JsonNode jsonNode, boolean expectedResult) {
+        boolean isArray = aaiTreeNodeBuilder.isArray(jsonNode, NodeType.GENERIC_VNF);
+        assertEquals(expectedResult, isArray);
+    }
+
+    @Test
+    public void jsonToAaiNodeTest() {
+        NodeType nodeType = NodeType.SERVICE_INSTANCE;
+        JsonNode node = buildOneLevelJson(nodeType);
+        ConcurrentSkipListSet<AAITreeNode> nodesAccumulator = new ConcurrentSkipListSet<>(comparing(AAITreeNode::getUniqueNodeKey));
+
+        AAITreeNode aaiTreeNode = aaiTreeNodeBuilder.createAaiNode(nodeType, node, nodesAccumulator);
+
+        assertEquals("any-instance-id", aaiTreeNode.getId());
+        assertEquals("any-instance-name", aaiTreeNode.getName());
+        assertTrue(nodesAccumulator.contains(aaiTreeNode));
+    }
+
+    @Test
+    public void getNextLevelInPathsTreeTest() {
+        Tree<AAIServiceTree.AaiRelationship> firstLevelTree = getPathsTree();
+
+        Tree<AAIServiceTree.AaiRelationship> secondLevelTree = aaiTreeNodeBuilder.getNextLevelInPathsTree(firstLevelTree, NodeType.GENERIC_VNF.getType());
+        assertEquals(NodeType.GENERIC_VNF.getType(), secondLevelTree.getRootValue().type);
+
+        Tree<AAIServiceTree.AaiRelationship> thirdLevelTree = aaiTreeNodeBuilder.getNextLevelInPathsTree(secondLevelTree, NodeType.INSTANCE_GROUP.getType());
+        assertEquals(NodeType.INSTANCE_GROUP.getType(), thirdLevelTree.getRootValue().type);
+    }
+
+    @Test
+    public void getNextLevelInPathsTreeTest_givenIrrelevantNode_expectedNull() {
+        Tree<AAIServiceTree.AaiRelationship> pathsTree = getPathsTree();
+
+        Tree<AAIServiceTree.AaiRelationship> subTree = aaiTreeNodeBuilder.getNextLevelInPathsTree(pathsTree, NodeType.INSTANCE_GROUP.getType());
+
+        assertNull(subTree);
+    }
+
+    @Test
+    public void getRelationships_given2Relationships_expect1filtered() {
+        NodeType firstRelationship = NodeType.GENERIC_VNF;
+        NodeType secondRelationship = NodeType.INSTANCE_GROUP;
+        JsonNode jsonNode = buildOneLevelJson(NodeType.SERVICE_INSTANCE, firstRelationship, secondRelationship);
+
+        List<Relationship> relationships = aaiTreeNodeBuilder.getFilteredRelationships(jsonNode, getPathsTree());
+
+        assertEquals(1, relationships.size());
+        assertEquals(firstRelationship.getType(), relationships.get(0).getRelatedTo());
+    }
+
+    @Test
+    public void getRelationships_givenNoRelationships_expectedEmptyListTest() {
+        JsonNode jsonNode = buildOneLevelJson(NodeType.SERVICE_INSTANCE);
+
+        List<Relationship> relationships = aaiTreeNodeBuilder.getFilteredRelationships(jsonNode, getPathsTree());
+
+        assertThat(relationships, is(empty()));
+    }
+
+    @Test
+    public void getRelationships_given2RelationshipsNotExistInTreePaths_expectAllFiltered() {
+        NodeType firstRelationship = NodeType.CONFIGURATION;
+        NodeType secondRelationship = NodeType.INSTANCE_GROUP;
+        JsonNode jsonNode = buildOneLevelJson(NodeType.SERVICE_INSTANCE, firstRelationship, secondRelationship);
+
+        List<Relationship> relationships = aaiTreeNodeBuilder.getFilteredRelationships(jsonNode, getPathsTree());
+
+        assertThat(relationships, is(empty()));
+    }
+
+    @Test
+    public void aggregateAllOtherPropertiesTest() {
+        NodeType nodeType = NodeType.SERVICE_INSTANCE;
+        JsonNode jsonNode = buildOneLevelJson(nodeType, NodeType.GENERIC_VNF, NodeType.GENERIC_VNF);
+        ((ObjectNode) jsonNode).put("nf-role", "any-value");
+
+        Map<String, Object> additionalProps = aaiTreeNodeBuilder.aggregateAllOtherProperties(jsonNode, nodeType);
+        assertThat(additionalProps, is(ImmutableMap.of(
+                "nf-role", "any-value")));
+    }
+
+    @Test
+    public void parseNodeAndFilterRelationshipsTest() {
+        NodeType nodeType = NodeType.SERVICE_INSTANCE;
+        JsonNode jsonNode = buildOneLevelJson(NodeType.SERVICE_INSTANCE, NodeType.GENERIC_VNF, NodeType.NETWORK, NodeType.VF_MODULE);
+        ConcurrentSkipListSet<AAITreeNode> nodesAccumulator = new ConcurrentSkipListSet<>(comparing(AAITreeNode::getUniqueNodeKey));
+
+        Pair<AAITreeNode, List<Relationship>> resultNode = aaiTreeNodeBuilder.parseNodeAndFilterRelationships(jsonNode, nodeType,
+                nodesAccumulator, getPathsTree());
+
+        assertEquals(nodeType, resultNode.getKey().getType());
+        assertEquals(2, resultNode.getValue().size());
+        assertEquals(NodeType.GENERIC_VNF.getType(), resultNode.getValue().get(0).getRelatedTo());
+        assertEquals(NodeType.NETWORK.getType(), resultNode.getValue().get(1).getRelatedTo());
+    }
+
+    @Test(expectedExceptions = GenericUncheckedException.class ,expectedExceptionsMessageRegExp = "AAI node fetching failed.")
+    public void fetchChildrenAsyncTest_given2children_expected1Ok1Timeout() {
+        ConcurrentSkipListSet<AAITreeNode> nodesAccumulator = new ConcurrentSkipListSet<>(comparing(AAITreeNode::getUniqueNodeKey));
+        ExecutorService threadPool = Executors.newFixedThreadPool(5);
+
+        AAITreeNode rootNode = createExpectedGroupNode();
+        JsonNode relationshipJson = getRelationships(NodeType.GENERIC_VNF, NodeType.NETWORK);
+        List<Relationship> relationships = mapper.convertValue(relationshipJson, RelationshipList.class).getRelationship();
+
+        when(aaiClientMock.typedAaiRest(Unchecked.toURI(relationships.get(0).getRelatedLink()), JsonNode.class, null, HttpMethod.GET, false))
+                .thenReturn(buildOneLevelJson(NodeType.GENERIC_VNF));
+
+        when(aaiClientMock.typedAaiRest(Unchecked.toURI(relationships.get(1).getRelatedLink()), JsonNode.class, null, HttpMethod.GET, false))
+                .thenAnswer((Answer<JsonNode>) invocation -> {
+                    Thread.sleep(2000);
+                    return buildOneLevelJson(NodeType.NETWORK);
+                });
+
+        aaiTreeNodeBuilder.fetchChildrenAsync(threadPool, nodesAccumulator, rootNode, relationships, getPathsTree(), 1);
+
+        assertEquals(2, rootNode.getChildren().size());
+        assertEquals(NodeType.GENERIC_VNF, rootNode.getChildren().get(0).getType());
+        assertEquals(NodeType.NETWORK, rootNode.getChildren().get(1).getType());
+    }
+
+    @DataProvider
+    public Object[][] testIsListOfKeyResultsDataProvider() {
+        return new Object[][]{
+                {"Node has results with several values",
+                        "{\"results\":[{\"l3-network\":{}},{\"l3-network\":{}},{\"l3-network\":{}}]}",
+                        true},
+                {"Node has results with no values",
+                        "{\"results\":[]}",
+                        true},
+                {"Node has results, but it isn't an array",
+                        "{\"results\":{\"some-field\":{}}}",
+                        false},
+                {"Node doesn't have results",
+                        "{\"l3-network\":[{},{}]}",
+                        false},
+                {"Node is null",
+                        "null",
+                        false},
+        };
+    }
+
+    @Test(dataProvider = "testIsListOfKeyResultsDataProvider")
+    public void testIsListOfKeyResults(String testCase, String input, boolean expectedResult) throws IOException {
+        assertEquals(testCase + ": " + input,
+                expectedResult, aaiTreeNodeBuilder.isListOfKeyResults(new ObjectMapper().readTree(input)));
+    }
+
+    private Tree<AAIServiceTree.AaiRelationship> getPathsTree() {
+        Tree<AAIServiceTree.AaiRelationship> pathsTree = new Tree<>(new AAIServiceTree.AaiRelationship(NodeType.SERVICE_INSTANCE));
+        pathsTree.addPath(AAIServiceTree.toAaiRelationshipList(NodeType.GENERIC_VNF, NodeType.INSTANCE_GROUP));
+        pathsTree.addPath(AAIServiceTree.toAaiRelationshipList(NodeType.NETWORK));
+
+        return pathsTree;
+    }
+
+    private static JsonNode buildOneLevelJson(NodeType nodeType, NodeType...relationships) {
+        ObjectNode objectNode = mapper.createObjectNode();
+        objectNode.put(nodeType.getId(), "any-instance-id");
+        objectNode.put(nodeType.getName(), "any-instance-name");
+        if (relationships.length > 0 ) {
+            objectNode.putPOJO("relationship-list", getRelationships(relationships));
+        }
+        return objectNode;
+    }
+
+    private static JsonNode buildArrayJson(NodeType nodeType) {
+        ObjectNode objectNode = mapper.createObjectNode();
+        ArrayNode arrayNode = objectNode.putArray(nodeType.getType());
+        arrayNode.add(buildOneLevelJson(nodeType));
+        arrayNode.add(buildOneLevelJson(nodeType));
+
+        return objectNode;
+    }
+
+    private static JsonNode getRelationship(String nodeType) {
+        ObjectNode relationship = mapper.createObjectNode();
+        relationship.put("related-to", nodeType);
+        relationship.put("relationship-label", "org.onap.relationships.inventory.ComposedOf");
+        relationship.put("related-link", "/aai/v12/network/" + nodeType + "s/" + nodeType + "/cf6f60cd-808d-44e6-978b-c663e00dba8d");
+        return relationship;
+    }
+
+    private static JsonNode getRelationships(NodeType...nodeTypes) {
+        ObjectNode relationshipList = mapper.createObjectNode();
+        ArrayNode relationships = relationshipList.putArray("relationship");
+
+        for (NodeType nodeType: nodeTypes) {
+            relationships.add(getRelationship(nodeType.getType()));
+        }
+
+        return relationshipList;
+    }
+
 }
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/AaiServiceImplTest.java b/vid-app-common/src/test/java/org/onap/vid/services/AaiServiceImplTest.java
index bb47180..09a5368 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/AaiServiceImplTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/AaiServiceImplTest.java
@@ -21,16 +21,36 @@
 
 package org.onap.vid.services;
 
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.isNull;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+import static org.onap.vid.model.aaiTree.NodeType.SERVICE_INSTANCE;
+
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import io.joshworks.restclient.http.HttpResponse;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import javax.ws.rs.core.Response;
 import org.apache.http.HttpStatus;
 import org.jetbrains.annotations.NotNull;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
+import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.onap.vid.aai.AaiClientInterface;
 import org.onap.vid.aai.AaiGetVnfResponse;
@@ -70,721 +90,711 @@
 import org.onap.vid.model.aaiTree.RelatedVnf;
 import org.onap.vid.model.aaiTree.ServiceInstance;
 import org.onap.vid.roles.RoleValidator;
-
-import javax.ws.rs.core.Response;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import org.springframework.http.HttpMethod;
 
 @RunWith(MockitoJUnitRunner.class)
 public class AaiServiceImplTest {
 
-	private static final String GLOBAL_CUSTOMER_ID = "GLOBAL_CUSTOMER_ID";
-	private static final String CLOUD_REGION_ID = "CLOUD_REGION_ID";
-	private static final String VNF_TYPE = "VNF_TYPE";
-	private static final String TENANT_ID = "TENANT_ID";
-	private static final String TENANT_NAME = "TENANT_NAME";
-	private static final String SERVICE_TYPE = "SERVICE_TYPE";
-	private static final String CORRECT_VALUE = "CORRECT_VALUE";
-	private static final String SUBSCRIBER_ID = "SUBSCRIBER_ID_EXPECTED";
-	private static final String STATUS_TEXT = "STATUS_TEXT";
-	private static final String GLOBAL_SUBSCRIBER_ID = "GLOBAL_SUBSCRIBER_ID";
-	private static final String GLOBAL_SUBSCRIBER_ID_NULL_RESPONSE = "ID_NULL";
-	private static final String VNF_INSTANCE_ID_OK = "VNF_INSTANCE_ID_OK";
-	private static final String VNF_INSTANCE_ID_FAIL = "VNF_INSTANCE_ID_FAIL";
-	private static final String PARENT_NAME = "PARENT_NAME";
-	private static final String PARENT_ID = "PARENT_ID";
-	private static final String INVARIANT_ID = "INVARIANT_ID";
-	private static final String GROUP_TYPE_FAILING = "GROUP_TYPE_FAILING";
-	private static final String GROUP_ROLE_OK = "GROUP_ROLE_OK";
-	private static final String GROUP_ROLE_FAILING = "GROUP_ROLE_FAILING";
-	private static final String group_type_ok = "GROUP_TYPE_OK";
-	private static final String CLOUD_TYPE = "CLOUD_TYPE";
+    private static final String GLOBAL_CUSTOMER_ID = "GLOBAL_CUSTOMER_ID";
+    private static final String CLOUD_REGION_ID = "CLOUD_REGION_ID";
+    private static final String VNF_TYPE = "VNF_TYPE";
+    private static final String TENANT_ID = "TENANT_ID";
+    private static final String TENANT_NAME = "TENANT_NAME";
+    private static final String SERVICE_TYPE = "SERVICE_TYPE";
+    private static final String CORRECT_VALUE = "CORRECT_VALUE";
+    private static final String SUBSCRIBER_ID = "SUBSCRIBER_ID_EXPECTED";
+    private static final String STATUS_TEXT = "STATUS_TEXT";
+    private static final String GLOBAL_SUBSCRIBER_ID = "GLOBAL_SUBSCRIBER_ID";
+    private static final String GLOBAL_SUBSCRIBER_ID_NULL_RESPONSE = "ID_NULL";
+    private static final String VNF_INSTANCE_ID_OK = "VNF_INSTANCE_ID_OK";
+    private static final String VNF_INSTANCE_ID_FAIL = "VNF_INSTANCE_ID_FAIL";
+    private static final String PARENT_NAME = "PARENT_NAME";
+    private static final String PARENT_ID = "PARENT_ID";
+    private static final String INVARIANT_ID = "INVARIANT_ID";
+    private static final String GROUP_TYPE_FAILING = "GROUP_TYPE_FAILING";
+    private static final String GROUP_ROLE_OK = "GROUP_ROLE_OK";
+    private static final String GROUP_ROLE_FAILING = "GROUP_ROLE_FAILING";
+    private static final String group_type_ok = "GROUP_TYPE_OK";
+    private static final String CLOUD_TYPE = "CLOUD_TYPE";
 
-	@Mock
-	private HttpResponse<SubscriberList> responseAllSubscribers;
-	@Mock
-	private AaiResponse<OperationalEnvironmentList> aaiResponseOpEnvList;
-	@Mock
-	private AaiResponse aaiResponse;
-	@Mock
-	private AaiResponse<JsonNode> aaiResponseJsonNode;
-	@Mock
-	private RoleValidator roleValidator;
+    @Mock
+    private HttpResponse<SubscriberList> responseAllSubscribers;
+    @Mock
+    private AaiResponse<OperationalEnvironmentList> aaiResponseOpEnvList;
+    @Mock
+    private AaiResponse aaiResponse;
+    @Mock
+    private AaiResponse<JsonNode> aaiResponseJsonNode;
+    @Mock
+    private RoleValidator roleValidator;
 
-	@Mock
-	private AaiClientInterface aaiClient;
-	@Mock
-	private AaiOverTLSClientInterface aaiOverTLSClient;
-	@Mock
-	private AaiResponseTranslator aaiResponseTranslator;
-	@Mock
-	private AAIServiceTree aaiServiceTree;
+    @Mock
+    private AaiClientInterface aaiClient;
+    @Mock
+    private AaiOverTLSClientInterface aaiOverTLSClient;
+    @Mock
+    private AaiResponseTranslator aaiResponseTranslator;
+    @Mock
+    private AAIServiceTree aaiServiceTree;
+    @Spy
+    private ExecutorService executorService = Executors.newFixedThreadPool(1);
 
-	@InjectMocks
-	private AaiServiceImpl aaiService;
+    @InjectMocks
+    private AaiServiceImpl aaiService;
 
+    @Test
+    public void shouldGetFullSubscriberListWithoutValidator() {
+        when(aaiOverTLSClient.getAllSubscribers()).thenReturn(responseAllSubscribers);
 
-	@Test
-	public void shouldGetFullSubscriberListWithoutValidator() {
-		when(aaiOverTLSClient.getAllSubscribers()).thenReturn(responseAllSubscribers);
+        HttpResponse<SubscriberList> actualResponse = aaiService.getFullSubscriberList();
 
-		HttpResponse<SubscriberList> actualResponse = aaiService.getFullSubscriberList();
+        assertThat(actualResponse).isEqualTo(responseAllSubscribers);
+    }
 
-		assertThat(actualResponse).isEqualTo(responseAllSubscribers);
-	}
+    @Test
+    public void shouldGetFullSubscriberListWithValidator() {
+        Subscriber subscriber = createSubscriber();
+        SubscriberList subscriberList = new SubscriberList(Collections.singletonList(subscriber));
 
-	@Test
-	public void shouldGetFullSubscriberListWithValidator() {
-		Subscriber subscriber = createSubscriber();
-		SubscriberList subscriberList = new SubscriberList(Collections.singletonList(subscriber));
+        when(aaiOverTLSClient.getAllSubscribers()).thenReturn(responseAllSubscribers);
+        when(responseAllSubscribers.getBody()).thenReturn(subscriberList);
+        when(responseAllSubscribers.getStatusText()).thenReturn(STATUS_TEXT);
+        when(responseAllSubscribers.getStatus()).thenReturn(HttpStatus.SC_OK);
+        SubscriberFilteredResults expectedSubscribers = new SubscriberFilteredResults(roleValidator, subscriberList,
+            STATUS_TEXT, HttpStatus.SC_OK);
 
-		when(aaiOverTLSClient.getAllSubscribers()).thenReturn(responseAllSubscribers);
-		when(responseAllSubscribers.getBody()).thenReturn(subscriberList);
-		when(responseAllSubscribers.getStatusText()).thenReturn(STATUS_TEXT);
-		when(responseAllSubscribers.getStatus()).thenReturn(HttpStatus.SC_OK);
-		SubscriberFilteredResults expectedSubscribers = new SubscriberFilteredResults(roleValidator, subscriberList,
-				STATUS_TEXT, HttpStatus.SC_OK);
+        SubscriberFilteredResults actualSubscribers = aaiService.getFullSubscriberList(roleValidator);
 
-		SubscriberFilteredResults actualSubscribers = aaiService.getFullSubscriberList(roleValidator);
+        assertThat(actualSubscribers.getHttpCode()).isEqualTo(expectedSubscribers.getHttpCode());
+        assertThat(actualSubscribers.getErrorMessage()).isEqualTo(expectedSubscribers.getErrorMessage());
+    }
 
-		assertThat(actualSubscribers.getHttpCode()).isEqualTo(expectedSubscribers.getHttpCode());
-		assertThat(actualSubscribers.getErrorMessage()).isEqualTo(expectedSubscribers.getErrorMessage());
-	}
+    @Test
+    public void shouldGetOperationalEnvironments() {
+        when(aaiClient.getOperationalEnvironments(anyString(), anyString()))
+            .thenReturn(aaiResponseOpEnvList);
 
-	@Test
-	public void shouldGetOperationalEnvironments() {
-		when(aaiClient.getOperationalEnvironments(anyString(), anyString()))
-				.thenReturn(aaiResponseOpEnvList);
+        AaiResponse<OperationalEnvironmentList> expectedEnvList =
+            aaiService.getOperationalEnvironments(anyString(), anyString());
 
-		AaiResponse<OperationalEnvironmentList> expectedEnvList =
-				aaiService.getOperationalEnvironments(anyString(), anyString());
+        assertThat(expectedEnvList).isEqualTo(aaiResponseOpEnvList);
+    }
 
-		assertThat(expectedEnvList).isEqualTo(aaiResponseOpEnvList);
-	}
+    @Test
+    public void shouldGetSubscriberData() {
+        Services services = createAaiResponseServices();
+        AaiResponse<Services> aaiResponseServices = new AaiResponse<>(services, null, HttpStatus.SC_OK);
 
-	@Test
-	public void shouldGetSubscriberData() {
-		Services services = createAaiResponseServices();
-		AaiResponse<Services> aaiResponseServices = new AaiResponse<>(services, null, HttpStatus.SC_OK);
+        when(aaiClient.getSubscriberData(SUBSCRIBER_ID, false)).thenReturn(aaiResponseServices);
+        when(roleValidator.isServicePermitted(eq(GLOBAL_CUSTOMER_ID), anyString())).thenReturn(Boolean.TRUE);
 
-		when(aaiClient.getSubscriberData(SUBSCRIBER_ID)).thenReturn(aaiResponseServices);
-		when(roleValidator.isServicePermitted(eq(GLOBAL_CUSTOMER_ID), anyString())).thenReturn(Boolean.TRUE);
+        AaiResponse actualResponse = aaiService.getSubscriberData(SUBSCRIBER_ID, roleValidator, false);
+        List<ServiceSubscription> actualServiceSubscriptions = ((AaiResponse<Services>) actualResponse)
+            .getT().serviceSubscriptions.serviceSubscription;
 
-		AaiResponse actualResponse = aaiService.getSubscriberData(SUBSCRIBER_ID, roleValidator);
-		List<ServiceSubscription> actualServiceSubscriptions = ((AaiResponse<Services>) actualResponse)
-				.getT().serviceSubscriptions.serviceSubscription;
+        assertThat(actualResponse).isEqualTo(aaiResponseServices);
+        assertThat(actualServiceSubscriptions).allMatch(s -> s.isPermitted);
+    }
 
-		assertThat(actualResponse).isEqualTo(aaiResponseServices);
-		assertThat(actualServiceSubscriptions).allMatch(s -> s.isPermitted);
-	}
+    @Test
+    public void shouldGetServiceInstanceEmptySearchResults() {
+        ServiceInstancesSearchResults serviceInstancesSearchResults = new ServiceInstancesSearchResults();
+        AaiResponse<ServiceInstancesSearchResults> emptyResponse = new AaiResponse<>(serviceInstancesSearchResults,
+            null, HttpStatus.SC_OK);
 
-	@Test
-	public void shouldGetServiceInstanceEmptySearchResults() {
-		ServiceInstancesSearchResults serviceInstancesSearchResults = new ServiceInstancesSearchResults();
-		AaiResponse<ServiceInstancesSearchResults> emptyResponse = new AaiResponse<>(serviceInstancesSearchResults,
-				null, HttpStatus.SC_OK);
+        AaiResponse actualResponse = aaiService.getServiceInstanceSearchResults(null, null,
+            null, null, null);
 
-		AaiResponse actualResponse = aaiService.getServiceInstanceSearchResults(null, null,
-				null, null, null);
+        assertThat(actualResponse).isEqualToComparingFieldByFieldRecursively(emptyResponse);
+    }
 
-		assertThat(actualResponse).isEqualToComparingFieldByFieldRecursively(emptyResponse);
-	}
+    @Test
+    public void shouldGetVersionByInvariantId() {
+        Response response = mock(Response.class);
+        when(aaiClient.getVersionByInvariantId(any())).thenReturn(response);
 
-	@Test
-	public void shouldGetVersionByInvariantId() {
-		Response response = mock(Response.class);
-		when(aaiClient.getVersionByInvariantId(any())).thenReturn(response);
+        Response actualResponse = aaiService.getVersionByInvariantId(any());
 
-		Response actualResponse = aaiService.getVersionByInvariantId(any());
+        assertThat(actualResponse).isEqualTo(response);
+    }
 
-		assertThat(actualResponse).isEqualTo(response);
-	}
+    @Test
+    public void shouldGetSpecificPnf() {
+        AaiResponse<Pnf> expectedResponse = new AaiResponse<>(Pnf.builder().build(), null, HttpStatus.SC_OK);
+        when(aaiClient.getSpecificPnf(anyString())).thenReturn(expectedResponse);
 
-	@Test
-	public void shouldGetSpecificPnf() {
-		AaiResponse<Pnf> expectedResponse = new AaiResponse<>(Pnf.builder().build(), null, HttpStatus.SC_OK);
-		when(aaiClient.getSpecificPnf(anyString())).thenReturn(expectedResponse);
+        AaiResponse<Pnf> actualResponse = aaiService.getSpecificPnf(anyString());
 
-		AaiResponse<Pnf> actualResponse = aaiService.getSpecificPnf(anyString());
+        assertThat(actualResponse).isEqualTo(expectedResponse);
+    }
 
-		assertThat(actualResponse).isEqualTo(expectedResponse);
-	}
+    @Test
+    public void shouldGetPnfData() {
+        when(aaiClient.getPNFData(anyString(), anyString(), anyString(), anyString(), anyString(), anyString(),
+            anyString())).thenReturn(aaiResponse);
 
-	@Test
-	public void shouldGetPnfData() {
-		when(aaiClient.getPNFData(anyString(), anyString(), anyString(), anyString(), anyString(), anyString(),
-				anyString())).thenReturn(aaiResponse);
+        AaiResponse actualResponse = aaiService.getPNFData(anyString(), anyString(), anyString(), anyString(),
+            anyString(), anyString(), anyString());
 
-		AaiResponse actualResponse = aaiService.getPNFData(anyString(), anyString(), anyString(), anyString(),
-				anyString(), anyString(), anyString());
+        assertThat(actualResponse).isEqualTo(aaiResponse);
+    }
 
-		assertThat(actualResponse).isEqualTo(aaiResponse);
-	}
+    @Test
+    public void shouldGetServices() {
+        org.onap.vid.aai.model.AaiGetServicesRequestModel.Service s1 =
+            createService("ID1", "V1", "D1");
+        org.onap.vid.aai.model.AaiGetServicesRequestModel.Service s2 =
+            createService("ID2", "V2", "D2");
 
-	@Test
-	public void shouldGetServices() {
-		org.onap.vid.aai.model.AaiGetServicesRequestModel.Service s1 =
-				createService("ID1", "V1", "D1");
-		org.onap.vid.aai.model.AaiGetServicesRequestModel.Service s2 =
-				createService("ID2", "V2", "D2");
+        GetServicesAAIRespone services = new GetServicesAAIRespone();
+        services.service = Arrays.asList(s1, s2);
 
-		GetServicesAAIRespone services = new GetServicesAAIRespone();
-		services.service = Arrays.asList(s1, s2);
+        AaiResponse<GetServicesAAIRespone> aaiResponseServices =
+            new AaiResponse<>(services, null, HttpStatus.SC_OK);
 
-		AaiResponse<GetServicesAAIRespone> aaiResponseServices =
-				new AaiResponse<>(services, null, HttpStatus.SC_OK);
+        when(aaiClient.getServices()).thenReturn(aaiResponseServices);
 
-		when(aaiClient.getServices()).thenReturn(aaiResponseServices);
+        Object actualObjectOfResponse = aaiService.getServices(roleValidator).getT();
 
-		Object actualObjectOfResponse = aaiService.getServices(roleValidator).getT();
+        assertThat(actualObjectOfResponse).isNotNull();
+        assertThat(((GetServicesAAIRespone) actualObjectOfResponse).service).allMatch(s -> s.isPermitted);
+    }
 
-		assertThat(actualObjectOfResponse).isNotNull();
-		assertThat(((GetServicesAAIRespone) actualObjectOfResponse).service).allMatch(s -> s.isPermitted);
-	}
+    @Test
+    public void shouldGetTenants() {
+        GetTenantsResponse tenant1 = new GetTenantsResponse("REGION_ID1", "CLOUD_OWNER1",
+            "TENANT_NAME1", "TENANT_ID1", true);
+        GetTenantsResponse tenant2 = new GetTenantsResponse("REGION_ID2", "CLOUD_OWNER2",
+            "TENANT_NAME2", "TENANT_ID2", false);
+        GetTenantsResponse[] tenants = {tenant1, tenant2};
+        AaiResponse<GetTenantsResponse[]> aaiGetTenantsResponse = new AaiResponse<>(tenants,
+            null, HttpStatus.SC_OK);
 
-	@Test
-	public void shouldGetTenants() {
-		GetTenantsResponse tenant1 = new GetTenantsResponse("REGION_ID1", "CLOUD_OWNER1",
-				"TENANT_NAME1", "TENANT_ID1", true);
-		GetTenantsResponse tenant2 = new GetTenantsResponse("REGION_ID2", "CLOUD_OWNER2",
-				"TENANT_NAME2", "TENANT_ID2", false);
-		GetTenantsResponse[] tenants = {tenant1, tenant2};
-		AaiResponse<GetTenantsResponse[]> aaiGetTenantsResponse = new AaiResponse<>(tenants,
-				null, HttpStatus.SC_OK);
+        when(aaiClient.getTenants(anyString(), anyString())).thenReturn(aaiGetTenantsResponse);
+        when(roleValidator.isTenantPermitted(anyString(), anyString(), anyString()))
+            .thenReturn(Boolean.TRUE);
 
-		when(aaiClient.getTenants(anyString(), anyString())).thenReturn(aaiGetTenantsResponse);
-		when(roleValidator.isTenantPermitted(anyString(), anyString(), anyString()))
-				.thenReturn(Boolean.TRUE);
+        GetTenantsResponse[] actualResponses = aaiService
+            .getTenants(anyString(), anyString(), roleValidator).getT();
 
-		GetTenantsResponse[] actualResponses = aaiService
-				.getTenants(anyString(), anyString(), roleValidator).getT();
+        assertThat(actualResponses).isNotNull();
+        assertThat(actualResponses.length).isEqualTo(2);
+        assertThat(actualResponses).allMatch(tenant -> tenant.isPermitted);
+    }
 
-		assertThat(actualResponses).isNotNull();
-		assertThat(actualResponses.length).isEqualTo(2);
-		assertThat(actualResponses).allMatch(tenant -> tenant.isPermitted);
-	}
+    @Test
+    public void shouldGetVNFDataWithoutFiltering() {
+        when(aaiClient.getVNFData(anyString(), anyString(), anyString())).thenReturn(aaiResponse);
 
-	@Test
-	public void shouldGetVNFDataWithoutFiltering() {
-		when(aaiClient.getVNFData(anyString(), anyString(), anyString())).thenReturn(aaiResponse);
+        AaiResponse actualResponse = aaiService.getVNFData(anyString(), anyString(), anyString());
 
-		AaiResponse actualResponse = aaiService.getVNFData(anyString(), anyString(), anyString());
+        assertThat(actualResponse).isEqualTo(aaiResponse);
+    }
 
-		assertThat(actualResponse).isEqualTo(aaiResponse);
-	}
+    @Test
+    public void shouldGetVNFDataWithFiltering() {
+        VnfResult vnfResult1 = createVnfResult("ID1", "generic-vnf");
+        VnfResult vnfResult2 = createVnfResult("ID2", "service-instance");
+        VnfResult vnfResult3 = createVnfResult("ID3", "anything-else");
 
-	@Test
-	public void shouldGetVNFDataWithFiltering() {
-		VnfResult vnfResult1 = createVnfResult("ID1", "generic-vnf");
-		VnfResult vnfResult2 = createVnfResult("ID2", "service-instance");
-		VnfResult vnfResult3 = createVnfResult("ID3", "anything-else");
+        List<VnfResult> vnfResults = Arrays.asList(vnfResult1, vnfResult2, vnfResult3);
+        AaiResponse<AaiGetVnfResponse> aaiResponseGetVnfResponse = createAaiResponseVnfResponse(vnfResults);
 
-		List<VnfResult> vnfResults = Arrays.asList(vnfResult1, vnfResult2, vnfResult3);
-		AaiResponse<AaiGetVnfResponse> aaiResponseGetVnfResponse = createAaiResponseVnfResponse(vnfResults);
+        vnfResults = Arrays.asList(vnfResult1, vnfResult2);
+        AaiResponse<AaiGetVnfResponse> expectedResponseWithReturnedVnfs = createAaiResponseVnfResponse(vnfResults);
+        AaiResponse expectedResponseWithoutReturnedVnfs = new AaiResponse();
 
-		vnfResults = Arrays.asList(vnfResult1, vnfResult2);
-		AaiResponse<AaiGetVnfResponse> expectedResponseWithReturnedVnfs = createAaiResponseVnfResponse(vnfResults);
-		AaiResponse expectedResponseWithoutReturnedVnfs = new AaiResponse();
+        when(aaiClient.getVNFData(GLOBAL_SUBSCRIBER_ID, SERVICE_TYPE)).thenReturn(aaiResponseGetVnfResponse);
+        when(aaiClient.getVNFData(GLOBAL_SUBSCRIBER_ID_NULL_RESPONSE, SERVICE_TYPE)).thenReturn(null);
 
-		when(aaiClient.getVNFData(GLOBAL_SUBSCRIBER_ID, SERVICE_TYPE)).thenReturn(aaiResponseGetVnfResponse);
-		when(aaiClient.getVNFData(GLOBAL_SUBSCRIBER_ID_NULL_RESPONSE, SERVICE_TYPE)).thenReturn(null);
+        AaiResponse<AaiGetVnfResponse> actualResponseWithReturnedVnfs =
+            aaiService.getVNFData(GLOBAL_SUBSCRIBER_ID, SERVICE_TYPE);
+        AaiResponse<AaiGetVnfResponse> actualResponseWithoutReturnedVnfs =
+            aaiService.getVNFData(GLOBAL_SUBSCRIBER_ID_NULL_RESPONSE, SERVICE_TYPE);
 
-		AaiResponse<AaiGetVnfResponse> actualResponseWithReturnedVnfs =
-				aaiService.getVNFData(GLOBAL_SUBSCRIBER_ID, SERVICE_TYPE);
-		AaiResponse<AaiGetVnfResponse> actualResponseWithoutReturnedVnfs =
-				aaiService.getVNFData(GLOBAL_SUBSCRIBER_ID_NULL_RESPONSE, SERVICE_TYPE);
+        assertThat(actualResponseWithReturnedVnfs)
+            .isEqualToComparingFieldByFieldRecursively(expectedResponseWithReturnedVnfs);
+        assertThat(actualResponseWithoutReturnedVnfs)
+            .isEqualToComparingFieldByField(expectedResponseWithoutReturnedVnfs);
+    }
 
-		assertThat(actualResponseWithReturnedVnfs)
-				.isEqualToComparingFieldByFieldRecursively(expectedResponseWithReturnedVnfs);
-		assertThat(actualResponseWithoutReturnedVnfs)
-				.isEqualToComparingFieldByField(expectedResponseWithoutReturnedVnfs);
-	}
+    @Test
+    public void shouldGetAaiZones() {
+        when(aaiClient.getAllAicZones()).thenReturn(aaiResponse);
 
-	@Test
-	public void shouldGetAaiZones() {
-		when(aaiClient.getAllAicZones()).thenReturn(aaiResponse);
+        AaiResponse actualResponse = aaiService.getAaiZones();
 
-		AaiResponse actualResponse = aaiService.getAaiZones();
+        assertThat(actualResponse).isEqualTo(aaiResponse);
+    }
 
-		assertThat(actualResponse).isEqualTo(aaiResponse);
-	}
+    @Test
+    public void shouldGetAicZoneForPnf() {
+        ServiceRelationships relationsService = createServiceRelationships();
+        AaiResponse<ServiceRelationships> expectedServiceInstanceResp =
+            new AaiResponse<>(relationsService, null, HttpStatus.SC_OK);
+        AaiResponse<String> expectedResponse = new AaiResponse<>(CORRECT_VALUE, null, HttpStatus.SC_OK);
 
-	@Test
-	public void shouldGetAicZoneForPnf() {
-		ServiceRelationships relationsService = createServiceRelationships();
-		AaiResponse<ServiceRelationships> expectedServiceInstanceResp =
-				new AaiResponse<>(relationsService, null, HttpStatus.SC_OK);
-		AaiResponse<String> expectedResponse = new AaiResponse<>(CORRECT_VALUE, null, HttpStatus.SC_OK);
+        when(aaiClient.getServiceInstance(anyString(), anyString(), anyString()))
+            .thenReturn(expectedServiceInstanceResp);
 
-		when(aaiClient.getServiceInstance(anyString(), anyString(), anyString()))
-				.thenReturn(expectedServiceInstanceResp);
+        AaiResponse actualResponse = aaiService.getAicZoneForPnf(anyString(), anyString(), anyString());
 
-		AaiResponse actualResponse = aaiService.getAicZoneForPnf(anyString(), anyString(), anyString());
+        assertThat(actualResponse).isEqualToComparingFieldByField(expectedResponse);
+    }
 
-		assertThat(actualResponse).isEqualToComparingFieldByField(expectedResponse);
-	}
+    @Test
+    public void shouldGetNodeTemplateInstances() {
+        when(aaiClient.getNodeTemplateInstances(anyString(), anyString(), anyString(),
+            anyString(), anyString())).thenReturn(aaiResponse);
 
-	@Test
-	public void shouldGetNodeTemplateInstances() {
-		when(aaiClient.getNodeTemplateInstances(anyString(), anyString(), anyString(),
-				anyString(), anyString())).thenReturn(aaiResponse);
+        AaiResponse expectedResponse = aaiService.getNodeTemplateInstances(anyString(), anyString(), anyString(),
+            anyString(), anyString());
 
-		AaiResponse expectedResponse = aaiService.getNodeTemplateInstances(anyString(), anyString(), anyString(),
-				anyString(), anyString());
+        assertThat(expectedResponse).isEqualTo(aaiResponse);
+    }
 
-		assertThat(expectedResponse).isEqualTo(aaiResponse);
-	}
+    @Test
+    public void shouldGetNetworkCollectionDetails() {
+        when(aaiClient.getNetworkCollectionDetails(anyString())).thenReturn(aaiResponse);
 
-	@Test
-	public void shouldGetNetworkCollectionDetails() {
-		when(aaiClient.getNetworkCollectionDetails(anyString())).thenReturn(aaiResponse);
+        AaiResponse expectedResponse = aaiService.getNetworkCollectionDetails(anyString());
 
-		AaiResponse expectedResponse = aaiService.getNetworkCollectionDetails(anyString());
+        assertThat(expectedResponse).isEqualTo(aaiResponse);
+    }
 
-		assertThat(expectedResponse).isEqualTo(aaiResponse);
-	}
+    @Test
+    public void shouldGetInstanceGroupsByCloudRegion() {
+        AaiGetInstanceGroupsByCloudRegion aaiGetInstanceGroupsByCloudRegion =
+            mock(AaiGetInstanceGroupsByCloudRegion.class);
+        AaiResponse<AaiGetInstanceGroupsByCloudRegion> expectedResponse =
+            new AaiResponse<>(aaiGetInstanceGroupsByCloudRegion, null, HttpStatus.SC_OK);
 
-	@Test
-	public void shouldGetInstanceGroupsByCloudRegion() {
-		AaiGetInstanceGroupsByCloudRegion aaiGetInstanceGroupsByCloudRegion =
-				mock(AaiGetInstanceGroupsByCloudRegion.class);
-		AaiResponse<AaiGetInstanceGroupsByCloudRegion> expectedResponse =
-				new AaiResponse<>(aaiGetInstanceGroupsByCloudRegion, null, HttpStatus.SC_OK);
+        when(aaiClient.getInstanceGroupsByCloudRegion(anyString(), anyString(), anyString()))
+            .thenReturn(expectedResponse);
+        AaiResponse<AaiGetInstanceGroupsByCloudRegion> actualResponse =
+            aaiService.getInstanceGroupsByCloudRegion(anyString(), anyString(), anyString());
 
-		when(aaiClient.getInstanceGroupsByCloudRegion(anyString(), anyString(), anyString()))
-				.thenReturn(expectedResponse);
-		AaiResponse<AaiGetInstanceGroupsByCloudRegion> actualResponse =
-				aaiService.getInstanceGroupsByCloudRegion(anyString(), anyString(), anyString());
+        assertThat(actualResponse).isEqualTo(expectedResponse);
+    }
 
-		assertThat(actualResponse).isEqualTo(expectedResponse);
-	}
+    @Test
+    public void shouldGetServicesByDistributionStatus() {
+        Result resultWithModelType = createResult("MODEL_TYPE1", "1");
+        Result resultWithEmptyModelType = createResult(null, "2");
+        Result resultWithoutModel = new Result();
+        resultWithoutModel.setModel(null);
+        Result resultWithoutValidModel = createResultWithoutValidModel();
+        List<Result> results = Arrays.asList(resultWithModelType, resultWithEmptyModelType, resultWithoutModel,
+            resultWithoutValidModel);
 
-	@Test
-	public void shouldGetServicesByDistributionStatus() {
-		Result resultWithModelType = createResult("MODEL_TYPE1", "1");
-		Result resultWithEmptyModelType = createResult(null, "2");
-		Result resultWithoutModel = new Result();
-		resultWithoutModel.setModel(null);
-		Result resultWithoutValidModel = createResultWithoutValidModel();
-		List<Result> results = Arrays.asList(resultWithModelType, resultWithEmptyModelType, resultWithoutModel,
-				resultWithoutValidModel);
+        GetServiceModelsByDistributionStatusResponse serviceModels = new GetServiceModelsByDistributionStatusResponse();
+        serviceModels.setResults(results);
 
-		GetServiceModelsByDistributionStatusResponse serviceModels = new GetServiceModelsByDistributionStatusResponse();
-		serviceModels.setResults(results);
+        AaiResponse<GetServiceModelsByDistributionStatusResponse> serviceModelsByDistributionStatusResponse
+            = new AaiResponse<>(serviceModels, null, HttpStatus.SC_OK);
 
-		AaiResponse<GetServiceModelsByDistributionStatusResponse> serviceModelsByDistributionStatusResponse
-				= new AaiResponse<>(serviceModels, null, HttpStatus.SC_OK);
+        Service[] expectedServices = {
+            createService("MODEL_TYPE1", "1"),
+            createService("", "2")
+        };
 
-		Service[] expectedServices = {
-				createService("MODEL_TYPE1", "1"),
-				createService("", "2")
-		};
+        when(aaiClient.getServiceModelsByDistributionStatus()).thenReturn(serviceModelsByDistributionStatusResponse);
+        Collection<Service> actualServices = aaiService.getServicesByDistributionStatus();
 
-		when(aaiClient.getServiceModelsByDistributionStatus()).thenReturn(serviceModelsByDistributionStatusResponse);
-		Collection<Service> actualServices = aaiService.getServicesByDistributionStatus();
+        assertThat(actualServices)
+            .hasSize(2)
+            .usingFieldByFieldElementComparator()
+            .containsExactly(expectedServices);
+    }
 
-		assertThat(actualServices)
-				.hasSize(2)
-				.usingFieldByFieldElementComparator()
-				.containsExactly(expectedServices);
-	}
+    @Test
+    public void shouldReturnEmptyListOfServices() {
+        AaiResponse<GetServiceModelsByDistributionStatusResponse> emptyResponse
+            = new AaiResponse<>(null, null, HttpStatus.SC_OK);
 
-	@Test
-	public void shouldReturnEmptyListOfServices() {
-		AaiResponse<GetServiceModelsByDistributionStatusResponse> emptyResponse
-				= new AaiResponse<>(null, null, HttpStatus.SC_OK);
+        when(aaiClient.getServiceModelsByDistributionStatus()).thenReturn(emptyResponse);
+        Collection<Service> actualServices = aaiService.getServicesByDistributionStatus();
 
-		when(aaiClient.getServiceModelsByDistributionStatus()).thenReturn(emptyResponse);
-		Collection<Service> actualServices = aaiService.getServicesByDistributionStatus();
+        assertThat(actualServices).isEqualTo(Collections.EMPTY_LIST);
+    }
 
-		assertThat(actualServices).isEqualTo(Collections.EMPTY_LIST);
-	}
+    @Test
+    public void shouldGetServiceInstanceAssociatedPnfs() {
+        ServiceRelationships relationsList = createServiceRelationships();
+        LogicalLinkResponse logicalLinkResponse = new LogicalLinkResponse();
+        logicalLinkResponse.setRelationshipList(relationsList.getRelationshipList());
 
-	@Test
-	public void shouldGetServiceInstanceAssociatedPnfs() {
-		ServiceRelationships relationsList = createServiceRelationships();
-		LogicalLinkResponse logicalLinkResponse = new LogicalLinkResponse();
-		logicalLinkResponse.setRelationshipList(relationsList.getRelationshipList());
+        AaiResponse<LogicalLinkResponse> aaiResponseLogicalLinkResponse =
+            new AaiResponse<>(logicalLinkResponse, null, HttpStatus.SC_OK);
+        AaiResponse<ServiceRelationships> aaiResponseServiceRelations =
+            new AaiResponse<>(relationsList, null, HttpStatus.SC_OK);
 
-		AaiResponse<LogicalLinkResponse> aaiResponseLogicalLinkResponse =
-				new AaiResponse<>(logicalLinkResponse, null, HttpStatus.SC_OK);
-		AaiResponse<ServiceRelationships> aaiResponseServiceRelations =
-				new AaiResponse<>(relationsList, null, HttpStatus.SC_OK);
+        when(aaiClient.getServiceInstance(anyString(), anyString(), anyString()))
+            .thenReturn(aaiResponseServiceRelations);
+        when(aaiClient.getLogicalLink(anyString())).thenReturn(aaiResponseLogicalLinkResponse);
 
-		when(aaiClient.getServiceInstance(anyString(), anyString(), anyString()))
-				.thenReturn(aaiResponseServiceRelations);
-		when(aaiClient.getLogicalLink(anyString())).thenReturn(aaiResponseLogicalLinkResponse);
+        List<String> expectedPnfs = Collections.singletonList(CORRECT_VALUE);
+        List<String> actualPnfs = aaiService.getServiceInstanceAssociatedPnfs(anyString(), anyString(), anyString());
 
+        assertThat(actualPnfs).isEqualTo(expectedPnfs);
+    }
 
-		List<String> expectedPnfs = Collections.singletonList(CORRECT_VALUE);
-		List<String> actualPnfs = aaiService.getServiceInstanceAssociatedPnfs(anyString(), anyString(), anyString());
+    @Test
+    public void shouldGetPortMirroringConfigData() {
+        AaiResponseTranslator.PortMirroringConfigData expectedData
+            = mock(AaiResponseTranslator.PortMirroringConfigData.class);
 
-		assertThat(actualPnfs).isEqualTo(expectedPnfs);
-	}
+        when(aaiClient.getCloudRegionAndSourceByPortMirroringConfigurationId(anyString()))
+            .thenReturn(aaiResponseJsonNode);
+        when(aaiResponseTranslator.extractPortMirroringConfigData(aaiResponseJsonNode)).thenReturn(expectedData);
 
-	@Test
-	public void shouldGetPortMirroringConfigData() {
-		AaiResponseTranslator.PortMirroringConfigData expectedData
-				= mock(AaiResponseTranslator.PortMirroringConfigData.class);
+        AaiResponseTranslator.PortMirroringConfigData actualData = aaiService.getPortMirroringConfigData(anyString());
+        assertThat(actualData).isEqualTo(expectedData);
+    }
 
-		when(aaiClient.getCloudRegionAndSourceByPortMirroringConfigurationId(anyString())).thenReturn(aaiResponseJsonNode);
-		when(aaiResponseTranslator.extractPortMirroringConfigData(aaiResponseJsonNode)).thenReturn(expectedData);
 
-		AaiResponseTranslator.PortMirroringConfigData actualData = aaiService.getPortMirroringConfigData(anyString());
-		assertThat(actualData).isEqualTo(expectedData);
-	}
+    @Test
+    public void shouldGetInstanceGroupsByVnfInstanceId() {
+        List<InstanceGroupInfo> instanceGroupInfo = Collections.singletonList(new InstanceGroupInfo(CORRECT_VALUE));
+        AaiGetRelatedInstanceGroupsByVnfId relatedInstanceGroups = new AaiGetRelatedInstanceGroupsByVnfId();
+        relatedInstanceGroups.setRelationshipList(createRelationshipList());
 
+        AaiResponse<AaiGetRelatedInstanceGroupsByVnfId> correctCodeResponse =
+            new AaiResponse<>(relatedInstanceGroups, null, HttpStatus.SC_OK);
 
-	@Test
-	public void shouldGetInstanceGroupsByVnfInstanceId() {
-		List<InstanceGroupInfo> instanceGroupInfo = Collections.singletonList(new InstanceGroupInfo(CORRECT_VALUE));
-		AaiGetRelatedInstanceGroupsByVnfId relatedInstanceGroups = new AaiGetRelatedInstanceGroupsByVnfId();
-		relatedInstanceGroups.setRelationshipList(createRelationshipList());
-
-		AaiResponse<AaiGetRelatedInstanceGroupsByVnfId> correctCodeResponse =
-				new AaiResponse<>(relatedInstanceGroups, null, HttpStatus.SC_OK);
-
-		AaiResponse<List<InstanceGroupInfo>> expectedCorrectCodeResponse =
-				new AaiResponse<>(instanceGroupInfo, null, HttpStatus.SC_OK);
-		AaiResponse<AaiGetRelatedInstanceGroupsByVnfId> expectedIncorrectCodeResponse =
-				new AaiResponse<>(relatedInstanceGroups, null, HttpStatus.SC_PAYMENT_REQUIRED);
-		List<InstanceGroupInfo> expectedCorrectResponseObject = expectedCorrectCodeResponse.getT();
+        AaiResponse<List<InstanceGroupInfo>> expectedCorrectCodeResponse =
+            new AaiResponse<>(instanceGroupInfo, null, HttpStatus.SC_OK);
+        AaiResponse<AaiGetRelatedInstanceGroupsByVnfId> expectedIncorrectCodeResponse =
+            new AaiResponse<>(relatedInstanceGroups, null, HttpStatus.SC_PAYMENT_REQUIRED);
+        List<InstanceGroupInfo> expectedCorrectResponseObject = expectedCorrectCodeResponse.getT();
 
-		when(aaiClient.getInstanceGroupsByVnfInstanceId(VNF_INSTANCE_ID_OK)).thenReturn(correctCodeResponse);
-		when(aaiClient.getInstanceGroupsByVnfInstanceId(VNF_INSTANCE_ID_FAIL)).thenReturn(expectedIncorrectCodeResponse);
+        when(aaiClient.getInstanceGroupsByVnfInstanceId(VNF_INSTANCE_ID_OK)).thenReturn(correctCodeResponse);
+        when(aaiClient.getInstanceGroupsByVnfInstanceId(VNF_INSTANCE_ID_FAIL))
+            .thenReturn(expectedIncorrectCodeResponse);
 
-		AaiResponse actualCorrectCodeResponse = aaiService.getInstanceGroupsByVnfInstanceId(VNF_INSTANCE_ID_OK);
-		AaiResponse actualIncorrectCodeResponse = aaiService.getInstanceGroupsByVnfInstanceId(VNF_INSTANCE_ID_FAIL);
+        AaiResponse actualCorrectCodeResponse = aaiService.getInstanceGroupsByVnfInstanceId(VNF_INSTANCE_ID_OK);
+        AaiResponse actualIncorrectCodeResponse = aaiService.getInstanceGroupsByVnfInstanceId(VNF_INSTANCE_ID_FAIL);
 
-		List<InstanceGroupInfo> actualCorrectResponseObject =
-				(List<InstanceGroupInfo>) actualCorrectCodeResponse.getT();
+        List<InstanceGroupInfo> actualCorrectResponseObject =
+            (List<InstanceGroupInfo>) actualCorrectCodeResponse.getT();
 
-		assertThat(actualCorrectResponseObject)
-				.usingFieldByFieldElementComparator()
-				.hasSameElementsAs(expectedCorrectResponseObject);
+        assertThat(actualCorrectResponseObject)
+            .usingFieldByFieldElementComparator()
+            .hasSameElementsAs(expectedCorrectResponseObject);
 
-		assertThat(actualIncorrectCodeResponse).isEqualTo(expectedIncorrectCodeResponse);
-	}
+        assertThat(actualIncorrectCodeResponse).isEqualTo(expectedIncorrectCodeResponse);
+    }
 
-	@Test
-	public void shouldGetHomingDataByVfModule() {
-		GetTenantsResponse expectedResponse = new GetTenantsResponse();
-		when(aaiClient.getHomingDataByVfModule(anyString(), anyString())).thenReturn(expectedResponse);
+    @Test
+    public void shouldGetHomingDataByVfModule() {
+        GetTenantsResponse expectedResponse = new GetTenantsResponse();
+        when(aaiClient.getHomingDataByVfModule(anyString(), anyString())).thenReturn(expectedResponse);
 
-		GetTenantsResponse actualResponse = aaiService.getHomingDataByVfModule(anyString(), anyString());
-		assertThat(actualResponse).isEqualTo(expectedResponse);
-	}
+        GetTenantsResponse actualResponse = aaiService.getHomingDataByVfModule(anyString(), anyString());
+        assertThat(actualResponse).isEqualTo(expectedResponse);
+    }
 
-	@Test
-	public void shouldSearchGroupMembers() {
-		Properties properties = createProperties();
-		Map<String, Properties> regionsAndTenants = createRegionsAndTenantsMap(properties);
+    @Test
+    public void shouldSearchGroupMembers() {
+        Properties properties = createProperties();
+        Map<String, Properties> regionsAndTenants = createRegionsAndTenantsMap(properties);
 
-		AAITreeNode validTreeNode = new AAITreeNode();
-		addAdditionalPropertiesToAaiTreeNode(validTreeNode);
-		List<AAITreeNode> validNodes = Arrays.asList(validTreeNode, validTreeNode);
+        AAITreeNode validTreeNode = new AAITreeNode();
+        addAdditionalPropertiesToAaiTreeNode(validTreeNode);
+        List<AAITreeNode> validNodes = Arrays.asList(validTreeNode, validTreeNode);
 
-		AAITreeNode validBranch = createTree(validNodes);
-		addAdditionalPropertiesToAaiTreeNode(validBranch);
-		List<AAITreeNode> testedBranches = Collections.singletonList(validBranch);
+        AAITreeNode validBranch = createTree(validNodes);
+        addAdditionalPropertiesToAaiTreeNode(validBranch);
+        List<AAITreeNode> testedBranches = Collections.singletonList(validBranch);
 
-		AAITreeNode testedTree = createTree(testedBranches);
+        AAITreeNode testedTree = createTree(testedBranches);
 
-		RelatedVnf expectedVnf = createExpectedVnf(validBranch);
-		List<RelatedVnf> expectedResult = Collections.singletonList(expectedVnf);
+        RelatedVnf expectedVnf = createExpectedVnf(validBranch);
+        List<RelatedVnf> expectedResult = Collections.singletonList(expectedVnf);
 
-		when(aaiServiceTree.buildAAITree(anyString(), any())).thenReturn(Collections.singletonList(testedTree));
-		when(aaiClient.getCloudRegionAndTenantByVnfId(anyString())).thenReturn(regionsAndTenants);
+        when(aaiServiceTree.buildAAITree(anyString(), isNull(), eq(HttpMethod.GET), any(), anyBoolean()))
+            .thenReturn(Collections.singletonList(testedTree));
+        when(aaiClient.getCloudRegionAndTenantByVnfId(anyString())).thenReturn(regionsAndTenants);
 
-		List<RelatedVnf> actualGroupMembers = aaiService.searchGroupMembers(GLOBAL_CUSTOMER_ID, SERVICE_TYPE,
-				INVARIANT_ID, GROUP_TYPE_FAILING, GROUP_ROLE_FAILING);
+        List<RelatedVnf> actualGroupMembers = aaiService.searchGroupMembers(GLOBAL_CUSTOMER_ID, SERVICE_TYPE,
+            INVARIANT_ID, GROUP_TYPE_FAILING, GROUP_ROLE_FAILING);
 
-		assertThat(actualGroupMembers)
-				.usingFieldByFieldElementComparator()
-				.hasSameElementsAs(expectedResult);
-	}
+        assertThat(actualGroupMembers)
+            .usingFieldByFieldElementComparator()
+            .hasSameElementsAs(expectedResult);
+    }
 
-	@Test
-	public void shouldGetPortMirroringSourcePorts() {
-		PortDetailsTranslator.PortDetails details = mock(PortDetailsTranslator.PortDetails.class);
-		List<PortDetailsTranslator.PortDetails> expectedDetailsList = Arrays.asList(
-				details, details, details
-		);
+    @Test
+    public void shouldGetPortMirroringSourcePorts() {
+        PortDetailsTranslator.PortDetails details = mock(PortDetailsTranslator.PortDetails.class);
+        List<PortDetailsTranslator.PortDetails> expectedDetailsList = Arrays.asList(
+            details, details, details
+        );
 
-		when(aaiClient.getPortMirroringSourcePorts(anyString())).thenReturn(expectedDetailsList);
-		List<PortDetailsTranslator.PortDetails> actualDetails = aaiService.getPortMirroringSourcePorts(anyString());
+        when(aaiClient.getPortMirroringSourcePorts(anyString())).thenReturn(expectedDetailsList);
+        List<PortDetailsTranslator.PortDetails> actualDetails = aaiService.getPortMirroringSourcePorts(anyString());
 
-		assertThat(actualDetails).isEqualTo(expectedDetailsList);
-	}
+        assertThat(actualDetails).isEqualTo(expectedDetailsList);
+    }
 
-	@Test
-	public void shouldGetAAIServiceTree() throws JsonProcessingException {
-		ServiceInstance serviceInstance = mock(ServiceInstance.class);
-		String expectedResult = new ObjectMapper().writeValueAsString(serviceInstance);
+    @Test
+    public void shouldGetAAIServiceTree() throws JsonProcessingException {
+        ServiceInstance serviceInstance = mock(ServiceInstance.class);
+        String expectedResult = new ObjectMapper().writeValueAsString(serviceInstance);
 
-		when(aaiServiceTree.getServiceInstanceTopology(anyString(), anyString(), anyString()))
-				.thenReturn(serviceInstance);
-		String actualResult = aaiService.getAAIServiceTree(anyString(), anyString(), anyString());
+        when(aaiServiceTree.getServiceInstanceTopology(anyString(), anyString(), anyString()))
+            .thenReturn(serviceInstance);
+        String actualResult = aaiService.getAAIServiceTree(anyString(), anyString(), anyString());
 
-		assertThat(actualResult).isEqualTo(expectedResult);
-	}
+        assertThat(actualResult).isEqualTo(expectedResult);
+    }
 
-	@NotNull
-	private Map<String, Properties> createRegionsAndTenantsMap(Properties properties) {
-		Map<String, Properties> regionsAndTenants = new HashMap<>();
-		regionsAndTenants.put("tenant", properties);
-		regionsAndTenants.put("cloud-region", properties);
-		return regionsAndTenants;
-	}
+    @NotNull
+    private Map<String, Properties> createRegionsAndTenantsMap(Properties properties) {
+        Map<String, Properties> regionsAndTenants = new HashMap<>();
+        regionsAndTenants.put("tenant", properties);
+        regionsAndTenants.put("cloud-region", properties);
+        return regionsAndTenants;
+    }
 
-	private Properties createProperties() {
-		Properties properties = new Properties();
-		properties.setTenantId(TENANT_ID);
-		properties.setTenantName(TENANT_NAME);
-		properties.setCloudRegionId(CLOUD_REGION_ID);
-		return properties;
-	}
+    private Properties createProperties() {
+        Properties properties = new Properties();
+        properties.setTenantId(TENANT_ID);
+        properties.setTenantName(TENANT_NAME);
+        properties.setCloudRegionId(CLOUD_REGION_ID);
+        return properties;
+    }
 
-	@NotNull
-	private RelatedVnf createExpectedVnf(AAITreeNode validBranch) {
-		RelatedVnf expectedVnf = RelatedVnf.from(validBranch);
-		expectedVnf.setTenantId(TENANT_ID);
-		expectedVnf.setTenantName(TENANT_NAME);
-		expectedVnf.setLcpCloudRegionId(CLOUD_REGION_ID);
-		expectedVnf.setServiceInstanceId(PARENT_ID);
-		expectedVnf.setServiceInstanceName(PARENT_NAME);
-		expectedVnf.setInstanceType(VNF_TYPE);
+    @NotNull
+    private RelatedVnf createExpectedVnf(AAITreeNode validBranch) {
+        RelatedVnf expectedVnf = RelatedVnf.from(validBranch);
+        expectedVnf.setTenantId(TENANT_ID);
+        expectedVnf.setTenantName(TENANT_NAME);
+        expectedVnf.setLcpCloudRegionId(CLOUD_REGION_ID);
+        expectedVnf.setServiceInstanceId(PARENT_ID);
+        expectedVnf.setServiceInstanceName(PARENT_NAME);
+        expectedVnf.setInstanceType(VNF_TYPE);
 
-		return expectedVnf;
-	}
+        return expectedVnf;
+    }
 
 
-	private AAITreeNode createTree(List<AAITreeNode> children) {
-		AAITreeNode tree = new AAITreeNode();
-		tree.addChildren(children);
-		tree.setId(PARENT_ID);
-		tree.setName(PARENT_NAME);
-		return tree;
-	}
+    private AAITreeNode createTree(List<AAITreeNode> children) {
+        AAITreeNode tree = new AAITreeNode();
+        tree.addChildren(children);
+        tree.setId(PARENT_ID);
+        tree.setName(PARENT_NAME);
+        tree.setType(SERVICE_INSTANCE);
+        return tree;
+    }
 
-	private void addAdditionalPropertiesToAaiTreeNode(AAITreeNode tree) {
-		Map<String, Object> additionalProperties = new HashMap<>();
-		additionalProperties.put("instance-group-role", GROUP_ROLE_OK);
-		additionalProperties.put("instance-group-type", group_type_ok);
-		additionalProperties.put("vnf-type", VNF_TYPE);
-		additionalProperties.put("cloud-region", CLOUD_TYPE);
-		tree.setAdditionalProperties(additionalProperties);
-	}
+    private void addAdditionalPropertiesToAaiTreeNode(AAITreeNode tree) {
+        Map<String, Object> additionalProperties = new HashMap<>();
+        additionalProperties.put("instance-group-role", GROUP_ROLE_OK);
+        additionalProperties.put("instance-group-type", group_type_ok);
+        additionalProperties.put("vnf-type", VNF_TYPE);
+        additionalProperties.put("cloud-region", CLOUD_TYPE);
+        tree.setAdditionalProperties(additionalProperties);
+    }
 
-	private org.onap.vid.asdc.beans.Service createService(String category, String suffix) {
-		return new Service.ServiceBuilder()
-				.setUuid("MODELVER_VERSION_ID" + suffix)
-				.setInvariantUUID("MODEL_INVARIANT_NAME" + suffix)
-				.setCategory(category)
-				.setVersion("MODELVER_VERSION" + suffix)
-				.setName("MODELVER_NAME" + suffix)
-				.setDistributionStatus("MODELVER_DIST_STATUS" + suffix)
-				.setToscaModelURL(null)
-				.setLifecycleState(null)
-				.setArtifacts(null)
-				.setResources(null)
-				.build();
-	}
+    private org.onap.vid.asdc.beans.Service createService(String category, String suffix) {
+        return new Service.ServiceBuilder()
+            .setUuid("MODELVER_VERSION_ID" + suffix)
+            .setInvariantUUID("MODEL_INVARIANT_NAME" + suffix)
+            .setCategory(category)
+            .setVersion("MODELVER_VERSION" + suffix)
+            .setName("MODELVER_NAME" + suffix)
+            .setDistributionStatus("MODELVER_DIST_STATUS" + suffix)
+            .setToscaModelURL(null)
+            .setLifecycleState(null)
+            .setArtifacts(null)
+            .setResources(null)
+            .build();
+    }
 
-	@NotNull
-	private Result createResultWithoutValidModel() {
-		ModelVers modelVers = new ModelVers();
-		modelVers.setModelVer(Collections.singletonList(new ModelVer()));
+    @NotNull
+    private Result createResultWithoutValidModel() {
+        ModelVers modelVers = new ModelVers();
+        modelVers.setModelVer(Collections.singletonList(new ModelVer()));
 
-		Model model = new Model();
-		model.setModelVers(modelVers);
+        Model model = new Model();
+        model.setModelVers(modelVers);
 
-		Result result1 = new Result();
-		result1.setModel(model);
-		return result1;
-	}
+        Result result1 = new Result();
+        result1.setModel(model);
+        return result1;
+    }
 
-	@NotNull
-	private Result createResult(String modelType, String suffix) {
-		ModelVer modelVer = new ModelVer();
-		modelVer.setModelVersionId("MODELVER_VERSION_ID" + suffix);
-		modelVer.setModelVersion("MODELVER_VERSION" + suffix);
-		modelVer.setModelName("MODELVER_NAME" + suffix);
-		modelVer.setDistributionStatus("MODELVER_DIST_STATUS" + suffix);
+    @NotNull
+    private Result createResult(String modelType, String suffix) {
+        ModelVer modelVer = new ModelVer();
+        modelVer.setModelVersionId("MODELVER_VERSION_ID" + suffix);
+        modelVer.setModelVersion("MODELVER_VERSION" + suffix);
+        modelVer.setModelName("MODELVER_NAME" + suffix);
+        modelVer.setDistributionStatus("MODELVER_DIST_STATUS" + suffix);
 
-		ModelVers modelVers = new ModelVers();
-		modelVers.setModelVer(Collections.singletonList(modelVer));
+        ModelVers modelVers = new ModelVers();
+        modelVers.setModelVer(Collections.singletonList(modelVer));
 
-		Model model = new Model();
-		model.setModelType(modelType);
-		model.setModelInvariantId("MODEL_INVARIANT_NAME" + suffix);
-		model.setModelVers(modelVers);
+        Model model = new Model();
+        model.setModelType(modelType);
+        model.setModelInvariantId("MODEL_INVARIANT_NAME" + suffix);
+        model.setModelVers(modelVers);
 
-		Result result = new Result();
-		result.setModel(model);
-		return result;
-	}
+        Result result = new Result();
+        result.setModel(model);
+        return result;
+    }
 
-	@NotNull
-	private ServiceRelationships createServiceRelationships() {
-		RelationshipList relationsList = createRelationshipList(CORRECT_VALUE);
-		ServiceRelationships relationsService = new ServiceRelationships();
-		relationsService.setRelationshipList(relationsList);
-		return relationsService;
-	}
+    @NotNull
+    private ServiceRelationships createServiceRelationships() {
+        RelationshipList relationsList = createRelationshipList(CORRECT_VALUE);
+        ServiceRelationships relationsService = new ServiceRelationships();
+        relationsService.setRelationshipList(relationsList);
+        return relationsService;
+    }
 
-	@NotNull
-	private RelationshipList createRelationshipList(String expectedValue) {
-		List<RelationshipData> relationsDataList = createRelationshipDataList(expectedValue);
-		return createRelationshipList(relationsDataList);
-	}
+    @NotNull
+    private RelationshipList createRelationshipList(String expectedValue) {
+        List<RelationshipData> relationsDataList = createRelationshipDataList(expectedValue);
+        return createRelationshipList(relationsDataList);
+    }
 
-	@NotNull
-	private RelationshipList createRelationshipList(List<RelationshipData> relationsDataList) {
-		Relationship relation1 = crateRelationship("any", relationsDataList);
-		Relationship relation2 = crateRelationship("zone", relationsDataList);
-		Relationship relation3 = crateRelationship("logical-link", relationsDataList);
-		Relationship relation4 = crateRelationship("lag-interface", relationsDataList);
-		Relationship relation5 = crateRelationship("pnf", relationsDataList);
+    @NotNull
+    private RelationshipList createRelationshipList(List<RelationshipData> relationsDataList) {
+        Relationship relation1 = crateRelationship("any", relationsDataList);
+        Relationship relation2 = crateRelationship("zone", relationsDataList);
+        Relationship relation3 = crateRelationship("logical-link", relationsDataList);
+        Relationship relation4 = crateRelationship("lag-interface", relationsDataList);
+        Relationship relation5 = crateRelationship("pnf", relationsDataList);
 
-		RelationshipList relationsList = new RelationshipList();
-		relationsList.setRelationship(Arrays.asList(relation1, relation2, relation3, relation4, relation5));
-		return relationsList;
-	}
+        RelationshipList relationsList = new RelationshipList();
+        relationsList.setRelationship(Arrays.asList(relation1, relation2, relation3, relation4, relation5));
+        return relationsList;
+    }
 
-	@NotNull
-	private List<RelationshipData> createRelationshipDataList(String expectedValue) {
-		RelationshipData relationData1 = createRelationshipData("any-key", "incorrect_key");
-		RelationshipData relationData2 = createRelationshipData("zone.zone-id", expectedValue);
-		RelationshipData relationData3 = createRelationshipData("logical-link.link-name", expectedValue);
-		RelationshipData relationData4 = createRelationshipData("pnf.pnf-name", expectedValue);
+    @NotNull
+    private List<RelationshipData> createRelationshipDataList(String expectedValue) {
+        RelationshipData relationData1 = createRelationshipData("any-key", "incorrect_key");
+        RelationshipData relationData2 = createRelationshipData("zone.zone-id", expectedValue);
+        RelationshipData relationData3 = createRelationshipData("logical-link.link-name", expectedValue);
+        RelationshipData relationData4 = createRelationshipData("pnf.pnf-name", expectedValue);
 
-		return Arrays.asList(relationData1, relationData2, relationData3, relationData4);
-	}
+        return Arrays.asList(relationData1, relationData2, relationData3, relationData4);
+    }
 
-	@NotNull
-	private Relationship crateRelationship(String relatedTo, List<RelationshipData> relationsDataList) {
-		Relationship relation = new Relationship();
-		relation.setRelatedTo(relatedTo);
-		relation.setRelationDataList(relationsDataList);
-		return relation;
-	}
+    @NotNull
+    private Relationship crateRelationship(String relatedTo, List<RelationshipData> relationsDataList) {
+        Relationship relation = new Relationship();
+        relation.setRelatedTo(relatedTo);
+        relation.setRelationDataList(relationsDataList);
+        return relation;
+    }
 
-	@NotNull
-	private RelationshipData createRelationshipData(String key, String value) {
-		RelationshipData relationData = new RelationshipData();
-		relationData.setRelationshipKey(key);
-		relationData.setRelationshipValue(value);
-		return relationData;
-	}
+    @NotNull
+    private RelationshipData createRelationshipData(String key, String value) {
+        RelationshipData relationData = new RelationshipData();
+        relationData.setRelationshipKey(key);
+        relationData.setRelationshipValue(value);
+        return relationData;
+    }
 
-	private org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.RelationshipList createRelationshipList() {
-		RelatedToProperty property1 =
-				createRelatedToProperty("instance-group.instance-group-name", CORRECT_VALUE);
-		RelatedToProperty property2 =
-				createRelatedToProperty("anything-key", "anything-value");
-		List<RelatedToProperty> properties = Arrays.asList(property1, property2);
+    private org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.RelationshipList createRelationshipList() {
+        RelatedToProperty property1 =
+            createRelatedToProperty("instance-group.instance-group-name", CORRECT_VALUE);
+        RelatedToProperty property2 =
+            createRelatedToProperty("anything-key", "anything-value");
+        List<RelatedToProperty> properties = Arrays.asList(property1, property2);
 
-		org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship relationship1 =
-				createRelationship("instance-group", properties);
-		org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship relationship2 =
-				createRelationship("any-key", properties);
+        org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship relationship1 =
+            createRelationship("instance-group", properties);
+        org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship relationship2 =
+            createRelationship("any-key", properties);
 
-		List<org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship> relationships =
-				Arrays.asList(relationship1, relationship2);
+        List<org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship> relationships =
+            Arrays.asList(relationship1, relationship2);
 
-		org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.RelationshipList relationshipList =
-				new org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.RelationshipList();
-		relationshipList.setRelationship(relationships);
+        org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.RelationshipList relationshipList =
+            new org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.RelationshipList();
+        relationshipList.setRelationship(relationships);
 
-		return relationshipList;
-	}
+        return relationshipList;
+    }
 
-	@NotNull
-	private org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship createRelationship(String relatedTo,
-	                                                                                              List<RelatedToProperty> relatedToPropertyList) {
-		org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship relationship1 =
-				new org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship();
-		relationship1.setRelatedTo(relatedTo);
-		relationship1.setRelatedToPropertyList(relatedToPropertyList);
-		return relationship1;
-	}
+    @NotNull
+    private org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship createRelationship(String relatedTo,
+        List<RelatedToProperty> relatedToPropertyList) {
+        org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship relationship1 =
+            new org.onap.vid.aai.model.AaiGetNetworkCollectionDetails.Relationship();
+        relationship1.setRelatedTo(relatedTo);
+        relationship1.setRelatedToPropertyList(relatedToPropertyList);
+        return relationship1;
+    }
 
-	@NotNull
-	private RelatedToProperty createRelatedToProperty(String key, String value) {
-		RelatedToProperty prop = new RelatedToProperty();
-		prop.setPropertyKey(key);
-		prop.setPropertyValue(value);
-		return prop;
-	}
+    @NotNull
+    private RelatedToProperty createRelatedToProperty(String key, String value) {
+        RelatedToProperty prop = new RelatedToProperty();
+        prop.setKey(key);
+        prop.setValue(value);
+        return prop;
+    }
 
-	@NotNull
-	private AaiResponse<AaiGetVnfResponse> createAaiResponseVnfResponse(List<VnfResult> vnfResults) {
-		AaiGetVnfResponse vnfResponse = new AaiGetVnfResponse();
-		vnfResponse.setResults(vnfResults);
-		return new AaiResponse<>(vnfResponse, null, HttpStatus.SC_OK);
-	}
+    @NotNull
+    private AaiResponse<AaiGetVnfResponse> createAaiResponseVnfResponse(List<VnfResult> vnfResults) {
+        AaiGetVnfResponse vnfResponse = new AaiGetVnfResponse();
+        vnfResponse.setResults(vnfResults);
+        return new AaiResponse<>(vnfResponse, null, HttpStatus.SC_OK);
+    }
 
-	private VnfResult createVnfResult(String id, String nodeType) {
-		VnfResult result = new VnfResult();
-		result.setJsonId(id);
-		result.setJsonNodeType(nodeType);
-		return result;
-	}
+    private VnfResult createVnfResult(String id, String nodeType) {
+        VnfResult result = new VnfResult();
+        result.setJsonId(id);
+        result.setJsonNodeType(nodeType);
+        return result;
+    }
 
 
-	private org.onap.vid.aai.model.AaiGetServicesRequestModel.Service createService(String serviceId,
-	                                                                                String resourceVersion,
-	                                                                                String serviceDescription) {
-		org.onap.vid.aai.model.AaiGetServicesRequestModel.Service service
-				= new org.onap.vid.aai.model.AaiGetServicesRequestModel.Service();
-		service.isPermitted = false;
-		service.resourceVersion = resourceVersion;
-		service.serviceDescription = serviceDescription;
-		service.serviceId = serviceId;
-		return service;
-	}
+    private org.onap.vid.aai.model.AaiGetServicesRequestModel.Service createService(String serviceId,
+        String resourceVersion,
+        String serviceDescription) {
+        org.onap.vid.aai.model.AaiGetServicesRequestModel.Service service
+            = new org.onap.vid.aai.model.AaiGetServicesRequestModel.Service();
+        service.isPermitted = false;
+        service.resourceVersion = resourceVersion;
+        service.serviceDescription = serviceDescription;
+        service.serviceId = serviceId;
+        return service;
+    }
 
-	@NotNull
-	private Services createAaiResponseServices() {
-		ServiceSubscription sub1 = new ServiceSubscription();
-		sub1.isPermitted = false;
-		sub1.serviceType = "serviceSubsType1";
+    @NotNull
+    private Services createAaiResponseServices() {
+        ServiceSubscription sub1 = new ServiceSubscription();
+        sub1.isPermitted = false;
+        sub1.serviceType = "serviceSubsType1";
 
-		ServiceSubscription sub2 = new ServiceSubscription();
-		sub2.isPermitted = true;
-		sub2.serviceType = "serviceSubsType2";
+        ServiceSubscription sub2 = new ServiceSubscription();
+        sub2.isPermitted = true;
+        sub2.serviceType = "serviceSubsType2";
 
-		ServiceSubscriptions serviceSubs = new ServiceSubscriptions();
-		serviceSubs.serviceSubscription = Collections.singletonList(sub2);
+        ServiceSubscriptions serviceSubs = new ServiceSubscriptions();
+        serviceSubs.serviceSubscription = Collections.singletonList(sub2);
 
-		Services services = new Services();
-		services.globalCustomerId = GLOBAL_CUSTOMER_ID;
-		services.resourceVersion = "v-1";
-		services.subscriberName = "name-1";
-		services.subscriberType = "type-1";
-		services.serviceSubscriptions = serviceSubs;
-		return services;
-	}
+        Services services = new Services();
+        services.globalCustomerId = GLOBAL_CUSTOMER_ID;
+        services.resourceVersion = "v-1";
+        services.subscriberName = "name-1";
+        services.subscriberType = "type-1";
+        services.serviceSubscriptions = serviceSubs;
+        return services;
+    }
 
-	@NotNull
-	private Subscriber createSubscriber() {
-		Subscriber subscriber = new Subscriber();
-		subscriber.globalCustomerId = "id-1";
-		subscriber.resourceVersion = "v-1";
-		subscriber.subscriberName = "name-1";
-		subscriber.subscriberType = "type-1";
-		return subscriber;
-	}
+    @NotNull
+    private Subscriber createSubscriber() {
+        Subscriber subscriber = new Subscriber();
+        subscriber.globalCustomerId = "id-1";
+        subscriber.resourceVersion = "v-1";
+        subscriber.subscriberName = "name-1";
+        subscriber.subscriberType = "type-1";
+        return subscriber;
+    }
 }
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBaseTest.java b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBaseTest.java
index 401a56c..4cab998 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBaseTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBaseTest.java
@@ -25,11 +25,16 @@
 import org.onap.vid.aai.AaiClientInterface;
 import org.onap.vid.aai.ExceptionWithRequestInfo;
 import org.onap.vid.model.Action;
+import org.onap.vid.model.VidNotions;
+import org.onap.vid.model.VidNotions.InstantiationType;
+import org.onap.vid.model.VidNotions.InstantiationUI;
+import org.onap.vid.model.VidNotions.ModelCategory;
 import org.onap.vid.model.serviceInstantiation.*;
 import org.onap.vid.mso.RestObject;
 import org.onap.vid.mso.model.ModelInfo;
 import org.onap.vid.mso.rest.AsyncRequestStatus;
 import org.onap.vid.mso.rest.RequestStatus;
+import org.onap.vid.properties.Features;
 import org.onap.vid.utils.TimeUtils;
 import org.springframework.http.HttpMethod;
 import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
@@ -38,14 +43,18 @@
 import javax.inject.Inject;
 import java.time.ZonedDateTime;
 import java.util.*;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
+import static java.util.Collections.emptyList;
 import static java.util.Collections.emptyMap;
-import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.*;
 import static org.mockito.Mockito.when;
 
 public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests {
 
     public static final String OWNING_ENTITY_ID = "038d99af-0427-42c2-9d15-971b99b9b489";
+    public static final String JULIO_ERICKSON = "JULIO ERICKSON";
     public static final String PACKET_CORE = "PACKET CORE";
     public static final String PROJECT_NAME = "{some project name}";
     public static final String SUBSCRIBER_ID = "{some subscriber id}";
@@ -98,7 +107,7 @@
 
         return new ServiceInstantiation ( modelInfo,
                 AsyncInstantiationBusinessLogicTest.OWNING_ENTITY_ID,
-                AsyncInstantiationBusinessLogicTest.PACKET_CORE,
+                AsyncInstantiationBusinessLogicTest.JULIO_ERICKSON,
                 projectName,
                 AsyncInstantiationBusinessLogicTest.SUBSCRIBER_ID,
                 AsyncInstantiationBusinessLogicTest.SUBSCRIBER_NAME,
@@ -114,6 +123,7 @@
                 vnfs,
                 networks,
                 vnfGroups,
+                null,
                 instanceParams,
                 isPause,
                 bulkSize,
@@ -121,8 +131,8 @@
                 isAlacarte,
                 testApi,
                 instanceId,
-                action.name()
-                );
+                action.name(),
+                UUID.randomUUID().toString(), null, null, null);
     }
 
     private List<Map<String,String>> createInstanceParams() {
@@ -146,10 +156,12 @@
         if (isAlacarte) {
             vfModuleInfo.setModelInvariantId("22222222-f63c-463e-ba94-286933b895f9");
             vfModuleInfo.setModelVersion("10.0");
-            return new VfModule(vfModuleInfo, instanceName, volumeGroupInstanceName, Action.Create.name(), "mdt1", null, "88a6ca3ee0394ade9403f075db23167e", instanceParams, supplementaryParams, false, true, null);
+            return new VfModule(vfModuleInfo, instanceName, volumeGroupInstanceName, Action.Create.name(), "mdt1", null,
+                    "88a6ca3ee0394ade9403f075db23167e", instanceParams, supplementaryParams, false, true, null, UUID.randomUUID().toString(), null, null);
         }
 
-        return new VfModule(vfModuleInfo, instanceName, volumeGroupInstanceName, Action.Create.name(), null, null, null, instanceParams, supplementaryParams, false, false, null);
+        return new VfModule(vfModuleInfo, instanceName, volumeGroupInstanceName, Action.Create.name(), null, null, null,
+                instanceParams, supplementaryParams, false, false, null, UUID.randomUUID().toString(), null, null);
     }
 
     protected ModelInfo createVnfModelInfo(boolean isAlacarte) {
@@ -167,19 +179,20 @@
         return vnfModelInfo;
     }
 
-    private ModelInfo createNetworkModelInfo(boolean isAlacarte) {
-        ModelInfo vnfModelInfo = new ModelInfo();
-        vnfModelInfo.setModelType("network");
-        vnfModelInfo.setModelName("2016-73_MOW-AVPN-vPE-BV-L");
-        vnfModelInfo.setModelVersionId("7f40c192-f63c-463e-ba94-286933b895f8");
-        vnfModelInfo.setModelCustomizationName("2016-73_MOW-AVPN-vPE-BV-L 0");
-        vnfModelInfo.setModelCustomizationId("ab153b6e-c364-44c0-bef6-1f2982117f04");
+    private ModelInfo createNetworkModelInfo(boolean isAlacarte, String modelCustomizationId)
+    {
+        ModelInfo modelInfo = new ModelInfo();
+        modelInfo.setModelType("network");
+        modelInfo.setModelName("2016-73_MOW-AVPN-vPE-BV-L");
+        modelInfo.setModelVersionId("7f40c192-f63c-463e-ba94-286933b895f8");
+        modelInfo.setModelCustomizationName("2016-73_MOW-AVPN-vPE-BV-L 0");
+        modelInfo.setModelCustomizationId(modelCustomizationId);
         //added two conditional fields according to MSO AID - needed only in alacarte
         if (isAlacarte) {
-            vnfModelInfo.setModelInvariantId("11111111-f63c-463e-ba94-286933b895f9");
-            vnfModelInfo.setModelVersion("10.0");
+            modelInfo.setModelInvariantId("11111111-f63c-463e-ba94-286933b895f9");
+            modelInfo.setModelVersion("10.0");
         }
-        return vnfModelInfo;
+        return modelInfo;
     }
 
     private ModelInfo createModelInfo() {
@@ -214,21 +227,33 @@
         vfModules.get(vfModuleModelName).put(vfModuleModelName + ":002", vfModule2);
 
         Vnf vnf = new Vnf(vnfModelInfo, "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", (isUserProvidedNaming ? VNF_NAME : null), Action.Create.name(),
-                "platformName", "mdt1", null, "88a6ca3ee0394ade9403f075db23167e", vnfInstanceParams,"lineOfBusinessName" , false, null, vfModules);
+                "platformName", "mdt1", null, "88a6ca3ee0394ade9403f075db23167e", vnfInstanceParams,"lineOfBusinessName" , false, null, vfModules,
+                UUID.randomUUID().toString(), null, null);
 
         vnfs.put(vnf.getModelInfo().getModelName(), vnf);
         return vnfs;
     }
 
-    protected Map<String, Network> createNetworkList(List vnfInstanceParams, boolean isUserProvidedNaming, boolean isALaCarte) {
-        Map<String, Network> networks = new HashMap<>();
-        ModelInfo networkModelInfo = createNetworkModelInfo(isALaCarte);
+    public static class NetworkDetails {
 
-        Network network = new Network(networkModelInfo, "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", isUserProvidedNaming ? VNF_NAME : null, Action.Create.name(),
-                "platformName", "mdt1", null, "88a6ca3ee0394ade9403f075db23167e", vnfInstanceParams,"lineOfBusinessName" , false, null);
+        public NetworkDetails(String name, String modelCustomizationId) {
+            this.name = name;
+            this.modelCustomizationId = modelCustomizationId;
+        }
 
-        networks.put(network.getModelInfo().getModelName(), network);
-        return networks;
+        public String name;
+        public String modelCustomizationId;
+    }
+
+
+    protected Map<String, Network> createNetworkList(List instanceParams, List<NetworkDetails> networkDetails, boolean isALaCarte) {
+        Stream<Network> networkStream = networkDetails.stream().map(
+                details->new Network(createNetworkModelInfo(isALaCarte, details.modelCustomizationId), "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+                        details.name, Action.Create.name(),
+                        "platformName", "mdt1", null, "88a6ca3ee0394ade9403f075db23167e", instanceParams,"lineOfBusinessName" ,
+                        false, null, UUID.randomUUID().toString(), null, null));
+//        I can't tell why compiler don't like the statement if it's only one line...
+        return networkStream.collect(Collectors.toMap(network -> network.getModelInfo().getModelCustomizationId(), network -> network));
     }
 
     protected InstanceGroup createInstanceGroup(boolean isUserProvidedNaming, Action action) {
@@ -241,7 +266,7 @@
         modelInfo.setModelInvariantId("11111111-f63c-463e-ba94-286933b895f9");
         modelInfo.setModelVersion("10.0");
 
-        return new InstanceGroup(modelInfo, (isUserProvidedNaming ? VNF_GROUP_NAME : null), action.name(), false, null);
+        return new InstanceGroup(modelInfo, (isUserProvidedNaming ? VNF_GROUP_NAME : null), action.name(), false, null, emptyMap(), UUID.randomUUID().toString(), null, null);
     }
 
     protected ModelInfo createServiceModelInfo() {
@@ -277,11 +302,11 @@
         return asyncRequestStatus;
     }
 
-    protected RestObject<AsyncRequestStatus> asyncRequestStatusResponseAsRestObject(String msoStatus) {
+    public static RestObject<AsyncRequestStatus> asyncRequestStatusResponseAsRestObject(String msoStatus) {
         return asyncRequestStatusResponseAsRestObject(msoStatus, 200);
     }
 
-    protected RestObject<AsyncRequestStatus> asyncRequestStatusResponseAsRestObject(String msoStatus, int httpStatusCode) {
+    public static RestObject<AsyncRequestStatus> asyncRequestStatusResponseAsRestObject(String msoStatus, int httpStatusCode) {
         RestObject<AsyncRequestStatus> restObject = new RestObject<>();
         restObject.set(asyncRequestStatusResponse(msoStatus));
         restObject.setStatusCode(httpStatusCode);
@@ -302,6 +327,12 @@
         return serviceInstantiation;
     }
 
+    protected ServiceInstantiation generateALaCarteWithNetworksPayload(List<NetworkDetails> networkDetails) {
+        Map<String, Network> networks = createNetworkList(emptyList(), networkDetails, true);
+        ServiceInstantiation serviceInstantiation = generateMockALaCarteServiceInstantiationPayload(false, emptyMap(), networks, emptyMap(), 1, true, PROJECT_NAME, false, "VNF_API");
+        return serviceInstantiation;
+    }
+
     protected ServiceInstantiation generateALaCarteUpdateWith1ExistingGroup2NewGroupsPayload() {
         final InstanceGroup instanceGroup1 = createInstanceGroup(true, Action.None);
         final InstanceGroup instanceGroup2 = createInstanceGroup(false, Action.Create);
@@ -315,4 +346,38 @@
                 1, true, PROJECT_NAME, false, true, "VNF_API",
                 Action.None, "1234567890");
     }
+
+    protected void enableAddCloudOwnerOnMsoRequest() {
+        enableAddCloudOwnerOnMsoRequest(true);
+    }
+
+    protected void enableAddCloudOwnerOnMsoRequest(boolean isActive) {
+        // always turn on the feature flag
+        when(featureManager.isActive(Features.FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST)).thenReturn(isActive);
+        when(aaiClient.getCloudOwnerByCloudRegionId(anyString())).thenReturn("irma-aic");
+    }
+
+    protected ServiceInstantiation generateALaCarteServiceInstantiationPayload() {
+        return generateMockALaCarteServiceInstantiationPayload(false, Collections.EMPTY_MAP, Collections.EMPTY_MAP, Collections.EMPTY_MAP, 1, true, PROJECT_NAME, false, "VNF_API");
+    }
+
+    protected ServiceInstantiation generateMacroMockServiceInstantiationPayload(boolean isPause, Map<String, Vnf> vnfs) {
+        return generateMockMacroServiceInstantiationPayload(isPause, vnfs, 1, true, PROJECT_NAME, false);
+    }
+
+    protected ServiceInstantiation generatePre1806MacroTransportServiceInstantiationPayload(String tenantId, String lcpCloudRegionId) {
+        List<Map<String, String>> instanceParams = ImmutableList.of(ImmutableMap.of("someUserParam","someValue", "anotherUserParam","anotherValue"));
+        ServiceInstantiation serviceInstantiation = new ServiceInstantiation(createServiceModelInfo(), "038d99af-0427-42c2-9d15-971b99b9b489",
+            "JULIO ERICKSON", "some_project_name", "some_subscriber_id", "some_subscriber_name",
+            "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", null, "MOG", lcpCloudRegionId, null, tenantId,
+            null, null, null, Collections.EMPTY_MAP, Collections.EMPTY_MAP, Collections.EMPTY_MAP, Collections.EMPTY_MAP, instanceParams, false, 1, false, false,
+            null, null, null, null, null, null,
+            new VidNotions(InstantiationUI.TRANSPORT_SERVICE, ModelCategory.Transport, InstantiationUI.TRANSPORT_SERVICE, InstantiationType.Macro)
+        );
+        return serviceInstantiation;
+    }
+
+    protected void mockAaiClientAaiStatusOK() {
+        when(aaiClient.isNodeTypeExistsByName(eq(AsyncInstantiationBusinessLogicImpl.NAME_FOR_CHECK_AAI_STATUS), any())).thenReturn(false);
+    }
 }
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java
index 21b8f3f..e2d182c 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java
@@ -7,9 +7,9 @@
  * 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.
@@ -20,69 +20,13 @@
 
 package org.onap.vid.services;
 
-import static com.google.common.collect.Maps.newHashMap;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.contains;
-import static org.hamcrest.Matchers.hasItem;
-import static org.hamcrest.Matchers.hasItems;
-import static org.hamcrest.Matchers.hasProperty;
-import static org.hamcrest.Matchers.is;
-import static org.hamcrest.Matchers.matchesPattern;
-import static org.hamcrest.Matchers.not;
-import static org.hamcrest.core.Every.everyItem;
-import static org.hamcrest.core.IsEqual.equalTo;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.anyString;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-import static org.onap.vid.job.Job.JobStatus.COMPLETED;
-import static org.onap.vid.job.Job.JobStatus.FAILED;
-import static org.onap.vid.job.Job.JobStatus.IN_PROGRESS;
-import static org.onap.vid.job.Job.JobStatus.PAUSE;
-import static org.onap.vid.job.Job.JobStatus.PENDING;
-import static org.onap.vid.job.Job.JobStatus.STOPPED;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertNull;
-import static org.testng.Assert.assertTrue;
-
-import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.time.Instant;
-import java.time.LocalDateTime;
-import java.time.ZoneId;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import java.util.Set;
-import java.util.UUID;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.stream.Collectors;
-import java.util.stream.IntStream;
-import javax.inject.Inject;
-import net.javacrumbs.jsonunit.JsonAssert;
 import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.time.DateUtils;
 import org.hibernate.SessionFactory;
+import org.jetbrains.annotations.NotNull;
 import org.json.JSONException;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
@@ -97,48 +41,64 @@
 import org.onap.vid.changeManagement.RequestDetailsWrapper;
 import org.onap.vid.config.DataSourceConfig;
 import org.onap.vid.config.MockedAaiClientAndFeatureManagerConfig;
-import org.onap.vid.exceptions.GenericUncheckedException;
+import org.onap.vid.dal.AsyncInstantiationRepository;
 import org.onap.vid.exceptions.MaxRetriesException;
+import org.onap.vid.exceptions.NotFoundException;
 import org.onap.vid.exceptions.OperationNotAllowedException;
 import org.onap.vid.job.Job;
 import org.onap.vid.job.Job.JobStatus;
 import org.onap.vid.job.JobAdapter;
 import org.onap.vid.job.JobType;
 import org.onap.vid.job.JobsBrokerService;
+import org.onap.vid.job.command.MsoRequestBuilder;
+import org.onap.vid.job.command.ResourceCommandTest.FakeResourceCreator;
 import org.onap.vid.job.impl.JobDaoImpl;
 import org.onap.vid.job.impl.JobSharedData;
-import org.onap.vid.model.Action;
-import org.onap.vid.model.JobAuditStatus;
-import org.onap.vid.model.JobAuditStatus.SourceStatus;
-import org.onap.vid.model.NameCounter;
-import org.onap.vid.model.ServiceInfo;
-import org.onap.vid.model.serviceInstantiation.InstanceGroup;
-import org.onap.vid.model.serviceInstantiation.Network;
+import org.onap.vid.model.*;
+import org.onap.vid.model.serviceInstantiation.BaseResource;
 import org.onap.vid.model.serviceInstantiation.ServiceInstantiation;
-import org.onap.vid.model.serviceInstantiation.VfModule;
 import org.onap.vid.model.serviceInstantiation.Vnf;
 import org.onap.vid.mso.MsoOperationalEnvironmentTest;
-import org.onap.vid.mso.model.InstanceGroupInstantiationRequestDetails;
+import org.onap.vid.mso.RestObject;
 import org.onap.vid.mso.model.ModelInfo;
-import org.onap.vid.mso.model.NetworkInstantiationRequestDetails;
-import org.onap.vid.mso.model.ServiceDeletionRequestDetails;
 import org.onap.vid.mso.model.ServiceInstantiationRequestDetails;
-import org.onap.vid.mso.model.VfModuleInstantiationRequestDetails;
-import org.onap.vid.mso.model.VfModuleMacro;
-import org.onap.vid.mso.model.VnfInstantiationRequestDetails;
-import org.onap.vid.mso.model.VolumeGroupRequestDetails;
 import org.onap.vid.mso.rest.AsyncRequestStatus;
+import org.onap.vid.mso.rest.RequestStatus;
 import org.onap.vid.properties.Features;
 import org.onap.vid.testUtils.TestUtils;
 import org.onap.vid.utils.DaoUtils;
+import org.onap.vid.utils.TimeUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
 import org.testng.Assert;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
+import org.testng.annotations.*;
+
+import javax.inject.Inject;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.time.*;
+import java.util.Optional;
+import java.util.*;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+import static net.javacrumbs.jsonunit.JsonAssert.assertJsonEquals;
+import static net.javacrumbs.jsonunit.JsonAssert.whenIgnoringPaths;
+import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals;
+import static net.javacrumbs.jsonunit.core.Option.IGNORING_ARRAY_ORDER;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.*;
+import static org.hamcrest.core.Every.everyItem;
+import static org.hamcrest.core.IsEqual.equalTo;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.*;
+import static org.onap.vid.job.Job.JobStatus.*;
+import static org.onap.vid.testUtils.TestUtils.generateRandomAlphaNumeric;
+import static org.testng.Assert.*;
 
 @ContextConfiguration(classes = {DataSourceConfig.class, SystemProperties.class, MockedAaiClientAndFeatureManagerConfig.class})
 public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseTest {
@@ -152,24 +112,42 @@
     @Mock
     private JobsBrokerService jobsBrokerServiceMock;
 
+    private AsyncInstantiationRepository asyncInstantiationRepository;
+
+    private AuditService auditService;
 
     @Autowired
     private SessionFactory sessionFactory;
 
     private AsyncInstantiationBusinessLogicImpl asyncInstantiationBL;
 
+    protected MsoRequestBuilder msoRequestBuilder;
+
     private int serviceCount = 0;
 
     private static final String UPDATE_SERVICE_INFO_EXCEPTION_MESSAGE =
-            "Failed to retrieve job with uuid .* from ServiceInfo table. Instances found: .*";
+            "Failed to retrieve class .*ServiceInfo with jobId .* from table. no resource found";
 
     private static final String DELETE_SERVICE_INFO_STATUS_EXCEPTION_MESSAGE =
             "Service status does not allow deletion from the queue";
 
+    private String uuidRegex = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
+    private org.hamcrest.Matcher uuidRegexMatcher = is(matchesPattern(uuidRegex));
+
+
     @BeforeClass
     void initServicesInfoService() {
         MockitoAnnotations.initMocks(this);
-        asyncInstantiationBL = new AsyncInstantiationBusinessLogicImpl(dataAccessService, jobAdapterMock, jobsBrokerServiceMock, sessionFactory, aaiClient, featureManager, cloudOwnerService);
+        AsyncInstantiationRepository realAsyncInstantiationRepository = new AsyncInstantiationRepository(dataAccessService);
+        asyncInstantiationRepository = spy(realAsyncInstantiationRepository);
+
+        auditService = new AuditServiceImpl(null, asyncInstantiationRepository);
+
+        AsyncInstantiationBusinessLogicImpl realAsyncInstantiationBL = new AsyncInstantiationBusinessLogicImpl(jobAdapterMock, jobsBrokerServiceMock, sessionFactory, aaiClient, featureManager, cloudOwnerService, asyncInstantiationRepository, auditService);
+        asyncInstantiationBL = Mockito.spy(realAsyncInstantiationBL);
+
+        msoRequestBuilder = new MsoRequestBuilder(asyncInstantiationBL, cloudOwnerService, aaiClient, featureManager);
+
         createInstanceParamsMaps();
     }
 
@@ -182,16 +160,6 @@
         enableAddCloudOwnerOnMsoRequest();
     }
 
-    private void enableAddCloudOwnerOnMsoRequest() {
-        enableAddCloudOwnerOnMsoRequest(true);
-    }
-
-    private void enableAddCloudOwnerOnMsoRequest(boolean isActive) {
-        // always turn on the feature flag
-        when(featureManager.isActive(Features.FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST)).thenReturn(isActive);
-        when(aaiClient.getCloudOwnerByCloudRegionId(anyString())).thenReturn("att-aic");
-    }
-
     @BeforeMethod
     void resetServiceCount() {
         serviceCount = 0;
@@ -215,13 +183,13 @@
         uuid = UUID.randomUUID();
         addNewJob(uuid);
         createdDate = NOW.minusYears(1);
-        addNewServiceInfo(uuid, userId, "Old", createdDate, createdDate, COMPLETED, false);
+        addNewServiceInfo(uuid, userId, "Old", createdDate, createdDate, COMPLETED, false, false);
 
         uuid = UUID.randomUUID();
         addNewJob(uuid);
         createdDate = NOW.minusDays(20);
         modifiedDate = NOW.minusDays(19);
-        addNewServiceInfo(uuid, userId, "Hidden", createdDate, modifiedDate, PAUSE, true);
+        addNewServiceInfo(uuid, userId, "Hidden", createdDate, modifiedDate, PAUSE, true, false);
 
         createNewTestServicesInfo(String.valueOf(userId));
     }
@@ -236,20 +204,20 @@
         addNewJob(uuid);
 
         createdDate = NOW.minusDays(40);
-        addNewServiceInfo(uuid, userId, "service instance 5", createdDate, createdDate, COMPLETED, false);
-        addNewServiceInfo(uuid, userId, "service instance 6", createdDate, createdDate, STOPPED, false);
+        addNewServiceInfo(uuid, userId, "service instance 5", createdDate, createdDate, COMPLETED, false, false);
+        addNewServiceInfo(uuid, userId, "service instance 6", createdDate, createdDate, STOPPED, false, false);
 
         uuid = UUID.randomUUID();
         addNewJob(uuid);
 
         createdDate = NOW.minusDays(20);
         modifiedDate = NOW.minusDays(10);
-        addNewServiceInfo(uuid, userId, "service instance 4", createdDate, modifiedDate, STOPPED, false);
-        addNewServiceInfo(uuid, userId, "service instance 2", createdDate, modifiedDate, COMPLETED, false);
-        addNewServiceInfo(uuid, userId, "service instance 3", createdDate, modifiedDate, PAUSE, false);
+        addNewServiceInfo(uuid, userId, "service instance 4", createdDate, modifiedDate, STOPPED, false, false);
+        addNewServiceInfo(uuid, userId, "service instance 2", createdDate, modifiedDate, COMPLETED, false, false);
+        addNewServiceInfo(uuid, userId, "service instance 3", createdDate, modifiedDate, PAUSE, false, false);
 
         modifiedDate = NOW.minusDays(19);
-        addNewServiceInfo(uuid, userId, "service instance 1", createdDate, modifiedDate, FAILED, false);
+        addNewServiceInfo(uuid, userId, "service instance 1", createdDate, modifiedDate, FAILED, false, false);
 
 
         // Job to a different user
@@ -257,7 +225,7 @@
         addNewJob(uuid);
 
         createdDate = NOW.minusMonths(2);
-        addNewServiceInfo(uuid, "2221", "service instance 7", createdDate, createdDate, COMPLETED, false);
+        addNewServiceInfo(uuid, "2221", "service instance 7", createdDate, createdDate, COMPLETED, false, false);
 
     }
 
@@ -269,7 +237,7 @@
         uuid = UUID.randomUUID();
         addNewJob(uuid, status);
 
-        addNewServiceInfo(uuid, null, "service instance 1", NOW, NOW, status, false);
+        addNewServiceInfo(uuid, null, "service instance 1", NOW, NOW, status, false, false);
 
         return uuid;
 
@@ -292,7 +260,7 @@
                 .toLocalDateTime();
     }
 
-    private void addNewServiceInfo(UUID uuid, String userId, String serviceName, LocalDateTime createDate, LocalDateTime statusModifiedDate, Job.JobStatus status, boolean isHidden) {
+    private void addNewServiceInfo(UUID uuid, String userId, String serviceName, LocalDateTime createDate, LocalDateTime statusModifiedDate, JobStatus status, boolean isHidden, boolean retryEnabled) {
         ServiceInfo serviceInfo = new ServiceInfo();
         serviceInfo.setJobId(uuid);
         serviceInfo.setUserId(userId);
@@ -302,6 +270,7 @@
         serviceInfo.setPause(false);
         serviceInfo.setOwningEntityId("1234");
         serviceInfo.setCreatedBulkDate(toDate(createDate));
+        serviceInfo.setRetryEnabled(retryEnabled);
 
         serviceInfo.setHidden(isHidden);
         dataAccessService.saveDomainObject(serviceInfo, getPropsMap());
@@ -334,6 +303,39 @@
         dataAccessService.saveDomainObject(jobDao, getPropsMap());
     }
 
+    private ServiceInstantiation addOriginalService(UUID jobId, String userID){
+        addNewServiceInfo(jobId, userID, "name", LocalDateTime.now(), LocalDateTime.now(), COMPLETED_WITH_ERRORS, false, true);
+        assertThat(asyncInstantiationRepository.getServiceInfoByJobId(jobId).isRetryEnabled(), is(true));
+        ServiceInstantiation originalServiceInstantiation = prepareServiceInstantiation(true, 1);
+        doReturn(originalServiceInstantiation).when(asyncInstantiationRepository).getJobRequest(jobId);
+        return originalServiceInstantiation;
+    }
+
+    private void assertRetryDisabled(UUID jobId){
+        assertThat(asyncInstantiationRepository.getServiceInfoByJobId(jobId).isRetryEnabled(), is(false));
+    }
+
+    private void assertNewJobExistsAsExpectedAfterRetry(List<UUID> newJobIds, ServiceInstantiation expectedServiceInstantiation, UUID jobId, String userId){
+        assertThat(newJobIds, hasSize(1));
+        assertThat(newJobIds.get(0), not(equalTo(jobId)));
+
+        ArgumentCaptor<ServiceInstantiation> requestsCaptor = ArgumentCaptor.forClass(ServiceInstantiation.class);
+        ArgumentCaptor<UUID> uuidsCaptor = ArgumentCaptor.forClass(UUID.class);
+        ArgumentCaptor<JobType> jobTypeCaptor = ArgumentCaptor.forClass(JobType.class);
+
+        verify(asyncInstantiationRepository).addJobRequest(uuidsCaptor.capture(), requestsCaptor.capture());
+        verify(jobAdapterMock).createServiceInstantiationJob(jobTypeCaptor.capture(), requestsCaptor.capture(), uuidsCaptor.capture(), eq(userId), any(), anyString(), anyInt());
+        verify(jobsBrokerServiceMock).add(any());
+
+        requestsCaptor.getAllValues().forEach(x->assertJsonEquals(expectedServiceInstantiation, x, whenIgnoringPaths(
+                "trackById",
+                "vnfs.2016-73_MOW-AVPN-vPE-BV-L.trackById",
+                "vnfs.2016-73_MOW-AVPN-vPE-BV-L.vfModules.201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0.201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0:001.trackById",
+                "vnfs.2016-73_MOW-AVPN-vPE-BV-L.vfModules.201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0.201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0:002.trackById"
+        )));
+
+    }
+
     @Test
     public void testServiceInfoAreOrderedAsExpected() {
         int userId = 2222;
@@ -344,6 +346,12 @@
     }
 
     @Test
+    public void whenNewServiceInfoCreated_isRetryEnablesIsFalse() {
+        UUID uuid = createServicesInfoWithDefaultValues(PENDING);
+        assertFalse(asyncInstantiationRepository.getServiceInfoByJobId(uuid).isRetryEnabled());
+    }
+
+    @Test
     public void testServiceInfoAreFilteredAsExpected() {
         int userId = 2222;
         createNewTestServicesInfoForFilter(String.valueOf(userId));
@@ -364,9 +372,9 @@
         defineMocks();
         ServiceInstantiation serviceInstantiationPayload = generateMockMacroServiceInstantiationPayload(isPause, createVnfList(vfModuleInstanceParamsMap, vnfInstanceParams, true), 2, true, PROJECT_NAME, false);
         final URL resource = this.getClass().getResource("/payload_jsons/bulk_service_request_unique_names.json");
-        when(jobAdapterMock.createServiceInstantiationJob(any(), any(), any(), any(), anyString(), any())).thenAnswer(invocation -> {
+        when(jobAdapterMock.createServiceInstantiationJob(any(), any(), any(), any(), any(), anyString(), any())).thenAnswer(invocation -> {
             Object[] args = invocation.getArguments();
-            return new MockedJob((String)args[4]);
+            return new MockedJob((String)args[5]);
         });
 
         when(jobsBrokerServiceMock.add(any(MockedJob.class))).thenAnswer((Answer<UUID>) invocation -> {
@@ -376,13 +384,13 @@
             return job.getUuid();
         });
 
-        when(featureManager.isActive(Features.FLAG_SHIFT_VFMODULE_PARAMS_TO_VNF)).thenReturn(true);
+        when(asyncInstantiationBL.isPartOfBulk(any())).thenReturn(true);
 
         List<UUID> uuids = asyncInstantiationBL.pushBulkJob(serviceInstantiationPayload, "az2016");
         for (int i = 0; i < 2; i++) {
             UUID currentUuid = uuids.get(i);
             RequestDetailsWrapper<ServiceInstantiationRequestDetails> result =
-                    asyncInstantiationBL.generateMacroServiceInstantiationRequest(currentUuid, serviceInstantiationPayload,
+                    msoRequestBuilder.generateMacroServiceInstantiationRequest(currentUuid, serviceInstantiationPayload,
                             MockedJob.getJob(currentUuid).getOptimisticUniqueServiceInstanceName(), "az2016");
             String unique =  i==0 ? "" : String.format("_00%s", i);
             String expected = IOUtils.toString(resource, "UTF-8")
@@ -403,7 +411,9 @@
     }
 
     protected void verifySearchNodeTypeByName(String unique, String resourceName, ResourceType serviceInstance) {
-        verify(aaiClient, times(1)).isNodeTypeExistsByName(resourceName + unique, serviceInstance);
+        String uniqueName = resourceName + unique;
+        verify(aaiClient, times(1)).isNodeTypeExistsByName(uniqueName, serviceInstance);
+        when(aaiClient.isNodeTypeExistsByName(uniqueName, serviceInstance)).thenReturn(true);
     }
 
     private HashMap<String, Object> getPropsMap() {
@@ -423,16 +433,7 @@
 
     @Test(dataProvider="dataProviderForInstanceNames")
     public void pushBulkJob_bulkWithSize3_instancesNamesAreExactlyAsExpected(boolean isUserProvidedNaming, List<String> expectedNames) {
-        int bulkSize = 3;
-
-        final ServiceInstantiation request = generateMockMacroServiceInstantiationPayload(
-                false,
-                createVnfList(instanceParamsMapWithoutParams, Collections.EMPTY_LIST, true),
-                bulkSize, isUserProvidedNaming, PROJECT_NAME, true
-        );
-
-        // in "createServiceInstantiationJob()" we will probe the service, with the generated names
-        configureMockitoWithMockedJob();
+        final ServiceInstantiation request = prepareServiceInstantiation(isUserProvidedNaming, 3);
 
 
         asyncInstantiationBL.pushBulkJob(request, "myUserId");
@@ -441,7 +442,106 @@
         assertEquals(serviceInfoList.stream().map(ServiceInfo::getServiceInstanceName).collect(Collectors.toList()), expectedNames);
     }
 
-    @Test(dataProvider = "aLaCarteAndMacroPayload")
+    protected ServiceInstantiation prepareServiceInstantiation(String projectName, boolean isUserProvidedNaming, int bulkSize) {
+        final ServiceInstantiation request = generateMockMacroServiceInstantiationPayload(
+                false,
+                createVnfList(instanceParamsMapWithoutParams, Collections.EMPTY_LIST, true),
+                bulkSize, isUserProvidedNaming, projectName, true
+        );
+
+        // in "createServiceInstantiationJob()" we will probe the service, with the generated names
+        configureMockitoWithMockedJob();
+        return request;
+    }
+
+    protected ServiceInstantiation prepareServiceInstantiation(boolean isUserProvidedNaming, int bulkSize) {
+        return prepareServiceInstantiation(PROJECT_NAME, isUserProvidedNaming, bulkSize);
+    }
+
+
+
+    @Test
+    public void whenPushBulkJob_thenJobRequestIsSaveInJobRequestDb() {
+        Mockito.reset(asyncInstantiationRepository);
+        int bulkSize = 3;
+        final ServiceInstantiation request = prepareServiceInstantiation(true, bulkSize);
+        when(jobsBrokerServiceMock.add(any())).thenReturn(UUID.randomUUID(), UUID.randomUUID(), UUID.randomUUID());
+        List<UUID> jobIds = asyncInstantiationBL.pushBulkJob(request, "abc");
+
+        ArgumentCaptor<JobAdapter.AsyncJobRequest> asyncJobRequestCaptor = ArgumentCaptor.forClass(JobAdapter.AsyncJobRequest.class);
+        ArgumentCaptor<ServiceInstantiation> requestsCaptor = ArgumentCaptor.forClass(ServiceInstantiation.class);
+        ArgumentCaptor<UUID> uuidsCaptor = ArgumentCaptor.forClass(UUID.class);
+        verify(asyncInstantiationRepository, times(bulkSize)).addJobRequest(uuidsCaptor.capture(), requestsCaptor.capture());
+        verify(jobsBrokerServiceMock, times(bulkSize)).add(any());
+        verify(jobAdapterMock, times(bulkSize)).createServiceInstantiationJob(any(), asyncJobRequestCaptor.capture(), any(), any(), any(), any(), any());
+
+        //verify that all for each job we saved an row in jobRequest table
+        assertThat(uuidsCaptor.getAllValues(), containsInAnyOrder(jobIds.toArray()));
+
+        //assert that each real job we created with the adaptor, request is save in jobRequest table
+        assertThat(requestsCaptor.getAllValues(), containsInAnyOrder(asyncJobRequestCaptor.getAllValues().toArray()));
+
+        assertThat(requestsCaptor.getAllValues(),everyItem(hasProperty("bulkSize", is(1))));
+
+        //assert that the requests that save in DB are the same as original request expect of the trackById
+        requestsCaptor.getAllValues().forEach(x->assertJsonEquals(request, x, whenIgnoringPaths(
+                "bulkSize",
+                "trackById",
+                "vnfs.2016-73_MOW-AVPN-vPE-BV-L.trackById",
+                "vnfs.2016-73_MOW-AVPN-vPE-BV-L.vfModules.201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0.201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0:001.trackById",
+                "vnfs.2016-73_MOW-AVPN-vPE-BV-L.vfModules.201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0.201673MowAvpnVpeBvL..AVPN_base_vPE_BV..module-0:002.trackById"
+        )));
+
+        //assert that each trackById on all bulk jobs is unique
+        Set<String> usedUUID = new HashSet<>();
+        requestsCaptor.getAllValues().forEach(x->assertTrackByIdRecursively(x, uuidRegexMatcher, usedUUID));
+    }
+
+    @Test
+    public void whenRetryJob_prevJobRetryIsDisabled() {
+        reset(asyncInstantiationRepository);
+        UUID jobId = UUID.randomUUID();
+        String userID = generateRandomAlphaNumeric(8);
+        addOriginalService(jobId, userID);
+        doReturn(mock(Map.class)).when(asyncInstantiationRepository).getResourceInfoByRootJobId(jobId);
+        asyncInstantiationBL.retryJob(jobId, userID);
+        assertRetryDisabled(jobId);
+    }
+
+    @Test
+    public void whenRetryJobWithEditedData_prevJobRetryIsDisabled() {
+        reset(asyncInstantiationRepository);
+        UUID jobId = UUID.randomUUID();
+        String userID = generateRandomAlphaNumeric(8);
+        addOriginalService(jobId, userID);
+        ServiceInstantiation editedServiceInstantiation = prepareServiceInstantiation("editedProjectName", true, 1);
+        asyncInstantiationBL.retryJob(editedServiceInstantiation, jobId, userID);
+        assertRetryDisabled(jobId);
+    }
+
+    @Test
+    public void retryJobWithEditedData_expectedNewJobDifferentData() {
+        reset(asyncInstantiationRepository);
+        UUID jobId = UUID.randomUUID();
+        String userID = generateRandomAlphaNumeric(8);
+        addOriginalService(jobId, userID);
+        ServiceInstantiation editedServiceInstantiation = prepareServiceInstantiation("editedProjectName", true, 1);
+        List<UUID> newJobIds =  asyncInstantiationBL.retryJob(editedServiceInstantiation, jobId, userID);
+        assertNewJobExistsAsExpectedAfterRetry(newJobIds, editedServiceInstantiation, jobId, userID);
+    }
+
+    @Test
+    public void retryJob_expectedNewJob() {
+        reset(asyncInstantiationRepository);
+        UUID jobId = UUID.randomUUID();
+        String userID = "az2016";
+        ServiceInstantiation originalServiceInstantiation =  addOriginalService(jobId, userID);
+        doReturn(mock(Map.class)).when(asyncInstantiationRepository).getResourceInfoByRootJobId(jobId);
+        List<UUID> newJobIds = asyncInstantiationBL.retryJob(jobId, userID);
+        assertNewJobExistsAsExpectedAfterRetry(newJobIds, originalServiceInstantiation, jobId, userID);
+    }
+
+    @Test (dataProvider = "aLaCarteAndMacroPayload")
     public void generateMockServiceInstantiationPayload_serializeBackAndForth_sourceShouldBeTheSame(ServiceInstantiation serviceInstantiationPayload) throws IOException {
         ObjectMapper mapper = new ObjectMapper();
         final String asString = mapper.writeValueAsString(serviceInstantiationPayload);
@@ -449,7 +549,7 @@
         final ServiceInstantiation asObject = mapper.readValue(asString, ServiceInstantiation.class);
         final String asString2 = mapper.writeValueAsString(asObject);
 
-        JsonAssert.assertJsonEquals(asString, asString2);
+        assertJsonEquals(asString, asString2);
     }
 
     @DataProvider
@@ -517,10 +617,6 @@
         };
     }
 
-    private ServiceInstantiation generateMacroMockServiceInstantiationPayload(boolean isPause, Map<String, Vnf> vnfs) {
-        return generateMockMacroServiceInstantiationPayload(isPause, vnfs, 1, true, PROJECT_NAME, false);
-    }
-
     @Test
     public void testUpdateServiceInfo_WithExistingServiceInfo_ServiceInfoIsUpdated() {
         UUID uuid = createFakedJobAndServiceInfo();
@@ -550,12 +646,12 @@
         return uuid;
     }
 
-    @Test(expectedExceptions = GenericUncheckedException.class, expectedExceptionsMessageRegExp = UPDATE_SERVICE_INFO_EXCEPTION_MESSAGE)
+    @Test(expectedExceptions = NotFoundException.class, expectedExceptionsMessageRegExp = UPDATE_SERVICE_INFO_EXCEPTION_MESSAGE)
     public void testUpdateServiceInfo_WithNonExisting_ThrowException() {
         asyncInstantiationBL.updateServiceInfo(UUID.randomUUID(), x -> x.setServiceInstanceName("not matter"));
     }
 
-    @Test(expectedExceptions = GenericUncheckedException.class, expectedExceptionsMessageRegExp = UPDATE_SERVICE_INFO_EXCEPTION_MESSAGE)
+    @Test(expectedExceptions = NotFoundException.class, expectedExceptionsMessageRegExp = UPDATE_SERVICE_INFO_EXCEPTION_MESSAGE)
     public void testUpdateServiceInfo_WithDoubleServiceWithSameJobUuid_ThrowException() {
         UUID uuid = createFakedJobAndServiceInfo();
         ServiceInfo serviceInfo = new ServiceInfo();
@@ -584,219 +680,10 @@
     @Test
     public void testCreateVnfEndpoint_useProvidedInstanceId() {
         String path = asyncInstantiationBL.getVnfInstantiationPath("myGreatId");
-        assertThat(path, matchesPattern("/serviceInstances/v./myGreatId/vnfs"));
+        assertThat(path, equalTo("/serviceInstantiation/v7/serviceInstances/myGreatId/vnfs"));
     }
 
-    @Test
-    public void createServiceInfo_WithUserProvidedNamingFalse_ServiceInfoIsAsExpected() throws IOException {
-        createMacroServiceInfo_WithUserProvidedNamingFalse_ServiceInfoIsAsExpected(true);
-    }
 
-    @Test
-    public void createServiceInfo_WithUserProvidedNamingFalseAndNoVfmodules_ServiceInfoIsAsExpected() throws IOException {
-        createMacroServiceInfo_WithUserProvidedNamingFalse_ServiceInfoIsAsExpected(false);
-    }
-
-    private void createMacroServiceInfo_WithUserProvidedNamingFalse_ServiceInfoIsAsExpected(boolean withVfmodules) throws IOException {
-        when(featureManager.isActive(Features.FLAG_SHIFT_VFMODULE_PARAMS_TO_VNF)).thenReturn(true);
-
-        ServiceInstantiation serviceInstantiationPayload = generateMockMacroServiceInstantiationPayload(true,
-                createVnfList(vfModuleInstanceParamsMapWithParamsToRemove, Collections.EMPTY_LIST, false),
-                1,
-                false, PROJECT_NAME, true);
-        URL resource;
-        if (withVfmodules) {
-            resource = this.getClass().getResource("/payload_jsons/bulk_service_request_ecomp_naming.json");
-        } else {
-            // remove the vf modules
-            serviceInstantiationPayload.getVnfs().values().forEach(vnf -> vnf.getVfModules().clear());
-            resource = this.getClass().getResource("/payload_jsons/bulk_service_request_no_vfmodule_ecomp_naming.json");
-        }
-
-        RequestDetailsWrapper<ServiceInstantiationRequestDetails> result =
-                asyncInstantiationBL.generateMacroServiceInstantiationRequest(null, serviceInstantiationPayload, serviceInstantiationPayload.getInstanceName(), "az2016");
-
-        String expected = IOUtils.toString(resource, "UTF-8");
-        MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result);
-    }
-
-    @Test
-    public void createALaCarteService_WithUserProvidedNamingFalse_RequestDetailsIsAsExpected() throws IOException {
-        ServiceInstantiation serviceInstantiationPayload = generateMockALaCarteServiceInstantiationPayload(false,
-                newHashMap(),
-                newHashMap(),
-                newHashMap(),
-                1,
-                false, PROJECT_NAME, true, null);
-
-        RequestDetailsWrapper<ServiceInstantiationRequestDetails> result =
-                asyncInstantiationBL.generateALaCarteServiceInstantiationRequest(null, serviceInstantiationPayload, serviceInstantiationPayload.getInstanceName(), "az2016");
-
-        URL resource = this.getClass().getResource("/payload_jsons/bulk_alacarte_service_request_naming_false.json");
-        String expected = IOUtils.toString(resource, "UTF-8");
-        MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result);
-    }
-
-    @Test
-    public void generateALaCarteServiceInstantiationRequest_withVnfList_HappyFllow() throws IOException {
-        ServiceInstantiation serviceInstantiationPayload = generateALaCarteWithVnfsServiceInstantiationPayload();
-        RequestDetailsWrapper<ServiceInstantiationRequestDetails> result =
-                asyncInstantiationBL.generateALaCarteServiceInstantiationRequest(null, serviceInstantiationPayload, serviceInstantiationPayload.getInstanceName(), "az2016");
-
-        String serviceExpected = IOUtils.toString(this.getClass().getResource("/payload_jsons/bulk_alacarte_service_request.json"), "UTF-8");
-        MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(serviceExpected, result);
-    }
-
-    @Test(dataProvider = "createVnfParameters")
-    public void createVnfRequestDetails_detailsAreAsExpected(boolean isFlagAddCloudOwnerActive, boolean isUserProvidedNaming, String file) throws IOException {
-
-        final List<Vnf> vnfList = new ArrayList<>(createVnfList(new HashMap<>(), null, isUserProvidedNaming, true).values());
-        ModelInfo siModelInfo = createServiceModelInfo();
-        String serviceInstanceId = "aa3514e3-5a33-55df-13ab-12abad84e7aa";
-
-        //we validate that the asyncInstantiationBL call to getUniqueName by simulate that aai retrun that original
-        //vnf name is used, and only next picked name is free.
-        Mockito.reset(aaiClient);
-        mockAaiClientAaiStatusOK();
-        when(aaiClient.isNodeTypeExistsByName(eq(VNF_NAME), eq(ResourceType.GENERIC_VNF))).thenReturn(true);
-        when(aaiClient.isNodeTypeExistsByName(eq(VNF_NAME+"_001"), eq(ResourceType.GENERIC_VNF))).thenReturn(false);
-        enableAddCloudOwnerOnMsoRequest(isFlagAddCloudOwnerActive);
-
-        String expected = IOUtils.toString(this.getClass().getResource(file), "UTF-8");
-        final RequestDetailsWrapper<VnfInstantiationRequestDetails> result = asyncInstantiationBL.generateVnfInstantiationRequest(vnfList.get(0), siModelInfo, serviceInstanceId, "pa0916");
-        MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result);
-    }
-
-    @DataProvider
-    public static Object[][] createVnfParameters() {
-        return new Object[][]{
-                {true, true, "/payload_jsons/bulk_vnf_request.json"},
-                {false, true, "/payload_jsons/bulk_vnf_request_without_cloud_owner.json"},
-                {true, false, "/payload_jsons/bulk_vnf_request_without_instance_name.json"},
-        };
-    }
-
-    @DataProvider
-    public static Object[][] vfModuleRequestDetails(Method test) {
-        return new Object[][]{
-                {"cc3514e3-5a33-55df-13ab-12abad84e7cc", true, "/payload_jsons/vfmodule_instantiation_request.json"},
-                {null, true, "/payload_jsons/vfmodule_instantiation_request_without_volume_group.json"},
-                {null, false, "/payload_jsons/vfmodule_instantiation_request_without_instance_name.json"}
-        };
-    }
-
-    @Test(dataProvider = "vfModuleRequestDetails")
-    public void createVfModuleRequestDetails_detailsAreAsExpected(String volumeGroupInstanceId, boolean isUserProvidedNaming, String fileName) throws IOException {
-
-        ModelInfo siModelInfo = createServiceModelInfo();
-        ModelInfo vnfModelInfo = createVnfModelInfo(true);
-        List<Map<String, String>> instanceParams = ImmutableList.of(ImmutableMap.of("vmx_int_net_len", "24",
-                "vre_a_volume_size_0" , "120"));
-        Map<String, String> supplementaryParams = ImmutableMap.of("vre_a_volume_size_0" , "100",
-                "availability_zone_0" , "mtpocdv-kvm-az01");
-        VfModule vfModule = createVfModule("201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1", "56e2b103-637c-4d1a-adc8-3a7f4a6c3240",
-                "72d9d1cd-f46d-447a-abdb-451d6fb05fa8", instanceParams, supplementaryParams,
-                (isUserProvidedNaming ? "vmxnjr001_AVPN_base_vRE_BV_expansion": null), "myVgName", true);
-
-        String serviceInstanceId = "aa3514e3-5a33-55df-13ab-12abad84e7aa";
-        String vnfInstanceId = "bb3514e3-5a33-55df-13ab-12abad84e7bb";
-
-        Mockito.reset(aaiClient);
-        mockAaiClientAaiStatusOK();
-        enableAddCloudOwnerOnMsoRequest();
-        when(aaiClient.isNodeTypeExistsByName(eq("vmxnjr001_AVPN_base_vRE_BV_expansion"), eq(ResourceType.VF_MODULE))).thenReturn(false);
-
-        String expected = IOUtils.toString(this.getClass().getResource(fileName), "UTF-8");
-        final RequestDetailsWrapper<VfModuleInstantiationRequestDetails> result = asyncInstantiationBL.generateVfModuleInstantiationRequest(
-                vfModule, siModelInfo, serviceInstanceId,
-                vnfModelInfo, vnfInstanceId, volumeGroupInstanceId, "pa0916");
-        MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result);
-    }
-
-    @DataProvider
-    public static Object[][] expectedAggregatedParams() {
-        return new Object[][]{
-                {ImmutableMap.of("a", "b", "c", "d"), ImmutableMap.of("e", "f", "g", "h"), ImmutableList.of(ImmutableMap.of("c", "d", "a", "b", "e", "f", "g", "h"))},
-                {ImmutableMap.of("a", "b", "c", "g"), ImmutableMap.of("c", "d", "e", "f"), ImmutableList.of(ImmutableMap.of("a", "b", "c", "d", "e", "f"))},
-                {ImmutableMap.of(), ImmutableMap.of("c", "d", "e", "f"), ImmutableList.of(ImmutableMap.of("c", "d", "e", "f"))},
-                {ImmutableMap.of("a", "b", "c", "g"), ImmutableMap.of(), ImmutableList.of(ImmutableMap.of("a", "b", "c", "g"))},
-                {ImmutableMap.of(), ImmutableMap.of(), ImmutableList.of()},
-                {null, ImmutableMap.of(), ImmutableList.of()},
-                {ImmutableMap.of(), null, ImmutableList.of()},
-        };
-    }
-
-    @Test(dataProvider = "expectedAggregatedParams")
-    public void testAggregateInstanceParamsAndSuppFile(Map<String, String> instanceParams, Map<String, String> suppParams, List<VfModuleInstantiationRequestDetails.UserParamMap<String, String>> expected) {
-        List<VfModuleInstantiationRequestDetails.UserParamMap<String, String>> aggParams = ((AsyncInstantiationBusinessLogicImpl)asyncInstantiationBL).aggregateAllInstanceParams(instanceParams, suppParams);
-        assertThat("Aggregated params are not as expected", aggParams, equalTo(expected));
-    }
-
-    @DataProvider
-    public static Object[][] expectedNetworkRequestDetailsParameters() {
-        return new Object[][]{
-            {true, "/payload_jsons/network_instantiation_request.json"},
-            {false, "/payload_jsons/network_instantiation_request_without_instance_name.json"}
-        };
-    }
-
-    @Test(dataProvider = "expectedNetworkRequestDetailsParameters")
-    public void createNetworkRequestDetails_detailsAreAsExpected(boolean isUserProvidedNaming, String filePath) throws IOException {
-
-        final List<Network> networksList = new ArrayList<>(createNetworkList(null, isUserProvidedNaming, true).values());
-        ModelInfo siModelInfo = createServiceModelInfo();
-        String serviceInstanceId = "aa3514e3-5a33-55df-13ab-12abad84e7aa";
-
-        Mockito.reset(aaiClient);
-        mockAaiClientAaiStatusOK();
-        enableAddCloudOwnerOnMsoRequest();
-        when(aaiClient.isNodeTypeExistsByName(eq(VNF_NAME), eq(ResourceType.L3_NETWORK))).thenReturn(true);
-        when(aaiClient.isNodeTypeExistsByName(eq(VNF_NAME+"_001"), eq(ResourceType.L3_NETWORK))).thenReturn(false);
-
-        String expected = IOUtils.toString(this.getClass().getResource(filePath), "UTF-8");
-        final RequestDetailsWrapper<NetworkInstantiationRequestDetails> result = asyncInstantiationBL.generateNetworkInstantiationRequest(networksList.get(0), siModelInfo, serviceInstanceId, "pa0916");
-        MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result);
-    }
-
-    @Test
-    public void createInstanceGroupRequestDetails_detailsAreAsExpected() throws IOException {
-
-        final InstanceGroup instanceGroup = createInstanceGroup(true, Action.Create);
-        ModelInfo siModelInfo = createServiceModelInfo();
-        String serviceInstanceId = "aa3514e3-5a33-55df-13ab-12abad84e7aa";
-
-        Mockito.reset(aaiClient);
-        mockAaiClientAaiStatusOK();
-        enableAddCloudOwnerOnMsoRequest();
-        when(aaiClient.isNodeTypeExistsByName(eq(VNF_GROUP_NAME), eq(ResourceType.INSTANCE_GROUP))).thenReturn(true);
-        when(aaiClient.isNodeTypeExistsByName(eq(VNF_GROUP_NAME+"_001"), eq(ResourceType.INSTANCE_GROUP))).thenReturn(false);
-
-        String expected = IOUtils.toString(this.getClass().getResource("/payload_jsons/instance_group_instantiation_request.json"), "UTF-8");
-        final RequestDetailsWrapper<InstanceGroupInstantiationRequestDetails> result = asyncInstantiationBL.generateInstanceGroupInstantiationRequest(instanceGroup, siModelInfo, serviceInstanceId, "az2018");
-        MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result);
-    }
-
-    @Test
-    public void checkIfNullProjectNameSentToMso(){
-        ServiceInstantiation serviceInstantiationPayload = generateMockMacroServiceInstantiationPayload(true,
-                createVnfList(vfModuleInstanceParamsMapWithParamsToRemove, Collections.EMPTY_LIST, false),
-                1,
-                false,null,false);
-        RequestDetailsWrapper<ServiceInstantiationRequestDetails> result =
-                asyncInstantiationBL.generateMacroServiceInstantiationRequest(null, serviceInstantiationPayload, serviceInstantiationPayload.getInstanceName(), "az2016");
-        JsonNode jsonNode = new ObjectMapper().valueToTree(result.requestDetails);
-        Assert.assertTrue(jsonNode.get("project").isNull());
-        serviceInstantiationPayload = generateMockMacroServiceInstantiationPayload(true,
-                createVnfList(vfModuleInstanceParamsMapWithParamsToRemove, Collections.EMPTY_LIST, false),
-                1,
-                false,"not null",false);
-        result = asyncInstantiationBL.generateMacroServiceInstantiationRequest(null, serviceInstantiationPayload, serviceInstantiationPayload.getInstanceName(), "az2016");
-        jsonNode = new ObjectMapper().valueToTree(result.requestDetails);
-        Assert.assertTrue(jsonNode.get("project").get("projectName").asText().equalsIgnoreCase("not null"));
-
-
-
-    }
 
     @Test
     public void pushBulkJob_macroServiceverifyCreatedDateBehavior_createdDateIsTheSameForAllServicesInSameBulk() {
@@ -853,7 +740,9 @@
         Mockito.reset(jobAdapterMock);
         final Job job = mock(Job.class);
         when(job.getStatus()).thenReturn(PENDING);
-        when(jobAdapterMock.createServiceInstantiationJob(any(), any(), any(), any(), any(), any())).thenReturn(job);
+        when(job.getUuid()).thenReturn(UUID.fromString("db2c5ed9-1c19-41ce-9cb7-edf0d878cdeb"));
+        when(jobAdapterMock.createServiceInstantiationJob(any(), any(), any(), any(), any(), any(), any())).thenReturn(job);
+        when(jobsBrokerServiceMock.add(job)).thenReturn(UUID.randomUUID());
     }
 
     @DataProvider
@@ -869,7 +758,11 @@
                 {"Paused", JobStatus.PAUSE},
                 {"Pause", JobStatus.PAUSE},
                 {"PENDING_MANUAL_TASK", JobStatus.PAUSE},
-                {"UNLOCKED", JobStatus.IN_PROGRESS}
+                {"UNLOCKED", JobStatus.IN_PROGRESS},
+                {"AbORtEd", COMPLETED_WITH_ERRORS},
+                {"RoLlED_baCK", FAILED},
+                {"ROllED_BAcK_To_ASsIGnED", FAILED},
+                {"rOLLED_bACK_tO_CrEATeD", FAILED},
         };
     }
 
@@ -879,131 +772,6 @@
         assertThat(asyncInstantiationBL.calcStatus(asyncRequestStatus), equalTo(expectedJobStatus));
     }
 
-    private void createNewAuditStatus(JobAuditStatus auditStatus)
-    {
-        Date createdDate= auditStatus.getCreated();
-        dataAccessService.saveDomainObject(auditStatus, getPropsMap());
-        setDateToStatus(auditStatus.getSource(), auditStatus.getJobStatus(), createdDate);
-    }
-
-
-
-    private static final String MSO_ARBITRARY_STATUS = "completed mso status";
-
-    @DataProvider
-    public static Object[][] auditStatuses(Method test) {
-        return new Object[][]{
-                {
-                        SourceStatus.VID,
-                        new String[]{ JobStatus.PENDING.toString(), JobStatus.IN_PROGRESS.toString()}
-                },
-                {       SourceStatus.MSO,
-                        new String[]{ JobStatus.IN_PROGRESS.toString(), MSO_ARBITRARY_STATUS }
-                }
-        };
-
-    }
-
-    private void setDateToStatus(SourceStatus source, String status, Date date) {
-        List<JobAuditStatus> jobAuditStatusList = dataAccessService.getList(JobAuditStatus.class, getPropsMap());
-        DaoUtils.tryWithSessionAndTransaction(sessionFactory, session -> {
-            jobAuditStatusList.stream()
-                    .filter(auditStatus -> source.equals(auditStatus.getSource()) && status.equals(auditStatus.getJobStatus()))
-                    .forEach(auditStatus -> {
-                        auditStatus.setCreated(date);
-                        session.saveOrUpdate(auditStatus);
-                    });
-            return 1;
-        });
-    }
-
-
-    @Test(dataProvider = "auditStatuses")
-    public void givenSomeAuditStatuses_getStatusesOfSpecificSourceAndJobId_getSortedResultsMatchingToParameters(SourceStatus expectedSource, String [] expectedSortedStatuses){
-        UUID jobUuid = UUID.randomUUID();
-        List<JobAuditStatus> auditStatusList = com.google.common.collect.ImmutableList.of(
-                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.VID, toDate(LocalDateTime.now().minusHours(2))),
-                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, UUID.randomUUID(),"",toDate(LocalDateTime.now().minusHours(30))),
-                new JobAuditStatus(jobUuid, MSO_ARBITRARY_STATUS, SourceStatus.MSO, UUID.randomUUID(),"",toDate(LocalDateTime.now().minusHours(3))),
-                new JobAuditStatus(jobUuid, PENDING.toString(), SourceStatus.VID, toDate(LocalDateTime.now().minusHours(3))),
-                new JobAuditStatus(UUID.randomUUID(), PENDING.toString(), SourceStatus.VID, toDate(LocalDateTime.now().minusHours(3))));
-        auditStatusList.forEach((auditStatus) -> createNewAuditStatus(auditStatus));
-        List<JobAuditStatus> statuses = asyncInstantiationBL.getAuditStatuses(jobUuid, expectedSource);
-        List<String> statusesList = statuses.stream().map(status -> status.getJobStatus()).collect(Collectors.toList());
-        Assert.assertTrue(statuses.stream().allMatch(status -> (status.getSource().equals(expectedSource)&& status.getJobId().equals(jobUuid))),"Only statuses of " + expectedSource + " for " + jobUuid + " should be returned. Returned statuses: " + String.join(",", statusesList ));
-        assertThat(statusesList, contains(expectedSortedStatuses));
-    }
-
-
-
-    @Test
-    public void addSomeVidStatuses_getThem_verifyGetInsertedWithoutDuplicates(){
-        ImmutableList<JobStatus> statusesToBeInserted = ImmutableList.of(PENDING, IN_PROGRESS, IN_PROGRESS, COMPLETED);
-        UUID jobUuid = UUID.randomUUID();
-        statusesToBeInserted.forEach(status->
-            {
-                asyncInstantiationBL.auditVidStatus(jobUuid, status);
-            });
-        List<String> statusesFromDB = asyncInstantiationBL.getAuditStatuses(jobUuid, SourceStatus.VID).stream().map(auditStatus -> auditStatus.getJobStatus()).collect(Collectors.toList());
-        List<String> statusesWithoutDuplicates = statusesToBeInserted.stream().distinct().map(x -> x.toString()).collect(Collectors.toList());
-        assertThat(statusesFromDB, is(statusesWithoutDuplicates));
-    }
-
-    @DataProvider
-    public static Object[][] msoAuditStatuses(Method test) {
-        UUID jobUuid = UUID.randomUUID();
-        UUID requestId = UUID.randomUUID();
-        return new Object[][]{
-                {
-                        jobUuid,
-                        ImmutableList.of(
-                                new JobAuditStatus(jobUuid, PENDING.toString(), SourceStatus.MSO, null, null),
-                                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, requestId, null),
-                                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, requestId, null),
-                                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, requestId, null),
-                                new JobAuditStatus(jobUuid, COMPLETED.toString(), SourceStatus.MSO, requestId, null)),
-                        ImmutableList.of(PENDING.toString(), IN_PROGRESS.toString(), COMPLETED.toString()),
-                        "All distinct statuses should be without duplicates"
-                },
-                {
-                        jobUuid,
-                        ImmutableList.of(
-                                new JobAuditStatus(jobUuid, PENDING.toString(), SourceStatus.MSO, null, null),
-                                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, requestId, null),
-                                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, requestId, "aa"),
-                                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, requestId, "aa"),
-                                new JobAuditStatus(jobUuid, IN_PROGRESS.toString(), SourceStatus.MSO, UUID.randomUUID(), "aa"),
-                                new JobAuditStatus(jobUuid, COMPLETED.toString(), SourceStatus.MSO, requestId, null)),
-                        ImmutableList.of(PENDING.toString(), IN_PROGRESS.toString(), IN_PROGRESS.toString(),IN_PROGRESS.toString(), COMPLETED.toString()),
-                        "Statuses should be without duplicates only with same requestId and additionalInfo"
-
-                }
-        };
-    }
-
-    @Test(dataProvider = "msoAuditStatuses")
-    public void addSomeMsoStatuses_getThem_verifyGetInsertedWithoutDuplicates(UUID jobUuid, ImmutableList<JobAuditStatus> msoStatuses, ImmutableList<String> expectedStatuses, String assertionReason) {
-        msoStatuses.forEach(status -> {
-            asyncInstantiationBL.auditMsoStatus(status.getJobId(), status.getJobStatus(), status.getRequestId() != null ? status.getRequestId().toString() : null, status.getAdditionalInfo());
-        });
-        List<String> statusesFromDB = asyncInstantiationBL.getAuditStatuses(jobUuid, SourceStatus.MSO).stream().map(auditStatus -> auditStatus.getJobStatus()).collect(Collectors.toList());
-        assertThat( assertionReason, statusesFromDB, is(expectedStatuses));
-    }
-
-    @Test
-    public void addSameStatusOfVidAndMso_verifyThatBothWereAdded(){
-        UUID jobUuid = UUID.randomUUID();
-        JobStatus sameStatus = IN_PROGRESS;
-        asyncInstantiationBL.auditMsoStatus(jobUuid, sameStatus.toString(),null,null);
-        asyncInstantiationBL.auditVidStatus(jobUuid, sameStatus);
-        List<JobAuditStatus> list = dataAccessService.getList(
-                JobAuditStatus.class,
-                String.format(" where JOB_ID = '%s'", jobUuid),
-                null, null);
-        Assert.assertEquals(list.size(),2);
-        assertThat(list,everyItem(hasProperty("jobStatus", is(sameStatus.toString()))));
-    }
-
     @DataProvider
     public static Object[][] msoRequestStatusFiles(Method test) {
         return new Object[][]{
@@ -1026,7 +794,7 @@
         doNothing().when(jobsBrokerServiceMock).delete(any());
         UUID uuid = createServicesInfoWithDefaultValues(PENDING);
         asyncInstantiationBL.deleteJob(uuid);
-        assertNotNull(asyncInstantiationBL.getServiceInfoByJobId(uuid).getDeletedAt(), "service info wasn't deleted");
+        assertNotNull(asyncInstantiationRepository.getServiceInfoByJobId(uuid).getDeletedAt(), "service info wasn't deleted");
     }
 
     @Test(expectedExceptions = IllegalStateException.class, expectedExceptionsMessageRegExp = DELETE_SERVICE_INFO_STATUS_EXCEPTION_MESSAGE)
@@ -1036,7 +804,7 @@
         try {
             asyncInstantiationBL.deleteJob(uuid);
         } catch (Exception e) {
-            assertNull(asyncInstantiationBL.getServiceInfoByJobId(uuid).getDeletedAt(), "service info shouldn't deleted");
+            assertNull(asyncInstantiationRepository.getServiceInfoByJobId(uuid).getDeletedAt(), "service info shouldn't deleted");
             throw e;
         }
     }
@@ -1081,7 +849,7 @@
         try {
             asyncInstantiationBL.hideServiceInfo(uuid);
         } catch (Exception e) {
-            assertFalse(asyncInstantiationBL.getServiceInfoByJobId(uuid).isHidden(), "service info shouldn't be hidden");
+            assertFalse(asyncInstantiationRepository.getServiceInfoByJobId(uuid).isHidden(), "service info shouldn't be hidden");
             throw e;
         }
     }
@@ -1126,16 +894,23 @@
         assertThat(asyncInstantiationBL.getUniqueName(name, type), equalTo(name+"_001"));
     }
 
+    @Test(enabled = false) //skip till we will handle macro bulk again...
+    public void whenNamedNotInUsedInAai_getSameNameTwice() {
+        String name = someCommonStepsAndGetName();
+        ResourceType type = ResourceType.GENERIC_VNF;
+        when(aaiClient.isNodeTypeExistsByName(name, type)).thenReturn(false);
+        assertThat(asyncInstantiationBL.getUniqueName(name, type), equalTo(name));
+        assertThat(asyncInstantiationBL.getUniqueName(name, type), equalTo(name));
+        when(aaiClient.isNodeTypeExistsByName(name, type)).thenReturn(true);
+        assertThat(asyncInstantiationBL.getUniqueName(name, type), equalTo(name+"_001"));
+    }
+
     private String someCommonStepsAndGetName() {
         mockAaiClientAaiStatusOK();
         return UUID.randomUUID().toString();
     }
 
-    private void mockAaiClientAaiStatusOK() {
-        when(aaiClient.isNodeTypeExistsByName(eq(AsyncInstantiationBusinessLogicImpl.NAME_FOR_CHECK_AAI_STATUS), any())).thenReturn(false);
-    }
-
-    @Test(expectedExceptions=ExceptionWithRequestInfo.class)
+    @Test(expectedExceptions= ExceptionWithRequestInfo.class)
     public void whenAaiBadResponseCode_throwInvalidAAIResponseException() {
         String name = someCommonStepsAndGetName();
         ResourceType type = ResourceType.SERVICE_INSTANCE;
@@ -1171,7 +946,7 @@
 
         ArgumentCaptor<JobType> argumentCaptor = ArgumentCaptor.forClass(JobType.class);
         asyncInstantiationBL.pushBulkJob(request, "myUserId");
-        verify(jobAdapterMock).createServiceInstantiationJob(argumentCaptor.capture(),any(),any(),anyString(), anyString(), anyInt());
+        verify(jobAdapterMock).createServiceInstantiationJob(argumentCaptor.capture(),any(),any(),anyString(), anyString(),  anyString(), anyInt());
         assertTrue(argumentCaptor.getValue().equals(JobType.ALaCarteServiceInstantiation));
     }
 
@@ -1184,198 +959,285 @@
 
         ArgumentCaptor<JobType> argumentCaptor = ArgumentCaptor.forClass(JobType.class);
         asyncInstantiationBL.pushBulkJob(request, "myUserId");
-        verify(jobAdapterMock).createServiceInstantiationJob(argumentCaptor.capture(),any(),any(),anyString(), anyString(), anyInt());
+        verify(jobAdapterMock).createServiceInstantiationJob(argumentCaptor.capture(),any(),any(),anyString(), any(),  anyString(), anyInt());
         assertTrue(argumentCaptor.getValue().equals(JobType.MacroServiceInstantiation));
     }
 
-    @Test
-    public void generateALaCarteServiceInstantiationRequest_verifyRequestIsAsExpected() throws IOException {
-        ServiceInstantiation serviceInstantiationPayload = generateALaCarteServiceInstantiationPayload();
-        final URL resource = this.getClass().getResource("/payload_jsons/bulk_alacarte_service_request.json");
-        RequestDetailsWrapper<ServiceInstantiationRequestDetails> result =
-                asyncInstantiationBL.generateALaCarteServiceInstantiationRequest(null, serviceInstantiationPayload, serviceInstantiationPayload.getInstanceName(), "az2016");
-        String expected = IOUtils.toString(resource, "UTF-8");
-        MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result);
-    }
+
 
     @Test
-    public void generateALaCarteServiceDeletionRequest_verifyRequestIsAsExpected() throws IOException {
-        final URL resource = this.getClass().getResource("/payload_jsons/bulk_alacarte_service_deletion_request.json");
-        String expected = IOUtils.toString(resource, "UTF-8");
+    public void getALaCarteServiceDeletionPath_verifyPathIsAsExpected() {
 
-        ServiceInstantiation serviceDeletionPayload = generateALaCarteServiceDeletionPayload();
-        RequestDetailsWrapper<ServiceDeletionRequestDetails> result =
-                asyncInstantiationBL.generateALaCarteServiceDeletionRequest(null, serviceDeletionPayload, "az2016");
-
-        MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result);
-    }
-
-    @Test
-    public void getALaCarteServiceDeletionPath_verifyPathIsAsExpected() throws IOException {
-
-        String expected = "/serviceInstantiation/v./serviceInstances/f36f5734-e9df-4fbf-9f35-61be13f028a1";
+        String expected = "/serviceInstantiation/v7/serviceInstances/f36f5734-e9df-4fbf-9f35-61be13f028a1";
 
         String result = asyncInstantiationBL.getServiceDeletionPath("f36f5734-e9df-4fbf-9f35-61be13f028a1");
 
-        assertThat(result, matchesPattern(expected));
+        assertThat(expected,equalTo(result));
+    }
+
+    @Test
+    public void getResumeRequestPath_verifyPathIsAsExpected() {
+
+        String expected = "/orchestrationRequests/v7/rq1234d1-5a33-55df-13ab-12abad84e333/resume";
+
+        String result = asyncInstantiationBL.getResumeRequestPath("rq1234d1-5a33-55df-13ab-12abad84e333");
+
+        assertThat(expected, equalTo(result));
     }
 
     @Test
     public void getInstanceGroupsDeletionPath_verifyPathIsAsExpected()  {
-
         assertEquals(asyncInstantiationBL.getInstanceGroupDeletePath("9aada4af-0f9b-424f-ae21-e693bd3e005b"),
                 "/serviceInstantiation/v7/instanceGroups/9aada4af-0f9b-424f-ae21-e693bd3e005b");
     }
 
-    @DataProvider
-    public static Object[][] testBuildVnfInstanceParamsDataProvider(Method test) {
-        return new Object[][]{
-                {
-                    Collections.EMPTY_LIST,
-                    ImmutableList.of(
-                        ImmutableList.of(ImmutableMap.of("k1","v1","k2","v2")),
-                        ImmutableList.of(ImmutableMap.of("k3","v3","k2","v2"))
-                    ),
-                    true,
-                    ImmutableList.of(ImmutableMap.of("k1","v1","k2","v2","k3","v3"))
-                },
-                {
-                        ImmutableList.of(ImmutableMap.of("j1", "w1", "k1","v1", "vnf_name","w2", "vf_module_name","w3")), //vnf_name, vf_module_name are excluded
-                        ImmutableList.of(
-                                ImmutableList.of(ImmutableMap.of("k1","v1","k2","v2")),
-                                ImmutableList.of(ImmutableMap.of("k3","v3","k2","v2")),
-                                ImmutableList.of(Collections.EMPTY_MAP),
-                                Collections.singletonList(null)
-                        ),
-                        true,
-                        ImmutableList.of(ImmutableMap.of("k1","v1","k2","v2","k3","v3","j1", "w1"))
-                },
-                {
-                        Collections.EMPTY_LIST,
-                        Arrays.asList(null, null),
-                        true,
-                        Collections.EMPTY_LIST //mso is expect to empty list and not list with empty map
-                },
-                {
-                        ImmutableList.of(Collections.EMPTY_MAP),
-                        ImmutableList.of(
-                                ImmutableList.of(Collections.EMPTY_MAP),
-                                ImmutableList.of(Collections.EMPTY_MAP)
-                        ),
-                        true,
-                        Collections.EMPTY_LIST //mso is expect to empty list and not list with empty map
-                },
-                {
-                        Collections.EMPTY_LIST,
-                        ImmutableList.of(
-                                ImmutableList.of(ImmutableMap.of("k1","v1","k2","v2")),
-                                ImmutableList.of(ImmutableMap.of("k3","v3","k2","v2"))
-                        ),
-                        false,
-                        Collections.EMPTY_LIST //mso is expect to empty list and not list with empty map
-                },
-                {
-                        ImmutableList.of(ImmutableMap.of("j1", "w1", "k1","v1", "vnf_name","w2", "vf_module_name","w3")),
-                        ImmutableList.of(
-                                ImmutableList.of(Collections.EMPTY_MAP)
-                        ),
-                        false,
-                        ImmutableList.of(ImmutableMap.of("j1", "w1", "k1","v1"))
-                },
-                {
-                        ImmutableList.of(ImmutableMap.of("vnf_name","w2", "vf_module_name", "w3", "j2", "w2", "j4","w4")),
-                        ImmutableList.of(
-                                ImmutableList.of(ImmutableMap.of("k1","v1","k2","v2")),
-                                ImmutableList.of(ImmutableMap.of("k3","v3","k2","v2"))
-                        ),
-                        false,
-                        ImmutableList.of(ImmutableMap.of("j2", "w2", "j4","w4"))
-                },
-
-        };
-    }
-
-    @Test(dataProvider="testBuildVnfInstanceParamsDataProvider")
-    public void testBuildVnfInstanceParams(List<Map<String, String>> currentVnfInstanceParams,
-                                           List<List<Map<String, String>>> vfModulesInstanceParams,
-                                           boolean isFeatureActive,
-                                           List<Map<String,String>> expectedResult){
-        when(featureManager.isActive(Features.FLAG_SHIFT_VFMODULE_PARAMS_TO_VNF)).thenReturn(isFeatureActive);
-        List<VfModuleMacro> vfModules =
-                vfModulesInstanceParams.stream().map(params-> new VfModuleMacro(new ModelInfo(), null, null, params)).collect(Collectors.toList());
-        List<Map<String,String>> actual = asyncInstantiationBL.buildVnfInstanceParams(currentVnfInstanceParams, vfModules);
-        assertThat(actual, equalTo(expectedResult));
-
-    }
-
     @Test
     public void whenLcpRegionNotEmpty_thenCloudRegionIdOfResourceIsLegacy() {
         String legacyCloudRegion = "legacyCloudRegion";
-        Vnf vnf = new Vnf(new ModelInfo(), null, null, Action.Create.name(), null, "anyCloudRegion", legacyCloudRegion, null, null, null, false, null, null);
+        Vnf vnf = new Vnf(new ModelInfo(), null, null, Action.Create.name(), null, "anyCloudRegion", legacyCloudRegion,
+                null, null, null, false, null, null, UUID.randomUUID().toString(), null, null);
         assertThat(vnf.getLcpCloudRegionId(), equalTo(legacyCloudRegion));
-
-
     }
 
     @Test
     public void whenLcpRegionNotEmpty_thenCloudRegionIdOfServiceIsLegacy() {
         String legacyCloudRegion = "legacyCloudRegion";
         ServiceInstantiation service = new ServiceInstantiation(new ModelInfo(), null, null, null, null, null, null,
-                null, null, "anyCloudRegion", legacyCloudRegion, null, null, null, null, null, null, null, null,
-                false, 1,false, false, null, null, Action.Create.name());
+                null, null, "anyCloudRegion", legacyCloudRegion, null, null, null, null, null, null, null, null, null,
+                false, 1,false, false, null, null, Action.Create.name(), UUID.randomUUID().toString(), null, null, null);
         assertThat(service.getLcpCloudRegionId(), equalTo(legacyCloudRegion));
     }
 
-    @Test
-    public void createVolumeGroup_verifyResultAsExpected() throws IOException {
-        final URL resource = this.getClass().getResource("/payload_jsons/volumegroup_instantiation_request.json");
-        VfModule vfModule = createVfModule("201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1",
-                "56e2b103-637c-4d1a-adc8-3a7f4a6c3240",
-                "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
-                Collections.emptyList(),
-                Collections.emptyMap(),
-                "vmxnjr001_AVPN_base_vRE_BV_expansion",
-                "myVgName",
-                true);
-        vfModule.getModelInfo().setModelInvariantId("ff5256d2-5a33-55df-13ab-12abad84e7ff");
-        vfModule.getModelInfo().setModelVersion("1");
-        ModelInfo vnfModelInfo = createVnfModelInfo(true);
-        RequestDetailsWrapper<VolumeGroupRequestDetails> result =
-                asyncInstantiationBL.generateVolumeGroupInstantiationRequest(vfModule,
-                        createServiceModelInfo(),
-                       "ff3514e3-5a33-55df-13ab-12abad84e7ff",
-                        vnfModelInfo,
-                        "vnfInstanceId",
-                        "az2016");
-        String expected = IOUtils.toString(resource, "UTF-8");
-        MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result);
+    @DataProvider
+    public static Object[][] getJobTypeByRequest_verifyResultAsExpectedDataProvider() {
+        return new Object[][]{
+                {false, Action.Create, JobType.MacroServiceInstantiation},
+                {true, Action.Create, JobType.ALaCarteServiceInstantiation},
+                {true, Action.Delete, JobType.ALaCarteService},
+        };
+    }
+
+    @Test(dataProvider = "getJobTypeByRequest_verifyResultAsExpectedDataProvider")
+    public void getJobTypeByRequest_verifyResultAsExpected(boolean isALaCarte, Action action, JobType expectedJobType) {
+        ServiceInstantiation service = createServiceWithIsALaCarteAndAction(isALaCarte, action);
+        assertThat(asyncInstantiationBL.getJobType(service), equalTo(expectedJobType));
+    }
+
+    @NotNull
+    protected ServiceInstantiation createServiceWithIsALaCarteAndAction(boolean isALaCarte, Action action) {
+        return new ServiceInstantiation(new ModelInfo(), null, null, null, null, null, null,
+                null, null, null, null, null, null, null, null, null, null, null, null, null,
+                false, 1, false, isALaCarte, null, null, action.name(),
+                UUID.randomUUID().toString(), null, null, null);
+    }
+
+    @DataProvider
+    public static Object[][] isRetryEnabledForStatusDataProvider(Method test) {
+        return new Object[][]{
+                {FAILED, true, true},
+                {COMPLETED_WITH_ERRORS, true, true},
+                {COMPLETED_WITH_NO_ACTION, true, false},
+                {COMPLETED, true, false},
+                {IN_PROGRESS, true, false},
+                {FAILED, false, false},
+                {COMPLETED_WITH_ERRORS, false, false},
+                {COMPLETED, false, false},
+        };
+    }
+
+    @Test(dataProvider = "isRetryEnabledForStatusDataProvider")
+    public void whenUpdateServiceInfoAndAuditStatus_thenServiceInfoRowIsUpdatedAndIsRetryIsRight(
+            JobStatus jobStatus, boolean isRetryfeatureEnabled, boolean expectedIsRetry) {
+        when(featureManager.isActive(Features.FLAG_1902_RETRY_JOB)).thenReturn(isRetryfeatureEnabled);
+        UUID uuid = createFakedJobAndServiceInfo();
+        asyncInstantiationBL.updateServiceInfoAndAuditStatus(uuid, jobStatus);
+        ServiceInfo serviceInfo = ((List<ServiceInfo>)dataAccessService.getList(ServiceInfo.class, getPropsMap())).
+                stream().filter(x->x.getJobId().equals(uuid)).findFirst().get();
+        assertEquals(jobStatus, serviceInfo.getJobStatus());
+
+        //we don't test serviceInfo.getStatusModifiedDate() because it's too complicated
+
+        assertEquals(expectedIsRetry, serviceInfo.isRetryEnabled());
     }
 
     @Test
-    public void getJobTypeByRequest_verifyResultAsExpected(){
-        ServiceInstantiation service = new ServiceInstantiation(new ModelInfo(), null, null, null, null, null, null,
-                null, null, null, null, null, null, null, null, null, null, null, null,
-                false, 1,false, false, null, null, Action.Create.name());
-        JobType jobType = asyncInstantiationBL.getJobType(service) ;
-        assertThat(jobType, equalTo(JobType.MacroServiceInstantiation));
-        service = new ServiceInstantiation(new ModelInfo(), null, null, null, null, null, null,
-                null, null, null, null, null, null, null, null, null, null, null, null,
-                false, 1,false, true, null, null, Action.Create.name());
-        jobType = asyncInstantiationBL.getJobType(service);
-        assertThat(jobType, equalTo(JobType.ALaCarteServiceInstantiation));
-        service = new ServiceInstantiation(new ModelInfo(), null, null, null, null, null, null,
-                null, null, null, null, null, null, null, null, null, null, null, null,
-                false, 1,false, true, null, null, Action.Delete.name());
-        jobType = asyncInstantiationBL.getJobType(service);
-        assertThat(jobType, equalTo(JobType.ALaCarteService));
+    public void givenServiceWithNullTrackByIds_whenReplaceTrackByIds_thenAllLevelsHasTrackByIdWithUUID() {
+        ServiceInstantiation serviceInstantiation = FakeResourceCreator.createServiceWith2InstancesInEachLevel(Action.Create);
+        //assert for the given that all trackById are null
+        assertTrackByIdRecursively(serviceInstantiation, is(nullValue()), new HashSet<>());
+        ServiceInstantiation modifiedServiceInstantiation = asyncInstantiationBL.prepareServiceToBeUnique(serviceInstantiation);
+        assertTrackByIdRecursively(modifiedServiceInstantiation, uuidRegexMatcher, new HashSet<>());
     }
 
-    protected ServiceInstantiation generateALaCarteServiceInstantiationPayload() {
-        return generateMockALaCarteServiceInstantiationPayload(false, Collections.EMPTY_MAP, Collections.EMPTY_MAP, Collections.EMPTY_MAP, 1, true, PROJECT_NAME, false, "VNF_API");
+    private void assertTrackByIdRecursively(BaseResource baseResource, org.hamcrest.Matcher matcher, Set<String> usedUuids) {
+        assertThat(baseResource.getTrackById(), matcher);
+        if (baseResource.getTrackById()!=null) {
+            assertThat(usedUuids, not(hasItem(baseResource.getTrackById())));
+            usedUuids.add(baseResource.getTrackById());
+        }
+        baseResource.getChildren().forEach(x->assertTrackByIdRecursively(x, matcher, usedUuids));
     }
 
-    private ServiceInstantiation generateALaCarteServiceDeletionPayload() {
-        return generateMockALaCarteServiceDeletionPayload(false, Collections.EMPTY_MAP, Collections.EMPTY_MAP, Collections.EMPTY_MAP, 1, true, PROJECT_NAME, false, "VNF_API", "1234567890");
+    @Test
+    public void givenServicefromDB_returnsTheBulkRequest() throws IOException {
+        ServiceInstantiation serviceInstantiation = TestUtils.readJsonResourceFileAsObject("/payload_jsons/VnfGroupCreate3Delete1None1Request.json", ServiceInstantiation.class);
+        UUID jobId = UUID.randomUUID();
+        doReturn(serviceInstantiation).when(asyncInstantiationRepository).getJobRequest(jobId);
+        doReturn(mock(Map.class)).when(asyncInstantiationRepository).getResourceInfoByRootJobId(jobId);
+        ServiceInstantiation modifiedServiceInstantiation = asyncInstantiationBL.getBulkForRetry(jobId);
+        assertThat(modifiedServiceInstantiation, jsonEquals(serviceInstantiation).when(IGNORING_ARRAY_ORDER));
+    }
+
+    @Test
+    public void givenServiceFromDB_returnsResolvedData() throws IOException {
+        ServiceInstantiation serviceInstantiation = TestUtils.readJsonResourceFileAsObject("/payload_jsons/VnfGroupCreate3Delete1None1Request.json", ServiceInstantiation.class);
+        ServiceInstantiation expectedServiceInstantiation = TestUtils.readJsonResourceFileAsObject("/payload_jsons/VnfGroupCreate3Delete1None1RequestResolvedForRetry.json", ServiceInstantiation.class);
+        UUID jobId = UUID.randomUUID();
+        AsyncRequestStatus asyncRequestStatus = TestUtils.readJsonResourceFileAsObject(
+                "/responses/mso/orchestrationRequestsVnf.json",
+                AsyncRequestStatus.class);
+        Map<String, ResourceInfo> mockedResourceInfoMap = ImmutableMap.of(
+                "groupingservicefortest..ResourceInstanceGroup..0:001", new ResourceInfo("groupingservicefortest..ResourceInstanceGroup..0:001",jobId,"VNF_GROUP1_INSTANCE_ID", COMPLETED, asyncRequestStatus),// TODO case: delete completed
+                "ag5aav86u4j", new ResourceInfo("ag5aav86u4j",jobId, null, FAILED, asyncRequestStatus),// case: failed
+                "asedrftjko", new ResourceInfo("asedrftjko",jobId, "VNF_GROUP1_INSTANCE_ID_3", COMPLETED, asyncRequestStatus),//case: completed after retry failed
+                "rgedfdged4", new ResourceInfo("rgedfdged4", jobId,"VNF_GROUP1_INSTANCE_ID_4", COMPLETED, asyncRequestStatus ));// case: create completed
+
+        doReturn(mockedResourceInfoMap).when(asyncInstantiationRepository).getResourceInfoByRootJobId(jobId);
+        ServiceInstantiation modifiedServiceInstantiation = asyncInstantiationBL.enrichBulkForRetry(serviceInstantiation,jobId);
+        assertThat(modifiedServiceInstantiation, jsonEquals(expectedServiceInstantiation).when(IGNORING_ARRAY_ORDER));
+    }
+
+    @DataProvider
+    public static Object[][] readStatusMsgDataProvider(Method test) throws IOException {
+        AsyncRequestStatus asyncRequestStatus = TestUtils.readJsonResourceFileAsObject(
+                "/responses/mso/orchestrationRequestsVnf.json",
+                AsyncRequestStatus.class);
+        return new Object[][]{
+                {null, null},
+                {new AsyncRequestStatus(), null},
+                {new AsyncRequestStatus(new AsyncRequestStatus.Request()), null},
+                {new AsyncRequestStatus(new AsyncRequestStatus.Request(new RequestStatus())), null},
+                {asyncRequestStatus, "Vnf has been created successfully."}
+        };
+    }
+
+    @Test(dataProvider = "readStatusMsgDataProvider")
+    public void resourceInfoReadStatusMsg_returnsStatusMsgOrNull(AsyncRequestStatus asyncRequestStatus, String expected) {
+        ResourceInfo resourceInfo = new ResourceInfo("groupingservicefortest..ResourceInstanceGroup..0:001",UUID.randomUUID(),"VNF_GROUP1_INSTANCE_ID", COMPLETED, asyncRequestStatus);
+        String msg= asyncInstantiationBL.readStatusMsg(resourceInfo);
+        assertThat(msg, equalTo( expected));
+    }
+
+    @Test
+    public void testAddResourceInfoForOkResponse() {
+        reset(asyncInstantiationRepository);
+        String serviceInstanceId = "service-instance-id";
+        UUID jobUuid = UUID.randomUUID();
+
+        asyncInstantiationBL.addResourceInfo(prepareSharedDataForAddResourceInfo(jobUuid), JobStatus.IN_PROGRESS, serviceInstanceId);
+
+        ArgumentCaptor<ResourceInfo> resourceInfoCaptor = ArgumentCaptor.forClass(ResourceInfo.class);
+        verify(asyncInstantiationRepository).saveResourceInfo(resourceInfoCaptor.capture());
+
+        ResourceInfo resourceInfo = resourceInfoCaptor.getValue();
+        assertResourceInfoValues(resourceInfo, serviceInstanceId, jobUuid, JobStatus.IN_PROGRESS);
+        assertThat(resourceInfo.getErrorMessage(), is(nullValue()));
+    }
+
+    private JobSharedData prepareSharedDataForAddResourceInfo(UUID jobUuid) {
+        ServiceInstantiation serviceInstantiation = mock(ServiceInstantiation.class);
+        when(serviceInstantiation.getTrackById()).thenReturn("track-by-id");
+        return new JobSharedData(jobUuid, "", serviceInstantiation, "");
+    }
+
+    private void assertResourceInfoValues(ResourceInfo resourceInfo, String serviceInstanceId, UUID jobUuid, JobStatus jobStatus) {
+        assertThat(resourceInfo.getInstanceId(), equalTo(serviceInstanceId));
+        assertThat(resourceInfo.getJobStatus(), equalTo(jobStatus));
+        assertThat(resourceInfo.getRootJobId(), equalTo(jobUuid));
+        assertThat(resourceInfo.getTrackById(), equalTo("track-by-id"));
+    }
+
+    @DataProvider
+    public static Object[][] addResourceInfoWithError() {
+        String message = "Failed to create service instance";
+        return new Object[][]{
+                {500, message},
+                {199, "{\"serviceException\":{\"messageId\":\"SVC2000\",\"text\":\"Error: " + message + "\"}}"}
+        };
+    }
+
+    @Test(dataProvider = "addResourceInfoWithError")
+    public void testAddResourceInfoForErrorResponse(int errorCode, String errorMessage) {
+        reset(asyncInstantiationRepository);
+        UUID jobUuid = UUID.randomUUID();
+
+        RestObject restObject = mock(RestObject.class);
+        when(restObject.getStatusCode()).thenReturn(errorCode);
+        when(restObject.getRaw()).thenReturn(errorMessage);
+        asyncInstantiationBL.addFailedResourceInfo(prepareSharedDataForAddResourceInfo(jobUuid), restObject);
+
+        ArgumentCaptor<ResourceInfo> resourceInfoCaptor = ArgumentCaptor.forClass(ResourceInfo.class);
+        verify(asyncInstantiationRepository).saveResourceInfo(resourceInfoCaptor.capture());
+
+        ResourceInfo resourceInfo = resourceInfoCaptor.getValue();
+        assertResourceInfoValues(resourceInfo, null, jobUuid, JobStatus.FAILED);
+        assertThat(resourceInfo.getErrorMessage().request.requestStatus.getStatusMessage(), containsString("Failed to create service instance"));
+        assertThat(resourceInfo.getErrorMessage().request.requestStatus.getStatusMessage(), containsString(String.valueOf(errorCode)));
+        ZonedDateTime parsedDate = TimeUtils.parseZonedDateTime(resourceInfo.getErrorMessage().request.requestStatus.getTimestamp());
+        assertThat(parsedDate.toLocalDate(), is(LocalDate.now()));
+
+        doReturn(resourceInfo).when(asyncInstantiationRepository).getResourceInfoByTrackId(any());
+        JobAuditStatus jobAuditStatus = auditService.getResourceAuditStatus(resourceInfo.getTrackById());
+        assertThat(jobAuditStatus.getJobStatus(), equalTo("FAILED"));
+        assertThat(jobAuditStatus.getAdditionalInfo(), containsString("Failed to create service instance"));
+        assertThat(jobAuditStatus.getAdditionalInfo(), containsString(String.valueOf(errorCode)));
+        assertTrue(DateUtils.isSameDay(jobAuditStatus.getCreatedDate(), new Date()));
+    }
+
+    @DataProvider
+    public static Object[][] updateResourceInfoParameters() {
+        return new Object[][] {
+                {JobStatus.COMPLETED, "Instance was created successfully"},
+                {JobStatus.FAILED, "Failed to create instance"}
+        };
+    }
+
+    @Test(dataProvider = "updateResourceInfoParameters")
+    public void testUpdateResourceInfo(JobStatus jobStatus, String message) {
+        reset(asyncInstantiationRepository);
+        UUID jobUuid = UUID.randomUUID();
+        JobSharedData sharedData = new JobSharedData(jobUuid, "", mock(ServiceInstantiation.class),"");
+
+        ResourceInfo resourceInfoMock = new ResourceInfo();
+        resourceInfoMock.setTrackById(UUID.randomUUID().toString());
+        doReturn(resourceInfoMock).when(asyncInstantiationRepository).getResourceInfoByTrackId(any());
+
+        AsyncRequestStatus asyncRequestStatus = asyncInstantiationBL.convertMessageToAsyncRequestStatus(message);
+
+        asyncInstantiationBL.updateResourceInfo(sharedData, jobStatus, asyncRequestStatus);
+
+        ArgumentCaptor<ResourceInfo> resourceInfoCaptor = ArgumentCaptor.forClass(ResourceInfo.class);
+        verify(asyncInstantiationRepository).saveResourceInfo(resourceInfoCaptor.capture());
+
+        ResourceInfo resourceInfo = resourceInfoCaptor.getValue();
+        assertThat(resourceInfo.getJobStatus(), equalTo(jobStatus));
+        if (jobStatus == JobStatus.FAILED) {
+            assertThat(resourceInfo.getErrorMessage(), is(not(nullValue())));
+            assertThat(resourceInfo.getErrorMessage().request.requestStatus.getStatusMessage(), equalTo(message));
+            ZonedDateTime parsedDate = TimeUtils.parseZonedDateTime(resourceInfo.getErrorMessage().request.requestStatus.getTimestamp());
+            assertThat(parsedDate.toLocalDate(), is(LocalDate.now()));
+        } else {
+            assertThat(resourceInfo.getErrorMessage(), is(nullValue()));
+        }
+
+        JobAuditStatus jobAuditStatus = auditService.getResourceAuditStatus(resourceInfo.getTrackById());
+        if (jobStatus == JobStatus.FAILED) {
+            assertThat(jobAuditStatus.getJobStatus(), equalTo("FAILED"));
+            assertThat(jobAuditStatus.getAdditionalInfo(), equalTo(message));
+        } else {
+            assertThat(jobAuditStatus, is(nullValue()));
+        }
+
     }
 
     static class MockedJob implements Job {
@@ -1426,7 +1288,7 @@
 
         @Override
         public JobSharedData getSharedData() {
-            return new JobSharedData(uuid, "", null);
+            return new JobSharedData(uuid, "", null,"");
         }
 
         @Override
@@ -1463,4 +1325,13 @@
             return optimisticUniqueServiceInstanceName;
         }
     }
+
+
+    @Test
+    public void testGetVfModuleReplacePath_asMSOexpected()
+    {
+        String path = asyncInstantiationBL.getVfModuleReplacePath("myService", "myVNF", "myVFModule");
+        assertThat(path, equalTo("/serviceInstantiation/v7/serviceInstances/myService/vnfs/myVNF/vfModules/myVFModule/replace"));
+
+    }
 }
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/AuditServiceImplTest.java b/vid-app-common/src/test/java/org/onap/vid/services/AuditServiceImplTest.java
index bdb2a28..ce5840b 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/AuditServiceImplTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/AuditServiceImplTest.java
@@ -19,71 +19,88 @@
  */
 package org.onap.vid.services;
 
-import org.glassfish.grizzly.http.util.HttpStatus;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
-import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.onap.vid.dal.AsyncInstantiationRepository;
 import org.onap.vid.model.JobAuditStatus;
+import org.onap.vid.mso.RestMsoImplementation;
+import org.onap.vid.mso.RestObject;
+import org.onap.vid.mso.rest.AsyncRequestStatus;
 import org.onap.vid.mso.rest.AsyncRequestStatusList;
 import org.onap.vid.testUtils.TestUtils;
-import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
-import java.io.IOException;
-import java.util.Date;
 import java.util.List;
-import java.util.UUID;
 
-import static java.util.stream.Collectors.toList;
 import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.*;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.MockitoAnnotations.initMocks;
+import static org.hamcrest.Matchers.equalTo;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.when;
 
 public class AuditServiceImplTest {
+
   @Mock
-  private AsyncInstantiationBusinessLogic asyncInstantiationBL;
+  private RestMsoImplementation restMso;
+  @Mock
+  private AsyncInstantiationRepository asyncInstantiationRepository;
 
   @InjectMocks
   private AuditServiceImpl auditService;
 
-  @BeforeClass
-  public void init() {
-    initMocks(this);
+  @BeforeMethod
+  public void setUp() {
+    restMso = null;
+    asyncInstantiationRepository = null;
+    auditService = null;
+    MockitoAnnotations.initMocks(this);
   }
 
   @Test
-  public void setFailedAuditStatusFromMsoTest() {
+  public void testGetRequestsIdsByServiceIdAndRequestTypeAndScope() throws Exception {
 
-    UUID jobUuid = UUID.randomUUID();
-    String requestId = "1";
-    int statusCode = HttpStatus.OK_200.getStatusCode();
-    String msoResponse = "{}";
+    String instanceId = "d40c8a82-cc04-45e5-a0f6-0c9394c8f8d2";
+    //the request id in multipleOrchestrationRequestsServiceInstance.json
+    String expectedRequestId = "fab854bf-e53c-415e-b3cc-b6fcce8414b2";
+    String msoBasePath = "/someMsoPath/v2019?";
 
-    auditService.setFailedAuditStatusFromMso(jobUuid, requestId, statusCode, msoResponse);
-
-    verify(asyncInstantiationBL, times(1))
-        .auditMsoStatus(
-            Mockito.any(UUID.class),
-            Mockito.anyString(),
-            Mockito.anyString(),
-            Mockito.anyString());
+    AsyncRequestStatusList asyncRequestStatusList = TestUtils.readJsonResourceFileAsObject(
+        "/responses/mso/multipleOrchestrationRequestsServiceInstance.json",
+        AsyncRequestStatusList.class);
+    RestObject<AsyncRequestStatusList> msoResponse = new RestObject<>();
+    msoResponse.set(asyncRequestStatusList);
+    msoResponse.setStatusCode(200);
+    when(restMso.GetForObject(eq(msoBasePath + "filter=serviceInstanceId:EQUALS:" + instanceId),
+        eq(AsyncRequestStatusList.class)))
+        .thenReturn(msoResponse);
+    TestUtils.testWithSystemProperty("mso.restapi.get.orc.reqs", msoBasePath, () -> {
+      List<AsyncRequestStatus.Request> result = auditService
+          .retrieveRequestsFromMsoByServiceIdAndRequestTypeAndScope(instanceId, "createInstance", "service");
+      assertThat(result.size(), equalTo(1));
+      assertThat(result.get(0).requestId, equalTo(expectedRequestId));
+      assertThat(result.get(0).startTime, equalTo("Mon, 04 Mar 2019 20:47:15 GMT"));
+    });
   }
 
   @Test
-  public void testConvertMsoResponseStatusToJobAuditStatus_missingDateFromMso_shouldNoError() throws IOException {
-    final AsyncRequestStatusList asyncRequestStatusList = TestUtils.readJsonResourceFileAsObject("/orchestrationRequestsByServiceInstanceId.json", AsyncRequestStatusList.class);
+  public void nextOrdinalAfter_givenNull_returnZero() {
+    assertThat(
+        auditService.nextOrdinalAfter(null),
+        equalTo(0)
+    );
+  }
 
-    AuditServiceImpl auditService = new AuditServiceImpl(null, null);
+  @Test
+  public void nextOrdinalAfter_givenX_returnXplus1() {
+    final int x = 6;
+    final JobAuditStatus jobAuditStatus = new JobAuditStatus();
+    jobAuditStatus.setOrdinal(x);
 
-    final List<JobAuditStatus> jobAuditStatuses = auditService.convertMsoResponseStatusToJobAuditStatus(asyncRequestStatusList.getRequestList(), "foo");
-
-    final List<Date> dates = jobAuditStatuses.stream().map(JobAuditStatus::getCreatedDate).collect(toList());
-    final List<String> statuses = jobAuditStatuses.stream().map(JobAuditStatus::getJobStatus).collect(toList());
-
-    assertThat(dates, containsInAnyOrder(notNullValue(), notNullValue(), nullValue()));
-    assertThat(statuses, containsInAnyOrder("COMPLETE", "COMPLETE", "IN_PROGRESS"));
+    assertThat(
+        auditService.nextOrdinalAfter(jobAuditStatus),
+        equalTo(x + 1)
+    );
   }
 
 }
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/JobsBrokerServiceTest.java b/vid-app-common/src/test/java/org/onap/vid/services/JobsBrokerServiceTest.java
index 85cf23e..40546e9 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/JobsBrokerServiceTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/JobsBrokerServiceTest.java
@@ -7,9 +7,9 @@
  * 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.
@@ -21,57 +21,22 @@
 package org.onap.vid.services;
 
 
-import static java.util.concurrent.TimeUnit.MILLISECONDS;
-import static java.util.stream.Collectors.toList;
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.both;
-import static org.hamcrest.Matchers.containsInAnyOrder;
-import static org.onap.vid.job.Job.JobStatus.COMPLETED;
-import static org.onap.vid.job.Job.JobStatus.CREATING;
-import static org.onap.vid.job.Job.JobStatus.FAILED;
-import static org.onap.vid.job.Job.JobStatus.IN_PROGRESS;
-import static org.onap.vid.job.Job.JobStatus.PAUSE;
-import static org.onap.vid.job.Job.JobStatus.PENDING;
-import static org.onap.vid.job.Job.JobStatus.RESOURCE_IN_PROGRESS;
-import static org.onap.vid.job.Job.JobStatus.STOPPED;
-import static org.onap.vid.utils.Streams.not;
-import static org.testng.Assert.assertNotNull;
-import static org.testng.AssertJUnit.assertEquals;
-
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
-import java.lang.reflect.Method;
-import java.time.LocalDateTime;
-import java.time.ZoneId;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-import java.util.Optional;
-import java.util.Set;
-import java.util.UUID;
-import java.util.concurrent.ConcurrentSkipListSet;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeoutException;
-import java.util.stream.IntStream;
-import java.util.stream.Stream;
-import javax.inject.Inject;
 import org.apache.commons.lang.RandomStringUtils;
 import org.apache.commons.lang3.RandomUtils;
 import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.commons.lang3.tuple.Pair;
 import org.apache.log4j.LogManager;
 import org.apache.log4j.Logger;
 import org.hibernate.SessionFactory;
+import org.jetbrains.annotations.NotNull;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
 import org.onap.portalsdk.core.domain.support.DomainVo;
 import org.onap.portalsdk.core.service.DataAccessService;
 import org.onap.portalsdk.core.util.SystemProperties;
-import org.onap.vid.config.DataSourceConfig;
-import org.onap.vid.config.JobAdapterConfig;
 import org.onap.vid.exceptions.GenericUncheckedException;
 import org.onap.vid.exceptions.OperationNotAllowedException;
 import org.onap.vid.job.Job;
@@ -80,8 +45,12 @@
 import org.onap.vid.job.JobsBrokerService;
 import org.onap.vid.job.command.JobCommandFactoryTest;
 import org.onap.vid.job.impl.JobDaoImpl;
+import org.onap.vid.job.impl.JobSchedulerInitializer;
 import org.onap.vid.job.impl.JobsBrokerServiceInDatabaseImpl;
+import org.onap.vid.services.VersionService;
 import org.onap.vid.utils.DaoUtils;
+import org.onap.vid.config.DataSourceConfig;
+import org.onap.vid.config.JobAdapterConfig;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
 import org.testng.Assert;
@@ -90,6 +59,31 @@
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
+import javax.inject.Inject;
+import java.lang.reflect.Method;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+import java.util.stream.Stream;
+
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
+import static java.util.stream.Collectors.toList;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.both;
+import static org.hamcrest.Matchers.containsInAnyOrder;
+import static org.mockito.Mockito.when;
+import static org.onap.vid.job.Job.JobStatus.*;
+import static org.onap.vid.utils.Streams.not;
+import static org.onap.vid.testUtils.TestUtils.generateRandomAlphaNumeric;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
+
 @ContextConfiguration(classes = {DataSourceConfig.class, SystemProperties.class, JobAdapterConfig.class})
 public class JobsBrokerServiceTest extends AbstractTestNGSpringContextTests {
 
@@ -101,7 +95,7 @@
 
     private final Set<Long> threadsIds = new ConcurrentSkipListSet<>();
 
-    private final long FEW = 1000;
+    private final long FEW = 500;
 
     private final String JOBS_SHOULD_MATCH = "the jobs that added and those that pulled must be the same";
     private final String JOBS_PEEKED_SHOULD_MATCH = "the jobs that added and those that peeked must be the same";
@@ -116,6 +110,23 @@
     @Inject
     private SessionFactory sessionFactory;
 
+    @Mock
+    private VersionService versionService;
+
+    @AfterMethod
+    public void threadsCounter() {
+        logger.info("participating threads count: " + threadsIds.size());
+        threadsIds.clear();
+    }
+
+    @BeforeMethod
+    public void initializeBroker() {
+        MockitoAnnotations.initMocks(this);
+        when(versionService.retrieveBuildNumber()).thenReturn("aBuildNumber");
+        broker = new JobsBrokerServiceInDatabaseImpl(dataAccessService, sessionFactory, 200, 0, versionService);
+        ((JobsBrokerServiceInDatabaseImpl) broker).deleteAll();
+    }
+
     /*
     - pulling jobs is limited to inserted ones
     - putting back allows getting the job again
@@ -147,6 +158,7 @@
                 new JobCommandFactoryTest.MockedRequest(42,"nothing") ,
                 UUID.randomUUID(),
                 userId,
+                null,
                 "optimisticUniqueServiceInstanceName",
                 RandomUtils.nextInt());
     }
@@ -234,18 +246,6 @@
         threadsIds.add(Thread.currentThread().getId());
     }
 
-    @AfterMethod
-    public void threadsCounter() {
-        logger.info("participating threads count: " + threadsIds.size());
-        threadsIds.clear();
-    }
-
-    @BeforeMethod
-    public void initializeBroker() {
-        broker = new JobsBrokerServiceInDatabaseImpl(dataAccessService, sessionFactory, 200, 0);
-        ((JobsBrokerServiceInDatabaseImpl) broker).deleteAll();
-    }
-
     @Test
     public void givenSingleJob_getIt_verifySameJob() {
         final Job originalJob = waitForFutureJob(newJobAsync(broker));
@@ -254,6 +254,51 @@
         assertThat(JOBS_SHOULD_MATCH, retrievedJob, is(originalJob));
     }
 
+    @DataProvider
+    public static Object[][] allTopics() {
+        return JobSchedulerInitializer.WORKERS_TOPICS.stream()
+                .map(topic -> new Object[] { topic })
+                .toArray(Object[][]::new);
+    }
+
+    @Test(dataProvider = "allTopics")
+    public void givenJobFromSameBuild_pullJobs_jobIsPulled(Job.JobStatus topic) {
+        when(versionService.retrieveBuildNumber()).thenReturn("someVersion");
+        Job mockedJob = createMockJob("user id", topic);
+        UUID uuid = broker.add(mockedJob);
+        assertEquals(uuid,  broker.pull(topic, UUID.randomUUID().toString()).get().getUuid());
+    }
+
+
+    @Test(dataProvider = "allTopics")
+    public void givenJobFromOtherBuild_pullJobs_noneIsPulled(Job.JobStatus topic) {
+        when(versionService.retrieveBuildNumber()).thenReturn("old");
+        Job mockedJob = createMockJob("user id", topic);
+        broker.add(mockedJob);
+        when(versionService.retrieveBuildNumber()).thenReturn("new");
+        assertFalse(broker.pull(topic, UUID.randomUUID().toString()).isPresent());
+    }
+
+    @Test
+    public void givenJobWithNullBuildAndJobWithRealBuild_pullJobs_jobsWithNonNullIsPulled() {
+        Job.JobStatus topic = PENDING;
+
+        //push job with null build
+        when(versionService.retrieveBuildNumber()).thenReturn(null);
+        broker.add(createMockJob("user id", topic));
+
+        //push job with "aBuild" build
+        when(versionService.retrieveBuildNumber()).thenReturn("aBuild");
+        UUID newJobId = broker.add(createMockJob("user id", topic));
+
+        //pull jobs while current build is still "aBuild". Only the non null build is pulled
+        assertEquals(newJobId,  broker.pull(topic, UUID.randomUUID().toString()).get().getUuid());
+
+        //no more jobs to pull
+        assertFalse(broker.pull(topic, UUID.randomUUID().toString()).isPresent());
+    }
+
+
     @Test
     public void givenManyJobs_getJobsAndPushThemBack_alwaysSeeAllOfThemWithPeek() throws InterruptedException {
         final List<Job> originalJobs = putALotOfJobs(broker);
@@ -346,10 +391,10 @@
                         () -> createNewJob(14, UUID.randomUUID(), "userId", STOPPED,null, oldestDate),
                         () -> createNewJob(22, UUID.randomUUID(), "userId", PENDING,null, oldestDate),
                         () -> createNewJob(33, UUID.randomUUID(), "userId", PENDING,null, LocalDateTime.now().minusHours(2))),
-                  6,
-                  5,
-                  PENDING,
-                  "Broker should pull the only pending - first pending job by oldest job - ignore deleted,completed, failed, in-progress and stopped statuses"
+                        6,
+                        5,
+                        PENDING,
+                        "Broker should pull the only pending - first pending job by oldest job - ignore deleted,completed, failed, in-progress and stopped statuses"
                 },
                 {ImmutableList.of(
                         (Jobber)() -> createNewJob(11, UUID.randomUUID(), "userId", IN_PROGRESS, UUID.randomUUID().toString(), oldestDate),
@@ -374,7 +419,7 @@
                         () -> createNewJob(22, UUID.randomUUID(), "userId", PENDING, UUID.randomUUID().toString(), oldestDate),
                         () -> createNewJob(33, UUID.randomUUID(), "userId", PENDING, null, LocalDateTime.now().minusHours(2)),
                         () -> createNewJob(12, UUID.randomUUID(), "userId", RESOURCE_IN_PROGRESS, UUID.randomUUID().toString(), oldestDate)
-                        ),
+                ),
                         3,
                         2,
                         PENDING,
@@ -411,10 +456,10 @@
                         (Jobber)() -> createNewJob(11, sameTemplate, "userId", FAILED, null, oldestDate, DELETED),
                         () -> createNewJob(22, sameTemplate, "userId", STOPPED,null, oldestDate),
                         () -> createNewJob(33, sameTemplate, "userId", PENDING,null, LocalDateTime.now().minusHours(2))),
-                   3,
-                   2,
-                   PENDING,
-                   "Broker should pull pending job when there is another job from this template that was deleted, although failed"
+                        3,
+                        2,
+                        PENDING,
+                        "Broker should pull pending job when there is another job from this template that was deleted, although failed"
                 },
                 { ImmutableList.of(
                         (Jobber)() -> createNewJob(11, UUID.randomUUID(), "userA", IN_PROGRESS, null, oldestDate),
@@ -475,10 +520,10 @@
                         () -> createNewJob(33, UUID.randomUUID(), "userId", IN_PROGRESS, null, LocalDateTime.now().minusHours(2)),
                         () -> createNewJob(16, UUID.randomUUID(), "userId", RESOURCE_IN_PROGRESS, null, oldestDate)
                 ),
-                  20,
-                  6,
-                  IN_PROGRESS,
-                  "Broker with in progress topic should pull only in-progress jobs - first in-progress job by oldest date - ignore all other statuses"
+                        20,
+                        6,
+                        IN_PROGRESS,
+                        "Broker with in progress topic should pull only in-progress jobs - first in-progress job by oldest date - ignore all other statuses"
                 },
                 {ImmutableList.of(
                         (Jobber)() -> createNewJob(11, UUID.randomUUID(), "userId", COMPLETED, null, oldestDate),
@@ -541,14 +586,9 @@
 
     @Test(dataProvider = "jobs")
     public void givenSomeJobs_pullNextJob_returnNextOrNothingAsExpected(List<Jobber> jobbers, int msoLimit, int expectedIndexSelected, Job.JobStatus topic, String assertionReason) {
-        JobsBrokerServiceInDatabaseImpl broker = new JobsBrokerServiceInDatabaseImpl(dataAccessService, sessionFactory, msoLimit, 20);
-        final List<JobDaoImpl> jobs = jobbers.stream().map(Jobber::toJob).collect(toList());
-        for (JobDaoImpl job : jobs) {
-            Date modifiedDate = job.getModified();
-            broker.add(job);
-            setModifiedDateToJob(job.getUuid(), modifiedDate);
-        }
-        Optional<Job> nextJob = broker.pull(topic, UUID.randomUUID().toString());
+        JobsBrokerServiceInDatabaseImpl aBroker = new JobsBrokerServiceInDatabaseImpl(dataAccessService, sessionFactory, msoLimit, 20, versionService);
+        final List<JobDaoImpl> jobs = addJobsWithModifiedDate(jobbers, aBroker);
+        Optional<Job> nextJob = aBroker.pull(topic, UUID.randomUUID().toString());
         boolean shouldAnyBeSelected = expectedIndexSelected >= 0;
         String pulledJobDesc = nextJob.map(job -> ". pulled job: " + job.toString()).orElse(". no job pulled");
         Assert.assertEquals(nextJob.isPresent(), shouldAnyBeSelected, assertionReason+pulledJobDesc);
@@ -557,10 +597,206 @@
         }
     }
 
+    @NotNull
+    protected List<JobDaoImpl> addJobsWithModifiedDate(List<Jobber> jobbers, JobsBrokerService broker) {
+        final List<JobDaoImpl> jobs = jobbers.stream().map(Jobber::toJob).collect(toList());
+        return addJobsWithModifiedDateByJobDao(jobs, broker);
+    }
+
+    @NotNull
+    private List<JobDaoImpl> addJobsWithModifiedDateByJobDao(List<JobDaoImpl> jobs, JobsBrokerService broker) {
+        for (JobDaoImpl job : jobs) {
+            Date modifiedDate = job.getModified();
+            broker.add(job);
+            setModifiedDateToJob(job.getUuid(), modifiedDate);
+        }
+        return jobs;
+    }
+
+    @DataProvider
+    public static Object[][] jobsForTestingPendingResource(Method test) {
+        UUID templateId1 = UUID.fromString("311a9196-bbc5-47a1-8b11-bf0f9db1c7ca");
+        UUID templateId2 = UUID.fromString("4f1522f9-642e-49f7-af75-a2f344085bcc");
+        return new Object[][]{
+                {ImmutableList.of( (Jobber)
+                                () -> createNewJob(12, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(1, templateId2, "userId", CREATING, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(2, UUID.randomUUID(), "userId", RESOURCE_IN_PROGRESS, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(3, UUID.randomUUID(), "userId", IN_PROGRESS, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(4, UUID.randomUUID(), "userId", COMPLETED, null, LocalDateTime.now().minusSeconds(1), false)
+                ),
+                        0,
+                        "given there is only one in the queue in PENDING_RESOURCE and no other job with same templateId, then this job is selected"
+                },
+                {ImmutableList.of( (Jobber)
+                                () -> createNewJob(2, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(3, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusSeconds(2), false),
+                        () -> createNewJob(1, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now(), false)
+                ),
+                        2,
+                        "given multiple jobs with same templateId in PENDING_RESOURCE, then job with lowest indexInBulk is selected"
+                },
+                {ImmutableList.of( (Jobber)
+                                () -> createNewJob(1, templateId2, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(1, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now(), false)
+                ),
+                        1,
+                        "given multiple jobs with same indexInBulk, then job with lowest templateId is selected"
+                },
+                {ImmutableList.of( (Jobber)
+                                () -> createNewJob(1, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now(), false),
+                        () -> createNewJob(2, templateId2, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusSeconds(1), false)
+                ),
+                        0,
+                        "given multiple jobs with different indexInBulk and different templateId, then job with lowest indexInBulk is selected"
+                },
+                {ImmutableList.of( (Jobber)
+                                () -> createNewJob(5, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusMinutes(2), false),
+                        () -> createNewJob(1, templateId1, "userId", PENDING_RESOURCE, "123", LocalDateTime.now(), false)
+                ),
+                        -1,
+                        "given there is already taken job with same templateId, then no job is selected"
+                },
+                {ImmutableList.of( (Jobber)
+                                () -> createNewJob(2, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusMinutes(2), false),
+                        () -> createNewJob(1, templateId1, "userId", PENDING_RESOURCE, "123", LocalDateTime.now(), false),
+                        () -> createNewJob(9, templateId2, "userId", PENDING_RESOURCE, null, LocalDateTime.now(), false),
+                        () -> createNewJob(8, templateId2, "userId", PENDING_RESOURCE, null, LocalDateTime.now(), false)
+                ),
+                        3,
+                        "given 4 jobs, 2 jobs templateId1 but one of them is taken, and 2 jobs with templateId2, then select job with templateId2"
+                },
+                {ImmutableList.of( (Jobber)
+                                () -> createNewJob(5, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusMinutes(1), false),
+                        () -> createNewJob(1, templateId1, "userId", PENDING_RESOURCE, "123", LocalDateTime.now(), true)
+                ),
+                        0,
+                        "given 2 jobs with same templateId, one of them is taken but deleted, then the other job is selected"
+                },
+                {ImmutableList.of( (Jobber)
+                                () -> createNewJob(5, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusMinutes(1), false),
+                        () -> createNewJob(1, templateId1, "userId", IN_PROGRESS, null, LocalDateTime.now(), false)
+                ),
+                        -1,
+                        "given 2 jobs with same templateId, one of them is IN_PROGRESS, then no job is selected"
+                },
+                {ImmutableList.of( (Jobber)
+                                () -> createNewJob(5, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusMinutes(1), false),
+                        () -> createNewJob(1, templateId1, "userId", RESOURCE_IN_PROGRESS, null, LocalDateTime.now(), false)
+                ),
+                        -1,
+                        "given 2 jobs with same templateId, one of them is RESOURCE_IN_PROGRESS, then no job is selected"
+                },
+                {ImmutableList.of( (Jobber)
+                                () -> createNewJob(6, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusMinutes(2), false),
+                        () -> createNewJob(5, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusMinutes(1), false),
+                        () -> createNewJob(1, templateId1, "userId", RESOURCE_IN_PROGRESS, null, LocalDateTime.now(), true)
+                ),
+                        1,
+                        "given 3 jobs with same templateId, one of them is RESOURCE_IN_PROGRESS but deleted, then other job with lowest indexInBulk is selected"
+                },
+                {ImmutableList.of( (Jobber)
+                                () -> createNewJob(6, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusMinutes(2), false),
+                        () -> createNewJob(5, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusMinutes(1), false),
+                        () -> createNewJob(1, templateId1, "userId", RESOURCE_IN_PROGRESS, null, LocalDateTime.now(), false),
+                        () -> createNewJob(12, templateId2, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusMinutes(2), false),
+                        () -> createNewJob(11, templateId2, "userId", PENDING_RESOURCE, null, LocalDateTime.now(), false)
+                ),
+                        4,
+                        "given 5 jobs, 3 with templateId1 that one of them is RESOURCE_IN_PROGRESS,"+
+                                "2 with templateId2 both in PENDING_RESOURCE, then job with lowest indexInBulk from templateId2 is selected"
+
+                },
+                {ImmutableList.of( (Jobber)
+                        () -> createNewJob(6, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusMinutes(2), true)
+                ),
+                        -1,
+                        "given 1 job in PENDING_RESOURCE but it's deleted, then no job is selected"
+                },
+                {ImmutableList.of( (Jobber)
+                                () -> createNewJob(20, templateId1, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(1, templateId1, "userId", CREATING, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(2, templateId1, "userId", COMPLETED, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(3, templateId1, "userId", FAILED, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(4, templateId1, "userId", COMPLETED_WITH_ERRORS, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(5, templateId1, "userId", STOPPED, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(6, templateId1, "userId", PAUSE, null, LocalDateTime.now().minusSeconds(1), false)
+                ),
+                        0,
+                        "given multiple jobs with same templateId, 1 in PENDING_RESOURCE, and other are not in progress, "+
+                                "then the job in PENDING_RESOURCE is selected"
+                },
+                {ImmutableList.of( (Jobber)
+                                () -> createNewJob(1, UUID.randomUUID(), "userId", CREATING, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(2, UUID.randomUUID(), "userId", COMPLETED, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(3, UUID.randomUUID(), "userId", FAILED, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(4, UUID.randomUUID(), "userId", COMPLETED_WITH_ERRORS, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(5, UUID.randomUUID(), "userId", IN_PROGRESS, null, LocalDateTime.now().minusSeconds(1), false),
+                        () -> createNewJob(6, UUID.randomUUID(), "userId", RESOURCE_IN_PROGRESS, null, LocalDateTime.now().minusSeconds(1), false)
+                ),
+                        -1,
+                        "given there is no job in PENDING_RESOURCE state, then no job is selected"
+                },
+                {ImmutableList.of( (Jobber)
+                        () -> createNewJob(6, null, "userId", PENDING_RESOURCE, null, LocalDateTime.now().minusMinutes(2), false)
+                ),
+                        -1,
+                        "given there is 1 job in PENDING_RESOURCE but without templateId, then no job is selected"
+                },
+        };
+    }
+
+    @Test(dataProvider = "jobsForTestingPendingResource")
+    public void givenSomeJobs_pullPendingResource_returnNextOrNothingAsExpected(List<Jobber> jobbers, int expectedIndexSelected, String assertionReason) {
+        givenSomeJobs_pullNextJob_returnNextOrNothingAsExpected(jobbers, 1, expectedIndexSelected, PENDING_RESOURCE, assertionReason);
+    }
+
+    public static JobDaoImpl createNewJob(Job.JobStatus status, String takenBy, long secondsOffset, boolean deleted) {
+        return createNewJob(1, UUID.randomUUID(), "af456", status, takenBy, LocalDateTime.now().minusSeconds(secondsOffset), deleted);
+    }
+
+    @Test
+    public void givenSomeJobs_deleteOldFinalJobs_onlyExpectedJobsAreDeleted() {
+        long seconds = 999;
+        final List<Pair<JobDaoImpl,Boolean>> jobs = ImmutableList.of(
+                //not final
+                Pair.of(createNewJob(IN_PROGRESS, null, seconds+1, false), true),
+                Pair.of(createNewJob(RESOURCE_IN_PROGRESS, null, seconds+1, false), true),
+                Pair.of(createNewJob(PENDING, null, seconds+1, false), true),
+                Pair.of(createNewJob(CREATING, null, seconds+1, false), true),
+                Pair.of(createNewJob(PENDING_RESOURCE, null, seconds+1, false), true),
+                Pair.of(createNewJob(PAUSE, null, seconds+1, false), true),
+
+                //final
+                Pair.of(createNewJob(COMPLETED, null, seconds+1, false), false),
+                Pair.of(createNewJob(FAILED, null, seconds+1, false), false),
+                Pair.of(createNewJob(STOPPED, null, seconds+1, false), false),
+                Pair.of(createNewJob(COMPLETED_WITH_ERRORS, null, seconds+1, true), false),
+                Pair.of(createNewJob(COMPLETED_WITH_NO_ACTION, generateRandomAlphaNumeric(5), seconds+1, true), false),
+
+                //final but not old
+                Pair.of(createNewJob(COMPLETED, generateRandomAlphaNumeric(5), seconds-2, false), true),
+                Pair.of(createNewJob(COMPLETED, generateRandomAlphaNumeric(5), seconds-400, false), true),
+                Pair.of(createNewJob(COMPLETED, generateRandomAlphaNumeric(5), 0, false), true)
+        );
+        addJobsWithModifiedDateByJobDao(jobs.stream().map(Pair::getLeft).collect(Collectors.toList()), broker);
+        assertEquals(jobs.size(), broker.peek().size());
+
+        broker.deleteOldFinalJobs(seconds);
+        Stream<Pair<UUID, Job.JobStatus>> expectedJobs = jobs.stream()
+                .filter(Pair::getRight)
+                .map(x -> Pair.of(
+                        x.getLeft().getUuid(),
+                        x.getLeft().getStatus()
+                ));
+        assertThat(broker.peek().stream().map(x->Pair.of(x.getUuid(), x.getStatus())).collect(Collectors.toList()),
+                containsInAnyOrder(expectedJobs.toArray()));
+    }
+
     @DataProvider
     public Object[][] topics() {
         return Arrays.stream(Job.JobStatus.values())
-                .filter(not(t -> ImmutableList.of(PENDING, IN_PROGRESS, CREATING, RESOURCE_IN_PROGRESS).contains(t)))
+                .filter(not(t -> ImmutableList.of(PENDING, IN_PROGRESS, CREATING, RESOURCE_IN_PROGRESS, PENDING_RESOURCE).contains(t)))
                 .map(v -> new Object[]{v}).collect(toList()).toArray(new Object[][]{});
     }
 
@@ -660,7 +896,7 @@
     }
 
     @Test(dataProvider = "jobStatusesForSuccessDelete", expectedExceptions = NoJobException.class)
-       public void givenOneJob_deleteIt_canPeekOnItButCantPull(Job.JobStatus status) {
+    public void givenOneJob_deleteIt_canPeekOnItButCantPull(Job.JobStatus status) {
         final Job job = waitForFutureJob(newJobAsync(broker, status));
         broker.delete(job.getUuid());
         assertNotNull(((JobDaoImpl) broker.peek(job.getUuid())).getDeletedAt(), "job should be deleted");
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/PortDetailsTranslatorTest.java b/vid-app-common/src/test/java/org/onap/vid/services/PortDetailsTranslatorTest.java
index 117e444..33b8c7e 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/PortDetailsTranslatorTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/PortDetailsTranslatorTest.java
@@ -53,7 +53,7 @@
                 "        {" +
                 "            \"id\": \"4876980240\"," +
                 "            \"node-type\": \"l-interface\"," +
-                "            \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," +
+                "            \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," +
                 "            \"properties\": {" +
                 "                \"interface-name\": \"zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," +
                 "                \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\"," +
@@ -89,7 +89,7 @@
                 "        {" +
                 "            \"id\": \"4876980240\"," +
                 "            \"node-type\": \"l-interface\"," +
-                "            \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," +
+                "            \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," +
                 "            \"properties\": {" +
                 "                \"interface-name\": null," +
                 "                \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\"," +
@@ -122,7 +122,7 @@
                 "        {" +
                 "            \"id\": \"4876980240\"," +
                 "            \"node-type\": \"l-interface\"," +
-                "            \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," +
+                "            \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," +
                 "            \"properties\": {" +
                 "                \"interface-name\": \"zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," +
                 "                \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\"," +
@@ -155,7 +155,7 @@
                 "        {" +
                 "            \"id\": \"4876980240\"," +
                 "            \"node-type\": \"l-interface\"," +
-                "            \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," +
+                "            \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," +
                 "            \"properties\": {" +
                 "                \"interface-name\": \"\"," +
                 "                \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\"," +
@@ -188,7 +188,7 @@
                 "        {" +
                 "            \"id\": \"4876980240\"," +
                 "            \"node-type\": \"l-interface\"," +
-                "            \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," +
+                "            \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," +
                 "            \"properties\": {" +
                 "                \"interface-name\": \"zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," +
                 "                \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\"," +
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/RoleGenaratorServiceImplTest.java b/vid-app-common/src/test/java/org/onap/vid/services/RoleGenaratorServiceImplTest.java
index 2ad68dd..2bf73ee 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/RoleGenaratorServiceImplTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/RoleGenaratorServiceImplTest.java
@@ -75,7 +75,7 @@
 
         ServiceSubscription serviceSubscription = createServiceSubscription();
         AaiResponse<Services> subscriberResponse = createServicesAaiResponse(serviceSubscription);
-        doReturn(subscriberResponse).when(aaiClientInterface).getSubscriberData(subscriber.globalCustomerId);
+        doReturn(subscriberResponse).when(aaiClientInterface).getSubscriberData(subscriber.globalCustomerId,false);
 
         String result = testSubject.generateRoleScript(firstRun);
         Assert.assertTrue(StringUtils.isNotBlank(result));
@@ -91,7 +91,7 @@
 
         ServiceSubscription serviceSubscription = createServiceSubscription();
         AaiResponse<Services> subscriberResponse = createServicesAaiResponse(serviceSubscription);
-        doReturn(subscriberResponse).when(aaiClientInterface).getSubscriberData(subscriber.globalCustomerId);
+        doReturn(subscriberResponse).when(aaiClientInterface).getSubscriberData(subscriber.globalCustomerId, false);
 
         String result = testSubject.generateRoleScript(firstRun);
         Assert.assertTrue(StringUtils.isNotBlank(result));
diff --git a/vid-app-common/src/test/java/org/onap/vid/testUtils/TestUtils.java b/vid-app-common/src/test/java/org/onap/vid/testUtils/TestUtils.java
index 756d175..5fc5832 100644
--- a/vid-app-common/src/test/java/org/onap/vid/testUtils/TestUtils.java
+++ b/vid-app-common/src/test/java/org/onap/vid/testUtils/TestUtils.java
@@ -20,10 +20,14 @@
 
 package org.onap.vid.testUtils;
 
+import static com.fasterxml.jackson.module.kotlin.ExtensionsKt.jacksonObjectMapper;
 import static java.util.function.Function.identity;
 import static java.util.stream.Collectors.toList;
 import static java.util.stream.Collectors.toMap;
 import static org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptors;
+import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
+import static org.apache.commons.text.CharacterPredicates.DIGITS;
+import static org.apache.commons.text.CharacterPredicates.LETTERS;
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.RETURNS_DEFAULTS;
 import static org.mockito.Mockito.mock;
@@ -33,6 +37,7 @@
 
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.code.beanmatchers.BeanMatchers;
 import com.google.common.collect.ImmutableList;
 import java.beans.PropertyDescriptor;
 import java.io.ByteArrayInputStream;
@@ -50,7 +55,9 @@
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import org.apache.commons.beanutils.BeanUtils;
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.reflect.MethodUtils;
+import org.apache.commons.text.RandomStringGenerator;
 import org.apache.log4j.LogManager;
 import org.apache.log4j.Logger;
 import org.json.JSONArray;
@@ -62,8 +69,9 @@
 import org.mockito.stubbing.Answer;
 import org.onap.portalsdk.core.util.SystemProperties;
 import org.onap.vid.asdc.beans.Service;
+import org.onap.vid.mso.model.CloudConfiguration;
 import org.springframework.core.env.Environment;
-import org.springframework.mock.env.MockEnvironment;
+import org.testng.annotations.DataProvider;
 
 /**
  * Created by Oren on 6/7/17.
@@ -127,13 +135,22 @@
         return readJsonResourceFileAsObject(pathInResource, valueType, false);
     }
 
-    public static <T> T readJsonResourceFileAsObject(String pathInResource, Class<T> valueType, boolean ignoreUnknownProperties)
-            throws IOException {
-        ObjectMapper objectMapper = new ObjectMapper();
-        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, ignoreUnknownProperties);
+    public static <T> T readJsonResourceFileAsObject(String pathInResource, Class<T> valueType,
+        boolean failOnUnknownProperties)
+        throws IOException {
+        ObjectMapper objectMapper = jacksonObjectMapper()
+            .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, failOnUnknownProperties);
         return objectMapper.readValue(
-                TestUtils.class.getResource(pathInResource),
-                valueType);
+            TestUtils.class.getResource(pathInResource),
+            valueType);
+    }
+
+    public static String readFileAsString(String pathInResource) {
+        try {
+            return IOUtils.toString(TestUtils.class.getResource(pathInResource), "UTF-8");
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
     }
 
     public static String[] allPropertiesOf(Class<?> aClass) {
@@ -169,6 +186,12 @@
         }
     }
 
+    public static void registerCloudConfigurationValueGenerator() {
+        BeanMatchers.registerValueGenerator(() -> new CloudConfiguration(
+                randomAlphabetic(7), randomAlphabetic(7), randomAlphabetic(7)
+            ), CloudConfiguration.class);
+    }
+
 
     public static class JavaxRsClientMocks {
         private final javax.ws.rs.client.Client fakeClient;
@@ -277,4 +300,18 @@
         }
     }
 
+    private static RandomStringGenerator generator = new RandomStringGenerator.Builder()
+            .withinRange('0', 'z')
+            .filteredBy(LETTERS, DIGITS)
+            .build();
+
+    public static String generateRandomAlphaNumeric(int length) {
+        return generator.generate(length);
+    }
+
+    @DataProvider
+    public static Object[][] trueAndFalse() {
+        return new Object[][]{{true}, {false}};
+    }
+
 }
diff --git a/vid-app-common/src/test/resources/WEB-INF/conf/system.properties b/vid-app-common/src/test/resources/WEB-INF/conf/system.properties
index 9cb5208..bfd7ef9 100644
--- a/vid-app-common/src/test/resources/WEB-INF/conf/system.properties
+++ b/vid-app-common/src/test/resources/WEB-INF/conf/system.properties
@@ -1,23 +1,4 @@
-# Properties read by ECOMP Core library, epsdk-core.jar
-
-##########################################################################
-# The following properties should NOT be changed by partner applications.
-##########################################################################
-
-application_user_id           = 30000
-post_default_role_id          = 16
-clustered                     = true
-
-#Enable Fusion Mobile capabilities for the application
-mobile_enable			  	  = false
-
-# Cache config file is needed on the classpath
-cache_config_file_path        = /WEB-INF/classes/cache.ccf
-cache_switch                  = 199
-cache_load_on_startup         = false
-
-user_name					  = fullName
-decryption_key				  = AGLDdG4D04BKm2IxIWEr8o==
+#DB Info
 #db.userName=XXXX
 #db.password=XXXX
 #db.connectionURL=jdbc:oracle:thin:@XXXX/XX
@@ -63,6 +44,21 @@
 #business_direct_menu_attribute_name  = businessDirectMenuData
 
 application_name              = Virtual Infrastructure Deployment
+application_user_id           = 30000
+post_default_role_id          = 16
+clustered                     = true
+
+#Enable Fusion Mobile capabilities for the application
+mobile_enable			  	  = false
+
+# Cache config file is needed on the classpath
+cache_config_file_path        = /WEB-INF/classes/cache.ccf
+cache_switch                  = 199
+cache_load_on_startup         = false
+
+user_name					  = fullName
+
+decryption_key				  = AGLDdG4D04BKm2IxIWEr8o==
 
 
 #element map files
@@ -113,7 +109,7 @@
 camunda_cockpit_link = https://cloopwf.client.research.att.com:8443/camunda/app/cockpit/default/#/dashboard
 # An Unique 128-bit value defined to identify a specific version
 # of an application deployed on a specific virtual machine.
-# This value must be generated and updated by the application 
+# This value must be generated and updated by the application
 # which is using the ECOMP SDK at the time of its deployment.
 # Online Unique UUID generator - https://www.uuidgenerator.net/
 instance_uuid=8da691c9-987d-43ed-a358-00ac2f35685d
@@ -129,6 +125,19 @@
 #ueb_app_key = sYH0NJnsKmJC1B2A
 #ueb_app_secret = YOtknsT2wVFz9WISlSPDaAtd
 
+
+#Policy related properties
+#simulator
+policy.server.url=http://localhost:8080/pdp
+policy.get.config=/api/getConfig
+policy.ClientAuth=
+policy.client.mechId=
+policy.client.password=
+policy.username=
+policy.password=
+policy.Authorization=
+policy.environment=
+
 #MSO related properties
 #simulator
 #mso.server.url=http://localhost:8089
@@ -145,47 +154,55 @@
 mso.max.polls=10
 mso.user.name=infraportal
 mso.password.x=OBF:1ghz1kfx1j1w1m7w1i271e8q1eas1hzj1m4i1iyy1kch1gdz
-mso.restapi.svc.instance=/serviceInstances/v5
-mso.restapi.svc.instance.deleteAndUnassign=/serviceInstantiation/v5/serviceInstances
-mso.restapi.vnf.instance=/serviceInstances/v5/<service_instance_id>/vnfs
-mso.restapi.vnf.changemanagement.instance=/serviceInstances/v5/<service_instance_id>/vnfs/<vnf_instance_id>/<request_type>
-mso.restapi.network.instance=/serviceInstances/v5/<service_instance_id>/networks
-mso.restapi.vf.module.instance=/serviceInstances/v7/<service_instance_id>/vnfs/<vnf_instance_id>/vfModules
+mso.restapi.svc.instance=/serviceInstances/v7
+mso.restapi.svc.instance.deleteAndUnassign=/serviceInstantiation/v7/serviceInstances
+mso.restapi.vnf.instance=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances/<service_instance_id>/vnfs
+mso.restapi.vnf.changemanagement.instance=/serviceInstances/v7/<service_instance_id>/vnfs/<vnf_instance_id>/<request_type>
+mso.restapi.network.instance=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances/<service_instance_id>/networks
 mso.restapi.vf.module.scaleout=/serviceInstantiation/v7/serviceInstances/<service_instance_id>/vnfs/<vnf_instance_id>/vfModules/scaleOut
+mso.restapi.vf.module.instance=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances/<service_instance_id>/vnfs/<vnf_instance_id>/vfModules
 mso.restapi.workflow.invoke=/instanceManagement/v1/serviceInstances/<service_instance_id>/vnfs/<vnf_instance_id>/workflows/<workflow_UUID>
-mso.restapi.volume.group.instance=/serviceInstances/v5/<service_instance_id>/vnfs/<vnf_instance_id>/volumeGroups
-mso.restapi.instance.group=/serviceInstantiation/v7/instanceGroups
-mso.restapi.get.orc.req=/orchestrationRequests/v5
-mso.restapi.get.orc.reqs=/orchestrationRequests/v5?
+mso.restapi.volume.group.instance=/serviceInstances/v7/<service_instance_id>/vnfs/<vnf_instance_id>/volumeGroups
+mso.restapi.instance.group=${mso.restapi.serviceInstantiationApiRoot}/instanceGroups
+mso.restapi.get.orc.req=/orchestrationRequests/v7
+mso.restapi.get.orc.reqs=/orchestrationRequests/v7?
+mso.restapi.resume.orc.req=/orchestrationRequests/v7/<request_id>/resume
 mso.restapi.get.man.tasks=/tasks/v1
 mso.restapi.configurations=/serviceInstances/v6/<service_instance_id>/configurations
 mso.restapi.configuration.instance=${mso.restapi.configurations}<configuration_id>
-
-mso.restapi.operationalEnvironment.activate=${mso.restapi.operationalEnvironment}/activate
-mso.restapi.operationalEnvironment=${mso.restapi.cloudResourcesApiRoot}/operationalEnvironments/<operational_environment_id>
-mso.restapi.cloudResourcesApiRoot=/cloudResources/v1
-mso.restapi.cloudResourcesRequestsApiRoot=/cloudResourcesRequests/v1
-mso.restapi.operationalEnvironment.cloudResourcesRequests.status=${mso.restapi.cloudResourcesRequestsApiRoot}?requestId=<request_id>
-mso.restapi.operationalEnvironment.deactivate=${mso.restapi.operationalEnvironment}/deactivate
-mso.restapi.operationalEnvironment.create=${mso.restapi.cloudResourcesApiRoot}/operationalEnvironments
+mso.restapi.changeManagement.workflowSpecifications=/workflowSpecifications/v1/workflows?vnfModelVersionId=<model_version_id>
 
 mso.restapi.serviceInstantiationApiRoot=/serviceInstantiation/v7
 mso.restapi.serviceInstanceCreate=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances
 mso.restapi.serviceInstanceAssign=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances/assign
-mso.restapi.changeManagement.workflowSpecifications=/workflowSpecifications/v1/workflows?vnfModelVersionId=<model_version_id>
+
+mso.restapi.cloudResourcesApiRoot=/cloudResources/v1
+mso.restapi.operationalEnvironment=${mso.restapi.cloudResourcesApiRoot}/operationalEnvironments/<operational_environment_id>
+
+mso.restapi.operationalEnvironment.activate=${mso.restapi.operationalEnvironment}/activate
+mso.restapi.operationalEnvironment.deactivate=${mso.restapi.operationalEnvironment}/deactivate
+mso.restapi.operationalEnvironment.create=${mso.restapi.cloudResourcesApiRoot}/operationalEnvironments
+
+mso.restapi.cloudResourcesRequestsApiRoot=/cloudResourcesRequests/v1
+mso.restapi.operationalEnvironment.cloudResourcesRequests.status=${mso.restapi.cloudResourcesRequestsApiRoot}?requestId=<request_id>
 
 vid.truststore.filename=/opt/app/vid/etc/vid_keystore.jks
 mso.dme2.client.timeout=30000
 mso.dme2.client.read.timeout=120000
 
-scheduler.server.url=
+
+scheduler.server.url=http://localhost:8080/vidSimulator/scheduler
+
+##scheduler authentication credentials
+scheduler.user.name=test1
+scheduler.password=test2
+
 scheduler.create.new.vnf.change.instance=/v1/ChangeManagement/schedules/
+scheduler.submit.new.vnf.change=/v1/ChangeManagement/schedules/{scheduleId}/approvals
+scheduler.delete.schedule=/v1/ChangeManagement/schedules/%s
 scheduler.get.time.slots=/v1/ChangeManagement/schedules/
 scheduler.get.schedules=/v1/ChangeManagement/schedules/scheduleDetails/
 
-
-#vid.truststore.filename=/Users/Oren/Downloads/vid_keystore2.jks
-
 vid.truststore.passwd.x=OBF:1wgg1wfq1uus1uui1x131x0r1x1v1x1j1uvo1uve1wg81wfi
 #mso.dme2.server.url=http://mso-api-handler-anap-v1.mso.ecomp.att.com/services/ecomp/mso?
 mso.dme2.server.url=http://mso-api-handler-anap-v1.mso.ecomp.att.com/services/ecomp/mso?version=1607&envContext=TEST&routeOffer=st_mtsnj
@@ -203,3 +220,8 @@
 # Only required for applications using WebJunction or FE/BE separation.  For example:
 # app_base_url = https://www.e-access.att.com/app_junction/app_context/
 
+vid.asyncJob.howLongToKeepOldJobsInDays=7
+
+# thread definition - count and timeout (in seconds)
+vid.thread.count=50
+vid.thread.timeout=30
diff --git a/vid-app-common/src/test/resources/cr-csar.JSON b/vid-app-common/src/test/resources/cr-csar.JSON
index b712cc7..97b39b2 100644
--- a/vid-app-common/src/test/resources/cr-csar.JSON
+++ b/vid-app-common/src/test/resources/cr-csar.JSON
@@ -21,7 +21,7 @@
   "networks": {
 
   },
-  "collectionResource": {
+  "collectionResources": {
     "MSO_Example 0": {
       "uuid": "4f8068d9-fb13-49fc-9e39-634d2094b659",
       "invariantUuid": "2fc1b3b8-b8ed-413e-add8-3d903cf2b458",
@@ -75,5 +75,8 @@
   "pnfs": {
 
   },
-  "vnfGroups": {}
+  "vnfGroups": {},
+  "vrfs": {
+
+  }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/csars/1712_PASQUALE.zip b/vid-app-common/src/test/resources/csars/1712_PASQUALE.zip
new file mode 100644
index 0000000..bbfbd23
--- /dev/null
+++ b/vid-app-common/src/test/resources/csars/1712_PASQUALE.zip
Binary files differ
diff --git a/vid-app-common/src/test/resources/csars/csarTransportWithPnfs.zip b/vid-app-common/src/test/resources/csars/csarTransportWithPnfs.zip
new file mode 100644
index 0000000..33225f9
--- /dev/null
+++ b/vid-app-common/src/test/resources/csars/csarTransportWithPnfs.zip
Binary files differ
diff --git a/vid-app-common/src/test/resources/csars/service-AmpPhSvc-csar.zip b/vid-app-common/src/test/resources/csars/service-AmpPhSvc-csar.zip
new file mode 100644
index 0000000..d8969d6
--- /dev/null
+++ b/vid-app-common/src/test/resources/csars/service-AmpPhSvc-csar.zip
Binary files differ
diff --git a/vid-app-common/src/test/resources/csars/service-Infravpn-csar.zip b/vid-app-common/src/test/resources/csars/service-Infravpn-csar.zip
new file mode 100644
index 0000000..403aacc
--- /dev/null
+++ b/vid-app-common/src/test/resources/csars/service-Infravpn-csar.zip
Binary files differ
diff --git a/vid-app-common/src/test/resources/csars/service-JennyVtsbcVlanSvc-csar.zip b/vid-app-common/src/test/resources/csars/service-JennyVtsbcVlanSvc-csar.zip
new file mode 100644
index 0000000..a04f6db
--- /dev/null
+++ b/vid-app-common/src/test/resources/csars/service-JennyVtsbcVlanSvc-csar.zip
Binary files differ
diff --git a/vid-app-common/src/main/resources/service-MsoExampleService-csar.zip b/vid-app-common/src/test/resources/csars/service-MsoExampleService-csar.zip
similarity index 100%
rename from vid-app-common/src/main/resources/service-MsoExampleService-csar.zip
rename to vid-app-common/src/test/resources/csars/service-MsoExampleService-csar.zip
Binary files differ
diff --git a/vid-app-common/src/main/resources/service-ServicecontainerContainsPprobe.zip b/vid-app-common/src/test/resources/csars/service-ServicecontainerContainsPprobe.zip
similarity index 76%
rename from vid-app-common/src/main/resources/service-ServicecontainerContainsPprobe.zip
rename to vid-app-common/src/test/resources/csars/service-ServicecontainerContainsPprobe.zip
index fc74ba0..86b784b 100644
--- a/vid-app-common/src/main/resources/service-ServicecontainerContainsPprobe.zip
+++ b/vid-app-common/src/test/resources/csars/service-ServicecontainerContainsPprobe.zip
Binary files differ
diff --git a/vid-app-common/src/main/resources/service-Servicecontainermultiplepprobes-csar.zip b/vid-app-common/src/test/resources/csars/service-Servicecontainermultiplepprobes-csar.zip
similarity index 76%
rename from vid-app-common/src/main/resources/service-Servicecontainermultiplepprobes-csar.zip
rename to vid-app-common/src/test/resources/csars/service-Servicecontainermultiplepprobes-csar.zip
index e0a5331..7882b64 100644
--- a/vid-app-common/src/main/resources/service-Servicecontainermultiplepprobes-csar.zip
+++ b/vid-app-common/src/test/resources/csars/service-Servicecontainermultiplepprobes-csar.zip
Binary files differ
diff --git a/vid-app-common/src/test/resources/csars/service-VdorotheaSrv-csar.zip b/vid-app-common/src/test/resources/csars/service-VdorotheaSrv-csar.zip
new file mode 100644
index 0000000..5c5ee0f
--- /dev/null
+++ b/vid-app-common/src/test/resources/csars/service-VdorotheaSrv-csar.zip
Binary files differ
diff --git a/vid-app-common/src/test/resources/csars/service-fabric-configuration.zip b/vid-app-common/src/test/resources/csars/service-fabric-configuration.zip
new file mode 100644
index 0000000..c53e4f7
--- /dev/null
+++ b/vid-app-common/src/test/resources/csars/service-fabric-configuration.zip
Binary files differ
diff --git a/vid-app-common/src/test/resources/csars/service-vf-csar.zip b/vid-app-common/src/test/resources/csars/service-vf-csar.zip
new file mode 100644
index 0000000..05d4fd3
--- /dev/null
+++ b/vid-app-common/src/test/resources/csars/service-vf-csar.zip
Binary files differ
diff --git a/vid-app-common/src/test/resources/csars/service-vf-with-annotations.zip b/vid-app-common/src/test/resources/csars/service-vf-with-annotations.zip
new file mode 100644
index 0000000..7473eeb
--- /dev/null
+++ b/vid-app-common/src/test/resources/csars/service-vf-with-annotations.zip
Binary files differ
diff --git a/vid-app-common/src/test/resources/csars/service-vl-csar.zip b/vid-app-common/src/test/resources/csars/service-vl-csar.zip
new file mode 100644
index 0000000..220e02f
--- /dev/null
+++ b/vid-app-common/src/test/resources/csars/service-vl-csar.zip
Binary files differ
diff --git a/vid-app-common/src/test/resources/csars/service-vnf-grouping-csar.zip b/vid-app-common/src/test/resources/csars/service-vnf-grouping-csar.zip
new file mode 100644
index 0000000..7f93dc8
--- /dev/null
+++ b/vid-app-common/src/test/resources/csars/service-vnf-grouping-csar.zip
Binary files differ
diff --git a/vid-app-common/src/main/resources/vLoadBalancerMS-with-policy.TOSCA.zip b/vid-app-common/src/test/resources/csars/vLoadBalancerMS-with-policy.TOSCA.zip
similarity index 100%
rename from vid-app-common/src/main/resources/vLoadBalancerMS-with-policy.TOSCA.zip
rename to vid-app-common/src/test/resources/csars/vLoadBalancerMS-with-policy.TOSCA.zip
Binary files differ
diff --git a/vid-app-common/src/test/resources/fabric-configuration.json b/vid-app-common/src/test/resources/fabric-configuration.json
index ff17ca0..cb44073 100644
--- a/vid-app-common/src/test/resources/fabric-configuration.json
+++ b/vid-app-common/src/test/resources/fabric-configuration.json
@@ -2,13 +2,13 @@
   "service": {
     "uuid": "12344bb4-a416-4b4e-997e-0059973630b9",
     "invariantUuid": "12343f9e-3244-4d8f-a8e0-0e5d7a29eda9",
-    "name": "ADIOD vMX vPE_BV Service 488",
+    "name": "PASQUALE vMX vPE_BV Service 488",
     "version": "1.0",
     "toscaModelURL": null,
     "category": "Network L1-3",
     "serviceType": "",
     "serviceRole": "",
-    "description": "ADIOD vMX vPE based on Juniper 17.2 release. Updated with updated VF for v8.0 of VLM",
+    "description": "PASQUALE vMX vPE based on Juniper 17.2 release. Updated with updated VF for v8.0 of VLM",
     "serviceEcompNaming": "true",
     "instantiationType": "ClientConfig",
     "inputs": {
@@ -21,7 +21,7 @@
   "networks": {
 
   },
-  "collectionResource": {},
+  "collectionResources": {},
   "configurations": {
 
   },
@@ -48,5 +48,8 @@
   "pnfs": {
 
   },
-  "vnfGroups": {}
+  "vnfGroups": {},
+  "vrfs": {
+
+  }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/fabric-real-sriov-configuration.json b/vid-app-common/src/test/resources/fabric-real-sriov-configuration.json
index d6efc28..1b20c31 100644
--- a/vid-app-common/src/test/resources/fabric-real-sriov-configuration.json
+++ b/vid-app-common/src/test/resources/fabric-real-sriov-configuration.json
@@ -21,7 +21,7 @@
   "networks": {
 
   },
-  "collectionResource": {},
+  "collectionResources": {},
   "configurations": {
 
   },
diff --git a/vid-app-common/src/test/resources/getTopology/network.json b/vid-app-common/src/test/resources/getTopology/network.json
new file mode 100644
index 0000000..ba9cf5c
--- /dev/null
+++ b/vid-app-common/src/test/resources/getTopology/network.json
@@ -0,0 +1,79 @@
+{
+  "network-id": "94c86b39-bbbf-4027-8120-ff37c6d2493a",
+  "network-name": "AUK51a_oam_calea_net_1",
+  "network-type": "SR-IOV-PROVIDER2-1",
+  "network-role": "oam_calea_net_1",
+  "network-technology": "STANDARD-SR-IOV",
+  "is-bound-to-vpn": false,
+  "resource-version": "1540925016770",
+  "orchestration-status": "Assigned",
+  "model-invariant-id": "b9a9b549-0ee4-49fc-b4f2-5edc6701da68",
+  "model-version-id": "77010093-df36-4dcb-8428-c3d02bf3f88d",
+  "model-customization-id": "e5f33853-f84c-4cdd-99f2-93846957aa18",
+  "physical-network-name": "sriovnet1",
+  "is-provider-network": true,
+  "is-shared-network": true,
+  "is-external-network": false,
+  "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/4b7cc8d1-f8ec-4461-ac43-5805e4ca3126/service-data/networks/network/94c86b39-bbbf-4027-8120-ff37c6d2493a/network-data/network-topology/",
+  "relationship-list": {
+    "relationship": [{
+      "related-to": "service-instance",
+      "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+      "related-link": "/aai/v14/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/Emanuel/service-instances/service-instance/4b7cc8d1-f8ec-4461-ac43-5805e4ca3126",
+      "relationship-data": [{
+        "relationship-key": "customer.global-customer-id",
+        "relationship-value": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+      }, {
+        "relationship-key": "service-subscription.service-type",
+        "relationship-value": "Emanuel"
+      }, {
+        "relationship-key": "service-instance.service-instance-id",
+        "relationship-value": "4b7cc8d1-f8ec-4461-ac43-5805e4ca3126"
+      }
+      ],
+      "related-to-property": [{
+        "property-key": "service-instance.service-instance-name",
+        "property-value": "AUK51a_oam_calea_net_service"
+      }
+      ]
+    }, {
+      "related-to": "tenant",
+      "relationship-label": "org.onap.relationships.inventory.Uses",
+      "related-link": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/att-nc/auk51a/tenants/tenant/b530fc990b6d4334bd45518bebca6a51",
+      "relationship-data": [{
+        "relationship-key": "cloud-region.cloud-owner",
+        "relationship-value": "att-nc"
+      }, {
+        "relationship-key": "cloud-region.cloud-region-id",
+        "relationship-value": "auk51a"
+      }, {
+        "relationship-key": "tenant.tenant-id",
+        "relationship-value": "b530fc990b6d4334bd45518bebca6a51"
+      }
+      ],
+      "related-to-property": [{
+        "property-key": "tenant.tenant-name",
+        "property-value": "ecomp_ispt"
+      }
+      ]
+    }, {
+      "related-to": "cloud-region",
+      "relationship-label": "org.onap.relationships.inventory.Uses",
+      "related-link": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/att-nc/auk51a",
+      "relationship-data": [{
+        "relationship-key": "cloud-region.cloud-owner",
+        "relationship-value": "att-nc"
+      }, {
+        "relationship-key": "cloud-region.cloud-region-id",
+        "relationship-value": "auk51a"
+      }
+      ],
+      "related-to-property": [{
+        "property-key": "cloud-region.owner-defined-type",
+        "property-value": "lcp"
+      }
+      ]
+    }
+    ]
+  }
+}
diff --git a/vid-app-common/src/test/resources/getTopology/serviceWithCR/CR.json b/vid-app-common/src/test/resources/getTopology/serviceWithCR/CR.json
new file mode 100644
index 0000000..26d598c
--- /dev/null
+++ b/vid-app-common/src/test/resources/getTopology/serviceWithCR/CR.json
@@ -0,0 +1,62 @@
+{
+  "collection-id": "84a351ae-3601-45e2-98df-878d6c816abc",
+  "model-invariant-id": "081ceb56-eb71-4566-a72d-3e7cbee5cdf1",
+  "model-version-id": "ce8c98bc-4691-44fb-8ff0-7a47487c11c4",
+  "collection-name": "NcmVlanSvcYm161f_77_vTSBC Customer Landing Network Collection",
+  "collection-type": "L3-NETWORK",
+  "collection-role": "SUB_INTERFACE",
+  "collection-function": "vTSBC_function",
+  "orchestration-status": "Active",
+  "collection-customization-id": "bac6ffe5-c851-495f-a64a-28751400ff03",
+  "relationship-list": {
+    "relationship": [
+      {
+        "related-to": "service-instance",
+        "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+        "related-link": "/aai/v14/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/Emanuel/service-instances/service-instance/a565e6ad-75d1-4493-98f1-33234b5c17e2",
+        "relationship-data": [
+          {
+            "relationship-key": "customer.global-customer-id",
+            "relationship-value": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+          },
+          {
+            "relationship-key": "service-subscription.service-type",
+            "relationship-value": "Emanuel"
+          },
+          {
+            "relationship-key": "service-instance.service-instance-id",
+            "relationship-value": "a565e6ad-75d1-4493-98f1-33234b5c17e2"
+          }
+        ],
+        "related-to-property": [
+          {
+            "property-key": "service-instance.service-instance-name",
+            "property-value": "NcmVlanSvcYm161f_77"
+          }
+        ]
+      },
+      {
+        "related-to": "instance-group",
+        "relationship-label": "org.onap.inventory.BelongsTo",
+        "related-link": "/aai/v14/network/instance-groups/instance-group/6b3536cf-3a12-457f-abb5-fa2203e0d923",
+        "relationship-data": [
+          {
+            "relationship-key": "instance-group.id",
+            "relationship-value": "6b3536cf-3a12-457f-abb5-fa2203e0d923"
+          }
+        ],
+        "related-to-property": [
+          {
+            "property-key": "instance-group.description",
+            "property-value": "vTSBC Customer Landing Network Collection Desc"
+          },
+          {
+            "property-key": "instance-group.instance-group-name",
+            "property-value": "NcmVlanSvcYm161f_77_vTSBC Customer Landing Network Collection"
+          }
+        ]
+      }
+    ]
+  },
+  "resource-version": "1539158498209"
+}
diff --git a/vid-app-common/src/test/resources/getTopology/serviceWithCR/getTopologyWithCR.json b/vid-app-common/src/test/resources/getTopology/serviceWithCR/getTopologyWithCR.json
new file mode 100644
index 0000000..f038427
--- /dev/null
+++ b/vid-app-common/src/test/resources/getTopology/serviceWithCR/getTopologyWithCR.json
@@ -0,0 +1,95 @@
+{
+  "action": "None",
+  "instanceName": "NcmVlanSvcYm161f_77",
+  "instanceId": "a565e6ad-75d1-4493-98f1-33234b5c17e2",
+  "orchStatus": "Assigned",
+  "productFamilyId": null,
+  "lcpCloudRegionId": null,
+  "tenantId": null,
+  "cloudOwner": null,
+  "modelInfo": {
+    "modelInvariantId": "f6342be5-d66b-4d03-a1aa-c82c3094c4ea",
+    "modelVersionId": "6e0bec91-09f3-43aa-9cf3-e617cd0146be",
+    "modelName": "NCM_VLAN_SVC_ym161f",
+    "modelType": "service",
+    "modelVersion": "8.0"
+  },
+  "globalSubscriberId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+  "subscriptionServiceType": "Emanuel",
+  "owningEntityId": null,
+  "owningEntityName": null,
+  "tenantName": null,
+  "aicZoneId": null,
+  "aicZoneName": null,
+  "projectName": null,
+  "rollbackOnFailure": null,
+  "isALaCarte": false,
+  "vnfs": {},
+  "networks": {},
+  "vrfs": {},
+  "vnfGroups": {},
+  "collectionResources": {
+    "84a351ae-3601-45e2-98df-878d6c816abc": {
+      "action": "None",
+      "instanceName": "NcmVlanSvcYm161f_77_vTSBC Customer Landing Network Collection",
+      "instanceId": "84a351ae-3601-45e2-98df-878d6c816abc",
+      "orchStatus": "Active",
+      "productFamilyId": null,
+      "lcpCloudRegionId": null,
+      "tenantId": null,
+      "cloudOwner": null,
+      "modelInfo": {
+        "modelInvariantId": "081ceb56-eb71-4566-a72d-3e7cbee5cdf1",
+        "modelVersionId": "ce8c98bc-4691-44fb-8ff0-7a47487c11c4",
+        "modelName": "NCM_VLAN_ym161f",
+        "modelType": "collection",
+        "modelVersion": "5.0"
+      },
+      "instanceType": null,
+      "provStatus": null,
+      "inMaint": false,
+      "uuid": "ce8c98bc-4691-44fb-8ff0-7a47487c11c4",
+      "originalName": "NCM_VLAN_ym161f 0",
+      "legacyRegion": null,
+      "lineOfBusiness": null,
+      "platformName": null,
+      "trackById": "84a351ae-3601-45e2-98df-878d6c816abc",
+      "ncfs": {
+        "6b3536cf-3a12-457f-abb5-fa2203e0d923": {
+          "action": "None",
+          "instanceName": "NcmVlanSvcYm161f_77_vTSBC Customer Landing Network Collection",
+          "instanceId": "6b3536cf-3a12-457f-abb5-fa2203e0d923",
+          "orchStatus": null,
+          "productFamilyId": null,
+          "lcpCloudRegionId": null,
+          "tenantId": null,
+          "cloudOwner": null,
+          "modelInfo": {
+            "modelInvariantId": "868b109c-9481-4a18-891b-af974db7705a",
+            "modelVersionId": "dd182d7d-6949-4b90-b3cc-5befe400742e",
+            "modelName": "ncm_vlan_ym161f..NetworkCollection..0",
+            "modelType": "instanceGroup",
+            "modelVersion": "1"
+          },
+          "instanceType": "L3-NETWORK",
+          "provStatus": null,
+          "inMaint": false,
+          "uuid": "dd182d7d-6949-4b90-b3cc-5befe400742e",
+          "originalName": "ncm_vlan_ym161f..NetworkCollection..0",
+          "legacyRegion": null,
+          "lineOfBusiness": null,
+          "platformName": null,
+          "trackById": "6b3536cf-3a12-457f-abb5-fa2203e0d923",
+          "instanceGroupRole": "SUB_INTERFACE",
+          "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+          "numberOfNetworks": 1
+        }
+      }
+    }
+  },
+  "validationCounter": 0,
+  "existingVNFCounterMap": {},
+  "existingNetworksCounterMap": {},
+  "existingVnfGroupCounterMap": {},
+  "existingVRFCounterMap": {}
+}
diff --git a/vid-app-common/src/test/resources/getTopology/serviceWithCR/instanceGroup-NCF.json b/vid-app-common/src/test/resources/getTopology/serviceWithCR/instanceGroup-NCF.json
new file mode 100644
index 0000000..8c4d3f2
--- /dev/null
+++ b/vid-app-common/src/test/resources/getTopology/serviceWithCR/instanceGroup-NCF.json
@@ -0,0 +1,43 @@
+{
+  "id": "6b3536cf-3a12-457f-abb5-fa2203e0d923",
+  "instance-group-role": "SUB_INTERFACE",
+  "model-invariant-id": "868b109c-9481-4a18-891b-af974db7705a",
+  "model-version-id": "dd182d7d-6949-4b90-b3cc-5befe400742e",
+  "description": "vTSBC Customer Landing Network Collection Desc",
+  "instance-group-type": "L3-NETWORK",
+  "resource-version": "1539158492730",
+  "instance-group-name": "NcmVlanSvcYm161f_77_vTSBC Customer Landing Network Collection",
+  "instance-group-function": "vTSBC Customer Landing Network Collection",
+  "relationship-list": {
+    "relationship": [
+      {
+        "related-to-property": [
+          {
+            "property-value": "APPC-24595-T-IST-02AShared_cps_internal_net_1",
+            "property-key": "l3-network.network-name"
+          }
+        ],
+        "relationship-data": [
+          {
+            "relationship-value": "1fea0624-dac2-4997-904d-34ca1bc12fa9",
+            "relationship-key": "l3-network.network-id"
+          }
+        ],
+        "related-link": "/aai/v14/network/l3-networks/l3-network/1fea0624-dac2-4997-904d-34ca1bc12fa9",
+        "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+        "related-to": "l3-network"
+      },
+      {
+        "related-to": "collection",
+        "relationship-label": "org.onap.inventory.BelongsTo",
+        "related-link": "/aai/v14/network/collections/collection/84a351ae-3601-45e2-98df-878d6c816abc",
+        "relationship-data": [
+          {
+            "relationship-key": "collection.collection-id",
+            "relationship-value": "84a351ae-3601-45e2-98df-878d6c816abc"
+          }
+        ]
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/getTopology/serviceWithCR/service-design-and-creation.json b/vid-app-common/src/test/resources/getTopology/serviceWithCR/service-design-and-creation.json
new file mode 100644
index 0000000..d7bafeb
--- /dev/null
+++ b/vid-app-common/src/test/resources/getTopology/serviceWithCR/service-design-and-creation.json
@@ -0,0 +1,1057 @@
+{
+  "model": [
+    {
+      "model-invariant-id": "f6342be5-d66b-4d03-a1aa-c82c3094c4ea",
+      "model-type": "service",
+      "resource-version": "1534274421300",
+      "model-vers": {
+        "model-ver": [
+          {
+            "model-version-id": "a92f899d-a3ec-465b-baed-1663b0a5aee1",
+            "model-name": "NCM_VLAN_SVC_ym161f",
+            "model-version": "3.0",
+            "distribution-status": "DISTRIBUTION_COMPLETE_OK",
+            "model-description": "Network Collection service for vLAN tagging",
+            "resource-version": "1534788756086",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "901e2641-c66c-4178-a6e8-cbe2877b0a2a",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1534463243387",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/82194af1-3c2c-485a-8f44-420e22a9eaa4/model-vers/model-ver/46b92144-923a-4d20-b85a-3cbd847668a9",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "82194af1-3c2c-485a-8f44-420e22a9eaa4"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "46b92144-923a-4d20-b85a-3cbd847668a9"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "service-instance"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          },
+          {
+            "model-version-id": "d2fda667-e92e-4cfa-9620-5da5de01a319",
+            "model-name": "NCM_VLAN_SVC_ym161f",
+            "model-version": "1.0",
+            "distribution-status": "DISTRIBUTION_COMPLETE_OK",
+            "model-description": "Network Collection service for vLAN tagging",
+            "resource-version": "1534444087221",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "d291ed5e-4f50-4f57-956d-ce0e67a059e5",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1534274421311",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/82194af1-3c2c-485a-8f44-420e22a9eaa4/model-vers/model-ver/46b92144-923a-4d20-b85a-3cbd847668a9",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "82194af1-3c2c-485a-8f44-420e22a9eaa4"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "46b92144-923a-4d20-b85a-3cbd847668a9"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "service-instance"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          },
+          {
+            "model-version-id": "d4a447e5-9791-47b9-b365-1abb19b4b626",
+            "model-name": "NCM_VLAN_SVC_ym161f",
+            "model-version": "4.0",
+            "model-description": "Network Collection service for vLAN tagging",
+            "resource-version": "1534863624237",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "0ef29f1f-836a-4fab-986c-5f1b96310a3d",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1534863624242",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/82194af1-3c2c-485a-8f44-420e22a9eaa4/model-vers/model-ver/46b92144-923a-4d20-b85a-3cbd847668a9",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "82194af1-3c2c-485a-8f44-420e22a9eaa4"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "46b92144-923a-4d20-b85a-3cbd847668a9"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "service-instance"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          },
+          {
+            "model-version-id": "0e97a118-b1b6-40d5-bbad-98cdd51b1c48",
+            "model-name": "NCM_VLAN_SVC_ym161f",
+            "model-version": "11.0",
+            "distribution-status": "DISTRIBUTION_COMPLETE_OK",
+            "model-description": "Network Collection service for vLAN tagging",
+            "resource-version": "1550783120267",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "0ea8ac21-64b8-4489-9d62-12e625d66995",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1543961990189",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/82194af1-3c2c-485a-8f44-420e22a9eaa4/model-vers/model-ver/46b92144-923a-4d20-b85a-3cbd847668a9",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "82194af1-3c2c-485a-8f44-420e22a9eaa4"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "46b92144-923a-4d20-b85a-3cbd847668a9"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "service-instance"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          },
+          {
+            "model-version-id": "46093d8f-6dfa-4332-9c00-7e822c681b59",
+            "model-name": "NCM_VLAN_SVC_ym161f",
+            "model-version": "7.0",
+            "distribution-status": "DISTRIBUTION_COMPLETE_OK",
+            "model-description": "Network Collection service for vLAN tagging",
+            "resource-version": "1534885144462",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "d74a5dff-ef7f-4e32-9c13-d82fb2c617c9",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1534885014144",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/82194af1-3c2c-485a-8f44-420e22a9eaa4/model-vers/model-ver/46b92144-923a-4d20-b85a-3cbd847668a9",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "82194af1-3c2c-485a-8f44-420e22a9eaa4"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "46b92144-923a-4d20-b85a-3cbd847668a9"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "service-instance"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          },
+          {
+            "model-version-id": "12930bcc-5276-42bb-8ed6-1e43d7acae2c",
+            "model-name": "NCM_VLAN_SVC_ym161f",
+            "model-version": "10.0",
+            "distribution-status": "DISTRIBUTION_COMPLETE_OK",
+            "model-description": "Network Collection service for vLAN tagging",
+            "resource-version": "1539613511543",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "4d57798e-81b7-490e-bee8-48bd382a1349",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1539613450903",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/82194af1-3c2c-485a-8f44-420e22a9eaa4/model-vers/model-ver/46b92144-923a-4d20-b85a-3cbd847668a9",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "82194af1-3c2c-485a-8f44-420e22a9eaa4"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "46b92144-923a-4d20-b85a-3cbd847668a9"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "service-instance"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          },
+          {
+            "model-version-id": "f8783bb2-6135-4c35-8320-64fa7deae76b",
+            "model-name": "NCM_VLAN_SVC_ym161f",
+            "model-version": "2.0",
+            "distribution-status": "DISTRIBUTION_COMPLETE_OK",
+            "model-description": "Network Collection service for vLAN tagging",
+            "resource-version": "1534450229751",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "c666f1dd-99ff-442a-9ba2-1ee2dabb9e25",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1534450167963",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/82194af1-3c2c-485a-8f44-420e22a9eaa4/model-vers/model-ver/46b92144-923a-4d20-b85a-3cbd847668a9",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "82194af1-3c2c-485a-8f44-420e22a9eaa4"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "46b92144-923a-4d20-b85a-3cbd847668a9"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "service-instance"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          },
+          {
+            "model-version-id": "0148e4c5-629b-4fef-9728-1e13fd630679",
+            "model-name": "NCM_VLAN_SVC_ym161f",
+            "model-version": "9.0",
+            "distribution-status": "DISTRIBUTION_COMPLETE_OK",
+            "model-description": "Network Collection service for vLAN tagging",
+            "resource-version": "1537901614540",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "6ae6fd91-2086-470d-8c36-9d668c41fd32",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1537882880185",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/82194af1-3c2c-485a-8f44-420e22a9eaa4/model-vers/model-ver/46b92144-923a-4d20-b85a-3cbd847668a9",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "82194af1-3c2c-485a-8f44-420e22a9eaa4"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "46b92144-923a-4d20-b85a-3cbd847668a9"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "service-instance"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          },
+          {
+            "model-version-id": "1ceab842-7ded-49f1-a129-dce2ecef8c71",
+            "model-name": "NCM_VLAN_SVC_ym161f",
+            "model-version": "6.0",
+            "distribution-status": "DISTRIBUTION_COMPLETE_OK",
+            "model-description": "Network Collection service for vLAN tagging",
+            "resource-version": "1534883213652",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "5ca853fc-2984-45c7-b2e7-8514a56785ba",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1534883154090",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/82194af1-3c2c-485a-8f44-420e22a9eaa4/model-vers/model-ver/46b92144-923a-4d20-b85a-3cbd847668a9",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "82194af1-3c2c-485a-8f44-420e22a9eaa4"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "46b92144-923a-4d20-b85a-3cbd847668a9"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "service-instance"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          },
+          {
+            "model-version-id": "fd21f6b5-02f6-4ac0-9515-e1f01112da95",
+            "model-name": "NCM_VLAN_SVC_ym161f",
+            "model-version": "5.0",
+            "distribution-status": "DISTRIBUTION_COMPLETE_OK",
+            "model-description": "Network Collection service for vLAN tagging",
+            "resource-version": "1534872246413",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "0812b47d-7ef1-4a65-b6fb-9f3ff3bc3eee",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1534872174141",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/82194af1-3c2c-485a-8f44-420e22a9eaa4/model-vers/model-ver/46b92144-923a-4d20-b85a-3cbd847668a9",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "82194af1-3c2c-485a-8f44-420e22a9eaa4"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "46b92144-923a-4d20-b85a-3cbd847668a9"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "service-instance"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          },
+          {
+            "model-version-id": "6e0bec91-09f3-43aa-9cf3-e617cd0146be",
+            "model-name": "NCM_VLAN_SVC_ym161f",
+            "model-version": "8.0",
+            "distribution-status": "DISTRIBUTION_COMPLETE_OK",
+            "model-description": "Network Collection service for vLAN tagging",
+            "resource-version": "1536098608209",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "a0247d2e-3843-4753-be2f-4c252c99390e",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1536098548388",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/82194af1-3c2c-485a-8f44-420e22a9eaa4/model-vers/model-ver/46b92144-923a-4d20-b85a-3cbd847668a9",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "82194af1-3c2c-485a-8f44-420e22a9eaa4"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "46b92144-923a-4d20-b85a-3cbd847668a9"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "service-instance"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          }
+        ]
+      }
+    },
+    {
+      "model-invariant-id": "868b109c-9481-4a18-891b-af974db7705a",
+      "model-type": "resource",
+      "resource-version": "1534795610752",
+      "model-vers": {
+        "model-ver": [
+          {
+            "model-version-id": "dd182d7d-6949-4b90-b3cc-5befe400742e",
+            "model-name": "ncm_vlan_ym161f..NetworkCollection..0",
+            "model-version": "1",
+            "distribution-status": "DISTRIBUTION_COMPLETE_OK",
+            "resource-version": "1534795610763"
+          },
+          {
+            "model-version-id": "e5fc56b7-e14c-45e5-b127-978c36a921c0",
+            "model-name": "ncm_vlan_ym161f..NetworkCollection..0",
+            "model-version": "1",
+            "resource-version": "1543961989136",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "9001ff96-1142-49c6-af5b-df4e2b23a305",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1543961989136",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/3bf1e610-45f7-4ad6-b833-ca4c5ee6a3fd/model-vers/model-ver/8e6ee9dc-9017-444a-83b3-219edb018128",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "3bf1e610-45f7-4ad6-b833-ca4c5ee6a3fd"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "8e6ee9dc-9017-444a-83b3-219edb018128"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "instance-group"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            },
+            "relationship-list": {
+              "relationship": [
+                {
+                  "related-to": "model-element",
+                  "relationship-label": "org.onap.relationships.inventory.IsA",
+                  "related-link": "/aai/v14/service-design-and-creation/models/model/081ceb56-eb71-4566-a72d-3e7cbee5cdf1/model-vers/model-ver/a580855f-8d1b-40d5-a75b-50709fbd17d3/model-elements/model-element/06014449-69d3-4aef-a96b-0a5130ba9483/model-elements/model-element/a050dc96-2c35-45c7-ba23-9279215d501e",
+                  "relationship-data": [
+                    {
+                      "relationship-key": "model.model-invariant-id",
+                      "relationship-value": "081ceb56-eb71-4566-a72d-3e7cbee5cdf1"
+                    },
+                    {
+                      "relationship-key": "model-ver.model-version-id",
+                      "relationship-value": "a580855f-8d1b-40d5-a75b-50709fbd17d3"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "06014449-69d3-4aef-a96b-0a5130ba9483"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "a050dc96-2c35-45c7-ba23-9279215d501e"
+                    }
+                  ]
+                }
+              ]
+            }
+          }
+        ]
+      }
+    },
+    {
+      "model-invariant-id": "081ceb56-eb71-4566-a72d-3e7cbee5cdf1",
+      "model-type": "resource",
+      "resource-version": "1534788713816",
+      "model-vers": {
+        "model-ver": [
+          {
+            "model-version-id": "747d2a17-5771-4fd6-879d-c2e9e4c5cd4f",
+            "model-name": "NCM_VLAN_ym161f",
+            "model-version": "2.0",
+            "model-description": "Network Collection Service VF for VLAN TAgging",
+            "resource-version": "1534863623891",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "0dd28c63-cadf-48b2-afb0-a7bf7184ef5a",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1534863623895",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/425b2158-e51d-4509-9945-dad4556474a3/model-vers/model-ver/2a160989-b202-47dd-874b-4a0f275998f7",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "425b2158-e51d-4509-9945-dad4556474a3"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "2a160989-b202-47dd-874b-4a0f275998f7"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "cloud-region"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            },
+            "relationship-list": {
+              "relationship": [
+                {
+                  "related-to": "model-element",
+                  "relationship-label": "org.onap.relationships.inventory.IsA",
+                  "related-link": "/aai/v14/service-design-and-creation/models/model/f6342be5-d66b-4d03-a1aa-c82c3094c4ea/model-vers/model-ver/d4a447e5-9791-47b9-b365-1abb19b4b626/model-elements/model-element/0ef29f1f-836a-4fab-986c-5f1b96310a3d/model-elements/model-element/700f890b-05c9-471a-b859-956655d28f47",
+                  "relationship-data": [
+                    {
+                      "relationship-key": "model.model-invariant-id",
+                      "relationship-value": "f6342be5-d66b-4d03-a1aa-c82c3094c4ea"
+                    },
+                    {
+                      "relationship-key": "model-ver.model-version-id",
+                      "relationship-value": "d4a447e5-9791-47b9-b365-1abb19b4b626"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "0ef29f1f-836a-4fab-986c-5f1b96310a3d"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "700f890b-05c9-471a-b859-956655d28f47"
+                    }
+                  ]
+                }
+              ]
+            }
+          },
+          {
+            "model-version-id": "a580855f-8d1b-40d5-a75b-50709fbd17d3",
+            "model-name": "NCM_VLAN_ym161f",
+            "model-version": "6.0",
+            "model-description": "Network Collection Service VF for VLAN TAgging",
+            "resource-version": "1543961989670",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "06014449-69d3-4aef-a96b-0a5130ba9483",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1543961989670",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/8bac3599-9a1c-4b7f-80e5-c1838f744c23/model-vers/model-ver/3f908abc-3a15-40d0-b674-2a639e52884d",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "8bac3599-9a1c-4b7f-80e5-c1838f744c23"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "3f908abc-3a15-40d0-b674-2a639e52884d"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "collection"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            },
+            "relationship-list": {
+              "relationship": [
+                {
+                  "related-to": "model-element",
+                  "relationship-label": "org.onap.relationships.inventory.IsA",
+                  "related-link": "/aai/v14/service-design-and-creation/models/model/f6342be5-d66b-4d03-a1aa-c82c3094c4ea/model-vers/model-ver/0e97a118-b1b6-40d5-bbad-98cdd51b1c48/model-elements/model-element/0ea8ac21-64b8-4489-9d62-12e625d66995/model-elements/model-element/d614653c-5f19-4668-ad98-cfbe012308e1",
+                  "relationship-data": [
+                    {
+                      "relationship-key": "model.model-invariant-id",
+                      "relationship-value": "f6342be5-d66b-4d03-a1aa-c82c3094c4ea"
+                    },
+                    {
+                      "relationship-key": "model-ver.model-version-id",
+                      "relationship-value": "0e97a118-b1b6-40d5-bbad-98cdd51b1c48"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "0ea8ac21-64b8-4489-9d62-12e625d66995"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "d614653c-5f19-4668-ad98-cfbe012308e1"
+                    }
+                  ]
+                }
+              ]
+            }
+          },
+          {
+            "model-version-id": "b84e2233-37bf-4c8d-b613-eb8a8820b725",
+            "model-name": "NCM_VLAN_ym161f",
+            "model-version": "4.0",
+            "model-description": "Network Collection Service VF for VLAN TAgging",
+            "resource-version": "1534883153714",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "f7c3f5bb-777a-4d9f-9401-a652f5006152",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1534883153720",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/425b2158-e51d-4509-9945-dad4556474a3/model-vers/model-ver/2a160989-b202-47dd-874b-4a0f275998f7",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "425b2158-e51d-4509-9945-dad4556474a3"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "2a160989-b202-47dd-874b-4a0f275998f7"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "cloud-region"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            },
+            "relationship-list": {
+              "relationship": [
+                {
+                  "related-to": "model-element",
+                  "relationship-label": "org.onap.relationships.inventory.IsA",
+                  "related-link": "/aai/v14/service-design-and-creation/models/model/f6342be5-d66b-4d03-a1aa-c82c3094c4ea/model-vers/model-ver/1ceab842-7ded-49f1-a129-dce2ecef8c71/model-elements/model-element/5ca853fc-2984-45c7-b2e7-8514a56785ba/model-elements/model-element/030553aa-8d82-4b03-a3dc-bc210daadd5e",
+                  "relationship-data": [
+                    {
+                      "relationship-key": "model.model-invariant-id",
+                      "relationship-value": "f6342be5-d66b-4d03-a1aa-c82c3094c4ea"
+                    },
+                    {
+                      "relationship-key": "model-ver.model-version-id",
+                      "relationship-value": "1ceab842-7ded-49f1-a129-dce2ecef8c71"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "5ca853fc-2984-45c7-b2e7-8514a56785ba"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "030553aa-8d82-4b03-a3dc-bc210daadd5e"
+                    }
+                  ]
+                }
+              ]
+            }
+          },
+          {
+            "model-version-id": "5ededaad-905c-4356-b30d-471b0ae2a12a",
+            "model-name": "NCM_VLAN_ym161f",
+            "model-version": "3.0",
+            "model-description": "Network Collection Service VF for VLAN TAgging",
+            "resource-version": "1534872173817",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "31f558c6-d73a-43e4-aab0-c863ccd6b110",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1534872173821",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/425b2158-e51d-4509-9945-dad4556474a3/model-vers/model-ver/2a160989-b202-47dd-874b-4a0f275998f7",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "425b2158-e51d-4509-9945-dad4556474a3"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "2a160989-b202-47dd-874b-4a0f275998f7"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "cloud-region"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            },
+            "relationship-list": {
+              "relationship": [
+                {
+                  "related-to": "model-element",
+                  "relationship-label": "org.onap.relationships.inventory.IsA",
+                  "related-link": "/aai/v14/service-design-and-creation/models/model/f6342be5-d66b-4d03-a1aa-c82c3094c4ea/model-vers/model-ver/fd21f6b5-02f6-4ac0-9515-e1f01112da95/model-elements/model-element/0812b47d-7ef1-4a65-b6fb-9f3ff3bc3eee/model-elements/model-element/110a5ba4-997b-45f0-8e53-d64d6b342be1",
+                  "relationship-data": [
+                    {
+                      "relationship-key": "model.model-invariant-id",
+                      "relationship-value": "f6342be5-d66b-4d03-a1aa-c82c3094c4ea"
+                    },
+                    {
+                      "relationship-key": "model-ver.model-version-id",
+                      "relationship-value": "fd21f6b5-02f6-4ac0-9515-e1f01112da95"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "0812b47d-7ef1-4a65-b6fb-9f3ff3bc3eee"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "110a5ba4-997b-45f0-8e53-d64d6b342be1"
+                    }
+                  ]
+                }
+              ]
+            }
+          },
+          {
+            "model-version-id": "67b91dcd-4fa5-4111-80c9-60d524740667",
+            "model-name": "NCM_VLAN_ym161f",
+            "model-version": "1.0",
+            "model-description": "Network Collection Service VF for VLAN TAgging",
+            "resource-version": "1534788713822",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "6fdf228e-89ce-4cf6-9bd7-399aa1b690b3",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1534788713833",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/425b2158-e51d-4509-9945-dad4556474a3/model-vers/model-ver/2a160989-b202-47dd-874b-4a0f275998f7",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "425b2158-e51d-4509-9945-dad4556474a3"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "2a160989-b202-47dd-874b-4a0f275998f7"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "cloud-region"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          },
+          {
+            "model-version-id": "ce8c98bc-4691-44fb-8ff0-7a47487c11c4",
+            "model-name": "NCM_VLAN_ym161f",
+            "model-version": "5.0",
+            "model-description": "Network Collection Service VF for VLAN TAgging",
+            "resource-version": "1534885013739",
+            "model-elements": {
+              "model-element": [
+                {
+                  "model-element-uuid": "4bd10473-a9de-4399-abe7-c9b24e48e0ee",
+                  "new-data-del-flag": "T",
+                  "cardinality": "unbounded",
+                  "resource-version": "1534885013745",
+                  "relationship-list": {
+                    "relationship": [
+                      {
+                        "related-to": "model-ver",
+                        "relationship-label": "org.onap.relationships.inventory.IsA",
+                        "related-link": "/aai/v14/service-design-and-creation/models/model/425b2158-e51d-4509-9945-dad4556474a3/model-vers/model-ver/2a160989-b202-47dd-874b-4a0f275998f7",
+                        "relationship-data": [
+                          {
+                            "relationship-key": "model.model-invariant-id",
+                            "relationship-value": "425b2158-e51d-4509-9945-dad4556474a3"
+                          },
+                          {
+                            "relationship-key": "model-ver.model-version-id",
+                            "relationship-value": "2a160989-b202-47dd-874b-4a0f275998f7"
+                          }
+                        ],
+                        "related-to-property": [
+                          {
+                            "property-key": "model-ver.model-name",
+                            "property-value": "cloud-region"
+                          }
+                        ]
+                      }
+                    ]
+                  }
+                }
+              ]
+            },
+            "relationship-list": {
+              "relationship": [
+                {
+                  "related-to": "model-element",
+                  "relationship-label": "org.onap.relationships.inventory.IsA",
+                  "related-link": "/aai/v14/service-design-and-creation/models/model/f6342be5-d66b-4d03-a1aa-c82c3094c4ea/model-vers/model-ver/12930bcc-5276-42bb-8ed6-1e43d7acae2c/model-elements/model-element/4d57798e-81b7-490e-bee8-48bd382a1349/model-elements/model-element/93eafb42-11b5-471d-8f8a-333408114a9a",
+                  "relationship-data": [
+                    {
+                      "relationship-key": "model.model-invariant-id",
+                      "relationship-value": "f6342be5-d66b-4d03-a1aa-c82c3094c4ea"
+                    },
+                    {
+                      "relationship-key": "model-ver.model-version-id",
+                      "relationship-value": "12930bcc-5276-42bb-8ed6-1e43d7acae2c"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "4d57798e-81b7-490e-bee8-48bd382a1349"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "93eafb42-11b5-471d-8f8a-333408114a9a"
+                    }
+                  ]
+                },
+                {
+                  "related-to": "model-element",
+                  "relationship-label": "org.onap.relationships.inventory.IsA",
+                  "related-link": "/aai/v14/service-design-and-creation/models/model/f6342be5-d66b-4d03-a1aa-c82c3094c4ea/model-vers/model-ver/6e0bec91-09f3-43aa-9cf3-e617cd0146be/model-elements/model-element/a0247d2e-3843-4753-be2f-4c252c99390e/model-elements/model-element/cb986adf-5ca8-48a5-ac9b-b222d6d2e280",
+                  "relationship-data": [
+                    {
+                      "relationship-key": "model.model-invariant-id",
+                      "relationship-value": "f6342be5-d66b-4d03-a1aa-c82c3094c4ea"
+                    },
+                    {
+                      "relationship-key": "model-ver.model-version-id",
+                      "relationship-value": "6e0bec91-09f3-43aa-9cf3-e617cd0146be"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "a0247d2e-3843-4753-be2f-4c252c99390e"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "cb986adf-5ca8-48a5-ac9b-b222d6d2e280"
+                    }
+                  ]
+                },
+                {
+                  "related-to": "model-element",
+                  "relationship-label": "org.onap.relationships.inventory.IsA",
+                  "related-link": "/aai/v14/service-design-and-creation/models/model/f6342be5-d66b-4d03-a1aa-c82c3094c4ea/model-vers/model-ver/0148e4c5-629b-4fef-9728-1e13fd630679/model-elements/model-element/6ae6fd91-2086-470d-8c36-9d668c41fd32/model-elements/model-element/a520808b-b8bc-4969-9eba-c85e2797f3dd",
+                  "relationship-data": [
+                    {
+                      "relationship-key": "model.model-invariant-id",
+                      "relationship-value": "f6342be5-d66b-4d03-a1aa-c82c3094c4ea"
+                    },
+                    {
+                      "relationship-key": "model-ver.model-version-id",
+                      "relationship-value": "0148e4c5-629b-4fef-9728-1e13fd630679"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "6ae6fd91-2086-470d-8c36-9d668c41fd32"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "a520808b-b8bc-4969-9eba-c85e2797f3dd"
+                    }
+                  ]
+                },
+                {
+                  "related-to": "model-element",
+                  "relationship-label": "org.onap.relationships.inventory.IsA",
+                  "related-link": "/aai/v14/service-design-and-creation/models/model/ca26a7e6-064d-4e90-a5b9-32ffe819f826/model-vers/model-ver/e9a290ca-41f0-4117-a1b5-8b7cd5595ff7/model-elements/model-element/ff3fdeb9-24e9-406f-8761-1334c9ea29d1/model-elements/model-element/bc6ddc86-f948-4f47-a4e6-bededd8d5780",
+                  "relationship-data": [
+                    {
+                      "relationship-key": "model.model-invariant-id",
+                      "relationship-value": "ca26a7e6-064d-4e90-a5b9-32ffe819f826"
+                    },
+                    {
+                      "relationship-key": "model-ver.model-version-id",
+                      "relationship-value": "e9a290ca-41f0-4117-a1b5-8b7cd5595ff7"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "ff3fdeb9-24e9-406f-8761-1334c9ea29d1"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "bc6ddc86-f948-4f47-a4e6-bededd8d5780"
+                    }
+                  ]
+                },
+                {
+                  "related-to": "model-element",
+                  "relationship-label": "org.onap.relationships.inventory.IsA",
+                  "related-link": "/aai/v14/service-design-and-creation/models/model/f6342be5-d66b-4d03-a1aa-c82c3094c4ea/model-vers/model-ver/46093d8f-6dfa-4332-9c00-7e822c681b59/model-elements/model-element/d74a5dff-ef7f-4e32-9c13-d82fb2c617c9/model-elements/model-element/f7bd32b4-bbbf-4788-9137-9dfa299e6111",
+                  "relationship-data": [
+                    {
+                      "relationship-key": "model.model-invariant-id",
+                      "relationship-value": "f6342be5-d66b-4d03-a1aa-c82c3094c4ea"
+                    },
+                    {
+                      "relationship-key": "model-ver.model-version-id",
+                      "relationship-value": "46093d8f-6dfa-4332-9c00-7e822c681b59"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "d74a5dff-ef7f-4e32-9c13-d82fb2c617c9"
+                    },
+                    {
+                      "relationship-key": "model-element.model-element-uuid",
+                      "relationship-value": "f7bd32b4-bbbf-4788-9137-9dfa299e6111"
+                    }
+                  ]
+                }
+              ]
+            }
+          }
+        ]
+      }
+    }
+  ]
+}
diff --git a/vid-app-common/src/test/resources/getTopology/serviceWithCR/serviceWithCR.json b/vid-app-common/src/test/resources/getTopology/serviceWithCR/serviceWithCR.json
new file mode 100644
index 0000000..7b96729
--- /dev/null
+++ b/vid-app-common/src/test/resources/getTopology/serviceWithCR/serviceWithCR.json
@@ -0,0 +1,38 @@
+{
+  "service-instance-id": "a565e6ad-75d1-4493-98f1-33234b5c17e2",
+  "service-instance-name": "NcmVlanSvcYm161f_77",
+  "service-type": "INFRASTRUCTURE",
+  "environment-context": "General_Revenue-Bearing",
+  "workload-context": "Production",
+  "model-invariant-id": "f6342be5-d66b-4d03-a1aa-c82c3094c4ea",
+  "model-version-id": "6e0bec91-09f3-43aa-9cf3-e617cd0146be",
+  "resource-version": "1539158502875",
+  "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/a565e6ad-75d1-4493-98f1-33234b5c17e2/service-data/service-topology/",
+  "orchestration-status": "Assigned",
+  "relationship-list": {
+    "relationship": [
+      {
+        "related-to": "collection",
+        "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+        "related-link": "/aai/v14/network/collections/collection/84a351ae-3601-45e2-98df-878d6c816abc",
+        "relationship-data": [
+          {
+            "relationship-key": "collection.collection-id",
+            "relationship-value": "84a351ae-3601-45e2-98df-878d6c816abc"
+          }
+        ]
+      },
+      {
+        "related-to": "owning-entity",
+        "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+        "related-link": "/aai/v14/business/owning-entities/owning-entity/e4257a94-21cc-40c5-adc9-e6f4ff868e31",
+        "relationship-data": [
+          {
+            "relationship-key": "owning-entity.owning-entity-id",
+            "relationship-value": "e4257a94-21cc-40c5-adc9-e6f4ff868e31"
+          }
+        ]
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/getTopology/serviceWithCR/serviceWithCRModel.json b/vid-app-common/src/test/resources/getTopology/serviceWithCR/serviceWithCRModel.json
new file mode 100644
index 0000000..6cca1cd
--- /dev/null
+++ b/vid-app-common/src/test/resources/getTopology/serviceWithCR/serviceWithCRModel.json
@@ -0,0 +1,72 @@
+{
+  "service": {
+    "uuid": "6e0bec91-09f3-43aa-9cf3-e617cd0146be",
+    "invariantUuid": "f6342be5-d66b-4d03-a1aa-c82c3094c4ea",
+    "name": "NCM_VLAN_SVC_ym161f",
+    "version": "8.0",
+    "toscaModelURL": null,
+    "category": "Network L4+",
+    "serviceType": "INFRASTRUCTURE",
+    "serviceRole": "",
+    "description": "Network Collection service for vLAN tagging",
+    "serviceEcompNaming": "true",
+    "instantiationType": "Macro",
+    "inputs": {},
+    "vidNotions": {
+      "instantiationType": "Macro",
+      "instantiationUI": "serviceWithCollectionResource",
+      "modelCategory": "other",
+      "viewEditUI": "serviceWithCollectionResource"
+    }
+  },
+  "vnfs": {},
+  "networks": {},
+  "collectionResources": {
+    "NCM_VLAN_ym161f 0": {
+      "uuid": "ce8c98bc-4691-44fb-8ff0-7a47487c11c4",
+      "invariantUuid": "081ceb56-eb71-4566-a72d-3e7cbee5cdf1",
+      "description": "Network Collection Service VF for VLAN TAgging",
+      "name": "NCM_VLAN_ym161f",
+      "version": "5.0",
+      "customizationUuid": "bac6ffe5-c851-495f-a64a-28751400ff03",
+      "inputs": {},
+      "commands": {},
+      "properties": {
+        "ncm_vlan_ym161f..Fixed..0_quantity": "3",
+        "cr_function": "vTSBC_function",
+        "ncm_vlan_ym161f..NetworkCollection..0_network_collection_description": "vTSBC Customer Landing Network Collection Desc",
+        "cr_role": "SUB_INTERFACE",
+        "cr_type": "L3-NETWORK",
+        "ecomp_generated_naming": "false",
+        "ncm_vlan_ym161f..NetworkCollection..0_network_collection_function": "vTSBC Customer Landing Network Collection"
+      },
+      "type": "CR",
+      "category": "Generic",
+      "subcategory": "Infrastructure",
+      "resourceVendor": "ATT",
+      "resourceVendorRelease": "201810",
+      "resourceVendorModelNumber": "294455b",
+      "customizationUUID": "bac6ffe5-c851-495f-a64a-28751400ff03",
+      "networksCollection": {
+        "ncm_vlan_ym161f..NetworkCollection..0": {
+          "uuid": "dd182d7d-6949-4b90-b3cc-5befe400742e",
+          "invariantUuid": "868b109c-9481-4a18-891b-af974db7705a",
+          "name": "ncm_vlan_ym161f..NetworkCollection..0",
+          "version": "1",
+          "networkCollectionProperties": {
+            "networkCollectionFunction": "vTSBC Customer Landing Network Collection",
+            "networkCollectionDescription": "vTSBC Customer Landing Network Collection Desc"
+          }
+        }
+      }
+    }
+  },
+  "configurations": {},
+  "fabricConfigurations": {},
+  "serviceProxies": {},
+  "vfModules": {},
+  "volumeGroups": {},
+  "pnfs": {},
+  "vnfGroups": {},
+  "vrfs": {}
+}
diff --git a/vid-app-common/src/test/resources/getTopology/vfModule.json b/vid-app-common/src/test/resources/getTopology/vfModule.json
new file mode 100644
index 0000000..3fd9c08
--- /dev/null
+++ b/vid-app-common/src/test/resources/getTopology/vfModule.json
@@ -0,0 +1,66 @@
+{
+  "vf-module": [{
+    "vf-module-id": "2cb6d41e-2bef-4cb2-80ce-c7815bcdcf4e",
+    "vf-module-name": "dyh3brarf8000v_base",
+    "heat-stack-id": "dyh3brarf8000v_base/5a826d59-cafa-49fd-9860-dfc6eb7515ae",
+    "orchestration-status": "Active",
+    "is-base-vf-module": true,
+    "automated-assignment": false,
+    "resource-version": "1546547784901",
+    "model-invariant-id": "3ecca473-b0c0-46ae-b0b7-bd2969d8b79f",
+    "model-version-id": "5c35b764-e266-4498-af87-a88c4ba92dc4",
+    "model-customization-id": "06b4ece0-f6f8-4003-b445-653418292101",
+    "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/aea56040-8caf-41b3-a85b-97c44001499e/service-data/vnfs/vnf/9a7a4dc1-8e5f-43fe-a360-7734c5f51382/vnf-data/vf-modules/vf-module/2cb6d41e-2bef-4cb2-80ce-c7815bcdcf4e/vf-module-data/vf-module-topology/",
+    "relationship-list": {
+      "relationship": [{
+        "related-to": "l3-network",
+        "relationship-label": "org.onap.relationships.inventory.DependsOn",
+        "related-link": "/aai/v14/network/l3-networks/l3-network/974345f8-75d5-4ae2-be72-600930bcbe6b",
+        "relationship-data": [{
+          "relationship-key": "l3-network.network-id",
+          "relationship-value": "974345f8-75d5-4ae2-be72-600930bcbe6b"
+        }
+        ],
+        "related-to-property": [{
+          "property-key": "l3-network.network-name",
+          "property-value": "APP-C-24595-T-IST-05B_oam_protected_net_1"
+        }
+        ]
+      }, {
+        "related-to": "vnfc",
+        "relationship-label": "org.onap.relationships.inventory.Uses",
+        "related-link": "/aai/v14/network/vnfcs/vnfc/dyh3brarf8000vm001",
+        "relationship-data": [{
+          "relationship-key": "vnfc.vnfc-name",
+          "relationship-value": "dyh3brarf8000vm001"
+        }
+        ]
+      }, {
+        "related-to": "vserver",
+        "relationship-label": "org.onap.relationships.inventory.Uses",
+        "related-link": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/dyh3b/tenants/tenant/c8035f5ee95d4c62bbc8074c044122b9/vservers/vserver/3e3985e1-2369-4191-9721-7858a478ab6d",
+        "relationship-data": [{
+          "relationship-key": "cloud-region.cloud-owner",
+          "relationship-value": "irma-aic"
+        }, {
+          "relationship-key": "cloud-region.cloud-region-id",
+          "relationship-value": "dyh3b"
+        }, {
+          "relationship-key": "tenant.tenant-id",
+          "relationship-value": "c8035f5ee95d4c62bbc8074c044122b9"
+        }, {
+          "relationship-key": "vserver.vserver-id",
+          "relationship-value": "3e3985e1-2369-4191-9721-7858a478ab6d"
+        }
+        ],
+        "related-to-property": [{
+          "property-key": "vserver.vserver-name",
+          "property-value": "dyh3brarf8000vm001"
+        }
+        ]
+      }
+      ]
+    }
+  }
+  ]
+}
diff --git a/vid-app-common/src/test/resources/getTopology/vnf.json b/vid-app-common/src/test/resources/getTopology/vnf.json
new file mode 100644
index 0000000..7b640da
--- /dev/null
+++ b/vid-app-common/src/test/resources/getTopology/vnf.json
@@ -0,0 +1,160 @@
+{
+  "vnf-id": "9a7a4dc1-8e5f-43fe-a360-7734c5f51382",
+  "vnf-name": "dyh3brarf8000v",
+  "vnf-type": "vRAR_1902_ap7134/vRAR_1902_ap7134 0",
+  "prov-status": "PREPROV",
+  "equipment-role": "vRAR",
+  "orchestration-status": "Active",
+  "in-maint": true,
+  "is-closed-loop-disabled": false,
+  "resource-version": "1547155053461",
+  "model-invariant-id": "b711997f-36b3-4a9b-8b37-71a0fc2ebd6d",
+  "model-version-id": "7f23e4f7-e44c-44df-b066-4cedc6950bfe",
+  "model-customization-id": "401350be-0f56-481c-86d8-f32d573fec26",
+  "nf-type": "REPORT",
+  "nf-function": "REVENUE-ASSURANCE",
+  "nf-role": "vRAR",
+  "nf-naming-code": "rarf",
+  "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/aea56040-8caf-41b3-a85b-97c44001499e/service-data/vnfs/vnf/9a7a4dc1-8e5f-43fe-a360-7734c5f51382/vnf-data/vnf-topology/",
+  "relationship-list": {
+    "relationship": [{
+      "related-to": "service-instance",
+      "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+      "related-link": "/aai/v14/business/customers/customer/e433710f-9217-458d-a79d-1c7aff376d89/service-subscriptions/service-subscription/TYLER%20SILVIA/service-instances/service-instance/aea56040-8caf-41b3-a85b-97c44001499e",
+      "relationship-data": [{
+        "relationship-key": "customer.global-customer-id",
+        "relationship-value": "e433710f-9217-458d-a79d-1c7aff376d89"
+      }, {
+        "relationship-key": "service-subscription.service-type",
+        "relationship-value": "TYLER SILVIA"
+      }, {
+        "relationship-key": "service-instance.service-instance-id",
+        "relationship-value": "aea56040-8caf-41b3-a85b-97c44001499e"
+      }
+      ],
+      "related-to-property": [{
+        "property-key": "service-instance.service-instance-name",
+        "property-value": "vRAR_1902_un577h"
+      }
+      ]
+    }, {
+      "related-to": "vnfc",
+      "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+      "related-link": "/aai/v14/network/vnfcs/vnfc/dyh3brarf8000vm001",
+      "relationship-data": [{
+        "relationship-key": "vnfc.vnfc-name",
+        "relationship-value": "dyh3brarf8000vm001"
+      }
+      ]
+    }, {
+      "related-to": "platform",
+      "relationship-label": "org.onap.relationships.inventory.Uses",
+      "related-link": "/aai/v14/business/platforms/platform/FIRSTNET-DEDICATED",
+      "relationship-data": [{
+        "relationship-key": "platform.platform-name",
+        "relationship-value": "FIRSTNET-DEDICATED"
+      }
+      ]
+    }, {
+      "related-to": "line-of-business",
+      "relationship-label": "org.onap.relationships.inventory.Uses",
+      "related-link": "/aai/v14/business/lines-of-business/line-of-business/FIRSTNET",
+      "relationship-data": [{
+        "relationship-key": "line-of-business.line-of-business-name",
+        "relationship-value": "LINDSEY"
+      }
+      ]
+    }, {
+      "related-to": "tenant",
+      "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+      "related-link": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/dyh3b/tenants/tenant/c8035f5ee95d4c62bbc8074c044122b9",
+      "relationship-data": [{
+        "relationship-key": "cloud-region.cloud-owner",
+        "relationship-value": "irma-aic"
+      }, {
+        "relationship-key": "cloud-region.cloud-region-id",
+        "relationship-value": "dyh3b"
+      }, {
+        "relationship-key": "tenant.tenant-id",
+        "relationship-value": "c8035f5ee95d4c62bbc8074c044122b9"
+      }
+      ],
+      "related-to-property": [{
+        "property-key": "tenant.tenant-name",
+        "property-value": "APP-C-24595-T-IST-05B"
+      }
+      ]
+    }, {
+      "related-to": "vserver",
+      "relationship-label": "tosca.relationships.HostedOn",
+      "related-link": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/dyh3b/tenants/tenant/c8035f5ee95d4c62bbc8074c044122b9/vservers/vserver/3e3985e1-2369-4191-9721-7858a478ab6d",
+      "relationship-data": [{
+        "relationship-key": "cloud-region.cloud-owner",
+        "relationship-value": "irma-aic"
+      }, {
+        "relationship-key": "cloud-region.cloud-region-id",
+        "relationship-value": "dyh3b"
+      }, {
+        "relationship-key": "tenant.tenant-id",
+        "relationship-value": "c8035f5ee95d4c62bbc8074c044122b9"
+      }, {
+        "relationship-key": "vserver.vserver-id",
+        "relationship-value": "3e3985e1-2369-4191-9721-7858a478ab6d"
+      }
+      ],
+      "related-to-property": [{
+        "property-key": "vserver.vserver-name",
+        "property-value": "dyh3brarf8000vm001"
+      }
+      ]
+    }, {
+      "related-to": "availability-zone",
+      "relationship-label": "org.onap.relationships.inventory.Uses",
+      "related-link": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/dyh3b/availability-zones/availability-zone/dyh3b-kvm-az02",
+      "relationship-data": [{
+        "relationship-key": "cloud-region.cloud-owner",
+        "relationship-value": "irma-aic"
+      }, {
+        "relationship-key": "cloud-region.cloud-region-id",
+        "relationship-value": "dyh3b"
+      }, {
+        "relationship-key": "availability-zone.availability-zone-name",
+        "relationship-value": "dyh3b-kvm-az02"
+      }
+      ]
+    }, {
+      "related-to": "availability-zone",
+      "relationship-label": "org.onap.relationships.inventory.Uses",
+      "related-link": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/dyh3b/availability-zones/availability-zone/dyh3b-kvm-az01",
+      "relationship-data": [{
+        "relationship-key": "cloud-region.cloud-owner",
+        "relationship-value": "irma-aic"
+      }, {
+        "relationship-key": "cloud-region.cloud-region-id",
+        "relationship-value": "dyh3b"
+      }, {
+        "relationship-key": "availability-zone.availability-zone-name",
+        "relationship-value": "dyh3b-kvm-az01"
+      }
+      ]
+    }, {
+      "related-to": "cloud-region",
+      "relationship-label": "org.onap.relationships.inventory.LocatedIn",
+      "related-link": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/dyh3b",
+      "relationship-data": [{
+        "relationship-key": "cloud-region.cloud-owner",
+        "relationship-value": "irma-aic"
+      }, {
+        "relationship-key": "cloud-region.cloud-region-id",
+        "relationship-value": "dyh3b"
+      }
+      ],
+      "related-to-property": [{
+        "property-key": "cloud-region.owner-defined-type",
+        "property-value": "lcp"
+      }
+      ]
+    }
+    ]
+  }
+}
diff --git a/vid-app-common/src/test/resources/orchestrationRequestsByServiceInstanceId.json b/vid-app-common/src/test/resources/orchestrationRequestsByServiceInstanceId.json
index 34f18f7..d20fc67 100644
--- a/vid-app-common/src/test/resources/orchestrationRequestsByServiceInstanceId.json
+++ b/vid-app-common/src/test/resources/orchestrationRequestsByServiceInstanceId.json
@@ -93,7 +93,7 @@
         ],
         "cloudConfiguration": {
           "tenantId": "460f35aeb53542dc9f77105066483e83",
-          "cloudOwner": "att-aic",
+          "cloudOwner": "irma-aic" ,
           "lcpCloudRegionId": "rdm5b"
         },
         "requestParameters": {},
@@ -177,7 +177,7 @@
         ],
         "cloudConfiguration": {
           "tenantId": "460f35aeb53542dc9f77105066483e83",
-          "cloudOwner": "att-aic",
+          "cloudOwner": "irma-aic" ,
           "lcpCloudRegionId": "rdm5b"
         },
         "requestParameters": {
diff --git a/vid-app-common/src/test/resources/payload_jsons/VnfGroupCreate1Delete1None1Request.json b/vid-app-common/src/test/resources/payload_jsons/VnfGroupCreate1Delete1None1Request.json
new file mode 100644
index 0000000..bc64545
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/VnfGroupCreate1Delete1None1Request.json
@@ -0,0 +1,123 @@
+{
+  "action": "None",
+  "isDirty": true,
+  "trackById":"aabbcc",
+  "vnfs": {},
+  "instanceParams": [],
+  "validationCounter": 0,
+  "existingNames": {
+    "service_instance_name": "",
+    "vnf_group3_instance_name": ""
+  },
+  "existingVNFCounterMap": {},
+  "existingVnfGroupCounterMap": {
+    "daeb6568-cef8-417f-9075-ed259ce59f48": 3
+  },
+  "existingNetworksCounterMap": {},
+  "networks": {},
+  "vnfGroups": {
+    "groupingservicefortest..ResourceInstanceGroup..0:001": {
+      "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+      "trackById": "groupingservicefortest..ResourceInstanceGroup..0:001",
+      "instanceName": "VNF_GROUP1_INSTANCE_NAME",
+      "lcpCloudRegionId": null,
+      "legacyRegion": null,
+      "lineOfBusiness": null,
+      "action": "None_Delete",
+      "instanceId": "VNF_GROUP1_INSTANCE_ID",
+      "instanceType": "VNF_GROUP1_INSTANCE_TYPE",
+      "orchStatus": null,
+      "platformName": null,
+      "productFamilyId": null,
+      "provStatus": null,
+      "tenantId": null,
+      "inMaint": false,
+      "modelInfo": {
+        "modelType": "instanceGroup",
+        "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+        "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+      },
+      "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+      "instanceGroupRole": "VNF_GROUP1_INSTANCE_ROLE",
+      "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+      "vnfs":{}
+    },
+    "groupingservicefortest..ResourceInstanceGroup..0:002": {
+      "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+      "trackById": "groupingservicefortest..ResourceInstanceGroup..0:002",
+      "instanceName": "VNF_GROUP2_INSTANCE_NAME",
+      "lcpCloudRegionId": null,
+      "legacyRegion": null,
+      "lineOfBusiness": null,
+      "action": "None",
+      "instanceId": "VNF_GROUP2_INSTANCE_ID",
+      "instanceType": "VNF_GROUP2_INSTANCE_TYPE",
+      "orchStatus": null,
+      "platformName": null,
+      "productFamilyId": null,
+      "provStatus": null,
+      "inMaint": false,
+      "modelInfo": {
+        "modelType": "instanceGroup",
+        "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+        "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+      },
+      "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+      "tenantId": null,
+      "instanceGroupRole": "VNF_GROUP2_INSTANCE_ROLE",
+      "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+      "vnfs": {}
+    },
+    "groupingservicefortest..ResourceInstanceGroup..0": {
+      "action": "Create",
+      "inMaint": false,
+      "rollbackOnFailure": "true",
+      "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+      "isMissingData": false,
+      "trackById": "ag5aav86u4j",
+      "vnfGroupStoreKey": "groupingservicefortest..ResourceInstanceGroup..0",
+      "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+      "instanceName": "VNF_GROUP3_INSTANCE_NAME",
+      "modelInfo": {
+        "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+        "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48",
+        "modelName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "modelVersion": "1",
+        "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48"
+      },
+      "instanceParams": [{}
+      ],
+      "vnfs":{}
+    }
+  },
+  "bulkSize": 1,
+  "instanceName": "SERVICE_INSTANCE_NAME",
+
+  "instanceId": "service-instance-id",
+  "orchStatus": "GARBAGE DATA",
+  "globalSubscriberId": "global-customer-id",
+  "subscriptionServiceType": "service-instance-type",
+  "owningEntityId": null,
+  "owningEntityName": null,
+  "productFamilyId": null,
+  "lcpCloudRegionId": null,
+  "tenantId": null,
+  "tenantName": null,
+  "aicZoneId": null,
+  "aicZoneName": null,
+  "projectName": null,
+  "rollbackOnFailure": false,
+  "isALaCarte": true,
+  "modelInfo": {
+    "modelInvariantId": "7ee41ce4-4827-44b0-a48e-2707a59905d2",
+    "modelVersionId": "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc",
+    "modelName": "Grouping Service for Test",
+    "modelType": "service",
+    "modelVersion": "1.0"
+  },
+
+  "testApi": "VNF_API"
+}
diff --git a/vid-app-common/src/test/resources/payload_jsons/VnfGroupCreate3Delete1None1Request.json b/vid-app-common/src/test/resources/payload_jsons/VnfGroupCreate3Delete1None1Request.json
new file mode 100644
index 0000000..1906bc8
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/VnfGroupCreate3Delete1None1Request.json
@@ -0,0 +1,171 @@
+{
+  "action": "None",
+  "isDirty": true,
+  "trackById":"aabbcc",
+  "vnfs": {},
+  "instanceParams": [],
+  "validationCounter": 0,
+  "existingNames": {
+    "service_instance_name": "",
+    "vnf_group3_instance_name": ""
+  },
+  "existingVNFCounterMap": {},
+  "existingVnfGroupCounterMap": {
+    "daeb6568-cef8-417f-9075-ed259ce59f48": 3
+  },
+  "existingNetworksCounterMap": {},
+  "networks": {},
+  "vnfGroups": {
+    "groupingservicefortest..ResourceInstanceGroup..0:001": {
+      "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+      "trackById": "groupingservicefortest..ResourceInstanceGroup..0:001",
+      "instanceName": "VNF_GROUP1_INSTANCE_NAME",
+      "lcpCloudRegionId": null,
+      "legacyRegion": null,
+      "lineOfBusiness": null,
+      "action": "None_Delete",
+      "instanceId": "VNF_GROUP1_INSTANCE_ID",
+      "instanceType": "VNF_GROUP1_INSTANCE_TYPE",
+      "orchStatus": null,
+      "platformName": null,
+      "productFamilyId": null,
+      "provStatus": null,
+      "tenantId": null,
+      "inMaint": false,
+      "modelInfo": {
+        "modelType": "instanceGroup",
+        "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+        "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+      },
+      "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+      "instanceGroupRole": "VNF_GROUP1_INSTANCE_ROLE",
+      "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+      "vnfs":{}
+    },
+    "groupingservicefortest..ResourceInstanceGroup..0:002": {
+      "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+      "trackById": "groupingservicefortest..ResourceInstanceGroup..0:002",
+      "instanceName": "VNF_GROUP2_INSTANCE_NAME",
+      "lcpCloudRegionId": null,
+      "legacyRegion": null,
+      "lineOfBusiness": null,
+      "action": "None",
+      "instanceId": "VNF_GROUP2_INSTANCE_ID",
+      "instanceType": "VNF_GROUP2_INSTANCE_TYPE",
+      "orchStatus": null,
+      "platformName": null,
+      "productFamilyId": null,
+      "provStatus": null,
+      "inMaint": false,
+      "modelInfo": {
+        "modelType": "instanceGroup",
+        "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+        "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+      },
+      "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+      "tenantId": null,
+      "instanceGroupRole": "VNF_GROUP2_INSTANCE_ROLE",
+      "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+      "vnfs": {}
+    },
+    "groupingservicefortest..ResourceInstanceGroup..0": {
+      "action": "Create",
+      "inMaint": false,
+      "rollbackOnFailure": "true",
+      "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+      "isMissingData": false,
+      "trackById": "ag5aav86u4j",
+      "vnfGroupStoreKey": "groupingservicefortest..ResourceInstanceGroup..0",
+      "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+      "instanceName": "VNF_GROUP3_INSTANCE_NAME",
+      "modelInfo": {
+        "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+        "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48",
+        "modelName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "modelVersion": "1",
+        "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48"
+      },
+      "instanceParams": [{}
+      ],
+      "vnfs":{}
+    },
+    "groupingservicefortest..ResourceInstanceGroup..0:003": {
+      "action": "Create",
+      "isFailed": true,
+      "statusMessage": "failed!",
+      "inMaint": false,
+      "rollbackOnFailure": "true",
+      "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+      "isMissingData": false,
+      "trackById": "asedrftjko",
+      "vnfGroupStoreKey": "groupingservicefortest..ResourceInstanceGroup..0",
+      "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+      "instanceName": "VNF_GROUP4_INSTANCE_NAME",
+      "modelInfo": {
+        "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+        "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48",
+        "modelName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "modelVersion": "1",
+        "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48"
+      },
+      "instanceParams": [{}
+      ],
+      "vnfs":{}
+    },
+    "groupingservicefortest..ResourceInstanceGroup..0:004": {
+      "action": "Create",
+      "isFailed": false,
+      "statusMessage": null,
+      "inMaint": false,
+      "rollbackOnFailure": "true",
+      "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+      "isMissingData": false,
+      "trackById": "rgedfdged4",
+      "vnfGroupStoreKey": "groupingservicefortest..ResourceInstanceGroup..0",
+      "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+      "instanceName": "VNF_GROUP5_INSTANCE_NAME",
+      "modelInfo": {
+        "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+        "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48",
+        "modelName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "modelVersion": "1",
+        "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48"
+      },
+      "instanceParams": [{}
+      ],
+      "vnfs":{}
+    }
+  },
+  "bulkSize": 1,
+  "instanceName": "SERVICE_INSTANCE_NAME",
+
+  "instanceId": "service-instance-id",
+  "orchStatus": "GARBAGE DATA",
+  "globalSubscriberId": "global-customer-id",
+  "subscriptionServiceType": "service-instance-type",
+  "owningEntityId": null,
+  "owningEntityName": null,
+  "productFamilyId": null,
+  "lcpCloudRegionId": null,
+  "tenantId": null,
+  "tenantName": null,
+  "aicZoneId": null,
+  "aicZoneName": null,
+  "projectName": null,
+  "rollbackOnFailure": false,
+  "isALaCarte": true,
+  "modelInfo": {
+    "modelInvariantId": "7ee41ce4-4827-44b0-a48e-2707a59905d2",
+    "modelVersionId": "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc",
+    "modelName": "Grouping Service for Test",
+    "modelType": "service",
+    "modelVersion": "1.0"
+  },
+
+  "testApi": "VNF_API"
+}
diff --git a/vid-app-common/src/test/resources/payload_jsons/VnfGroupCreate3Delete1None1RequestResolvedForRetry.json b/vid-app-common/src/test/resources/payload_jsons/VnfGroupCreate3Delete1None1RequestResolvedForRetry.json
new file mode 100644
index 0000000..6196cd7
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/VnfGroupCreate3Delete1None1RequestResolvedForRetry.json
@@ -0,0 +1,176 @@
+{
+  "action": "None",
+  "isDirty": true,
+  "trackById":"aabbcc",
+  "vnfs": {},
+  "instanceParams": [],
+  "validationCounter": 0,
+  "existingNames": {
+    "service_instance_name": "",
+    "vnf_group3_instance_name": ""
+  },
+  "existingVNFCounterMap": {},
+  "existingVnfGroupCounterMap": {
+    "daeb6568-cef8-417f-9075-ed259ce59f48": 3
+  },
+  "existingNetworksCounterMap": {},
+  "networks": {},
+  "vnfGroups": {
+    "groupingservicefortest..ResourceInstanceGroup..0:001": {
+      "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+      "trackById": "groupingservicefortest..ResourceInstanceGroup..0:001",
+      "instanceName": "VNF_GROUP1_INSTANCE_NAME",
+      "lcpCloudRegionId": null,
+      "legacyRegion": null,
+      "lineOfBusiness": null,
+      "action": "None",
+      "statusMessage": "Vnf has been created successfully.",
+      "instanceId": "VNF_GROUP1_INSTANCE_ID",
+      "instanceType": "VNF_GROUP1_INSTANCE_TYPE",
+      "orchStatus": null,
+      "platformName": null,
+      "productFamilyId": null,
+      "provStatus": null,
+      "tenantId": null,
+      "inMaint": false,
+      "modelInfo": {
+        "modelType": "instanceGroup",
+        "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+        "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+      },
+      "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+      "instanceGroupRole": "VNF_GROUP1_INSTANCE_ROLE",
+      "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+      "vnfs":{}
+    },
+    "groupingservicefortest..ResourceInstanceGroup..0:002": {
+      "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+      "trackById": "groupingservicefortest..ResourceInstanceGroup..0:002",
+      "instanceName": "VNF_GROUP2_INSTANCE_NAME",
+      "lcpCloudRegionId": null,
+      "legacyRegion": null,
+      "lineOfBusiness": null,
+      "action": "None",
+      "instanceId": "VNF_GROUP2_INSTANCE_ID",
+      "instanceType": "VNF_GROUP2_INSTANCE_TYPE",
+      "orchStatus": null,
+      "platformName": null,
+      "productFamilyId": null,
+      "provStatus": null,
+      "inMaint": false,
+      "modelInfo": {
+        "modelType": "instanceGroup",
+        "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+        "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+      },
+      "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+      "tenantId": null,
+      "instanceGroupRole": "VNF_GROUP2_INSTANCE_ROLE",
+      "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+      "vnfs": {}
+    },
+    "groupingservicefortest..ResourceInstanceGroup..0": {
+      "action": "Create",
+      "inMaint": false,
+      "rollbackOnFailure": "true",
+      "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+      "isMissingData": false,
+      "trackById": "ag5aav86u4j",
+      "vnfGroupStoreKey": "groupingservicefortest..ResourceInstanceGroup..0",
+      "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+      "instanceName": "VNF_GROUP3_INSTANCE_NAME",
+      "isFailed": true,
+      "statusMessage": "Vnf has been created successfully.",
+      "modelInfo": {
+        "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+        "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48",
+        "modelName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "modelVersion": "1",
+        "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48"
+      },
+      "instanceParams": [{}
+      ],
+      "vnfs":{}
+    },
+    "groupingservicefortest..ResourceInstanceGroup..0:003": {
+      "action": "None",
+      "isFailed": false,
+      "instanceId": "VNF_GROUP1_INSTANCE_ID_3",
+      "statusMessage": "Vnf has been created successfully.",
+      "inMaint": false,
+      "rollbackOnFailure": "true",
+      "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+      "isMissingData": false,
+      "trackById": "asedrftjko",
+      "vnfGroupStoreKey": "groupingservicefortest..ResourceInstanceGroup..0",
+      "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+      "instanceName": "VNF_GROUP4_INSTANCE_NAME",
+      "modelInfo": {
+        "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+        "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48",
+        "modelName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "modelVersion": "1",
+        "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48"
+      },
+      "instanceParams": [{}
+      ],
+      "vnfs":{}
+    },
+    "groupingservicefortest..ResourceInstanceGroup..0:004": {
+      "action": "None",
+      "isFailed": false,
+      "statusMessage": "Vnf has been created successfully.",
+      "instanceId": "VNF_GROUP1_INSTANCE_ID_4",
+      "inMaint": false,
+      "rollbackOnFailure": "true",
+      "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+      "isMissingData": false,
+      "trackById": "rgedfdged4",
+      "vnfGroupStoreKey": "groupingservicefortest..ResourceInstanceGroup..0",
+      "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+      "instanceName": "VNF_GROUP5_INSTANCE_NAME",
+      "modelInfo": {
+        "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+        "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48",
+        "modelName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "modelVersion": "1",
+        "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+        "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48"
+      },
+      "instanceParams": [{}
+      ],
+      "vnfs":{}
+    }
+  },
+  "bulkSize": 1,
+  "instanceName": "SERVICE_INSTANCE_NAME",
+
+  "instanceId": "service-instance-id",
+  "orchStatus": "GARBAGE DATA",
+  "globalSubscriberId": "global-customer-id",
+  "subscriptionServiceType": "service-instance-type",
+  "owningEntityId": null,
+  "owningEntityName": null,
+  "productFamilyId": null,
+  "lcpCloudRegionId": null,
+  "tenantId": null,
+  "tenantName": null,
+  "aicZoneId": null,
+  "aicZoneName": null,
+  "projectName": null,
+  "rollbackOnFailure": false,
+  "isALaCarte": true,
+  "modelInfo": {
+    "modelInvariantId": "7ee41ce4-4827-44b0-a48e-2707a59905d2",
+    "modelVersionId": "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc",
+    "modelName": "Grouping Service for Test",
+    "modelType": "service",
+    "modelVersion": "1.0"
+  },
+
+  "testApi": "VNF_API"
+}
diff --git a/vid-app-common/src/test/resources/payload_jsons/bulk_alacarte_service_request.json b/vid-app-common/src/test/resources/payload_jsons/bulk_alacarte_service_request.json
index 9556852..4e3fc10 100644
--- a/vid-app-common/src/test/resources/payload_jsons/bulk_alacarte_service_request.json
+++ b/vid-app-common/src/test/resources/payload_jsons/bulk_alacarte_service_request.json
@@ -9,7 +9,7 @@
 		},
 		"owningEntity": {
 			"owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
-			"owningEntityName": "PACKET CORE"
+			"owningEntityName": "JULIO ERICKSON"
 		},
 		"project": {
 			"projectName": "{some project name}"
diff --git a/vid-app-common/src/test/resources/payload_jsons/bulk_alacarte_service_request_naming_false.json b/vid-app-common/src/test/resources/payload_jsons/bulk_alacarte_service_request_naming_false.json
index be697ed..5b1fdc1 100644
--- a/vid-app-common/src/test/resources/payload_jsons/bulk_alacarte_service_request_naming_false.json
+++ b/vid-app-common/src/test/resources/payload_jsons/bulk_alacarte_service_request_naming_false.json
@@ -9,7 +9,7 @@
     },
     "owningEntity": {
       "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
-      "owningEntityName": "PACKET CORE"
+      "owningEntityName": "JULIO ERICKSON"
     },
     "subscriberInfo": {
       "globalSubscriberId": "{some subscriber id}"
diff --git a/vid-app-common/src/test/resources/payload_jsons/bulk_macro_service_request.json b/vid-app-common/src/test/resources/payload_jsons/bulk_macro_service_request.json
index 917900c..c0315d0 100644
--- a/vid-app-common/src/test/resources/payload_jsons/bulk_macro_service_request.json
+++ b/vid-app-common/src/test/resources/payload_jsons/bulk_macro_service_request.json
@@ -9,7 +9,7 @@
 		},
 		"owningEntity": {
 			"owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
-			"owningEntityName": "PACKET CORE"
+			"owningEntityName": "JULIO ERICKSON"
 		},
 		"project": {
 			"projectName": "{some project name}"
@@ -51,7 +51,7 @@
 							},
 							"cloudConfiguration": {
 								"lcpCloudRegionId": "mdt1",
-								"cloudOwner": "att-aic",
+								"cloudOwner": "irma-aic",
 								"tenantId": "88a6ca3ee0394ade9403f075db23167e"
 							},
 							"platform": {
diff --git a/vid-app-common/src/test/resources/payload_jsons/bulk_service_request_ecomp_naming.json b/vid-app-common/src/test/resources/payload_jsons/bulk_service_request_ecomp_naming.json
index 55765a8..dd343f4 100644
--- a/vid-app-common/src/test/resources/payload_jsons/bulk_service_request_ecomp_naming.json
+++ b/vid-app-common/src/test/resources/payload_jsons/bulk_service_request_ecomp_naming.json
@@ -9,7 +9,7 @@
 		},
 		"owningEntity": {
 			"owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
-			"owningEntityName": "PACKET CORE"
+			"owningEntityName": "JULIO ERICKSON"
 		},
 		"project": {
 			"projectName": "{some project name}"
@@ -48,7 +48,7 @@
 							},
 							"cloudConfiguration": {
 								"lcpCloudRegionId": "mdt1",
-								"cloudOwner": "att-aic",
+								"cloudOwner": "irma-aic",
 								"tenantId": "88a6ca3ee0394ade9403f075db23167e"
 							},
 							"platform": {
diff --git a/vid-app-common/src/test/resources/payload_jsons/bulk_service_request_no_vfmodule_ecomp_naming.json b/vid-app-common/src/test/resources/payload_jsons/bulk_service_request_no_vfmodule_ecomp_naming.json
index fdc8151..0ef15d7 100644
--- a/vid-app-common/src/test/resources/payload_jsons/bulk_service_request_no_vfmodule_ecomp_naming.json
+++ b/vid-app-common/src/test/resources/payload_jsons/bulk_service_request_no_vfmodule_ecomp_naming.json
@@ -9,7 +9,7 @@
 		},
 		"owningEntity": {
 			"owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
-			"owningEntityName": "PACKET CORE"
+			"owningEntityName": "JULIO ERICKSON"
 		},
 		"project": {
 			"projectName": "{some project name}"
@@ -48,7 +48,7 @@
 							},
 							"cloudConfiguration": {
 								"lcpCloudRegionId": "mdt1",
-								"cloudOwner": "att-aic",
+								"cloudOwner": "irma-aic",
 								"tenantId": "88a6ca3ee0394ade9403f075db23167e"
 							},
 							"platform": {
diff --git a/vid-app-common/src/test/resources/payload_jsons/bulk_service_request_unique_names.json b/vid-app-common/src/test/resources/payload_jsons/bulk_service_request_unique_names.json
index 643c104..c4f40a9 100644
--- a/vid-app-common/src/test/resources/payload_jsons/bulk_service_request_unique_names.json
+++ b/vid-app-common/src/test/resources/payload_jsons/bulk_service_request_unique_names.json
@@ -9,7 +9,7 @@
 		},
 		"owningEntity": {
 			"owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
-			"owningEntityName": "PACKET CORE"
+			"owningEntityName": "JULIO ERICKSON"
 		},
 		"project": {
 			"projectName": "{some project name}"
@@ -50,7 +50,7 @@
 							},
 							"cloudConfiguration": {
 								"lcpCloudRegionId": "mdt1",
-								"cloudOwner": "att-aic",
+								"cloudOwner": "irma-aic",
 								"tenantId": "88a6ca3ee0394ade9403f075db23167e"
 							},
 							"platform": {
diff --git a/vid-app-common/src/test/resources/payload_jsons/bulk_vnf_request.json b/vid-app-common/src/test/resources/payload_jsons/bulk_vnf_request.json
index d7b6d86..5aa0211 100644
--- a/vid-app-common/src/test/resources/payload_jsons/bulk_vnf_request.json
+++ b/vid-app-common/src/test/resources/payload_jsons/bulk_vnf_request.json
@@ -12,7 +12,7 @@
      "cloudConfiguration": {
        "lcpCloudRegionId": "mdt1",
        "tenantId": "88a6ca3ee0394ade9403f075db23167e",
-       "cloudOwner" : "att-aic"
+       "cloudOwner" : "irma-aic"
      },
      "requestInfo": {
        "instanceName": "vmxnjr001_001",
diff --git a/vid-app-common/src/test/resources/payload_jsons/bulk_vnf_request_without_instance_name.json b/vid-app-common/src/test/resources/payload_jsons/bulk_vnf_request_without_instance_name.json
index 9921de5..7322d85 100644
--- a/vid-app-common/src/test/resources/payload_jsons/bulk_vnf_request_without_instance_name.json
+++ b/vid-app-common/src/test/resources/payload_jsons/bulk_vnf_request_without_instance_name.json
@@ -12,7 +12,7 @@
     "cloudConfiguration": {
       "lcpCloudRegionId": "mdt1",
       "tenantId": "88a6ca3ee0394ade9403f075db23167e",
-      "cloudOwner": "att-aic"
+      "cloudOwner": "irma-aic"
     },
     "requestInfo": {
       "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
diff --git a/vid-app-common/src/test/resources/payload_jsons/instance_group_instantiation_request.json b/vid-app-common/src/test/resources/payload_jsons/instance_group_instantiation_request.json
index 7072d32..70e8f04 100644
--- a/vid-app-common/src/test/resources/payload_jsons/instance_group_instantiation_request.json
+++ b/vid-app-common/src/test/resources/payload_jsons/instance_group_instantiation_request.json
@@ -10,7 +10,7 @@
        "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
      },
      "requestInfo": {
-       "instanceName": "VNF_GROUP_NAME_001",
+       "instanceName": "VNF_GROUP_NAME",
        "source": "VID",
        "suppressRollback": true,
        "requestorId": "az2018"
@@ -30,7 +30,8 @@
         }
      ],
      "requestParameters": {
-           "userParams": []
+       "userParams": [],
+       "testApi" : "VNF_API"
      }
    }
  }
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/mso_request_create_configuration.json b/vid-app-common/src/test/resources/payload_jsons/mso_request_create_configuration.json
index e0942ba..c4849f0 100644
--- a/vid-app-common/src/test/resources/payload_jsons/mso_request_create_configuration.json
+++ b/vid-app-common/src/test/resources/payload_jsons/mso_request_create_configuration.json
@@ -39,7 +39,7 @@
             "modelType": "vnf",
             "modelInvariantId": "a7eac2b3-8444-40ee-92e3-b3359b32445c",
             "modelVersionId": "2a2ea15f-07c6-4b89-bfca-e8aba39a34d6",
-            "modelName": "vmmeService2",
+            "modelName": "vflorenceService2",
             "modelVersion": "1.0",
             "modelCustomizationId": "060be63d-5f9c-4fd0-8ef7-830d5e8eca17"
           }
diff --git a/vid-app-common/src/test/resources/payload_jsons/mso_service_instantiation.json b/vid-app-common/src/test/resources/payload_jsons/mso_service_instantiation.json
index 537b8d6..926c435 100644
--- a/vid-app-common/src/test/resources/payload_jsons/mso_service_instantiation.json
+++ b/vid-app-common/src/test/resources/payload_jsons/mso_service_instantiation.json
@@ -13,7 +13,7 @@
     },
     "owningEntity": {
       "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
-      "owningEntityName": "PACKET CORE"
+      "owningEntityName": "JULIO ERICKSON"
     },
     "project": {
       "projectName": "TODO"
@@ -49,7 +49,7 @@
     "modelVersion":"10.0"
   },
   "owningEntityId":"038d99af-0427-42c2-9d15-971b99b9b489",
-  "owningEntityName":"PACKET CORE",
+  "owningEntityName":"JULIO ERICKSON",
   "projectName":"{some project name}",
   "globalSubscriberId":"{some subscriber id}",
   "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
diff --git a/vid-app-common/src/test/resources/payload_jsons/networkDelete1Create1Request.json b/vid-app-common/src/test/resources/payload_jsons/networkDelete1Create1Request.json
new file mode 100644
index 0000000..cc35dca
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/networkDelete1Create1Request.json
@@ -0,0 +1,117 @@
+{
+  "action":"None",
+  "isDirty":true,
+  "vnfs":{
+
+  },
+  "instanceParams":[
+    {
+      "2017488_pasqualevpe0_ASN":"AV_vPE"
+    }
+  ],
+  "validationCounter":0,
+  "existingNames":{
+    "123":"",
+    "instancename":"",
+    "yoav":""
+  },
+  "existingVNFCounterMap":{
+
+  },
+  "existingVnfGroupCounterMap":{
+
+  },
+  "existingNetworksCounterMap":{
+    "94fdd893-4a36-4d70-b16a-ec29c54c184f":1
+  },
+  "networks":{
+    "ExtVL 0":{
+      "rollbackOnFailure":"false",
+      "productFamilyId":"36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
+      "lcpCloudRegionId":"hvf6",
+      "tenantId":"229bcdc6eaeb4ca59d55221141d01f8e",
+      "lineOfBusiness":"zzz1",
+      "platformName":"platform",
+      "originalName":"ExtVL 0",
+      "modelInfo":{
+        "modelInvariantId":"379f816b-a7aa-422f-be30-17114ff50b7c",
+        "modelVersionId":"ddc3f20c-08b5-40fd-af72-c6d14636b986",
+        "modelName":"ExtVL",
+        "modelVersion":"37.0",
+        "modelType":"network",
+        "modelCustomizationId":"94fdd893-4a36-4d70-b16a-ec29c54c184f",
+        "modelCustomizationName":"ExtVL 0"
+      },
+      "instanceName":"ExtVL 0",
+      "instanceId":"NETWORK_INSTANCE_ID",
+      "action":"None_Delete"
+    },
+    "ExtVL 0_1":{
+      "action":"Create",
+      "inMaint":false,
+      "rollbackOnFailure":"true",
+      "originalName":"ExtVL 0",
+      "isMissingData":false,
+      "trackById":"r21vcx0szoc",
+      "networkStoreKey":"ExtVL 0_1",
+      "instanceName":"ExtVL",
+      "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+      "lcpCloudRegionId":"hvf6",
+      "tenantId":"229bcdc6eaeb4ca59d55221141d01f8e",
+      "platformName":"xxx1",
+      "lineOfBusiness":"zzz1",
+      "instanceParams":[
+        {
+
+        }
+      ],
+      "modelInfo":{
+        "modelInvariantId":"379f816b-a7aa-422f-be30-17114ff50b7c",
+        "modelVersionId":"ddc3f20c-08b5-40fd-af72-c6d14636b986",
+        "modelName":"ExtVL",
+        "modelVersion":"37.0",
+        "modelCustomizationId":"94fdd893-4a36-4d70-b16a-ec29c54c184f",
+        "modelCustomizationName":"ExtVL 0",
+        "uuid":"ddc3f20c-08b5-40fd-af72-c6d14636b986",
+        "modelUniqueId":"94fdd893-4a36-4d70-b16a-ec29c54c184f"
+      },
+      "uuid":"ddc3f20c-08b5-40fd-af72-c6d14636b986"
+    }
+  },
+  "vnfGroups":{
+
+  },
+  "bulkSize":1,
+  "instanceName":"InstanceName",
+  "globalSubscriberId":"e433710f-9217-458d-a79d-1c7aff376d89",
+  "subscriptionServiceType":"TYLER SILVIA",
+  "owningEntityId":"d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+  "productFamilyId":"17cc1042-527b-11e6-beb8-9e71128cae77",
+  "lcpCloudRegionId":"AAIAIC25",
+  "tenantId":"092eb9e8e4b7412e8787dd091bc58e86",
+  "aicZoneId":"JAG1",
+  "projectName":"WATKINS",
+  "rollbackOnFailure":true,
+  "aicZoneName":"YUDFJULP-JAG1",
+  "owningEntityName":"WayneHolland",
+  "testApi":"GR_API",
+  "tenantName":"USP-SIP-IC-24335-T-01",
+  "modelInfo":{
+    "modelInvariantId":"e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+    "modelVersionId":"6b528779-44a3-4472-bdff-9cd15ec93450",
+    "modelName":"action-data",
+    "modelVersion":"1.0",
+    "uuid":"6b528779-44a3-4472-bdff-9cd15ec93450"
+  },
+  "isALaCarte":true,
+  "name":"action-data",
+  "version":"1.0",
+  "description":"",
+  "category":"",
+  "uuid":"6b528779-44a3-4472-bdff-9cd15ec93450",
+  "invariantUuid":"e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+  "serviceType":"",
+  "serviceRole":"",
+  "isMultiStepDesign":false,
+  "instanceId":"f8791436-8d55-4fde-b4d5-72dd2cf13cfb"
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/network_instantiation_request.json b/vid-app-common/src/test/resources/payload_jsons/network_instantiation_request.json
index 5a722ac..241ee07 100644
--- a/vid-app-common/src/test/resources/payload_jsons/network_instantiation_request.json
+++ b/vid-app-common/src/test/resources/payload_jsons/network_instantiation_request.json
@@ -12,10 +12,10 @@
      "cloudConfiguration": {
        "lcpCloudRegionId": "mdt1",
        "tenantId": "88a6ca3ee0394ade9403f075db23167e",
-       "cloudOwner" : "att-aic"
+       "cloudOwner" : "irma-aic"
      },
      "requestInfo": {
-       "instanceName": "vmxnjr001_001",
+       "instanceName": "vmxnjr001",
        "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
        "source": "VID",
        "suppressRollback": true,
@@ -42,7 +42,8 @@
           }
        ],
        "requestParameters": {
-             "userParams": []
+         "userParams": [],
+         "testApi" : "VNF_API"
        }
    }
  }
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/network_instantiation_request_without_instance_name.json b/vid-app-common/src/test/resources/payload_jsons/network_instantiation_request_without_instance_name.json
index db55736..8b69e0b 100644
--- a/vid-app-common/src/test/resources/payload_jsons/network_instantiation_request_without_instance_name.json
+++ b/vid-app-common/src/test/resources/payload_jsons/network_instantiation_request_without_instance_name.json
@@ -12,7 +12,7 @@
      "cloudConfiguration": {
        "lcpCloudRegionId": "mdt1",
        "tenantId": "88a6ca3ee0394ade9403f075db23167e",
-       "cloudOwner" : "att-aic"
+       "cloudOwner" : "irma-aic"
      },
      "requestInfo": {
        "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
@@ -41,7 +41,8 @@
           }
        ],
        "requestParameters": {
-             "userParams": []
+         "userParams": [],
+         "testApi" : "VNF_API"
        }
    }
  }
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/pre_1806_macro_service_instantiation_request.json b/vid-app-common/src/test/resources/payload_jsons/pre_1806_macro_service_instantiation_request.json
new file mode 100644
index 0000000..9923230
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/pre_1806_macro_service_instantiation_request.json
@@ -0,0 +1,47 @@
+{
+	"requestDetails": {
+		"modelInfo": {
+			"modelType": "service",
+			"modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+			"modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+			"modelName": "sriov",
+			"modelVersion": "1.0"
+		},
+		"cloudConfiguration": {
+			"cloudOwner": "irma-aic",
+			"lcpCloudRegionId": "mdt1",
+			"tenantId": "88a6ca3ee0394ade9403f075db23167e"
+		},
+		"owningEntity": {
+			"owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+			"owningEntityName": "JULIO ERICKSON"
+		},
+		"project": {
+			"projectName": "some_project_name"
+		},
+		"subscriberInfo": {
+			"globalSubscriberId": "some_subscriber_id",
+			"subscriberName": "some_subscriber_name"
+		},
+		"requestInfo": {
+			"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+			"source": "VID",
+			"suppressRollback": true,
+			"requestorId": "az2016"
+		},
+		"requestParameters": {
+			"subscriptionServiceType": "MOG",
+			"aLaCarte": false,
+			"userParams": [
+				{
+					"name": "someUserParam",
+					"value": "someValue"
+				},
+				{
+					"name": "anotherUserParam",
+					"value": "anotherValue"
+				}
+			]
+		}
+	}
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/pre_1806_macro_without_cloudConfiguration.json b/vid-app-common/src/test/resources/payload_jsons/pre_1806_macro_without_cloudConfiguration.json
new file mode 100644
index 0000000..472ccc9
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/pre_1806_macro_without_cloudConfiguration.json
@@ -0,0 +1,42 @@
+{
+	"requestDetails": {
+		"modelInfo": {
+			"modelType": "service",
+			"modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+			"modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+			"modelName": "sriov",
+			"modelVersion": "1.0"
+		},
+		"owningEntity": {
+			"owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+			"owningEntityName": "JULIO ERICKSON"
+		},
+		"project": {
+			"projectName": "some_project_name"
+		},
+		"subscriberInfo": {
+			"globalSubscriberId": "some_subscriber_id",
+			"subscriberName": "some_subscriber_name"
+		},
+		"requestInfo": {
+			"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+			"source": "VID",
+			"suppressRollback": true,
+			"requestorId": "az2016"
+		},
+		"requestParameters": {
+			"subscriptionServiceType": "MOG",
+			"aLaCarte": false,
+			"userParams": [
+				{
+					"name": "someUserParam",
+					"value": "someValue"
+				},
+				{
+					"name": "anotherUserParam",
+					"value": "anotherValue"
+				}
+			]
+		}
+	}
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/resume/feRequestResumeMacroService.json b/vid-app-common/src/test/resources/payload_jsons/resume/feRequestResumeMacroService.json
new file mode 100644
index 0000000..c2c84dc
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/resume/feRequestResumeMacroService.json
@@ -0,0 +1,107 @@
+{
+  "isDirty": false,
+  "instanceParams": [],
+  "existingNames": {
+    "ncmvlansvcym161f_77": ""
+  },
+  "vidNotions": {
+    "instantiationType": "Macro",
+    "instantiationUI": "serviceWithCollectionResource",
+    "modelCategory": "other",
+    "viewEditUI": "serviceWithCollectionResource"
+  },
+  "bulkSize": 1,
+  "action": "Resume",
+  "instanceName": "NcmVlanSvcYm161f_77",
+  "instanceId": "a565e6ad-75d1-4493-98f1-33234b5c17e2",
+  "orchStatus": "Assigned",
+  "productFamilyId": null,
+  "lcpCloudRegionId": null,
+  "tenantId": null,
+  "cloudOwner": null,
+  "modelInfo": {
+    "modelInvariantId": "f6342be5-d66b-4d03-a1aa-c82c3094c4ea",
+    "modelVersionId": "6e0bec91-09f3-43aa-9cf3-e617cd0146be",
+    "modelName": "NCM_VLAN_SVC_ym161f",
+    "modelType": "service",
+    "modelVersion": "8.0"
+  },
+  "globalSubscriberId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+  "subscriptionServiceType": "Emanuel",
+  "owningEntityId": null,
+  "owningEntityName": null,
+  "tenantName": null,
+  "aicZoneId": null,
+  "aicZoneName": null,
+  "projectName": null,
+  "rollbackOnFailure": false,
+  "isALaCarte": false,
+  "vnfs": {},
+  "vrfs": {},
+  "networks": {},
+  "vnfGroups": {},
+  "validationCounter": 0,
+  "existingVNFCounterMap": {},
+  "existingVRFCounterMap": {},
+  "existingNetworksCounterMap": {},
+  "existingVnfGroupCounterMap": {},
+  "collectionResources": {
+    "84a351ae-3601-45e2-98df-878d6c816abc": {
+      "action": "None",
+      "instanceName": "NcmVlanSvcYm161f_77_vTSBC Customer Landing Network Collection",
+      "instanceId": "84a351ae-3601-45e2-98df-878d6c816abc",
+      "orchStatus": "Active",
+      "productFamilyId": null,
+      "lcpCloudRegionId": null,
+      "tenantId": null,
+      "cloudOwner": null,
+      "modelInfo": {
+        "modelInvariantId": "081ceb56-eb71-4566-a72d-3e7cbee5cdf1",
+        "modelVersionId": "ce8c98bc-4691-44fb-8ff0-7a47487c11c4",
+        "modelName": "NCM_VLAN_ym161f",
+        "modelType": "collection",
+        "modelVersion": "5.0"
+      },
+      "instanceType": null,
+      "provStatus": null,
+      "inMaint": false,
+      "uuid": "ce8c98bc-4691-44fb-8ff0-7a47487c11c4",
+      "originalName": "NCM_VLAN_ym161f 0",
+      "legacyRegion": null,
+      "lineOfBusiness": null,
+      "platformName": null,
+      "trackById": "84a351ae-3601-45e2-98df-878d6c816abc",
+      "ncfs": {
+        "6b3536cf-3a12-457f-abb5-fa2203e0d923": {
+          "action": "None",
+          "instanceName": "NcmVlanSvcYm161f_77_vTSBC Customer Landing Network Collection",
+          "instanceId": "6b3536cf-3a12-457f-abb5-fa2203e0d923",
+          "orchStatus": null,
+          "productFamilyId": null,
+          "lcpCloudRegionId": null,
+          "tenantId": null,
+          "cloudOwner": null,
+          "modelInfo": {
+            "modelInvariantId": "868b109c-9481-4a18-891b-af974db7705a",
+            "modelVersionId": "dd182d7d-6949-4b90-b3cc-5befe400742e",
+            "modelName": "ncm_vlan_ym161f..NetworkCollection..0",
+            "modelType": "instanceGroup",
+            "modelVersion": "1"
+          },
+          "instanceType": "L3-NETWORK",
+          "provStatus": null,
+          "inMaint": false,
+          "uuid": "dd182d7d-6949-4b90-b3cc-5befe400742e",
+          "originalName": "ncm_vlan_ym161f..NetworkCollection..0",
+          "legacyRegion": null,
+          "lineOfBusiness": null,
+          "platformName": null,
+          "trackById": "6b3536cf-3a12-457f-abb5-fa2203e0d923",
+          "instanceGroupRole": "SUB_INTERFACE",
+          "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+          "numberOfNetworks": 1
+        }
+      }
+    }
+  }
+}
diff --git a/vid-app-common/src/test/resources/payload_jsons/resume/msoResponseGetRequestsOfServiceInstance.json b/vid-app-common/src/test/resources/payload_jsons/resume/msoResponseGetRequestsOfServiceInstance.json
new file mode 100644
index 0000000..cb49dd8
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/resume/msoResponseGetRequestsOfServiceInstance.json
@@ -0,0 +1,62 @@
+{
+  "requestList": [
+    {
+      "request": {
+        "requestId": "894089b8-f7f4-418d-81da-34186fd32670",
+        "startTime": "Wed, 10 Oct 2018 08:01:21 GMT",
+        "finishTime": "Wed, 10 Oct 2018 08:01:43 GMT",
+        "requestScope": "service",
+        "requestType": "createInstance",
+        "requestDetails": {
+          "modelInfo": {
+            "modelInvariantId": "f6342be5-d66b-4d03-a1aa-c82c3094c4ea",
+            "modelType": "service",
+            "modelName": "NCM_VLAN_SVC_ym161f",
+            "modelVersion": "8.0",
+            "modelVersionId": "6e0bec91-09f3-43aa-9cf3-e617cd0146be",
+            "modelUuid": "6e0bec91-09f3-43aa-9cf3-e617cd0146be",
+            "modelInvariantUuid": "f6342be5-d66b-4d03-a1aa-c82c3094c4ea"
+          },
+          "requestInfo": {
+            "productFamilyId": "db171b8f-115c-4992-a2e3-ee04cae357e0",
+            "source": "VID",
+            "suppressRollback": false,
+            "requestorId": "cs0554"
+          },
+          "subscriberInfo": {
+            "globalSubscriberId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+          },
+          "cloudConfiguration": {
+            "tenantId": "d3b49834f7164cbe831bfbfa35ef649b",
+            "cloudOwner": "irma-aic",
+            "lcpCloudRegionId": "Two"
+          },
+          "requestParameters": {
+            "subscriptionServiceType": "Emanuel",
+            "userParams": [
+              {
+                "name": "aic_zone",
+                "value": "TTL58"
+              }
+            ],
+            "aLaCarte": false
+          },
+          "owningEntity": {
+            "owningEntityId": "e4257a94-21cc-40c5-adc9-e6f4ff868e31",
+            "owningEntityName": "EMANUEL-CORE"
+          }
+        },
+        "instanceReferences": {
+          "serviceInstanceId": "a565e6ad-75d1-4493-98f1-33234b5c17e2",
+          "requestorId": "cs0554"
+        },
+        "requestStatus": {
+          "requestState": "FAILED",
+          "statusMessage": "STATUS: Macro-Service-createInstance request was executed correctly.",
+          "percentProgress": 100,
+          "timestamp": "Wed, 10 Oct 2018 08:01:43 GMT"
+        }
+      }
+    }
+  ]
+}
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfModuleDelete1Create1None1Request.json b/vid-app-common/src/test/resources/payload_jsons/vfModuleDelete1Create1None1Request.json
new file mode 100644
index 0000000..642c2aa
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/vfModuleDelete1Create1None1Request.json
@@ -0,0 +1,139 @@
+{
+  "action": "None",
+  "isDirty": true,
+  "vnfs": {
+    "2017-488_PASQUALE-vPE 0": {
+      "vfModules": {
+        "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0": {
+          "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0uvfot": {
+            "instanceName": "VFinstancenameZERO",
+            "instanceId": "VF_MODULE_INSTANCE_ID",
+            "action": "Create",
+            "lcpCloudRegionId": "AAIAIC25",
+            "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+            "modelInfo": {
+              "modelInvariantId": "b34833bb-6aa9-4ad6-a831-70b06367a091",
+              "modelVersionId": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+              "modelName": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0",
+              "modelVersion": "5",
+              "modelCustomizationId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3",
+              "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0",
+              "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+            },
+            "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+            "provStatus": "Prov Status",
+            "orchStatus": "Active",
+            "inMaint": true
+          }
+        },
+        "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1": {
+          "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1fshmc": {
+            "instanceName": "VFinstancename",
+            "instanceId": "VF_MODULE_INSTANCE_ID",
+            "action": "None_Delete",
+            "volumeGroupName": "VFinstancename_vol_abc",
+            "orchStatus": "Create",
+            "provStatus": "Prov Status",
+            "inMaint": false,
+            "lcpCloudRegionId": "AAIAIC25",
+            "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+            "modelInfo": {
+              "modelInvariantId": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+              "modelVersionId": "25284168-24bb-4698-8cb4-3f509146eca5",
+              "modelName": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
+              "modelVersion": "6",
+              "modelCustomizationId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401",
+              "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
+              "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+            },
+            "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+          }
+        },
+        "2017588_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-2": {
+          "2017588_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-2frgth": {
+            "instanceName": "VFinstancename",
+            "instanceId": "VF_MODULE_INSTANCE_ID1",
+            "action": "None",
+            "volumeGroupName": "VFinstancename_vol_abc",
+            "orchStatus": "Create",
+            "provStatus": "Prov Status",
+            "inMaint": false,
+            "lcpCloudRegionId": "AAIAIC25",
+            "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+            "modelInfo": {
+              "modelInvariantId": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+              "modelVersionId": "25284168-24bb-4698-8cb4-3f509146eca5",
+              "modelName": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
+              "modelVersion": "6",
+              "modelCustomizationId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401",
+              "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
+              "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+            },
+            "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+          }
+        }
+      },
+      "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+      "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+      "lcpCloudRegionId": "AAIAIC25",
+      "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+      "lineOfBusiness": "ONAP",
+      "platformName": "platform",
+      "modelInfo": {
+        "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+        "modelVersionId": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+        "modelName": "2017-488_PASQUALE-vPE",
+        "modelVersion": "5.0",
+        "modelCustomizationId": "1da7b585-5e61-4993-b95e-8e6606c81e45",
+        "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
+        "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
+      },
+      "orchStatus": "Created",
+      "inMaint": false,
+      "instanceId": "VNF_INSTANCE_ID",
+      "instanceName": "2017488_PASQUALEvPEVNFinstancename",
+      "action": "None",
+      "legacyRegion": "some legacy region"
+    }
+  },
+  "instanceParams": [],
+  "validationCounter": 0,
+  "existingNames": {
+    "mcankinstancename": ""
+  },
+  "existingVNFCounterMap": {
+    "afacccf6-397d-45d6-b5ae-94c39734b168": 1,
+    "69e09f68-8b63-4cc9-b9ff-860960b5db09": 3,
+    "b3c76f73-eeb5-4fb6-9d31-72a889f1811c": 1
+  },
+  "existingVnfGroupCounterMap": {},
+  "existingNetworksCounterMap": {},
+  "networks": {},
+  "vnfGroups": {},
+  "bulkSize": 1,
+  "instanceId": "f8791436-8d55-4fde-b4d5-72dd2cf13cfb",
+  "instanceName": "mCaNkinstancename",
+  "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+  "subscriptionServiceType": "TYLER SILVIA",
+  "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+  "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+  "lcpCloudRegionId": "hvf6",
+  "tenantId": "bae71557c5bb4d5aac6743a4e5f1d054",
+  "aicZoneId": "NFT1",
+  "projectName": "WATKINS",
+  "rollbackOnFailure": true,
+  "aicZoneName": "NFTJSSSS-NFT1",
+  "owningEntityName": "WayneHolland",
+  "tenantName": "AIN Web Tool-15-D-testalexandria",
+  "modelInfo": {
+    "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+    "modelVersionId": "6b528779-44a3-4472-bdff-9cd15ec93450",
+    "modelName": "action-data",
+    "modelVersion": "1.0",
+    "uuid": "6b528779-44a3-4472-bdff-9cd15ec93450"
+  },
+  "isALaCarte": true,
+  "orchStatus": "Active",
+  "modelInavariantId": "6b528779-44a3-4472-bdff-9cd15ec93450",
+  "testApi": "VNF_API"
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule.json b/vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule.json
new file mode 100644
index 0000000..c3ab694
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule.json
@@ -0,0 +1,52 @@
+{
+  "requestDetails": {
+    "requestInfo": {
+      "source": "VID",
+      "requestorId": "az2016",
+      "instanceName": "replace_module",
+      "suppressRollback": false
+    },
+    "relatedInstanceList": [{
+      "relatedInstance": {
+        "instanceId": "e9993045-cc96-4f3f-bf9a-71b2a400a956",
+        "modelInfo": {
+          "modelVersionId": "bad955c3-29b2-4a27-932e-28e942cc6480",
+          "modelVersion": "1",
+          "modelName": "Vf zolson5bpxmc02092017-Service",
+          "modelInvariantId": "b16a9398-ffa3-4041-b78c-2956b8ad9c7b",
+          "modelType": "service"
+        }
+      }
+    }, {
+      "relatedInstance": {
+        "instanceId": "5c9c2896-1fe6-4055-b7ec-d0a01e5f9bf5",
+        "modelInfo": {
+          "modelName": "Vf zolson5bpxmc02092017-VF",
+          "modelVersion": "1",
+          "modelInvariantId": "23122c9b-dd7f-483f-bf0a-e069303db2f7",
+          "modelType": "vnf",
+          "modelCustomizationName": "Vf zolson5bpxmc02092017-VF 0",
+          "modelVersionId": "d326f424-2312-4dd6-b7fe-364fadbd1ef5",
+          "modelCustomizationId": "96c23a4a-6887-4b2c-9cce-1e4ea35eaade"
+        }
+      }
+    }],
+    "requestParameters": {
+      "userParams": [],
+      "testApi": "GR_API"
+    },
+    "modelInfo": {
+      "modelName": "VfZrdm5bpxmc02092017Vf..CORNELIUS_base..module-0",
+      "modelVersion": "1",
+      "modelInvariantId": "f7a867f2-596b-4f4a-a128-421e825a6190",
+      "modelType": "vfModule",
+      "modelVersionId": "eb5de6fb-9ecf-4009-b922-fae3a9ae7d46",
+      "modelCustomizationId": "074c64d0-7e13-4bcc-8bdb-ea922331102d"
+    },
+    "cloudConfiguration": {
+      "cloudOwner": "irma-aic",
+      "tenantId": "0422ffb57ba042c0800a29dc85ca70f8",
+      "lcpCloudRegionId": "regionOne"
+    }
+  }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule_fe_input.json b/vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule_fe_input.json
new file mode 100644
index 0000000..92ccfe5
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule_fe_input.json
@@ -0,0 +1,92 @@
+{
+  "action": "None",
+  "isDirty": true,
+  "vnfs": {
+    "Vf zolson5bpxmc02092017-VF 0": {
+      "vfModules": {
+        "VfZrdm5bpxmc02092017Vf..CORNELIUS_base..module-0": {
+          "VfZrdm5bpxmc02092017Vf..CORNELIUS_base..module-0-?": {
+            "instanceName": "replace_module",
+            "instanceId": "5d49c3b1-fc90-4762-8c98-e800170baa55",
+            "action": "Replace",
+            "orchStatus": "Create",
+            "provStatus": "Prov Status",
+            "inMaint": false,
+            "rollbackOnFailure": true,
+            "lcpCloudRegionId": "regionOne",
+            "tenantId": "0422ffb57ba042c0800a29dc85ca70f8",
+            "modelInfo": {
+              "modelInvariantId": "f7a867f2-596b-4f4a-a128-421e825a6190",
+              "modelVersionId": "eb5de6fb-9ecf-4009-b922-fae3a9ae7d46",
+              "modelName": "VfZrdm5bpxmc02092017Vf..CORNELIUS_base..module-0",
+              "modelVersion": "1",
+              "modelCustomizationId": "074c64d0-7e13-4bcc-8bdb-ea922331102d",
+              "uuid": "eb5de6fb-9ecf-4009-b922-fae3a9ae7d46"
+            },
+            "uuid": "eb5de6fb-9ecf-4009-b922-fae3a9ae7d46"
+          }
+        }
+      },
+      "uuid": "d326f424-2312-4dd6-b7fe-364fadbd1ef5",
+      "productFamilyId": "bad955c3-29b2-4a27-932e-28e942cc6480",
+      "lcpCloudRegionId": "regionOne",
+      "tenantId": "0422ffb57ba042c0800a29dc85ca70f8",
+      "lineOfBusiness": "ONAP",
+      "platformName": "platform",
+      "modelInfo": {
+        "modelInvariantId": "23122c9b-dd7f-483f-bf0a-e069303db2f7",
+        "modelVersionId": "d326f424-2312-4dd6-b7fe-364fadbd1ef5",
+        "modelName": "Vf zolson5bpxmc02092017-VF",
+        "modelVersion": "1",
+        "modelCustomizationId": "96c23a4a-6887-4b2c-9cce-1e4ea35eaade",
+        "modelCustomizationName": "Vf zolson5bpxmc02092017-VF 0",
+        "uuid": "d326f424-2312-4dd6-b7fe-364fadbd1ef5"
+      },
+      "orchStatus": "Created",
+      "inMaint": false,
+      "rollbackOnFailure": true,
+      "instanceId": "5c9c2896-1fe6-4055-b7ec-d0a01e5f9bf5",
+      "instanceName": "vnf_of_replace_module",
+      "action": "None",
+      "legacyRegion": "some legacy region"
+    }
+  },
+  "instanceParams": [],
+  "validationCounter": 0,
+  "existingNames": {
+    "mcankinstancename": ""
+  },
+  "existingVNFCounterMap": {
+    "d326f424-2312-4dd6-b7fe-364fadbd1ef5": 1
+  },
+  "existingVnfGroupCounterMap": {},
+  "existingNetworksCounterMap": {},
+  "networks": {},
+  "vnfGroups": {},
+  "bulkSize": 1,
+  "instanceId": "e9993045-cc96-4f3f-bf9a-71b2a400a956",
+  "instanceName": "service_of_replace_module",
+  "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+  "subscriptionServiceType": "TYLER SILVIA",
+  "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+  "productFamilyId": "bad955c3-29b2-4a27-932e-28e942cc6480",
+  "lcpCloudRegionId": "regionOne",
+  "tenantId": "0422ffb57ba042c0800a29dc85ca70f8",
+  "aicZoneId": "NFT1",
+  "projectName": "WATKINS",
+  "rollbackOnFailure": true,
+  "aicZoneName": "NFTJSSSS-NFT1",
+  "owningEntityName": "WayneHolland",
+  "tenantName": "tenant_name",
+  "modelInfo": {
+    "modelInvariantId": "b16a9398-ffa3-4041-b78c-2956b8ad9c7b",
+    "modelVersionId": "bad955c3-29b2-4a27-932e-28e942cc6480",
+    "modelName": "Vf zolson5bpxmc02092017-Service",
+    "modelVersion": "1",
+    "uuid": "bad955c3-29b2-4a27-932e-28e942cc6480"
+  },
+  "isALaCarte": true,
+  "orchStatus": "Active",
+  "modelInavariantId": "b16a9398-ffa3-4041-b78c-2956b8ad9c7b",
+  "testApi": "GR_API"
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfmodule_instantiation_request.json b/vid-app-common/src/test/resources/payload_jsons/vfmodule_instantiation_request.json
index 92f837f..1bce760 100644
--- a/vid-app-common/src/test/resources/payload_jsons/vfmodule_instantiation_request.json
+++ b/vid-app-common/src/test/resources/payload_jsons/vfmodule_instantiation_request.json
@@ -12,7 +12,7 @@
     "cloudConfiguration": {
       "lcpCloudRegionId": "mdt1",
       "tenantId": "88a6ca3ee0394ade9403f075db23167e",
-      "cloudOwner" : "att-aic"
+      "cloudOwner" : "irma-aic"
     },
     "requestInfo": {
       "instanceName": "vmxnjr001_AVPN_base_vRE_BV_expansion",
@@ -63,7 +63,8 @@
         "vre_a_volume_size_0" : "100",
         "vmx_int_net_len" : "24",
         "availability_zone_0": "mtpocdv-kvm-az01"
-      }]
+      }],
+      "testApi" : "VNF_API"
     }
   }
 }
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfmodule_instantiation_request_without_instance_name.json b/vid-app-common/src/test/resources/payload_jsons/vfmodule_instantiation_request_without_instance_name.json
index 82df5b9..1c0d2b9 100644
--- a/vid-app-common/src/test/resources/payload_jsons/vfmodule_instantiation_request_without_instance_name.json
+++ b/vid-app-common/src/test/resources/payload_jsons/vfmodule_instantiation_request_without_instance_name.json
@@ -12,7 +12,7 @@
     "cloudConfiguration": {
       "lcpCloudRegionId": "mdt1",
       "tenantId": "88a6ca3ee0394ade9403f075db23167e",
-      "cloudOwner" : "att-aic"
+      "cloudOwner" : "irma-aic"
     },
     "requestInfo": {
       "source": "VID",
@@ -53,7 +53,8 @@
         "vre_a_volume_size_0" : "100",
         "vmx_int_net_len" : "24",
         "availability_zone_0": "mtpocdv-kvm-az01"
-      }]
+      }],
+      "testApi" : "VNF_API"
     }
   }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfmodule_instantiation_request_without_volume_group.json b/vid-app-common/src/test/resources/payload_jsons/vfmodule_instantiation_request_without_volume_group.json
index cfa4c26..3581a47 100644
--- a/vid-app-common/src/test/resources/payload_jsons/vfmodule_instantiation_request_without_volume_group.json
+++ b/vid-app-common/src/test/resources/payload_jsons/vfmodule_instantiation_request_without_volume_group.json
@@ -12,7 +12,7 @@
     "cloudConfiguration": {
       "lcpCloudRegionId": "mdt1",
       "tenantId": "88a6ca3ee0394ade9403f075db23167e",
-      "cloudOwner" : "att-aic"
+      "cloudOwner" : "irma-aic"
     },
     "requestInfo": {
       "instanceName": "vmxnjr001_AVPN_base_vRE_BV_expansion",
@@ -54,7 +54,8 @@
         "vre_a_volume_size_0" : "100",
         "vmx_int_net_len" : "24",
         "availability_zone_0": "mtpocdv-kvm-az01"
-      }]
+      }],
+      "testApi" : "VNF_API"
     }
   }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/vnf/bulk_vnf_request.json b/vid-app-common/src/test/resources/payload_jsons/vnf/bulk_vnf_request.json
new file mode 100644
index 0000000..1ae0406
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/vnf/bulk_vnf_request.json
@@ -0,0 +1,49 @@
+ {
+   "requestDetails": {
+     "modelInfo": {
+       "modelType": "vnf",
+       "modelInvariantId": "11111111-f63c-463e-ba94-286933b895f9",
+       "modelVersionId": "7f40c192-f63c-463e-ba94-286933b895f8",
+       "modelName": "2016-73_MOW-AVPN-vPE-BV-L",
+       "modelVersion": "10.0",
+       "modelCustomizationName": "2016-73_MOW-AVPN-vPE-BV-L 0",
+       "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+     },
+     "cloudConfiguration": {
+       "lcpCloudRegionId": "mdt1",
+       "tenantId": "88a6ca3ee0394ade9403f075db23167e",
+       "cloudOwner" : "irma-aic"
+     },
+     "requestInfo": {
+       "instanceName": "vmxnjr001",
+       "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+       "source": "VID",
+       "suppressRollback": true,
+       "requestorId": "pa0916"
+     },
+     "platform": {
+       "platformName": "platformName"
+     },
+     "lineOfBusiness": {
+       "lineOfBusinessName": "lineOfBusinessName"
+     },
+       "relatedInstanceList": [
+          {
+             "relatedInstance": {
+                "instanceId": "aa3514e3-5a33-55df-13ab-12abad84e7aa",
+                "modelInfo": {
+                   "modelType": "service",
+                   "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+                   "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+                   "modelName": "sriov",
+                   "modelVersion": "1.0"
+                }
+             }
+          }
+       ],
+       "requestParameters": {
+          "userParams": [],
+          "testApi" : "VNF_API"
+       }
+   }
+ }
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/vnf/bulk_vnf_request_without_cloud_owner.json b/vid-app-common/src/test/resources/payload_jsons/vnf/bulk_vnf_request_without_cloud_owner.json
new file mode 100644
index 0000000..1916964
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/vnf/bulk_vnf_request_without_cloud_owner.json
@@ -0,0 +1,48 @@
+ {
+   "requestDetails": {
+     "modelInfo": {
+       "modelType": "vnf",
+       "modelInvariantId": "11111111-f63c-463e-ba94-286933b895f9",
+       "modelVersionId": "7f40c192-f63c-463e-ba94-286933b895f8",
+       "modelName": "2016-73_MOW-AVPN-vPE-BV-L",
+       "modelVersion": "10.0",
+       "modelCustomizationName": "2016-73_MOW-AVPN-vPE-BV-L 0",
+       "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+     },
+     "cloudConfiguration": {
+       "lcpCloudRegionId": "mdt1",
+       "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+     },
+     "requestInfo": {
+       "instanceName": "vmxnjr001",
+       "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+       "source": "VID",
+       "suppressRollback": true,
+       "requestorId": "pa0916"
+     },
+     "platform": {
+       "platformName": "platformName"
+     },
+     "lineOfBusiness": {
+       "lineOfBusinessName": "lineOfBusinessName"
+     },
+       "relatedInstanceList": [
+          {
+             "relatedInstance": {
+                "instanceId": "aa3514e3-5a33-55df-13ab-12abad84e7aa",
+                "modelInfo": {
+                   "modelType": "service",
+                   "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+                   "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+                   "modelName": "sriov",
+                   "modelVersion": "1.0"
+                }
+             }
+          }
+       ],
+       "requestParameters": {
+         "userParams": [],
+         "testApi" : "VNF_API"
+       }
+   }
+ }
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/vnf/bulk_vnf_request_without_instance_name.json b/vid-app-common/src/test/resources/payload_jsons/vnf/bulk_vnf_request_without_instance_name.json
new file mode 100644
index 0000000..3b59e6d
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/vnf/bulk_vnf_request_without_instance_name.json
@@ -0,0 +1,48 @@
+{
+  "requestDetails": {
+    "modelInfo": {
+      "modelType": "vnf",
+      "modelInvariantId": "11111111-f63c-463e-ba94-286933b895f9",
+      "modelVersionId": "7f40c192-f63c-463e-ba94-286933b895f8",
+      "modelName": "2016-73_MOW-AVPN-vPE-BV-L",
+      "modelVersion": "10.0",
+      "modelCustomizationName": "2016-73_MOW-AVPN-vPE-BV-L 0",
+      "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+    },
+    "cloudConfiguration": {
+      "lcpCloudRegionId": "mdt1",
+      "tenantId": "88a6ca3ee0394ade9403f075db23167e",
+      "cloudOwner": "irma-aic"
+    },
+    "requestInfo": {
+      "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+      "source": "VID",
+      "suppressRollback": true,
+      "requestorId": "pa0916"
+    },
+    "platform": {
+      "platformName": "platformName"
+    },
+    "lineOfBusiness": {
+      "lineOfBusinessName": "lineOfBusinessName"
+    },
+    "relatedInstanceList": [
+      {
+        "relatedInstance": {
+          "instanceId": "aa3514e3-5a33-55df-13ab-12abad84e7aa",
+          "modelInfo": {
+            "modelType": "service",
+            "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+            "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+            "modelName": "sriov",
+            "modelVersion": "1.0"
+          }
+        }
+      }
+    ],
+    "requestParameters": {
+      "userParams": [],
+      "testApi" : "VNF_API"
+    }
+  }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/vnf/vnf_without_lob_expected.json b/vid-app-common/src/test/resources/payload_jsons/vnf/vnf_without_lob_expected.json
new file mode 100644
index 0000000..11c5dcb
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/vnf/vnf_without_lob_expected.json
@@ -0,0 +1,46 @@
+{
+  "requestDetails": {
+    "modelInfo": {
+      "modelCustomizationName": "xbi test VID noFC HEAT 0",
+      "modelCustomizationId": "e9745411-1f7d-47e3-9857-47363cb9ff92",
+      "modelInvariantId": "77d3a011-affb-4166-89b2-c4be7bc4ff23",
+      "modelVersionId": "9bb0edd9-3631-455b-bdfd-979b2ab53d07",
+      "modelName": "xbi test VID noFC HEAT",
+      "modelType": "vnf",
+      "modelVersion": "1.0"
+    },
+    "cloudConfiguration": {
+      "lcpCloudRegionId": "olson52b",
+      "tenantId": "bbf14e449c954feea272e926a8c2b244",
+      "cloudOwner" : "irma-aic"
+    },
+    "requestInfo": {
+      "instanceName": "zolson52bfrwl01",
+      "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+      "source": "VID",
+      "suppressRollback": false,
+      "requestorId": "pa0916"
+    },
+    "platform": {
+      "platformName": "NETWORK-CLOUD"
+    },
+    "relatedInstanceList": [
+      {
+        "relatedInstance": {
+          "instanceId": "aa3514e3-5a33-55df-13ab-12abad84e7aa",
+          "modelInfo": {
+            "modelType": "service",
+            "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+            "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+            "modelName": "sriov",
+            "modelVersion": "1.0"
+          }
+        }
+      }
+    ],
+    "requestParameters": {
+      "userParams": [],
+      "testApi": "VNF_API"
+    }
+  }
+}
diff --git a/vid-app-common/src/test/resources/payload_jsons/vnf/vnf_without_lob_user_input.json b/vid-app-common/src/test/resources/payload_jsons/vnf/vnf_without_lob_user_input.json
new file mode 100644
index 0000000..60be0d1
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/vnf/vnf_without_lob_user_input.json
@@ -0,0 +1,24 @@
+{
+  "modelInfo": {
+    "modelCustomizationName": "xbi test VID noFC HEAT 0",
+    "modelCustomizationId": "e9745411-1f7d-47e3-9857-47363cb9ff92",
+    "modelInvariantId": "77d3a011-affb-4166-89b2-c4be7bc4ff23",
+    "modelVersionId": "9bb0edd9-3631-455b-bdfd-979b2ab53d07",
+    "modelName": "xbi test VID noFC HEAT",
+    "modelType": "vnf",
+    "modelVersion": "1.0"
+  },
+  "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+  "instanceName": "zolson52bfrwl01",
+  "action": "Create",
+  "platformName": "NETWORK-CLOUD",
+  "lcpCloudRegionId": "olson52b",
+  "tenantId": "bbf14e449c954feea272e926a8c2b244",
+  "instanceParams": [{}],
+  "rollbackOnFailure": true,
+  "instanceId": null,
+  "vfModules": {},
+  "trackById": "449206d5-54a6-441f-b5c2-beacb2f2e1cc",
+  "isFailed": false,
+  "lineOfBusiness": null
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/vnfDelete1Create1Request.json b/vid-app-common/src/test/resources/payload_jsons/vnfDelete1Create1Request.json
new file mode 100644
index 0000000..5cf7973
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/vnfDelete1Create1Request.json
@@ -0,0 +1,240 @@
+{
+  "action": "None",
+  "isDirty": true,
+  "vnfs": {
+    "2017-388_PASQUALE-vPE 0": {
+      "vfModules": {},
+      "uuid": "afacccf6-397d-45d6-b5ae-94c39734b168",
+      "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+      "lcpCloudRegionId": "AAIAIC25",
+      "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+      "lineOfBusiness": "ONAP",
+      "platformName": "platform",
+      "modelInfo": {
+        "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+        "modelVersionId": "afacccf6-397d-45d6-b5ae-94c39734b168",
+        "modelName": "2017-388_PASQUALE-vPE",
+        "modelVersion": "4.0",
+        "modelCustomizationId": "b3c76f73-eeb5-4fb6-9d31-72a889f1811c",
+        "modelCustomizationName": "2017-388_PASQUALE-vPE 0",
+        "uuid": "afacccf6-397d-45d6-b5ae-94c39734b168"
+      },
+      "instanceName": "2017388_PASQUALEvPEmCaNkinstanceName",
+      "action": "None",
+      "legacyRegion": "some legacy region"
+    },
+    "2017-488_PASQUALE-vPE 0": {
+      "vfModules": {},
+      "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+      "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+      "lcpCloudRegionId": "AAIAIC25",
+      "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+      "lineOfBusiness": "ONAP",
+      "platformName": "platform",
+      "modelInfo": {
+        "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+        "modelVersionId": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+        "modelName": "2017-488_PASQUALE-vPE",
+        "modelVersion": "5.0",
+        "modelCustomizationId": "1da7b585-5e61-4993-b95e-8e6606c81e45",
+        "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
+        "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
+      },
+      "orchStatus": "Created",
+      "inMaint": false,
+      "instanceId": "VNF_INSTANCE_ID",
+      "instanceName": "2017488_PASQUALEvPEVNFinstancename",
+      "action": "None_Delete",
+      "legacyRegion": "some legacy region"
+    },
+    "2017-488_PASQUALE-vPE 0:0001": {
+      "vfModules": {
+        "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0": {
+          "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0uvfot": {
+            "instanceName": "VFinstancenameZERO_001",
+            "action": "None",
+            "provStatus": "Prov Status",
+            "inMaint": true,
+            "modelInfo": {
+              "modelInvariantId": "b34833bb-6aa9-4ad6-a831-70b06367a091",
+              "modelVersionId": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+              "modelName": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0",
+              "modelVersion": "5",
+              "modelCustomizationId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3",
+              "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0",
+              "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+            },
+            "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+          }
+        },
+        "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1": {
+          "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1fshmc": {
+            "instanceName": "VFinstancename_001",
+            "action": "None",
+            "volumeGroupName": "VFinstancename_vol_abc_001",
+            "modelInfo": {
+              "modelInvariantId": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+              "modelVersionId": "25284168-24bb-4698-8cb4-3f509146eca5",
+              "modelName": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
+              "modelVersion": "6",
+              "modelCustomizationId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401",
+              "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
+              "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+            },
+            "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+          }
+        }
+      },
+      "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+      "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+      "lcpCloudRegionId": "AAIAIC25",
+      "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+      "lineOfBusiness": "ONAP",
+      "platformName": "platform",
+      "modelInfo": {
+        "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+        "modelVersionId": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+        "modelName": "2017-488_PASQUALE-vPE",
+        "modelVersion": "5.0",
+        "modelCustomizationId": "1da7b585-5e61-4993-b95e-8e6606c81e45",
+        "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
+        "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
+      },
+      "instanceName": "2017488_PASQUALEvPEVNFinstancename_001",
+      "action": "None",
+      "legacyRegion": "some legacy region"
+    },
+    "2017-488_PASQUALE-vPE 0:0002": {
+      "vfModules": {
+        "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0": {
+          "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0uvfot": {
+            "instanceName": "VFinstancenameZERO_002",
+            "action": "None",
+            "modelInfo": {
+              "modelInvariantId": "b34833bb-6aa9-4ad6-a831-70b06367a091",
+              "modelVersionId": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+              "modelName": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0",
+              "modelVersion": "5",
+              "modelCustomizationId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3",
+              "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0",
+              "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+            },
+            "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+          }
+        },
+        "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1": {
+          "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1fshmc": {
+            "instanceName": "VFinstancename_002",
+            "action": "None",
+            "volumeGroupName": "VFinstancename_vol_abc_002",
+            "modelInfo": {
+              "modelInvariantId": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+              "modelVersionId": "25284168-24bb-4698-8cb4-3f509146eca5",
+              "modelName": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
+              "modelVersion": "6",
+              "modelCustomizationId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401",
+              "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
+              "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+            },
+            "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+          }
+        }
+      },
+      "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+      "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+      "lcpCloudRegionId": "AAIAIC25",
+      "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+      "lineOfBusiness": "ONAP",
+      "platformName": "platform",
+      "modelInfo": {
+        "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+        "modelVersionId": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+        "modelName": "2017-488_PASQUALE-vPE",
+        "modelVersion": "5.0",
+        "modelCustomizationId": "1da7b585-5e61-4993-b95e-8e6606c81e45",
+        "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
+        "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
+      },
+      "instanceName": "2017488_PASQUALEvPEVNFinstancename_002",
+      "action": "None",
+      "legacyRegion": "some legacy region"
+    },
+    "2017-388_PASQUALE-vPE 0_1": {
+      "action": "Create",
+      "inMaint": false,
+      "rollbackOnFailure": "true",
+      "originalName": "2017-388_PASQUALE-vPE 0",
+      "isMissingData": false,
+      "trackById": "wk10c4hh1oj",
+      "vfModules": {},
+      "vnfStoreKey": "2017-388_PASQUALE-vPE 0_1",
+      "instanceName": "2017388_PASQUALEvPEmCaNkinstanceName",
+      "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+      "lcpCloudRegionId": "hvf6",
+      "tenantId": "229bcdc6eaeb4ca59d55221141d01f8e",
+      "platformName": "xxx1",
+      "lineOfBusiness": "zzz1",
+      "instanceParams": [
+        {
+          "vnf_config_template_version": "17.2",
+          "bandwidth_units": "Gbps",
+          "bandwidth": "10",
+          "AIC_CLLI": "ATLMY8GA",
+          "ASN": "AV_vPE",
+          "vnf_instance_name": "mtnj309me6"
+        }
+      ],
+      "modelInfo": {
+        "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+        "modelVersionId": "afacccf6-397d-45d6-b5ae-94c39734b168",
+        "modelName": "2017-388_PASQUALE-vPE",
+        "modelVersion": "4.0",
+        "modelCustomizationId": "b3c76f73-eeb5-4fb6-9d31-72a889f1811c",
+        "modelCustomizationName": "2017-388_PASQUALE-vPE 0",
+        "uuid": "afacccf6-397d-45d6-b5ae-94c39734b168",
+        "modelUniqueId": "b3c76f73-eeb5-4fb6-9d31-72a889f1811c"
+      },
+      "uuid": "afacccf6-397d-45d6-b5ae-94c39734b168"
+    }
+  },
+  "instanceParams": [],
+  "validationCounter": 0,
+  "existingNames": {
+    "mcankinstancename": ""
+  },
+  "existingVNFCounterMap": {
+    "afacccf6-397d-45d6-b5ae-94c39734b168": 1,
+    "69e09f68-8b63-4cc9-b9ff-860960b5db09": 3,
+    "b3c76f73-eeb5-4fb6-9d31-72a889f1811c": 1
+  },
+  "existingVnfGroupCounterMap": {},
+  "existingNetworksCounterMap": {},
+  "networks": {},
+  "vnfGroups": {},
+  "bulkSize": 1,
+  "instanceId": "f8791436-8d55-4fde-b4d5-72dd2cf13cfb",
+  "instanceName": "mCaNkinstancename",
+  "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+  "subscriptionServiceType": "TYLER SILVIA",
+  "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+  "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+  "lcpCloudRegionId": "hvf6",
+  "tenantId": "bae71557c5bb4d5aac6743a4e5f1d054",
+  "aicZoneId": "NFT1",
+  "projectName": "WATKINS",
+  "rollbackOnFailure": true,
+  "aicZoneName": "NFTJSSSS-NFT1",
+  "owningEntityName": "WayneHolland",
+  "tenantName": "AIN Web Tool-15-D-testalexandria",
+  "modelInfo": {
+    "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+    "modelVersionId": "6b528779-44a3-4472-bdff-9cd15ec93450",
+    "modelName": "action-data",
+    "modelVersion": "1.0",
+    "uuid": "6b528779-44a3-4472-bdff-9cd15ec93450"
+  },
+  "isALaCarte": true,
+  "orchStatus": "Active",
+  "modelInavariantId": "6b528779-44a3-4472-bdff-9cd15ec93450",
+  "testApi": "VNF_API"
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/volumegroup_instantiation_request.json b/vid-app-common/src/test/resources/payload_jsons/volumegroup_instantiation_request.json
index 02d2d1e..8d64ebe 100644
--- a/vid-app-common/src/test/resources/payload_jsons/volumegroup_instantiation_request.json
+++ b/vid-app-common/src/test/resources/payload_jsons/volumegroup_instantiation_request.json
@@ -12,7 +12,7 @@
     "cloudConfiguration": {
       "lcpCloudRegionId": "mdt1",
       "tenantId": "88a6ca3ee0394ade9403f075db23167e",
-      "cloudOwner" : "att-aic"
+      "cloudOwner" : "irma-aic"
     },
     "requestInfo": {
       "instanceName": "myVgName",
@@ -50,7 +50,8 @@
     ],
     "requestParameters" : {
       "userParams" : [ ],
-      "usePreload" : true
+      "usePreload" : true,
+      "testApi" : "VNF_API"
     }
   }
 }
diff --git a/vid-app-common/src/test/resources/payload_jsons/vrfEntry/service_with_vrf_entry_fe_input.json b/vid-app-common/src/test/resources/payload_jsons/vrfEntry/service_with_vrf_entry_fe_input.json
new file mode 100644
index 0000000..4f20cf1
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/vrfEntry/service_with_vrf_entry_fe_input.json
@@ -0,0 +1,81 @@
+{
+  "action": "Create",
+  "isDirty": false,
+  "vnfs": {},
+  "vrfs": {
+    "vrf-1": {
+      "networks": {
+        "Network-1": {
+          "instanceName": "myBestNetwork",
+          "instanceId": "884b373f-41c0-4a96-9785-7f075cb4ae9d",
+          "modelInfo": {
+            "modelType": "network"
+          }
+        }
+      },
+      "vpns": {
+        "vpn-1": {
+          "instanceName": "justFakeVPN",
+          "instanceId": "7e971d5c-6ddf-4f02-be8a-95dcbc7daf83",
+          "modelInfo": {
+            "modelType": "vpnBinding"
+          }
+        }
+      }
+    }
+  },
+  "instanceParams": [
+    {}
+  ],
+  "validationCounter": 0,
+  "existingNames": {
+    "dfd": ""
+  },
+  "existingVNFCounterMap": {},
+  "existingVRFCounterMap": {},
+  "existingVnfGroupCounterMap": {},
+  "existingNetworksCounterMap": {},
+  "optionalGroupMembersMap": {},
+  "networks": {},
+  "vnfGroups": {},
+  "bulkSize": 1,
+  "instanceName": "dfd",
+  "productFamilyId": "ddf9cc0f-6331-4d35-bed0-a37f2d5e9cb3",
+  "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+  "subscriberName": "SILVIA ROBBINS",
+  "subscriptionServiceType": "TYLER SILVIA",
+  "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+  "lcpCloudRegionId": "lcpCloudRegionId",
+  "tenantName": "tenantName",
+  "tenantId": "4b273bc5-0ae6-4088-aa5d-5a862d84cab2",
+  "projectName": "WATKINS",
+  "rollbackOnFailure": "true",
+  "aicZoneName": null,
+  "owningEntityName": "WayneHolland",
+  "testApi": "VNF_API",
+  "modelInfo": {
+    "modelInvariantId": "dfc2c44c-2429-44ca-ae26-1e6dc1f207fb",
+    "modelVersionId": "f028b2e2-7080-4b13-91b2-94944d4c42d8",
+    "modelName": "infraVPN",
+    "modelVersion": "1.0",
+    "uuid": "f028b2e2-7080-4b13-91b2-94944d4c42d8",
+    "modelUniqueId": "f028b2e2-7080-4b13-91b2-94944d4c42d8"
+  },
+  "isALaCarte": true,
+  "name": "infraVPN",
+  "version": "1.0",
+  "description": "ddd",
+  "category": "Network Service",
+  "uuid": "f028b2e2-7080-4b13-91b2-94944d4c42d8",
+  "invariantUuid": "dfc2c44c-2429-44ca-ae26-1e6dc1f207fb",
+  "serviceType": "BONDING",
+  "serviceRole": "INFRASTRUCTURE-VPN",
+  "vidNotions": {
+    "instantiationType": "Macro",
+    "instantiationUI": "infrastructureVpn",
+    "modelCategory": "INFRASTRUCTURE_VPN",
+    "viewEditUI": "legacy"
+  },
+  "isEcompGeneratedNaming": true,
+  "isMultiStepDesign": false
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/vrfEntry/service_with_vrf_instantiation_request.json b/vid-app-common/src/test/resources/payload_jsons/vrfEntry/service_with_vrf_instantiation_request.json
new file mode 100644
index 0000000..2e64554
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/vrfEntry/service_with_vrf_instantiation_request.json
@@ -0,0 +1,59 @@
+{
+  "requestDetails": {
+    "modelInfo": {
+      "modelInvariantId": "dfc2c44c-2429-44ca-ae26-1e6dc1f207fb",
+      "modelVersionId": "f028b2e2-7080-4b13-91b2-94944d4c42d8",
+      "modelName": "infraVPN",
+      "modelVersion": "1.0",
+      "modelType": "service"
+    },
+    "cloudConfiguration": {
+      "cloudOwner": "irma-aic",
+      "lcpCloudRegionId": "lcpCloudRegionId",
+      "tenantId": "4b273bc5-0ae6-4088-aa5d-5a862d84cab2"
+    },
+    "owningEntity": {
+      "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+      "owningEntityName": "WayneHolland"
+    },
+    "project": {
+      "projectName": "WATKINS"
+    },
+    "subscriberInfo": {
+      "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+      "subscriberName": "SILVIA ROBBINS"
+    },
+    "requestInfo": {
+      "instanceName": "dfd",
+      "productFamilyId": "ddf9cc0f-6331-4d35-bed0-a37f2d5e9cb3",
+      "source": "VID",
+      "suppressRollback": false,
+      "requestorId": "az2016"
+    },
+    "requestParameters": {
+      "subscriptionServiceType": "TYLER SILVIA",
+      "aLaCarte": false,
+      "userParams": []
+    },
+    "relatedInstanceList": [
+      {
+        "relatedInstance": {
+          "instanceId": "7e971d5c-6ddf-4f02-be8a-95dcbc7daf83",
+          "instanceName": "justFakeVPN",
+          "modelInfo": {
+            "modelType": "vpnBinding"
+          }
+        }
+      },
+      {
+        "relatedInstance": {
+          "instanceId": "884b373f-41c0-4a96-9785-7f075cb4ae9d",
+          "instanceName": "myBestNetwork",
+          "modelInfo": {
+            "modelType": "network"
+          }
+        }
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/policy-configuration-by-policy-false.JSON b/vid-app-common/src/test/resources/policy-configuration-by-policy-false.JSON
index 4508599..6e07326 100644
--- a/vid-app-common/src/test/resources/policy-configuration-by-policy-false.JSON
+++ b/vid-app-common/src/test/resources/policy-configuration-by-policy-false.JSON
@@ -34,8 +34,8 @@
       "type": "Configuration",
       "modelCustomizationName": "Port Mirroring Configuration By Policy 1",
       "sourceNodes": [
-        "vmmeservice2_proxy 2",
-        "vmmeservice2_proxy 3"
+        "vflorenceservice2_proxy 2",
+        "vflorenceservice2_proxy 3"
       ],
       "collectorNodes": [
         "pprobeservice_proxy 5"
@@ -61,9 +61,9 @@
       "type": "Configuration",
       "modelCustomizationName": "Port Mirroring Configuration By Policy 0",
       "sourceNodes": [
-        "vmmeservice2_proxy 2",
-        "vmmeservice_proxy 1",
-        "vmmeservice_proxy 0"
+        "vflorenceservice2_proxy 2",
+        "vflorenceservice_proxy 1",
+        "vflorenceservice_proxy 0"
       ],
       "collectorNodes": [
       ],
@@ -71,11 +71,11 @@
     }
   },
   "serviceProxies": {
-    "vmmeservice_proxy 0": {
+    "vflorenceservice_proxy 0": {
       "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
       "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
-      "description": "A Proxy for Service vmmeService",
-      "name": "vmmeService Service Proxy",
+      "description": "A Proxy for Service vflorenceService",
+      "name": "vflorenceService Service Proxy",
       "version": "1.0",
       "customizationUuid": "d7cfe338-eeda-4217-ba13-f24b0811fb17",
       "inputs": {},
@@ -84,13 +84,13 @@
       "type": "Service Proxy",
       "sourceModelUuid": "c3e6c9bd-b24d-458e-aa99-e0cadf70c5e5",
       "sourceModelInvariant": "dd8a805d-3946-4f11-9831-e26cd6aec9a3",
-      "sourceModelName": "vmmeService"
+      "sourceModelName": "vflorenceService"
     },
-    "vmmeservice_proxy 1": {
+    "vflorenceservice_proxy 1": {
       "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
       "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
-      "description": "A Proxy for Service vmmeService",
-      "name": "vmmeService Service Proxy",
+      "description": "A Proxy for Service vflorenceService",
+      "name": "vflorenceService Service Proxy",
       "version": "1.0",
       "customizationUuid": "7a69f133-564c-4eb6-b93e-0a8281967efb",
       "inputs": {},
@@ -99,13 +99,13 @@
       "type": "Service Proxy",
       "sourceModelUuid": "c3e6c9bd-b24d-458e-aa99-e0cadf70c5e5",
       "sourceModelInvariant": "dd8a805d-3946-4f11-9831-e26cd6aec9a3",
-      "sourceModelName": "vmmeService"
+      "sourceModelName": "vflorenceService"
     },
-    "vmmeservice2_proxy 3": {
+    "vflorenceservice2_proxy 3": {
       "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
       "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
-      "description": "A Proxy for Service vmmeService2",
-      "name": "vmmeService2 Service Proxy",
+      "description": "A Proxy for Service vflorenceService2",
+      "name": "vflorenceService2 Service Proxy",
       "version": "1.0",
       "customizationUuid": "9d81c21f-e29c-44f6-b5f6-caa974ee078a",
       "inputs": {},
@@ -114,7 +114,7 @@
       "type": "Service Proxy",
       "sourceModelUuid": "2a2ea15f-07c6-4b89-bfca-e8aba39a34d6",
       "sourceModelInvariant": "a7eac2b3-8444-40ee-92e3-b3359b32445c",
-      "sourceModelName": "vmmeService2"
+      "sourceModelName": "vflorenceService2"
     },
     "pprobeservice_proxy 4": {
       "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
@@ -146,11 +146,11 @@
       "sourceModelInvariant": "83b458fd-5dd3-419b-a9e3-7335814a0911",
       "sourceModelName": "pProbeService"
     },
-    "vmmeservice2_proxy 2": {
+    "vflorenceservice2_proxy 2": {
       "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
       "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
-      "description": "A Proxy for Service vmmeService2",
-      "name": "vmmeService2 Service Proxy",
+      "description": "A Proxy for Service vflorenceService2",
+      "name": "vflorenceService2 Service Proxy",
       "version": "1.0",
       "customizationUuid": "060be63d-5f9c-4fd0-8ef7-830d5e8eca17",
       "inputs": {},
@@ -159,7 +159,7 @@
       "type": "Service Proxy",
       "sourceModelUuid": "2a2ea15f-07c6-4b89-bfca-e8aba39a34d6",
       "sourceModelInvariant": "a7eac2b3-8444-40ee-92e3-b3359b32445c",
-      "sourceModelName": "vmmeService2"
+      "sourceModelName": "vflorenceService2"
     }
   },
   "vfModules": {},
diff --git a/vid-app-common/src/test/resources/policy-configuration-csar.JSON b/vid-app-common/src/test/resources/policy-configuration-csar.JSON
index 41f5f5c..d2614cb 100644
--- a/vid-app-common/src/test/resources/policy-configuration-csar.JSON
+++ b/vid-app-common/src/test/resources/policy-configuration-csar.JSON
@@ -34,9 +34,9 @@
       "type": "Configuration",
       "modelCustomizationName": "Port Mirroring Configuration By Policy 1",
       "sourceNodes": [
-        "vmmeservice2_proxy 2",
-        "vmmeservice2_proxy 3",
-        "vmmeservice_proxy 1"
+        "vflorenceservice2_proxy 2",
+        "vflorenceservice2_proxy 3",
+        "vflorenceservice_proxy 1"
       ],
       "collectorNodes": [
         "pprobeservice_proxy 5"
@@ -62,9 +62,9 @@
       "type": "Configuration",
       "modelCustomizationName": "Port Mirroring Configuration By Policy 0",
       "sourceNodes": [
-        "vmmeservice2_proxy 2",
-        "vmmeservice_proxy 1",
-        "vmmeservice_proxy 0"
+        "vflorenceservice2_proxy 2",
+        "vflorenceservice_proxy 1",
+        "vflorenceservice_proxy 0"
       ],
       "collectorNodes": [
         "pprobeservice_proxy 4"
@@ -73,11 +73,11 @@
     }
   },
   "serviceProxies": {
-    "vmmeservice_proxy 0": {
+    "vflorenceservice_proxy 0": {
       "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
       "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
-      "description": "A Proxy for Service vmmeService",
-      "name": "vmmeService Service Proxy",
+      "description": "A Proxy for Service vflorenceService",
+      "name": "vflorenceService Service Proxy",
       "version": "1.0",
       "customizationUuid": "d7cfe338-eeda-4217-ba13-f24b0811fb17",
       "inputs": {},
@@ -88,13 +88,13 @@
       "type": "Service Proxy",
       "sourceModelUuid": "c3e6c9bd-b24d-458e-aa99-e0cadf70c5e5",
       "sourceModelInvariant": "dd8a805d-3946-4f11-9831-e26cd6aec9a3",
-      "sourceModelName": "vmmeService"
+      "sourceModelName": "vflorenceService"
     },
-    "vmmeservice_proxy 1": {
+    "vflorenceservice_proxy 1": {
       "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
       "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
-      "description": "A Proxy for Service vmmeService",
-      "name": "vmmeService Service Proxy",
+      "description": "A Proxy for Service vflorenceService",
+      "name": "vflorenceService Service Proxy",
       "version": "1.0",
       "customizationUuid": "7a69f133-564c-4eb6-b93e-0a8281967efb",
       "inputs": {},
@@ -105,13 +105,13 @@
       "type": "Service Proxy",
       "sourceModelUuid": "c3e6c9bd-b24d-458e-aa99-e0cadf70c5e5",
       "sourceModelInvariant": "dd8a805d-3946-4f11-9831-e26cd6aec9a3",
-      "sourceModelName": "vmmeService"
+      "sourceModelName": "vflorenceService"
     },
-    "vmmeservice2_proxy 3": {
+    "vflorenceservice2_proxy 3": {
       "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
       "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
-      "description": "A Proxy for Service vmmeService2",
-      "name": "vmmeService2 Service Proxy",
+      "description": "A Proxy for Service vflorenceService2",
+      "name": "vflorenceService2 Service Proxy",
       "version": "1.0",
       "customizationUuid": "9d81c21f-e29c-44f6-b5f6-caa974ee078a",
       "inputs": {},
@@ -122,7 +122,7 @@
       "type": "Service Proxy",
       "sourceModelUuid": "2a2ea15f-07c6-4b89-bfca-e8aba39a34d6",
       "sourceModelInvariant": "a7eac2b3-8444-40ee-92e3-b3359b32445c",
-      "sourceModelName": "vmmeService2"
+      "sourceModelName": "vflorenceService2"
     },
     "pprobeservice_proxy 4": {
       "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
@@ -158,11 +158,11 @@
       "sourceModelInvariant": "83b458fd-5dd3-419b-a9e3-7335814a0911",
       "sourceModelName": "pProbeService"
     },
-    "vmmeservice2_proxy 2": {
+    "vflorenceservice2_proxy 2": {
       "uuid": "a32fee17-5b59-4c34-ba6f-6dd2f1c61fee",
       "invariantUuid": "2933b574-d28d-45ea-bf22-4df2907e4a10",
-      "description": "A Proxy for Service vmmeService2",
-      "name": "vmmeService2 Service Proxy",
+      "description": "A Proxy for Service vflorenceService2",
+      "name": "vflorenceService2 Service Proxy",
       "version": "1.0",
       "customizationUuid": "060be63d-5f9c-4fd0-8ef7-830d5e8eca17",
       "inputs": {},
@@ -173,11 +173,14 @@
       "type": "Service Proxy",
       "sourceModelUuid": "2a2ea15f-07c6-4b89-bfca-e8aba39a34d6",
       "sourceModelInvariant": "a7eac2b3-8444-40ee-92e3-b3359b32445c",
-      "sourceModelName": "vmmeService2"
+      "sourceModelName": "vflorenceService2"
     }
   },
   "vfModules": {},
   "volumeGroups": {},
   "pnfs": {},
-  "vnfGroups": {}
+  "vnfGroups": {},
+  "vrfs": {
+
+  }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/responses/aai/getCloudRegionAndTenantByVnfId.json b/vid-app-common/src/test/resources/responses/aai/getCloudRegionAndTenantByVnfId.json
index 690be60..bc3ab0a 100644
--- a/vid-app-common/src/test/resources/responses/aai/getCloudRegionAndTenantByVnfId.json
+++ b/vid-app-common/src/test/resources/responses/aai/getCloudRegionAndTenantByVnfId.json
@@ -34,7 +34,7 @@
     {
       "id": "264798392",
       "node-type": "vserver",
-      "url": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn23b/tenants/tenant/3e9a20a3e89e45f884e09df0cc2d2d2a/vservers/vserver/088c2bf0-80e2-4bdf-93ae-b2469fbeba84",
+      "url": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/mtn23b/tenants/tenant/3e9a20a3e89e45f884e09df0cc2d2d2a/vservers/vserver/088c2bf0-80e2-4bdf-93ae-b2469fbeba84",
       "properties": {
         "vserver-id": "088c2bf0-80e2-4bdf-93ae-b2469fbeba84",
         "vserver-name": "zrdm3mogx01oam001",
@@ -49,7 +49,7 @@
           "id": "211808464",
           "relationship-label": "tosca.relationships.AttachesTo",
           "node-type": "volume",
-          "url": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn23b/tenants/tenant/3e9a20a3e89e45f884e09df0cc2d2d2a/vservers/vserver/088c2bf0-80e2-4bdf-93ae-b2469fbeba84/volumes/volume/28e1246e-2aeb-4a59-bb51-f20fb8e93c42"
+          "url": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/mtn23b/tenants/tenant/3e9a20a3e89e45f884e09df0cc2d2d2a/vservers/vserver/088c2bf0-80e2-4bdf-93ae-b2469fbeba84/volumes/volume/28e1246e-2aeb-4a59-bb51-f20fb8e93c42"
         }
       ]
     },
@@ -75,7 +75,7 @@
     {
       "id": "8757432",
       "node-type": "tenant",
-      "url": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn23b/tenants/tenant/3e9a20a3e89e45f884e09df0cc2d2d2a",
+      "url": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/mtn23b/tenants/tenant/3e9a20a3e89e45f884e09df0cc2d2d2a",
       "properties": {
         "tenant-id": "3e9a20a3e89e45f884e09df0cc2d2d2a",
         "tenant-name": "APPC-24595-T-IST-02C",
@@ -93,9 +93,9 @@
     {
       "id": "302227536",
       "node-type": "cloud-region",
-      "url": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn23b",
+      "url": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/mtn23b",
       "properties": {
-        "cloud-owner": "att-aic",
+        "cloud-owner": "irma-aic" ,
         "cloud-region-id": "mtn23b",
         "cloud-type": "openstack",
         "owner-defined-type": "lcp",
@@ -111,7 +111,7 @@
           "id": "2744328",
           "relationship-label": "org.onap.relationships.inventory.BelongsTo",
           "node-type": "tenant",
-          "url": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/att-aic/mtn23b/tenants/tenant/5452d6bd0cb34e99a3553d349456c642"
+          "url": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/mtn23b/tenants/tenant/5452d6bd0cb34e99a3553d349456c642"
         }
       ]
     }
diff --git a/vid-app-common/src/test/resources/responses/mso/multipleOrchestrationRequestsServiceInstance.json b/vid-app-common/src/test/resources/responses/mso/multipleOrchestrationRequestsServiceInstance.json
new file mode 100644
index 0000000..9708522
--- /dev/null
+++ b/vid-app-common/src/test/resources/responses/mso/multipleOrchestrationRequestsServiceInstance.json
@@ -0,0 +1,300 @@
+{
+  "requestList": [
+    {
+      "request": {
+        "requestId": "2543cd7c-ed76-4e94-83be-0cf0cc55bf23",
+        "startTime": "Mon, 04 Mar 2019 20:47:45 GMT",
+        "finishTime": "Mon, 04 Mar 2019 20:48:46 GMT",
+        "requestScope": "vnf",
+        "requestType": "createInstance",
+        "requestDetails": {
+          "modelInfo": {
+            "modelCustomizationName": "OAM_FRWL_5G_NC 0",
+            "modelInvariantId": "d5f2cc03-fad3-4a5a-bf36-6328771b3915",
+            "modelType": "vnf",
+            "modelName": "OAM_FRWL_5G_NC",
+            "modelVersion": "7.0",
+            "modelCustomizationUuid": "006ad5a0-b8c4-43f3-aa93-0fa379ea613d",
+            "modelVersionId": "f248be17-b66d-4ea0-bb24-51de6f62c240",
+            "modelCustomizationId": "006ad5a0-b8c4-43f3-aa93-0fa379ea613d",
+            "modelUuid": "f248be17-b66d-4ea0-bb24-51de6f62c240",
+            "modelInvariantUuid": "d5f2cc03-fad3-4a5a-bf36-6328771b3915",
+            "modelInstanceName": "OAM_FRWL_5G_NC 0"
+          },
+          "requestInfo": {
+            "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+            "source": "VID",
+            "instanceName": "zauk51bfrwl07",
+            "suppressRollback": false,
+            "requestorId": "pj8646"
+          },
+          "relatedInstanceList": [
+            {
+              "relatedInstance": {
+                "instanceId": "d40c8a82-cc04-45e5-a0f6-0c9394c8f8d2",
+                "modelInfo": {
+                  "modelInvariantId": "77ac5b6f-e31a-4477-b2c9-8a49ea58aee2",
+                  "modelType": "service",
+                  "modelName": "OAM_FRWL_5G_NC_SVC",
+                  "modelVersion": "6.0",
+                  "modelVersionId": "75a90831-a34f-4b81-8245-4f8b110f93fa",
+                  "modelUuid": "75a90831-a34f-4b81-8245-4f8b110f93fa",
+                  "modelInvariantUuid": "77ac5b6f-e31a-4477-b2c9-8a49ea58aee2"
+                }
+              }
+            }
+          ],
+          "cloudConfiguration": {
+            "tenantId": "e2a6af59d1cb43b2874e943bbbf8470a",
+            "cloudOwner": "att-nc",
+            "lcpCloudRegionId": "auk51b"
+          },
+          "requestParameters": {
+            "testApi": "GR_API"
+          },
+          "platform": {
+            "platformName": "NETWORK-CLOUD"
+          },
+          "lineOfBusiness": {
+            "lineOfBusinessName": "EMANUEL-CONSUMER"
+          }
+        },
+        "instanceReferences": {
+          "serviceInstanceId": "d40c8a82-cc04-45e5-a0f6-0c9394c8f8d2",
+          "vnfInstanceId": "05bedd02-b933-40f1-ad20-bab3197489a9",
+          "vnfInstanceName": "zauk51bfrwl07",
+          "requestorId": "pj8646"
+        },
+        "requestStatus": {
+          "requestState": "COMPLETE",
+          "statusMessage": "STATUS: ALaCarte-Vnf-createInstance request was executed correctly. FLOW STATUS: Successfully completed all Building Blocks",
+          "percentProgress": 100,
+          "timestamp": "Mon, 04 Mar 2019 20:48:46 GMT"
+        }
+      }
+    },
+    {
+      "request": {
+        "requestId": "fab854bf-e53c-415e-b3cc-b6fcce8414b2",
+        "startTime": "Mon, 04 Mar 2019 20:47:15 GMT",
+        "finishTime": "Mon, 04 Mar 2019 20:47:38 GMT",
+        "requestScope": "service",
+        "requestType": "createInstance",
+        "requestDetails": {
+          "modelInfo": {
+            "modelInvariantId": "77ac5b6f-e31a-4477-b2c9-8a49ea58aee2",
+            "modelType": "service",
+            "modelName": "OAM_FRWL_5G_NC_SVC",
+            "modelVersion": "6.0",
+            "modelVersionId": "75a90831-a34f-4b81-8245-4f8b110f93fa",
+            "modelUuid": "75a90831-a34f-4b81-8245-4f8b110f93fa",
+            "modelInvariantUuid": "77ac5b6f-e31a-4477-b2c9-8a49ea58aee2"
+          },
+          "requestInfo": {
+            "source": "VID",
+            "instanceName": "zauk51bfrwl07_vnf_service",
+            "suppressRollback": false,
+            "requestorId": "pj8646"
+          },
+          "subscriberInfo": {
+            "globalSubscriberId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"
+          },
+          "requestParameters": {
+            "subscriptionServiceType": "Emanuel",
+            "aLaCarte": true,
+            "testApi": "GR_API"
+          },
+          "project": {
+            "projectName": "Kennedy"
+          },
+          "owningEntity": {
+            "owningEntityId": "e4257a94-21cc-40c5-adc9-e6f4ff868e31",
+            "owningEntityName": "EMANUEL-CORE"
+          }
+        },
+        "instanceReferences": {
+          "serviceInstanceId": "d40c8a82-cc04-45e5-a0f6-0c9394c8f8d2",
+          "serviceInstanceName": "zauk51bfrwl07_vnf_service",
+          "requestorId": "pj8646"
+        },
+        "requestStatus": {
+          "requestState": "COMPLETE",
+          "statusMessage": "STATUS: ALaCarte-Service-createInstance request was executed correctly. FLOW STATUS: Successfully completed all Building Blocks",
+          "percentProgress": 100,
+          "timestamp": "Mon, 04 Mar 2019 20:47:38 GMT"
+        }
+      }
+    },
+    {
+      "request": {
+        "requestId": "3eb7b323-b486-402e-931a-2ad296e6406b",
+        "startTime": "Mon, 04 Mar 2019 20:48:52 GMT",
+        "finishTime": "Mon, 04 Mar 2019 20:50:40 GMT",
+        "requestScope": "vfModule",
+        "requestType": "createInstance",
+        "requestDetails": {
+          "modelInfo": {
+            "modelCustomizationName": "OamFrwl5gNc..base_oam..module-0",
+            "modelInvariantId": "00b03b3e-454f-438c-87ca-5860f98e8dbc",
+            "modelType": "vfModule",
+            "modelName": "OamFrwl5gNc..base_oam..module-0",
+            "modelVersion": "3",
+            "modelCustomizationUuid": "53aef95c-92b5-48d7-912a-1f89d0eb6355",
+            "modelVersionId": "3fb037f3-d629-490f-af49-2bbb97a946be",
+            "modelCustomizationId": "53aef95c-92b5-48d7-912a-1f89d0eb6355",
+            "modelUuid": "3fb037f3-d629-490f-af49-2bbb97a946be",
+            "modelInvariantUuid": "00b03b3e-454f-438c-87ca-5860f98e8dbc",
+            "modelInstanceName": "OamFrwl5gNc..base_oam..module-0"
+          },
+          "requestInfo": {
+            "source": "VID",
+            "instanceName": "zauk51bfrwl07_base_1",
+            "suppressRollback": false,
+            "requestorId": "pj8646"
+          },
+          "relatedInstanceList": [
+            {
+              "relatedInstance": {
+                "instanceId": "d40c8a82-cc04-45e5-a0f6-0c9394c8f8d2",
+                "modelInfo": {
+                  "modelInvariantId": "77ac5b6f-e31a-4477-b2c9-8a49ea58aee2",
+                  "modelType": "service",
+                  "modelName": "OAM_FRWL_5G_NC_SVC",
+                  "modelVersion": "6.0",
+                  "modelVersionId": "75a90831-a34f-4b81-8245-4f8b110f93fa",
+                  "modelUuid": "75a90831-a34f-4b81-8245-4f8b110f93fa",
+                  "modelInvariantUuid": "77ac5b6f-e31a-4477-b2c9-8a49ea58aee2"
+                }
+              }
+            },
+            {
+              "relatedInstance": {
+                "instanceId": "05bedd02-b933-40f1-ad20-bab3197489a9",
+                "modelInfo": {
+                  "modelCustomizationName": "OAM_FRWL_5G_NC 0",
+                  "modelInvariantId": "d5f2cc03-fad3-4a5a-bf36-6328771b3915",
+                  "modelType": "vnf",
+                  "modelName": "OAM_FRWL_5G_NC",
+                  "modelVersion": "7.0",
+                  "modelCustomizationUuid": "006ad5a0-b8c4-43f3-aa93-0fa379ea613d",
+                  "modelVersionId": "f248be17-b66d-4ea0-bb24-51de6f62c240",
+                  "modelCustomizationId": "006ad5a0-b8c4-43f3-aa93-0fa379ea613d",
+                  "modelUuid": "f248be17-b66d-4ea0-bb24-51de6f62c240",
+                  "modelInvariantUuid": "d5f2cc03-fad3-4a5a-bf36-6328771b3915",
+                  "modelInstanceName": "OAM_FRWL_5G_NC 0"
+                }
+              }
+            }
+          ],
+          "cloudConfiguration": {
+            "tenantId": "e2a6af59d1cb43b2874e943bbbf8470a",
+            "cloudOwner": "att-nc",
+            "lcpCloudRegionId": "auk51b"
+          },
+          "requestParameters": {
+            "usePreload": false,
+            "testApi": "GR_API"
+          }
+        },
+        "instanceReferences": {
+          "serviceInstanceId": "d40c8a82-cc04-45e5-a0f6-0c9394c8f8d2",
+          "vnfInstanceId": "05bedd02-b933-40f1-ad20-bab3197489a9",
+          "vfModuleInstanceId": "9276805f-07ba-43c0-a5f1-f327c1d72606",
+          "vfModuleInstanceName": "zauk51bfrwl07_base_1",
+          "requestorId": "pj8646"
+        },
+        "requestStatus": {
+          "requestState": "COMPLETE",
+          "statusMessage": "STATUS: ALaCarte-VfModule-createInstance request was executed correctly. FLOW STATUS: Successfully completed all Building Blocks",
+          "percentProgress": 100,
+          "timestamp": "Mon, 04 Mar 2019 20:50:40 GMT"
+        }
+      }
+    },
+    {
+      "request": {
+        "requestId": "74f5a2dc-1e80-4553-8fac-d30675e510be",
+        "startTime": "Mon, 04 Mar 2019 20:50:47 GMT",
+        "requestScope": "vfModule",
+        "requestType": "createInstance",
+        "requestDetails": {
+          "modelInfo": {
+            "modelCustomizationName": "OamFrwl5gNc..module_oam..module-1",
+            "modelInvariantId": "972a22a1-8cbf-45ce-8ff2-f0f33694695d",
+            "modelType": "vfModule",
+            "modelName": "OamFrwl5gNc..module_oam..module-1",
+            "modelVersion": "3",
+            "modelCustomizationUuid": "cf88008e-c4b6-48b8-99a9-44d850f3d8db",
+            "modelVersionId": "cea74dcd-1174-4f65-adff-87a355849275",
+            "modelCustomizationId": "cf88008e-c4b6-48b8-99a9-44d850f3d8db",
+            "modelUuid": "cea74dcd-1174-4f65-adff-87a355849275",
+            "modelInvariantUuid": "972a22a1-8cbf-45ce-8ff2-f0f33694695d",
+            "modelInstanceName": "OamFrwl5gNc..module_oam..module-1"
+          },
+          "requestInfo": {
+            "source": "VID",
+            "instanceName": "zauk51bfrwl07_mod_1",
+            "suppressRollback": false,
+            "requestorId": "pj8646"
+          },
+          "relatedInstanceList": [
+            {
+              "relatedInstance": {
+                "instanceId": "d40c8a82-cc04-45e5-a0f6-0c9394c8f8d2",
+                "modelInfo": {
+                  "modelInvariantId": "77ac5b6f-e31a-4477-b2c9-8a49ea58aee2",
+                  "modelType": "service",
+                  "modelName": "OAM_FRWL_5G_NC_SVC",
+                  "modelVersion": "6.0",
+                  "modelVersionId": "75a90831-a34f-4b81-8245-4f8b110f93fa",
+                  "modelUuid": "75a90831-a34f-4b81-8245-4f8b110f93fa",
+                  "modelInvariantUuid": "77ac5b6f-e31a-4477-b2c9-8a49ea58aee2"
+                }
+              }
+            },
+            {
+              "relatedInstance": {
+                "instanceId": "05bedd02-b933-40f1-ad20-bab3197489a9",
+                "modelInfo": {
+                  "modelCustomizationName": "OAM_FRWL_5G_NC 0",
+                  "modelInvariantId": "d5f2cc03-fad3-4a5a-bf36-6328771b3915",
+                  "modelType": "vnf",
+                  "modelName": "OAM_FRWL_5G_NC",
+                  "modelVersion": "7.0",
+                  "modelCustomizationUuid": "006ad5a0-b8c4-43f3-aa93-0fa379ea613d",
+                  "modelVersionId": "f248be17-b66d-4ea0-bb24-51de6f62c240",
+                  "modelCustomizationId": "006ad5a0-b8c4-43f3-aa93-0fa379ea613d",
+                  "modelUuid": "f248be17-b66d-4ea0-bb24-51de6f62c240",
+                  "modelInvariantUuid": "d5f2cc03-fad3-4a5a-bf36-6328771b3915",
+                  "modelInstanceName": "OAM_FRWL_5G_NC 0"
+                }
+              }
+            }
+          ],
+          "cloudConfiguration": {
+            "tenantId": "e2a6af59d1cb43b2874e943bbbf8470a",
+            "cloudOwner": "att-nc",
+            "lcpCloudRegionId": "auk51b"
+          },
+          "requestParameters": {
+            "usePreload": true,
+            "testApi": "GR_API"
+          }
+        },
+        "instanceReferences": {
+          "serviceInstanceId": "d40c8a82-cc04-45e5-a0f6-0c9394c8f8d2",
+          "vnfInstanceId": "05bedd02-b933-40f1-ad20-bab3197489a9",
+          "vfModuleInstanceId": "73a01fe6-d9f9-4022-82f4-082c6d8cf520",
+          "vfModuleInstanceName": "zauk51bfrwl07_mod_1",
+          "requestorId": "pj8646"
+        },
+        "requestStatus": {
+          "requestState": "FAILED",
+          "statusMessage": "STATUS: Error from SDNC: No active l3-network found in AAI with network_name GRP-27529-T-IST-07A_N_oam_protected_net_1 FLOW STATUS: All Rollback flows have completed successfully ROLLBACK STATUS: Rollback has been completed successfully.",
+          "percentProgress": 100,
+          "timestamp": "Mon, 04 Mar 2019 20:51:14 GMT"
+        }
+      }
+    }
+  ]
+}
diff --git a/vid-app-common/src/test/resources/responses/mso/orchestrationRequestsVnf.json b/vid-app-common/src/test/resources/responses/mso/orchestrationRequestsVnf.json
index f833104..e31f0e0 100644
--- a/vid-app-common/src/test/resources/responses/mso/orchestrationRequestsVnf.json
+++ b/vid-app-common/src/test/resources/responses/mso/orchestrationRequestsVnf.json
@@ -42,7 +42,7 @@
       ],
       "cloudConfiguration": {
         "tenantId": "19dfa99ba1cc4948bb868eba9e0de7ab",
-        "cloudOwner": "att-aic",
+        "cloudOwner": "irma-aic" ,
         "lcpCloudRegionId": "test1"
       },
       "requestParameters": {
diff --git a/vid-app-common/src/main/resources/sdcservices.json b/vid-app-common/src/test/resources/sdcservices.json
similarity index 67%
rename from vid-app-common/src/main/resources/sdcservices.json
rename to vid-app-common/src/test/resources/sdcservices.json
index 12142aa..1ba13c9 100644
--- a/vid-app-common/src/main/resources/sdcservices.json
+++ b/vid-app-common/src/test/resources/sdcservices.json
@@ -3,10 +3,10 @@
     {
       "uuid": "6bce7302-70bd-4057-b48e-8d5b99e686ca",
       "invariantUUID": "9aa04749-c02c-432d-a90c-18caa361c833",
-      "name": "vDBE_srv",
+      "name": "vDOROTHEA_srv",
       "version": "1.0",
-      "toscaModelURL": "./service-VdbeSrv-csar.zip",
-      "category": "Mobility",
+      "toscaModelURL": "./csars/service-VdorotheaSrv-csar.zip",
+      "category": "Emanuel",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
       "lastUpdaterFullName": null,
@@ -17,10 +17,10 @@
     {
       "uuid": "76f27dfe-33e5-472f-8e0b-acf524adc4f0",
       "invariantUUID": "c3618e16-bb5b-433a-a6e0-565ca79d8b65",
-      "name": "4-27_vMME_Service",
+      "name": "4-27_vFLORENCE_Service",
       "version": "1.0",
-      "toscaModelURL": "./service-MsoExampleService-csar.zip",
-      "category": "Mobility",
+      "toscaModelURL": "./csars/service-MsoExampleService-csar.zip",
+      "category": "Emanuel",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
       "lastUpdaterFullName": null,
@@ -31,10 +31,10 @@
     {
       "uuid": "f4d84bb4-a416-4b4e-997e-0059973630b9",
       "invariantUUID": "598e3f9e-3244-4d8f-a8e0-0e5d7a29eda9",
-      "name": "ADIOD vMX vPE_BV Service 488",
+      "name": "PASQUALE vMX vPE_BV Service 488",
       "version": "1.0",
-      "toscaModelURL": "./service-vf-with-annotations.zip",
-      "category": "Mobility",
+      "toscaModelURL": "./csars/service-vf-with-annotations.zip",
+      "category": "Emanuel",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
       "lastUpdaterFullName": null,
@@ -45,10 +45,10 @@
     {
       "uuid": "48a52540-8772-4368-9cdb-1f124ea5c931",
       "invariantUUID": "f430728a-4530-42be-a577-1206b9484cef",
-      "name": "4-27_vMME_Service",
+      "name": "4-27_vFLORENCE_Service",
       "version": "1.0",
-      "toscaModelURL": "./service-vf-csar.zip",
-      "category": "Mobility",
+      "toscaModelURL": "./csars/service-vf-csar.zip",
+      "category": "Emanuel",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
       "lastUpdaterFullName": null,
@@ -59,10 +59,10 @@
     {
       "uuid": "cb49608f-5a24-4789-b0f7-2595473cb997",
       "invariantUUID": "0311f998-9268-4fd6-bbba-afff15087b72",
-      "name": "4-27_vMME_Service",
+      "name": "4-27_vFLORENCE_Service",
       "version": "1.0",
-      "toscaModelURL": "./service-vl-csar.zip",
-      "category": "Mobility",
+      "toscaModelURL": "./csars/service-vl-csar.zip",
+      "category": "Emanuel",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
       "lastUpdaterFullName": null,
@@ -75,7 +75,7 @@
       "invariantUUID": "5461e83e-0b2a-465d-ab45-9d731894afd9",
       "name": "vLoadBalancerMS",
       "version": "1.0",
-      "toscaModelURL": "./vLoadBalancerMS-with-policy.TOSCA.zip",
+      "toscaModelURL": "./csars/vLoadBalancerMS-with-policy.TOSCA.zip",
       "category": "Network L4+",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "demo",
@@ -87,10 +87,10 @@
     {
       "uuid": "90fe6842-aa76-4b68-8329-5c86ff564407",
       "invariantUUID": "0311f998-9268-4fd6-bbba-afff15087b72",
-      "name": "4-27_vMME_Service",
+      "name": "4-27_vFLORENCE_Service",
       "version": "1.0",
-      "toscaModelURL": "./1712_ADIOD.zip",
-      "category": "Mobility",
+      "toscaModelURL": "./csars/1712_PASQUALE.zip",
+      "category": "Emanuel",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
       "lastUpdaterFullName": null,
@@ -101,10 +101,10 @@
     {
       "uuid": "73e1322a-8a9a-49dc-9558-b0c5c5770e4a",
       "invariantUUID": "f430728a-4530-42be-a577-1206b9484cef",
-      "name": "4-27_vMME_Service",
+      "name": "4-27_vFLORENCE_Service",
       "version": "1.0",
-      "toscaModelURL": "./pnf.zip",
-      "category": "Mobility",
+      "toscaModelURL": "./csars/pnf.zip",
+      "category": "Emanuel",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
       "lastUpdaterFullName": null,
@@ -117,8 +117,8 @@
       "invariantUUID": "709d1be4-9a3f-4a29-8c4d-a20465e808a3",
       "name": "Demo Service",
       "version": "1.0",
-      "toscaModelURL": "./service-DemoService1-csar.csar",
-      "category": "Mobility",
+      "toscaModelURL": "./csars/service-DemoService1-csar.csar",
+      "category": "Emanuel",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
       "lastUpdaterFullName": null,
@@ -129,10 +129,10 @@
     {
       "uuid": "32671332-a7ee-4df6-9609-db50ce5eaee7",
       "invariantUUID": "598e3f9e-3244-4d8f-a8e0-0e5d7a29eda9",
-      "name": "ADIOD vMX vPE_BV Service 488",
+      "name": "PASQUALE vMX vPE_BV Service 488",
       "version": "1.0",
-      "toscaModelURL": "./adiod.zip",
-      "category": "Mobility",
+      "toscaModelURL": "./csars/pasquale.zip",
+      "category": "Emanuel",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
       "lastUpdaterFullName": null,
@@ -145,8 +145,8 @@
       "invariantUUID": "3d89efc0-19ca-4df7-9818-028e1fc6f708",
       "name": "AMP PH SVC",
       "version": "1.0",
-      "toscaModelURL": "./service-AmpPhSvc-csar.zip",
-      "category": "Mobility",
+      "toscaModelURL": "./csars/service-AmpPhSvc-csar.zip",
+      "category": "Emanuel",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
       "lastUpdaterFullName": null,
@@ -159,8 +159,8 @@
       "invariantUUID": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
       "name": "action-data",
       "version": "1.0",
-      "toscaModelURL": "./2f80c596.zip",
-      "category": "Mobility",
+      "toscaModelURL": "./csars/2f80c596.zip",
+      "category": "Emanuel",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
       "lastUpdaterFullName": null,
@@ -173,8 +173,8 @@
       "invariantUUID": "b7d923c9-6175-41f1-91ba-4565c4953408",
       "name": "Multiple pProbes",
       "version": "1.0",
-      "toscaModelURL": "./service-Servicecontainermultiplepprobes-csar.zip",
-      "category": "Mobility",
+      "toscaModelURL": "./csars/service-Servicecontainermultiplepprobes-csar.zip",
+      "category": "Emanuel",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
       "lastUpdaterFullName": null,
@@ -187,7 +187,7 @@
       "invariantUUID": "b7d923c9-6175-41f1-91ba-4565c4955555",
       "name": "ServiceContainerMultiplepProbes2",
       "version": "2.0",
-      "toscaModelURL": "./service-ServicecontainerContainsPprobe.zip",
+      "toscaModelURL": "./csars/service-ServicecontainerContainsPprobe.zip",
       "category": "Network L1-3",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
@@ -201,8 +201,8 @@
       "invariantUUID": "598e3f9e-3244-4d8f-a8e0-0e5d7a29eda9",
       "name": "Fabric Configuration",
       "version": "1.0",
-      "toscaModelURL": "./service-fabric-configuration.zip",
-      "category": "Mobility",
+      "toscaModelURL": "./csars/service-fabric-configuration.zip",
+      "category": "Emanuel",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
       "lastUpdaterFullName": null,
@@ -215,7 +215,7 @@
       "invariantUUID": "93518289-3049-450f-a22d-86108c250265",
       "name": "jenny vTSBC vlan SVC",
       "version": "1.0",
-      "toscaModelURL": "./service-JennyVtsbcVlanSvc-csar.zip",
+      "toscaModelURL": "./csars/service-JennyVtsbcVlanSvc-csar.zip",
       "category": "Network L1-3",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
@@ -225,11 +225,39 @@
       "resources": null
     },
     {
+      "uuid": "2a53419b-3f85-4ad5-a9c9-d79905500a27",
+      "invariantUUID": "16972715-9d79-4fb0-9463-0253d45e1d48",
+      "name": "MNS VNN1B exn svc",
+      "version": "1.0",
+      "toscaModelURL": "./csars/service-MnsVnn1bExnSvc-csar.csar",
+      "category": "Emanuel",
+      "lifecycleState": "CERTIFIED",
+      "lastUpdaterUserId": "rg276b",
+      "lastUpdaterFullName": null,
+      "distributionStatus": "DISTRIBUTED",
+      "artifacts": null,
+      "resources": null
+    },
+    {
+      "uuid": "e32a5014-357f-4be4-b3f9-fecb0010811e",
+      "invariantUUID": "4e099102-fccb-4ee3-b51b-ebb51259dc50",
+      "name": "MNS VNN1B dmz svc",
+      "version": "1.0",
+      "toscaModelURL": "./csars/service-MnsVnn1bDmzSvc-csar.csar",
+      "category": "Emanuel",
+      "lifecycleState": "CERTIFIED",
+      "lastUpdaterUserId": "rg276b",
+      "lastUpdaterFullName": null,
+      "distributionStatus": "DISTRIBUTED",
+      "artifacts": null,
+      "resources": null
+    },
+    {
       "uuid": "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc",
       "invariantUUID": "7ee41ce4-4827-44b0-a48e-2707a59905d2",
       "name": "Grouping Service for Test",
       "version": "1.0",
-      "toscaModelURL": "./service-vnf-grouping-csar.zip",
+      "toscaModelURL": "./csars/service-vnf-grouping-csar.zip",
       "category": "Network L4+",
       "lifecycleState": "CERTIFIED",
       "lastUpdaterUserId": "rg276b",
@@ -237,6 +265,20 @@
       "distributionStatus": "DISTRIBUTED",
       "artifacts": null,
       "resources": null
+    },
+    {
+      "uuid": "f028b2e2-7080-4b13-91b2-94944d4c42d8",
+      "invariantUUID": "dfc2c44c-2429-44ca-ae26-1e6dc1f207fb",
+      "name": "infraVPN",
+      "version": "1.0",
+      "toscaModelURL": "./csars/service-Infravpn-csar.zip",
+      "category": "Network Service",
+      "lifecycleState": "CERTIFIED",
+      "lastUpdaterUserId": "rg276b",
+      "lastUpdaterFullName": null,
+      "distributionStatus": "DISTRIBUTED",
+      "artifacts": null,
+      "resources": null
     }
   ]
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/vLoadBalancerMS-with-policy.TOSCA.json b/vid-app-common/src/test/resources/vLoadBalancerMS-with-policy.TOSCA.json
index 8e29ff1..d066c2a 100644
--- a/vid-app-common/src/test/resources/vLoadBalancerMS-with-policy.TOSCA.json
+++ b/vid-app-common/src/test/resources/vLoadBalancerMS-with-policy.TOSCA.json
@@ -167,7 +167,7 @@
     }
   },
   "networks": {},
-  "collectionResource": {},
+  "collectionResources": {},
   "configurations": {},
   "fabricConfigurations": {},
   "serviceProxies": {},
diff --git a/vid-app-common/src/test/resources/vf-csar.JSON b/vid-app-common/src/test/resources/vf-csar.JSON
index c1b71b3..591f068 100644
--- a/vid-app-common/src/test/resources/vf-csar.JSON
+++ b/vid-app-common/src/test/resources/vf-csar.JSON
@@ -3,7 +3,7 @@
 
   },
   "service": {
-    "category": "Mobility",
+    "category": "Emanuel",
     "description": "Bla bla",
     "serviceRole": null,
     "serviceType": null,
@@ -96,10 +96,10 @@
       "properties": {
         "availability_zone_max_count": "get_input:greatdefect0_availability_zone_max_count",
         "itc_flavor_name": "nv.c8r24d160",
-        "itc_image_name": "NIMBUS_IXLA-ITC_8.20_EA_KVM_210117.qcow2",
+        "itc_image_name": "KENNEDY_IXLA-ITC_8.20_EA_KVM_210117.qcow2",
         "itc_name_0": "get_input:greatdefect0_itc_name_0",
         "itm_flavor_name": "nv.c2r4d50",
-        "itm_image_name": "NIMBUS_IXLA-ITM_8.20.EA_KVM.qcow2",
+        "itm_image_name": "KENNEDY_IXLA-ITM_8.20.EA_KVM.qcow2",
         "vf_module_id": "get_input:greatdefect0_vf_module_id",
         "ecomp_generated_naming": "false"
       },
@@ -178,5 +178,8 @@
   "pnfs": {
 
   },
-  "vnfGroups": {}
+  "vnfGroups": {},
+  "vrfs": {
+
+  }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/vf-with-annotation-csar.json b/vid-app-common/src/test/resources/vf-with-annotation-csar.json
index db68313..17cb652 100644
--- a/vid-app-common/src/test/resources/vf-with-annotation-csar.json
+++ b/vid-app-common/src/test/resources/vf-with-annotation-csar.json
@@ -2,17 +2,17 @@
   "service": {
     "uuid": "f4d84bb4-a416-4b4e-997e-0059973630b9",
     "invariantUuid": "598e3f9e-3244-4d8f-a8e0-0e5d7a29eda9",
-    "name": "ADIOD vMX vPE_BV Service 488",
+    "name": "PASQUALE vMX vPE_BV Service 488",
     "version": "1.0",
     "toscaModelURL": null,
     "category": "Network L1-3",
     "serviceType": "",
     "serviceRole": "",
-    "description": "ADIOD vMX vPE based on Juniper 17.2 release. Updated with updated VF for v8.0 of VLM",
+    "description": "PASQUALE vMX vPE based on Juniper 17.2 release. Updated with updated VF for v8.0 of VLM",
     "serviceEcompNaming": "true",
     "instantiationType": "Macro",
     "inputs": {
-      "2017488_adiodvpe0_ASN": {
+      "2017488_pasqualevpe0_ASN": {
         "type": "string",
         "description": "AV/PE",
         "entry_schema": null,
@@ -26,11 +26,11 @@
     }
   },
   "vnfs": {
-    "2017-488_ADIOD-vPE 0": {
+    "2017-488_PASQUALE-vPE 0": {
       "uuid": "ea81d6f7-0861-44a7-b7d5-d173b562c350",
       "invariantUuid": "5be7e99e-8eb2-4d97-be63-8081ff3cd10e",
-      "description": "Name ADIOD vPE Description The provider edge function for the ADIOD service supported by the Junipers VMX product Category Router Vendor Juniper Vendor Release Code 17.2 Owners Mary Fragale. Updated 9-25 to use v8.0 of the Juniper Valid 2 VLM",
-      "name": "2017-488_ADIOD-vPE",
+      "description": "Name PASQUALE vPE Description The provider edge function for the PASQUALE service supported by the Junipers VMX product Category Router Vendor Juniper Vendor Release Code 17.2 Owners Mary Fragale. Updated 9-25 to use v8.0 of the Juniper Valid 2 VLM",
+      "name": "2017-488_PASQUALE-vPE",
       "version": "9.0",
       "customizationUuid": "41516cc6-5098-4b40-a619-f8d5f55fc4d8",
       "inputs": {
@@ -41,21 +41,21 @@
       },
       "properties": {
         "vmxvre_retype": "RE-VMX",
-        "vnf_config_template_version": "get_input:2017488_adiodvpe0_vnf_config_template_version",
+        "vnf_config_template_version": "get_input:2017488_pasqualevpe0_vnf_config_template_version",
         "sriov44_net_id": "48d399b3-11ee-48a8-94d2-f0ea94d6be8d",
         "int_ctl_net_id": "2f323477-6936-4d01-ac53-d849430281d9",
         "vmxvpfe_sriov41_0_port_mac": "00:11:22:EF:AC:DF",
         "int_ctl_net_name": "VMX-INTXI",
-        "vmx_int_ctl_prefix": "128.0.0.0",
+        "vmx_int_ctl_prefix": "10.0.0.10",
         "sriov43_net_id": "da349ca1-6de9-4548-be88-2d88e99bfef5",
         "sriov42_net_id": "760669ba-013d-4d9b-b0e7-4151fe2e6279",
         "sriov41_net_id": "25ad52d5-c165-40f8-b3b0-ddfc2373280a",
         "nf_type": "ROUTER",
-        "vmxvpfe_int_ctl_ip_1": "128.0.0.16",
+        "vmxvpfe_int_ctl_ip_1": "10.0.0.10",
         "is_AVPN_service": "false",
         "vmx_RSG_name": "vREXI-affinity",
         "vmx_int_ctl_forwarding": "l2",
-        "vmxvre_oam_ip_0": "10.40.123.5",
+        "vmxvre_oam_ip_0": "10.0.0.10",
         "vmxvpfe_sriov44_0_port_mac": "00:11:22:EF:AC:DF",
         "vmxvpfe_sriov41_0_port_vlanstrip": "false",
         "vmxvpfe_sriov42_0_port_vlanfilter": "4001",
@@ -83,10 +83,10 @@
         "vmxvpfe_sriov42_0_port_unknownmulticastallow": "true",
         "vmxvpfe_sriov44_0_port_vlanstrip": "false",
         "vf_module_id": "123",
-        "nf_function": "ADIOD vPE",
+        "nf_function": "PASQUALE vPE",
         "vmxvpfe_sriov43_0_port_unknownmulticastallow": "true",
-        "vmxvre_int_ctl_ip_0": "128.0.0.1",
-        "AIC_CLLI": "get_input:2017488_adiodvpe0_AIC_CLLI",
+        "vmxvre_int_ctl_ip_0": "10.0.0.10",
+        "AIC_CLLI": "get_input:2017488_pasqualevpe0_AIC_CLLI",
         "vnf_name": "mtnj309me6vre",
         "vmxvpfe_sriov41_0_port_unknownunicastallow": "true",
         "vmxvre_volume_type_1": "HITACHI",
@@ -94,24 +94,24 @@
         "vmxvre_volume_type_0": "HITACHI",
         "vmxvpfe_volume_type_0": "HITACHI",
         "vmxvpfe_sriov43_0_port_broadcastallow": "true",
-        "bandwidth_units": "get_input:2017488_adiodvpe0_bandwidth_units",
+        "bandwidth_units": "get_input:2017488_pasqualevpe0_bandwidth_units",
         "vnf_id": "123",
         "vmxvre_oam_prefix": "24",
-        "availability_zone_0": "get_input:2017488_adiodvpe0_availability_zone_0",
-        "ASN": "get_input:2017488_adiodvpe0_ASN",
+        "availability_zone_0": "get_input:2017488_pasqualevpe0_availability_zone_0",
+        "ASN": "get_input:2017488_pasqualevpe0_ASN",
         "vmxvre_chassis_i2cid": "161",
         "vmxvpfe_name_0": "vPFEXI",
-        "bandwidth": "get_input:2017488_adiodvpe0_bandwidth",
+        "bandwidth": "get_input:2017488_pasqualevpe0_bandwidth",
         "availability_zone_max_count": "1",
         "vmxvre_volume_size_0": "45.0",
         "vmxvre_volume_size_1": "50.0",
         "vmxvpfe_sriov42_0_port_broadcastallow": "true",
-        "vmxvre_oam_gateway": "10.40.123.1",
+        "vmxvre_oam_gateway": "10.0.0.10",
         "vmxvre_volume_name_1": "vREXI_FAVolume",
         "vmxvre_ore_present": "0",
         "vmxvre_volume_name_0": "vREXI_FBVolume",
         "vmxvre_type": "0",
-        "vnf_instance_name": "get_input:2017488_adiodvpe0_vnf_instance_name",
+        "vnf_instance_name": "get_input:2017488_pasqualevpe0_vnf_instance_name",
         "vmxvpfe_sriov41_0_port_unknownmulticastallow": "true",
         "oam_net_id": "b95eeb1d-d55d-4827-abb4-8ebb94941429",
         "vmx_int_ctl_len": "24",
@@ -126,32 +126,32 @@
         "ecomp_generated_naming": "true"
       },
       "type": "VF",
-      "modelCustomizationName": "2017-488_ADIOD-vPE 0",
+      "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
       "vfModules": {
-        "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vRE_BV..module-1": {
+        "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1": {
           "uuid": "a5d8df05-11cb-4351-96e0-b6d4168ea4df",
           "invariantUuid": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
           "customizationUuid": "f3d97417-0c8d-424e-8ff7-b2eb4fbcecc3",
           "description": null,
-          "name": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+          "name": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
           "version": "8",
-          "modelCustomizationName": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+          "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
           "properties": {
             "minCountInstances": 0,
             "maxCountInstances": null,
             "initialCount": 0,
-            "vfModuleLabel": "ADIOD_vRE_BV",
+            "vfModuleLabel": "PASQUALE_vRE_BV",
             "baseModule" : false
           },
           "inputs": {
             "bandwidth_units": {
-              "fromInputName": "2017488_adiodvpe0_bandwidth_units",
+              "fromInputName": "2017488_pasqualevpe0_bandwidth_units",
               "type": "string",
               "description": "Units of bandwidth",
               "entry_schema": null,
               "inputProperties": {
                 "sourceType": "HEAT",
-                "vfModuleLabel": "ADIOD_vRE_BV",
+                "vfModuleLabel": "PASQUALE_vRE_BV",
                 "paramName": "bandwidth_units"
               },
               "constraints": null,
@@ -159,13 +159,13 @@
               "default": "Gbps"
             },
             "bandwidth": {
-              "fromInputName": "2017488_adiodvpe0_bandwidth",
+              "fromInputName": "2017488_pasqualevpe0_bandwidth",
               "type": "string",
               "description": "Requested VPE bandwidth",
               "entry_schema": null,
               "inputProperties": {
                 "sourceType": "HEAT",
-                "vfModuleLabel": "ADIOD_vRE_BV",
+                "vfModuleLabel": "PASQUALE_vRE_BV",
                 "paramName": "bandwidth"
               },
               "constraints": null,
@@ -173,13 +173,13 @@
               "default": "10"
             },
             "vnf_instance_name": {
-              "fromInputName": "2017488_adiodvpe0_vnf_instance_name",
+              "fromInputName": "2017488_pasqualevpe0_vnf_instance_name",
               "type": "string",
               "description": "The hostname assigned to the vpe.",
               "entry_schema": null,
               "inputProperties": {
                 "sourceType": "HEAT",
-                "vfModuleLabel": "ADIOD_vRE_BV",
+                "vfModuleLabel": "PASQUALE_vRE_BV",
                 "paramName": "vnf_instance_name"
               },
               "constraints": null,
@@ -187,13 +187,13 @@
               "default": "mtnj309me6"
             },
             "vnf_config_template_version": {
-              "fromInputName": "2017488_adiodvpe0_vnf_config_template_version",
+              "fromInputName": "2017488_pasqualevpe0_vnf_config_template_version",
               "type": "string",
               "description": "VPE Software Version",
               "entry_schema": null,
               "inputProperties": {
                 "sourceType": "HEAT",
-                "vfModuleLabel": "ADIOD_vRE_BV",
+                "vfModuleLabel": "PASQUALE_vRE_BV",
                 "paramName": "vnf_config_template_version"
               },
               "constraints": null,
@@ -201,13 +201,13 @@
               "default": "17.2"
             },
             "AIC_CLLI": {
-              "fromInputName": "2017488_adiodvpe0_AIC_CLLI",
+              "fromInputName": "2017488_pasqualevpe0_AIC_CLLI",
               "type": "string",
               "description": "AIC Site CLLI",
               "entry_schema": null,
               "inputProperties": {
                 "sourceType": "HEAT",
-                "vfModuleLabel": "ADIOD_vRE_BV",
+                "vfModuleLabel": "PASQUALE_vRE_BV",
                 "paramName": "AIC_CLLI"
               },
               "constraints": null,
@@ -217,19 +217,19 @@
           },
           "volumeGroupAllowed": true
         },
-        "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0": {
+        "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0": {
           "uuid": "040e591e-5d30-4e0d-850f-7266e5a8e013",
           "invariantUuid": "b34833bb-6aa9-4ad6-a831-70b06367a091",
           "customizationUuid": "5c5f91f9-5e31-4120-b892-5536587ec258",
           "description": null,
-          "name": "2017488AdiodVpe..ADIOD_base_vPE_BV..module-0",
+          "name": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0",
           "version": "6",
-          "modelCustomizationName": "2017488AdiodVpe..ADIOD_base_vPE_BV..module-0",
+          "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0",
           "properties": {
             "minCountInstances": 1,
             "maxCountInstances": 1,
             "initialCount": 1,
-            "vfModuleLabel": "ADIOD_base_vPE_BV",
+            "vfModuleLabel": "PASQUALE_base_vPE_BV",
             "baseModule" : true
           },
           "inputs": {
@@ -237,30 +237,30 @@
           },
           "volumeGroupAllowed": false
         },
-        "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vPFE_BV..module-2": {
+        "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2": {
           "uuid": "b3e8b26e-cff0-49fc-a4e6-f3e16c8440fe",
           "invariantUuid": "eff8cc59-53a1-4101-aed7-8cf24ecf8339",
           "customizationUuid": "6e410843-257c-46d9-ba8a-8d94e1362452",
           "description": null,
-          "name": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+          "name": "2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2",
           "version": "8",
-          "modelCustomizationName": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+          "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2",
           "properties": {
             "minCountInstances": 0,
             "maxCountInstances": null,
             "initialCount": 0,
-            "vfModuleLabel": "ADIOD_vPFE_BV",
+            "vfModuleLabel": "PASQUALE_vPFE_BV",
             "baseModule" : false
           },
           "inputs": {
             "availability_zone_0": {
-              "fromInputName": "2017488_adiodvpe0_availability_zone_0",
+              "fromInputName": "2017488_pasqualevpe0_availability_zone_0",
               "type": "string",
               "description": "The Availability Zone to launch the instance.",
               "entry_schema": null,
               "inputProperties": {
                 "sourceType": "HEAT",
-                "vfModuleLabel": "ADIOD_vPFE_BV",
+                "vfModuleLabel": "PASQUALE_vPFE_BV",
                 "paramName": "availability_zone_0"
               },
               "constraints": null,
@@ -272,29 +272,29 @@
         }
       },
       "volumeGroups": {
-        "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vRE_BV..module-1": {
+        "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1": {
           "uuid": "a5d8df05-11cb-4351-96e0-b6d4168ea4df",
           "invariantUuid": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
           "customizationUuid": "f3d97417-0c8d-424e-8ff7-b2eb4fbcecc3",
           "description": null,
-          "name": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+          "name": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
           "version": "8",
-          "modelCustomizationName": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+          "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
           "properties": {
             "minCountInstances": 0,
             "maxCountInstances": null,
             "initialCount": 0,
-            "vfModuleLabel": "ADIOD_vRE_BV"
+            "vfModuleLabel": "PASQUALE_vRE_BV"
           },
           "inputs": {
             "bandwidth_units": {
-              "fromInputName": "2017488_adiodvpe0_bandwidth_units",
+              "fromInputName": "2017488_pasqualevpe0_bandwidth_units",
               "type": "string",
               "description": "Units of bandwidth",
               "entry_schema": null,
               "inputProperties": {
                 "sourceType": "HEAT",
-                "vfModuleLabel": "ADIOD_vRE_BV",
+                "vfModuleLabel": "PASQUALE_vRE_BV",
                 "paramName": "bandwidth_units"
               },
               "constraints": null,
@@ -302,13 +302,13 @@
               "default": "Gbps"
             },
             "bandwidth": {
-              "fromInputName": "2017488_adiodvpe0_bandwidth",
+              "fromInputName": "2017488_pasqualevpe0_bandwidth",
               "type": "string",
               "description": "Requested VPE bandwidth",
               "entry_schema": null,
               "inputProperties": {
                 "sourceType": "HEAT",
-                "vfModuleLabel": "ADIOD_vRE_BV",
+                "vfModuleLabel": "PASQUALE_vRE_BV",
                 "paramName": "bandwidth"
               },
               "constraints": null,
@@ -316,13 +316,13 @@
               "default": "10"
             },
             "vnf_instance_name": {
-              "fromInputName": "2017488_adiodvpe0_vnf_instance_name",
+              "fromInputName": "2017488_pasqualevpe0_vnf_instance_name",
               "type": "string",
               "description": "The hostname assigned to the vpe.",
               "entry_schema": null,
               "inputProperties": {
                 "sourceType": "HEAT",
-                "vfModuleLabel": "ADIOD_vRE_BV",
+                "vfModuleLabel": "PASQUALE_vRE_BV",
                 "paramName": "vnf_instance_name"
               },
               "constraints": null,
@@ -330,13 +330,13 @@
               "default": "mtnj309me6"
             },
             "vnf_config_template_version": {
-              "fromInputName": "2017488_adiodvpe0_vnf_config_template_version",
+              "fromInputName": "2017488_pasqualevpe0_vnf_config_template_version",
               "type": "string",
               "description": "VPE Software Version",
               "entry_schema": null,
               "inputProperties": {
                 "sourceType": "HEAT",
-                "vfModuleLabel": "ADIOD_vRE_BV",
+                "vfModuleLabel": "PASQUALE_vRE_BV",
                 "paramName": "vnf_config_template_version"
               },
               "constraints": null,
@@ -344,13 +344,13 @@
               "default": "17.2"
             },
             "AIC_CLLI": {
-              "fromInputName": "2017488_adiodvpe0_AIC_CLLI",
+              "fromInputName": "2017488_pasqualevpe0_AIC_CLLI",
               "type": "string",
               "description": "AIC Site CLLI",
               "entry_schema": null,
               "inputProperties": {
                 "sourceType": "HEAT",
-                "vfModuleLabel": "ADIOD_vRE_BV",
+                "vfModuleLabel": "PASQUALE_vRE_BV",
                 "paramName": "AIC_CLLI"
               },
               "constraints": null,
@@ -359,29 +359,29 @@
             }
           }
         },
-        "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vPFE_BV..module-2": {
+        "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2": {
           "uuid": "b3e8b26e-cff0-49fc-a4e6-f3e16c8440fe",
           "invariantUuid": "eff8cc59-53a1-4101-aed7-8cf24ecf8339",
           "customizationUuid": "6e410843-257c-46d9-ba8a-8d94e1362452",
           "description": null,
-          "name": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+          "name": "2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2",
           "version": "8",
-          "modelCustomizationName": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+          "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2",
           "properties": {
             "minCountInstances": 0,
             "maxCountInstances": null,
             "initialCount": 0,
-            "vfModuleLabel": "ADIOD_vPFE_BV"
+            "vfModuleLabel": "PASQUALE_vPFE_BV"
           },
           "inputs": {
             "availability_zone_0": {
-              "fromInputName": "2017488_adiodvpe0_availability_zone_0",
+              "fromInputName": "2017488_pasqualevpe0_availability_zone_0",
               "type": "string",
               "description": "The Availability Zone to launch the instance.",
               "entry_schema": null,
               "inputProperties": {
                 "sourceType": "HEAT",
-                "vfModuleLabel": "ADIOD_vPFE_BV",
+                "vfModuleLabel": "PASQUALE_vPFE_BV",
                 "paramName": "availability_zone_0"
               },
               "constraints": null,
@@ -396,7 +396,7 @@
   "networks": {
     
   },
-  "collectionResource": {
+  "collectionResources": {
     
   },
   "configurations": {
@@ -406,30 +406,30 @@
     
   },
   "vfModules": {
-    "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vRE_BV..module-1": {
+    "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1": {
       "uuid": "a5d8df05-11cb-4351-96e0-b6d4168ea4df",
       "invariantUuid": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
       "customizationUuid": "f3d97417-0c8d-424e-8ff7-b2eb4fbcecc3",
       "description": null,
-      "name": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+      "name": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
       "version": "8",
-      "modelCustomizationName": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+      "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
       "properties": {
         "minCountInstances": 0,
         "maxCountInstances": null,
         "initialCount": 0,
-        "vfModuleLabel": "ADIOD_vRE_BV",
+        "vfModuleLabel": "PASQUALE_vRE_BV",
         "baseModule" : false
       },
       "inputs": {
         "bandwidth_units": {
-          "fromInputName": "2017488_adiodvpe0_bandwidth_units",
+          "fromInputName": "2017488_pasqualevpe0_bandwidth_units",
           "type": "string",
           "description": "Units of bandwidth",
           "entry_schema": null,
           "inputProperties": {
             "sourceType": "HEAT",
-            "vfModuleLabel": "ADIOD_vRE_BV",
+            "vfModuleLabel": "PASQUALE_vRE_BV",
             "paramName": "bandwidth_units"
           },
           "constraints": null,
@@ -437,13 +437,13 @@
           "default": "Gbps"
         },
         "bandwidth": {
-          "fromInputName": "2017488_adiodvpe0_bandwidth",
+          "fromInputName": "2017488_pasqualevpe0_bandwidth",
           "type": "string",
           "description": "Requested VPE bandwidth",
           "entry_schema": null,
           "inputProperties": {
             "sourceType": "HEAT",
-            "vfModuleLabel": "ADIOD_vRE_BV",
+            "vfModuleLabel": "PASQUALE_vRE_BV",
             "paramName": "bandwidth"
           },
           "constraints": null,
@@ -451,13 +451,13 @@
           "default": "10"
         },
         "vnf_instance_name": {
-          "fromInputName": "2017488_adiodvpe0_vnf_instance_name",
+          "fromInputName": "2017488_pasqualevpe0_vnf_instance_name",
           "type": "string",
           "description": "The hostname assigned to the vpe.",
           "entry_schema": null,
           "inputProperties": {
             "sourceType": "HEAT",
-            "vfModuleLabel": "ADIOD_vRE_BV",
+            "vfModuleLabel": "PASQUALE_vRE_BV",
             "paramName": "vnf_instance_name"
           },
           "constraints": null,
@@ -465,13 +465,13 @@
           "default": "mtnj309me6"
         },
         "vnf_config_template_version": {
-          "fromInputName": "2017488_adiodvpe0_vnf_config_template_version",
+          "fromInputName": "2017488_pasqualevpe0_vnf_config_template_version",
           "type": "string",
           "description": "VPE Software Version",
           "entry_schema": null,
           "inputProperties": {
             "sourceType": "HEAT",
-            "vfModuleLabel": "ADIOD_vRE_BV",
+            "vfModuleLabel": "PASQUALE_vRE_BV",
             "paramName": "vnf_config_template_version"
           },
           "constraints": null,
@@ -479,13 +479,13 @@
           "default": "17.2"
         },
         "AIC_CLLI": {
-          "fromInputName": "2017488_adiodvpe0_AIC_CLLI",
+          "fromInputName": "2017488_pasqualevpe0_AIC_CLLI",
           "type": "string",
           "description": "AIC Site CLLI",
           "entry_schema": null,
           "inputProperties": {
             "sourceType": "HEAT",
-            "vfModuleLabel": "ADIOD_vRE_BV",
+            "vfModuleLabel": "PASQUALE_vRE_BV",
             "paramName": "AIC_CLLI"
           },
           "constraints": null,
@@ -495,19 +495,19 @@
       },
       "volumeGroupAllowed": true
     },
-    "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_base_vPE_BV..module-0": {
+    "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0": {
       "uuid": "040e591e-5d30-4e0d-850f-7266e5a8e013",
       "invariantUuid": "b34833bb-6aa9-4ad6-a831-70b06367a091",
       "customizationUuid": "5c5f91f9-5e31-4120-b892-5536587ec258",
       "description": null,
-      "name": "2017488AdiodVpe..ADIOD_base_vPE_BV..module-0",
+      "name": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0",
       "version": "6",
-      "modelCustomizationName": "2017488AdiodVpe..ADIOD_base_vPE_BV..module-0",
+      "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0",
       "properties": {
         "minCountInstances": 1,
         "maxCountInstances": 1,
         "initialCount": 1,
-        "vfModuleLabel": "ADIOD_base_vPE_BV",
+        "vfModuleLabel": "PASQUALE_base_vPE_BV",
         "baseModule" : true
       },
       "inputs": {
@@ -515,30 +515,30 @@
       },
       "volumeGroupAllowed": false
     },
-    "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vPFE_BV..module-2": {
+    "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2": {
       "uuid": "b3e8b26e-cff0-49fc-a4e6-f3e16c8440fe",
       "invariantUuid": "eff8cc59-53a1-4101-aed7-8cf24ecf8339",
       "customizationUuid": "6e410843-257c-46d9-ba8a-8d94e1362452",
       "description": null,
-      "name": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+      "name": "2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2",
       "version": "8",
-      "modelCustomizationName": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+      "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2",
       "properties": {
         "minCountInstances": 0,
         "maxCountInstances": null,
         "initialCount": 0,
-        "vfModuleLabel": "ADIOD_vPFE_BV",
+        "vfModuleLabel": "PASQUALE_vPFE_BV",
         "baseModule" : false
       },
       "inputs": {
         "availability_zone_0": {
-          "fromInputName": "2017488_adiodvpe0_availability_zone_0",
+          "fromInputName": "2017488_pasqualevpe0_availability_zone_0",
           "type": "string",
           "description": "The Availability Zone to launch the instance.",
           "entry_schema": null,
           "inputProperties": {
             "sourceType": "HEAT",
-            "vfModuleLabel": "ADIOD_vPFE_BV",
+            "vfModuleLabel": "PASQUALE_vPFE_BV",
             "paramName": "availability_zone_0"
           },
           "constraints": null,
@@ -550,30 +550,30 @@
     }
   },
   "volumeGroups": {
-    "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vRE_BV..module-1": {
+    "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1": {
       "uuid": "a5d8df05-11cb-4351-96e0-b6d4168ea4df",
       "invariantUuid": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
       "customizationUuid": "f3d97417-0c8d-424e-8ff7-b2eb4fbcecc3",
       "description": null,
-      "name": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+      "name": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
       "version": "8",
-      "modelCustomizationName": "2017488AdiodVpe..ADIOD_vRE_BV..module-1",
+      "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1",
       "properties": {
         "minCountInstances": 0,
         "maxCountInstances": null,
         "initialCount": 0,
-        "vfModuleLabel": "ADIOD_vRE_BV",
+        "vfModuleLabel": "PASQUALE_vRE_BV",
         "baseModule" : false
       },
       "inputs": {
         "bandwidth_units": {
-          "fromInputName": "2017488_adiodvpe0_bandwidth_units",
+          "fromInputName": "2017488_pasqualevpe0_bandwidth_units",
           "type": "string",
           "description": "Units of bandwidth",
           "entry_schema": null,
           "inputProperties": {
             "sourceType": "HEAT",
-            "vfModuleLabel": "ADIOD_vRE_BV",
+            "vfModuleLabel": "PASQUALE_vRE_BV",
             "paramName": "bandwidth_units"
           },
           "constraints": null,
@@ -581,13 +581,13 @@
           "default": "Gbps"
         },
         "bandwidth": {
-          "fromInputName": "2017488_adiodvpe0_bandwidth",
+          "fromInputName": "2017488_pasqualevpe0_bandwidth",
           "type": "string",
           "description": "Requested VPE bandwidth",
           "entry_schema": null,
           "inputProperties": {
             "sourceType": "HEAT",
-            "vfModuleLabel": "ADIOD_vRE_BV",
+            "vfModuleLabel": "PASQUALE_vRE_BV",
             "paramName": "bandwidth"
           },
           "constraints": null,
@@ -595,13 +595,13 @@
           "default": "10"
         },
         "vnf_instance_name": {
-          "fromInputName": "2017488_adiodvpe0_vnf_instance_name",
+          "fromInputName": "2017488_pasqualevpe0_vnf_instance_name",
           "type": "string",
           "description": "The hostname assigned to the vpe.",
           "entry_schema": null,
           "inputProperties": {
             "sourceType": "HEAT",
-            "vfModuleLabel": "ADIOD_vRE_BV",
+            "vfModuleLabel": "PASQUALE_vRE_BV",
             "paramName": "vnf_instance_name"
           },
           "constraints": null,
@@ -609,13 +609,13 @@
           "default": "mtnj309me6"
         },
         "vnf_config_template_version": {
-          "fromInputName": "2017488_adiodvpe0_vnf_config_template_version",
+          "fromInputName": "2017488_pasqualevpe0_vnf_config_template_version",
           "type": "string",
           "description": "VPE Software Version",
           "entry_schema": null,
           "inputProperties": {
             "sourceType": "HEAT",
-            "vfModuleLabel": "ADIOD_vRE_BV",
+            "vfModuleLabel": "PASQUALE_vRE_BV",
             "paramName": "vnf_config_template_version"
           },
           "constraints": null,
@@ -623,13 +623,13 @@
           "default": "17.2"
         },
         "AIC_CLLI": {
-          "fromInputName": "2017488_adiodvpe0_AIC_CLLI",
+          "fromInputName": "2017488_pasqualevpe0_AIC_CLLI",
           "type": "string",
           "description": "AIC Site CLLI",
           "entry_schema": null,
           "inputProperties": {
             "sourceType": "HEAT",
-            "vfModuleLabel": "ADIOD_vRE_BV",
+            "vfModuleLabel": "PASQUALE_vRE_BV",
             "paramName": "AIC_CLLI"
           },
           "constraints": null,
@@ -638,30 +638,30 @@
         }
       }
     },
-    "2017488_adiodvpe0..2017488AdiodVpe..ADIOD_vPFE_BV..module-2": {
+    "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2": {
       "uuid": "b3e8b26e-cff0-49fc-a4e6-f3e16c8440fe",
       "invariantUuid": "eff8cc59-53a1-4101-aed7-8cf24ecf8339",
       "customizationUuid": "6e410843-257c-46d9-ba8a-8d94e1362452",
       "description": null,
-      "name": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+      "name": "2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2",
       "version": "8",
-      "modelCustomizationName": "2017488AdiodVpe..ADIOD_vPFE_BV..module-2",
+      "modelCustomizationName": "2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2",
       "properties": {
         "minCountInstances": 0,
         "maxCountInstances": null,
         "initialCount": 0,
-        "vfModuleLabel": "ADIOD_vPFE_BV",
+        "vfModuleLabel": "PASQUALE_vPFE_BV",
         "baseModule" : false
       },
       "inputs": {
         "availability_zone_0": {
-          "fromInputName": "2017488_adiodvpe0_availability_zone_0",
+          "fromInputName": "2017488_pasqualevpe0_availability_zone_0",
           "type": "string",
           "description": "The Availability Zone to launch the instance.",
           "entry_schema": null,
           "inputProperties": {
             "sourceType": "HEAT",
-            "vfModuleLabel": "ADIOD_vPFE_BV",
+            "vfModuleLabel": "PASQUALE_vPFE_BV",
             "paramName": "availability_zone_0"
           },
           "constraints": null,
@@ -674,5 +674,8 @@
   "pnfs": {
     
   },
-  "vnfGroups": {}
+  "vnfGroups": {},
+  "vrfs": {
+
+  }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/vf-with-vfcInstanceGroups.json b/vid-app-common/src/test/resources/vf-with-vfcInstanceGroups.json
index 3b7e2e8..34e2d45 100644
--- a/vid-app-common/src/test/resources/vf-with-vfcInstanceGroups.json
+++ b/vid-app-common/src/test/resources/vf-with-vfcInstanceGroups.json
@@ -2,13 +2,13 @@
   "service": {
     "uuid": "6bce7302-70bd-4057-b48e-8d5b99e686ca",
     "invariantUuid": "9aa04749-c02c-432d-a90c-18caa361c833",
-    "name": "vDBE_srv",
+    "name": "vDOROTHEA_srv",
     "version": "1.0",
     "toscaModelURL": null,
     "category": "Network L4+",
     "serviceType": "",
     "serviceRole": "",
-    "description": "vDBE_srv",
+    "description": "vDOROTHEA_srv",
     "serviceEcompNaming": "true",
     "instantiationType": "A-La-Carte",
     "inputs": {
@@ -16,11 +16,11 @@
     }
   },
   "vnfs": {
-    "vDBE 0": {
+    "vDOROTHEA 0": {
       "uuid": "61535073-2e50-4141-9000-f66fea69b433",
       "invariantUuid": "fcdf49ce-6f0b-4ca2-b676-a484e650e734",
-      "description": "vDBE",
-      "name": "vDBE",
+      "description": "vDOROTHEA",
+      "name": "vDOROTHEA",
       "version": "0.2",
       "customizationUuid": "882e5dcb-ba9f-4766-8cde-e326638107db",
       "inputs": {
@@ -40,16 +40,16 @@
         "untr_network_collection_function": "untraaa"
       },
       "type": "VF",
-      "modelCustomizationName": "vDBE 0",
+      "modelCustomizationName": "vDOROTHEA 0",
       "vfModules": {
-        "vdbe0..Vdbe..main..module-0": {
+        "vdorothea0..Vdorothea..main..module-0": {
           "uuid": "25a4d009-2f5a-44b4-b02a-62c584c15912",
           "invariantUuid": "614afb1a-3e7e-44e9-90ab-424d0070c781",
           "customizationUuid": "3443b341-7b0b-498c-a84a-a7ee736cba7e",
           "description": null,
-          "name": "Vdbe..main..module-0",
+          "name": "Vdorothea..main..module-0",
           "version": "1",
-          "modelCustomizationName": "Vdbe..main..module-0",
+          "modelCustomizationName": "Vdorothea..main..module-0",
           "properties": {
             "minCountInstances": 1,
             "maxCountInstances": 1,
@@ -97,7 +97,7 @@
   "networks": {
     
   },
-  "collectionResource": {
+  "collectionResources": {
     
   },
   "configurations": {
@@ -107,14 +107,14 @@
     
   },
   "vfModules": {
-    "vdbe0..Vdbe..main..module-0": {
+    "vdorothea0..Vdorothea..main..module-0": {
       "uuid": "25a4d009-2f5a-44b4-b02a-62c584c15912",
       "invariantUuid": "614afb1a-3e7e-44e9-90ab-424d0070c781",
       "customizationUuid": "3443b341-7b0b-498c-a84a-a7ee736cba7e",
       "description": null,
-      "name": "Vdbe..main..module-0",
+      "name": "Vdorothea..main..module-0",
       "version": "1",
-      "modelCustomizationName": "Vdbe..main..module-0",
+      "modelCustomizationName": "Vdorothea..main..module-0",
       "properties": {
         "minCountInstances": 1,
         "maxCountInstances": 1,
@@ -134,5 +134,8 @@
   "pnfs": {
     
   },
-  "vnfGroups": {}
+  "vnfGroups": {},
+  "vrfs": {
+
+  }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/vl-csar.JSON b/vid-app-common/src/test/resources/vl-csar.JSON
index 3de6ee4..cdf2125 100644
--- a/vid-app-common/src/test/resources/vl-csar.JSON
+++ b/vid-app-common/src/test/resources/vl-csar.JSON
@@ -75,7 +75,7 @@
             "modelCustomizationName": "ExtVL 0"
         }
     },
-    "collectionResource": {
+    "collectionResources": {
 
     },
     "configurations": {
@@ -93,5 +93,8 @@
     "pnfs": {
 
     },
-    "vnfGroups": {}
+    "vnfGroups": {},
+    "vrfs": {
+
+    }
 }
\ No newline at end of file
diff --git a/vid-app-common/src/test/resources/vnf-grouping-csar.json b/vid-app-common/src/test/resources/vnf-grouping-csar.json
index 4c6f1d9..ebf2204 100644
--- a/vid-app-common/src/test/resources/vnf-grouping-csar.json
+++ b/vid-app-common/src/test/resources/vnf-grouping-csar.json
@@ -18,18 +18,18 @@
   },
   "networks": {
   },
-  "collectionResource": {
+  "collectionResources": {
   },
   "configurations": {
   },
   "fabricConfigurations": {
   },
   "serviceProxies": {
-    "vdbe_svc_vprs_proxy 0": {
+    "vdorothea_svc_vprs_proxy 0": {
       "uuid": "65fadfa8-a0d9-443f-95ad-836cd044e26c",
       "invariantUuid": "f4baae0c-b3a5-4ca1-a777-afbffe7010bc",
-      "description": "A Proxy for Service vDBE_Svc_vPRS",
-      "name": "vDBE_Svc_vPRS Service Proxy",
+      "description": "A Proxy for Service vDOROTHEA_Svc_vPRS",
+      "name": "vDOROTHEA_Svc_vPRS Service Proxy",
       "version": "1.0",
       "customizationUuid": "bdb63d23-e132-4ce7-af2c-a493b4cafac9",
       "inputs": {
@@ -42,7 +42,7 @@
       "type": "Service Proxy",
       "sourceModelUuid": "da7827a2-366d-4be6-8c68-a69153c61274",
       "sourceModelInvariant": "24632e6b-584b-4f45-80d4-fefd75fd9f14",
-      "sourceModelName": "vDBE_Svc_vPRS"
+      "sourceModelName": "vDOROTHEA_Svc_vPRS"
     },
     "tsbc0001vm001_svc_proxy 0": {
       "uuid": "65fadfa8-a0d9-443f-95ad-836cd044e26c",
@@ -87,11 +87,11 @@
         "ecomp_generated_naming": "true"
       },
       "members": {
-        "vdbe_svc_vprs_proxy 0": {
+        "vdorothea_svc_vprs_proxy 0": {
           "uuid": "65fadfa8-a0d9-443f-95ad-836cd044e26c",
           "invariantUuid": "f4baae0c-b3a5-4ca1-a777-afbffe7010bc",
-          "description": "A Proxy for Service vDBE_Svc_vPRS",
-          "name": "vDBE_Svc_vPRS Service Proxy",
+          "description": "A Proxy for Service vDOROTHEA_Svc_vPRS",
+          "name": "vDOROTHEA_Svc_vPRS Service Proxy",
           "version": "1.0",
           "customizationUuid": "bdb63d23-e132-4ce7-af2c-a493b4cafac9",
           "inputs": {},
@@ -102,7 +102,7 @@
           "type": "Service Proxy",
           "sourceModelUuid": "da7827a2-366d-4be6-8c68-a69153c61274",
           "sourceModelInvariant": "24632e6b-584b-4f45-80d4-fefd75fd9f14",
-          "sourceModelName": "vDBE_Svc_vPRS"
+          "sourceModelName": "vDOROTHEA_Svc_vPRS"
         }
       }
     },
@@ -119,7 +119,8 @@
         "function": "SIGNALING",
         "description": "DDD1",
         "type": "LOAD-GROUP",
-        "ecomp_generated_naming": "true"
+        "ecomp_generated_naming": "true",
+        "quantity": 3
       },
       "members": {
         "tsbc0001vm001_svc_proxy 0": {
@@ -141,5 +142,8 @@
         }
       }
     }
+  },
+  "vrfs": {
+
   }
 }
\ No newline at end of file
