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
