Merge "Product family ID on VNF should be mandatory"
diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties
index 393327d..41e50c3 100755
--- a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties
+++ b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties
@@ -135,7 +135,7 @@
 mso.restapi.operationalEnvironment.cloudResourcesRequests.status=${mso.restapi.cloudResourcesRequestsApiRoot}?requestId=<request_id>
 
 mso.displayTestAPIOnScreen=true
-mso.defaultTestAPI=VNF_API
+mso.defaultTestAPI=GR_API
 mso.maxOpenedInstantiationRequests=200
 mso.asyncPollingIntervalSeconds=1
 refreshTimeInstantiationDashboard=10
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseRequestIdFilter.java b/vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseRequestIdFilter.java
index faaf55a..1c96819 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseRequestIdFilter.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseRequestIdFilter.java
@@ -41,8 +41,10 @@
 import javax.servlet.http.HttpServletRequestWrapper;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.constraints.NotNull;
+import org.onap.logging.ref.slf4j.ONAPLogConstants.MDCs;
 import org.onap.vid.logging.Headers;
 import org.onap.vid.logging.RequestIdHeader;
+import org.slf4j.MDC;
 import org.springframework.web.filter.GenericFilterBean;
 
 @WebFilter(urlPatterns = "/*")
@@ -82,12 +84,17 @@
 
         if (isWrapNeeded(highestPriorityHeader, originalRequestId)) {
             // Copy originalRequestId to the promised header value
-            request = new PromiseRequestIdRequestWrapper(httpRequest, toUuidOrElse(originalRequestId, UUID::randomUUID));
+            request = new PromiseRequestIdRequestWrapper(httpRequest,
+                firstValidUuidOrElse(originalRequestId, requestIdFromMDC(), UUID::randomUUID));
         }
 
         return request;
     }
 
+    private String requestIdFromMDC() {
+        return MDC.get(MDCs.REQUEST_ID);
+    }
+
     private boolean verifyAndValidateUuid(String value) {
         return isNotEmpty(value) && uuidRegex.matcher(value).matches();
     }
@@ -99,6 +106,10 @@
         return !headerExistsAndValid;
     }
 
+    UUID firstValidUuidOrElse(String uuid1, String uuid2, Supplier<UUID> uuidSupplier) {
+        return toUuidOrElse(uuid1, () -> toUuidOrElse(uuid2, uuidSupplier));
+    }
+
     UUID toUuidOrElse(String uuid, Supplier<UUID> uuidSupplier) {
         if (verifyAndValidateUuid(uuid)) {
             try {
diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/filter/PromiseRequestIdFilterTest.java b/vid-app-common/src/test/java/org/onap/vid/controller/filter/PromiseRequestIdFilterTest.java
index d67bd61..f415bfb 100644
--- a/vid-app-common/src/test/java/org/onap/vid/controller/filter/PromiseRequestIdFilterTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/controller/filter/PromiseRequestIdFilterTest.java
@@ -51,9 +51,12 @@
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mockito;
 import org.mockito.stubbing.Answer;
+import org.onap.logging.ref.slf4j.ONAPLogConstants.MDCs;
 import org.onap.portalsdk.core.web.support.UserUtils;
 import org.onap.vid.logging.RequestIdHeader;
+import org.slf4j.MDC;
 import org.springframework.mock.web.MockHttpServletResponse;
+import org.testng.annotations.AfterMethod;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
@@ -70,10 +73,18 @@
 
     private final PromiseRequestIdFilter promiseRequestIdFilter = new PromiseRequestIdFilter();
 
+    @AfterMethod
+    public void tearDown() {
+        MDC.remove(MDCs.REQUEST_ID);
+    }
+
     @Test
-    public void givenRequestIdHeader_headerValueNotChanged() throws IOException, ServletException {
+    public void givenMdcValueAndRequestIdHeader_headerValueNotChanged() throws IOException, ServletException {
 
         final String someTxId = "863850e2-8545-4efd-94b8-afba5f52b3d5";
+        final String mdcTxId = "ed752ff1-3970-4f18-8219-2d821fa4eaea";
+
+        MDC.put(MDCs.REQUEST_ID, mdcTxId);
 
         final ImmutableMap<String, String> incomingRequestHeaders = ImmutableMap.of(
                 anotherHeader, anotherValue,
@@ -122,6 +133,20 @@
     }
 
     @Test
+    public void givenMdcValueAndNoRequestIdHeader_headerValueWasFromMDC() throws IOException, ServletException {
+
+        final String mdcTxId = "ed752ff1-3970-4f18-8219-2d821fa4eaea";
+
+        MDC.put(MDCs.REQUEST_ID, mdcTxId);
+
+        final ImmutableMap<String, String> incomingRequestHeaders = ImmutableMap.of(
+                anotherHeader, anotherValue
+        );
+
+        buildRequestThenRunThroughFilterAndAssertResultRequestHeaders(incomingRequestHeaders, specificTxId(mdcTxId));
+    }
+
+    @Test
     public void givenTwoRequestIdHeader_onapHeaderValueIsUsed() throws IOException, ServletException {
 
         final String onapTxId = "863850e2-8545-4efd-94b8-AFBA5F52B3D5"; // note mixed case
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__fe_input_cypress.json b/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__fe_input_cypress.json
index d215a43..16d369b 100644
--- a/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__fe_input_cypress.json
+++ b/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__fe_input_cypress.json
@@ -111,7 +111,7 @@
   "rollbackOnFailure": false,
   "isALaCarte": true,
   "collectionResources": {},
-  "testApi": "VNF_API",
+  "testApi": "GR_API",
   "vidNotions": {
     "instantiationUI": "legacy",
     "modelCategory": "other",
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__payload_to_mso.json b/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__payload_to_mso.json
index 91f80e9..5c258f6 100644
--- a/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__payload_to_mso.json
+++ b/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__payload_to_mso.json
@@ -36,7 +36,7 @@
       "retainAssignments": false,
       "usePreload" : true,
       "userParams": [],
-      "testApi": "VNF_API"
+      "testApi": "GR_API"
     },
     "modelInfo": {
       "modelType": "vfModule",
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/execute/setup/SetupCDTest.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/execute/setup/SetupCDTest.java
index b3be16a..dd08eb3 100644
--- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/execute/setup/SetupCDTest.java
+++ b/vid-automation/src/main/java/org/onap/sdc/ci/tests/execute/setup/SetupCDTest.java
@@ -171,9 +171,6 @@
 
 	public static void navigateToUrl(String url)  {
 		try {
-			System.out.println("Deleting cookies...");
-			deleteCookies();
-
 			System.out.println("Navigating to URL : " + url);
 			getDriver().navigate().to(url);
 			GeneralUIUtils.waitForLoader();
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java
index 7c4ce03..0888bd9 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/BasePresets/BaseMSOPreset.java
@@ -11,22 +11,6 @@
     public static final String DEFAULT_INSTANCE_ID = "f8791436-8d55-4fde-b4d5-72dd2cf13cfb";
     protected String cloudOwner = DEFAULT_CLOUD_OWNER;
 
-    public static String getRequestBodyWithTestApiOnly() {
-        if (Features.FLAG_ADD_MSO_TESTAPI_FIELD.isActive()) {
-            return "" +
-                    "{" +
-                    "  \"requestDetails\": { " +
-                    "    \"requestParameters\": { " +
-                    "      \"testApi\": \"VNF_API\" " +
-                    "    } " +
-                    "  } " +
-                    "} " +
-                    "";
-        } else {
-            return null;
-        }
-    }
-
     protected String addCloudOwnerIfNeeded() {
         return Features.FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST.isActive() ?
             "\"cloudOwner\": \"" + cloudOwner + "\"," : "";
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOBaseDeleteWithCloudConfiguration.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOBaseDeleteWithCloudConfiguration.java
index 0c81364..ad7bd0b 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOBaseDeleteWithCloudConfiguration.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOBaseDeleteWithCloudConfiguration.java
@@ -23,7 +23,7 @@
                 "      \"requestorId\": \"us16807000\"" +
                 "    }," +
                 "    \"requestParameters\": {" +
-                "      \"testApi\": \"VNF_API\"" +
+                "      \"testApi\": \"GR_API\"" +
                 "    }," +
                 "    \"cloudConfiguration\": {" +
                 "      \"lcpCloudRegionId\": \"hvf6\"," +
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateNetworkALaCarte5G.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateNetworkALaCarte5G.java
index 0b7c651..835621a 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateNetworkALaCarte5G.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateNetworkALaCarte5G.java
@@ -70,7 +70,7 @@
                 "      }" +
                 "    ]," +
                 "    \"requestParameters\": {" +
-                "      \"testApi\": \"VNF_API\"," +
+                "      \"testApi\": \"GR_API\"," +
                 "      \"userParams\": []" +
                 "    }" +
                 "  }" +
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateNetworkALaCarteOldViewEdit.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateNetworkALaCarteOldViewEdit.java
index fcad03c..fd70723 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateNetworkALaCarteOldViewEdit.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateNetworkALaCarteOldViewEdit.java
@@ -38,7 +38,7 @@
                 "          \"modelCustomizationName\": \"AIC30_CONTRAIL_BASIC 0\"" +
                 "        }," +
                 "        \"requestParameters\": {" +
-                "          \"testApi\": \"VNF_API\"," +
+                "          \"testApi\": \"GR_API\"," +
                 "          \"userParams\": []" +
                 "        }," +
                 "        \"cloudConfiguration\": {" +
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceAlacarte.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceAlacarte.java
index 180aaef..a0867e5 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceAlacarte.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceAlacarte.java
@@ -44,7 +44,7 @@
                 "      \"requestorId\": \""+this.requestorId+"\"" +
                 "    }," +
                 "    \"requestParameters\": {" +
-                "      \"testApi\": \"VNF_API\"," +
+                "      \"testApi\": \"GR_API\"," +
                 "      \"subscriptionServiceType\": \"TYLER SILVIA\"," +
                 "      \"aLaCarte\": true," +
                 "      \"userParams\": []" +
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceGen2AlacarteService.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceGen2AlacarteService.java
index f80f6bb..f1de64f 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceGen2AlacarteService.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceGen2AlacarteService.java
@@ -42,7 +42,7 @@
                 "      \"requestorId\": \"us16807000\" " +
                 "    }, " +
                 "    \"requestParameters\": { " +
-                "      \"testApi\": \"VNF_API\", " +
+                "      \"testApi\": \"GR_API\", " +
                 "      \"subscriptionServiceType\": \"TYLER SILVIA\", " +
                 "      \"aLaCarte\": true, " +
                 "      \"userParams\": [] " +
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceGen2WithNamesAlacarteGroupingService.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceGen2WithNamesAlacarteGroupingService.java
index 28705ad..fcec155 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceGen2WithNamesAlacarteGroupingService.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceGen2WithNamesAlacarteGroupingService.java
@@ -50,7 +50,7 @@
                 "      \"requestorId\": \"" + userId + "\" " +
                 "    }, " +
                 "    \"requestParameters\": { " +
-                "      \"testApi\": \"VNF_API\", " +
+                "      \"testApi\": \"GR_API\", " +
                 "      \"subscriptionServiceType\": \"TYLER SILVIA\", " +
                 "      \"aLaCarte\": true, " +
                 "      \"userParams\": [] " +
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceGen2WithNamesAlacarteService.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceGen2WithNamesAlacarteService.java
index cc33a3b..4ad26cc 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceGen2WithNamesAlacarteService.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceGen2WithNamesAlacarteService.java
@@ -47,7 +47,7 @@
                 "      \"requestorId\": \"us16807000\" " +
                 "    }, " +
                 "    \"requestParameters\": { " +
-                "      \"testApi\": \"VNF_API\", " +
+                "      \"testApi\": \"GR_API\", " +
                 "      \"subscriptionServiceType\": \"TYLER SILVIA\", " +
                 "      \"aLaCarte\": true, " +
                 "      \"userParams\": [] " +
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVNFInstanceOnlyRelatedServiceInstance.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVNFInstanceOnlyRelatedServiceInstance.java
index f203a7d..9ace359 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVNFInstanceOnlyRelatedServiceInstance.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVNFInstanceOnlyRelatedServiceInstance.java
@@ -66,7 +66,7 @@
                 "    ]," +
                 "    \"requestParameters\": {" +
                 "      \"userParams\": []," +
-                "      \"testApi\": \"VNF_API\"" +
+                "      \"testApi\": \"GR_API\"" +
                 "    }" +
                 "  }" +
                 "}";
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteE2E.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteE2E.java
index 07a7826..185c4bf 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteE2E.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteE2E.java
@@ -76,7 +76,7 @@
             + "                    \"value\": \"sample\""
             + "                }"
             + "            ],"
-            + "            \"testApi\": \"VNF_API\""
+            + "            \"testApi\": \"GR_API\""
             + "        }"
             + "    }"
             + "}";
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteE2E.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteE2E.java
index c00054d..07839ba 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteE2E.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteE2E.java
@@ -60,7 +60,7 @@
             + "        ],"
             + "        \"requestParameters\": {"
             + "            \"userParams\": [],"
-            + "            \"testApi\": \"VNF_API\""
+            + "            \"testApi\": \"GR_API\""
             + "        }"
             + "    }"
             + "}";
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteServiceCypress2.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteServiceCypress2.java
index afdb3f4..bca049d 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteServiceCypress2.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteServiceCypress2.java
@@ -30,7 +30,7 @@
                     "\"modelType\":\"vnf\"," +
                     "\"modelVersion\":\"4.0\"}," +
                 "\"requestParameters\":{" +
-                    "\"testApi\": \"VNF_API\", " +
+                    "\"testApi\": \"GR_API\", " +
                     "\"userParams\":[]" +
                 "}," +
                 "\"relatedInstanceList\":[" +
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfGroup.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfGroup.java
index ac2d6f4..41e6748 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfGroup.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfGroup.java
@@ -45,7 +45,7 @@
                 "      }" +
                 "    ]," +
                 "    \"requestParameters\": {" +
-                "      \"testApi\": \"VNF_API\", " +
+                "      \"testApi\": \"GR_API\", " +
                 "      \"userParams\": []" +
                 "    }" +
                 "  }" +
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfVlanTagging.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfVlanTagging.java
index d5faa3f..131fe80 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfVlanTagging.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfVlanTagging.java
@@ -55,7 +55,7 @@
                 "    }," +
                 "    \"requestParameters\": {" +
                 "      \"userParams\": []," +
-                "      \"testApi\": \"VNF_API\"" +
+                "      \"testApi\": \"GR_API\"" +
                 "    }," +
                 "    \"relatedInstanceList\": [{" +
                 "        \"relatedInstance\": {" +
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSODeleteALaCarteService.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSODeleteALaCarteService.java
index b20d462..0fb9179 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSODeleteALaCarteService.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSODeleteALaCarteService.java
@@ -37,7 +37,7 @@
                 "      \"requestorId\": \"us16807000\"" +
                 "    }," +
                 "    \"requestParameters\": {" +
-                "       \"testApi\": \"VNF_API\","+
+                "       \"testApi\": \"GR_API\","+
                 "      \"aLaCarte\": true" +
                 "    }" +
                 "  }" +
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestsGet5GServiceInstanceAndNetwork.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestsGet5GServiceInstanceAndNetwork.java
index 1d3b8c0..4c667d9 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestsGet5GServiceInstanceAndNetwork.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestsGet5GServiceInstanceAndNetwork.java
@@ -1,13 +1,12 @@
 package org.onap.simulator.presetGenerator.presets.mso;
 
-import com.google.common.collect.ImmutableMap;
-import org.onap.simulator.presetGenerator.presets.BasePresets.BaseMSOPreset;
-import org.springframework.http.HttpMethod;
+import static java.util.Collections.singletonList;
 
+import com.google.common.collect.ImmutableMap;
 import java.util.List;
 import java.util.Map;
-
-import static java.util.Collections.singletonList;
+import org.onap.simulator.presetGenerator.presets.BasePresets.BaseMSOPreset;
+import org.springframework.http.HttpMethod;
 
 public class PresetMSOOrchestrationRequestsGet5GServiceInstanceAndNetwork extends BaseMSOPreset {
 
@@ -82,7 +81,7 @@
                 "          \"requestParameters\": {" +
                 "            \"subscriptionServiceType\": \"TYLER SILVIA\"," +
                 "            \"aLaCarte\": true," +
-                "            \"testApi\": \"VNF_API\"" +
+                "            \"testApi\": \"GR_API\"" +
                 "          }," +
                 "          \"project\": {" +
                 "            \"projectName\": \"WATKINS\"" +
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestsGetByRequestId.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestsGetByRequestId.java
index 8524d92..ee4fd3a 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestsGetByRequestId.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestsGetByRequestId.java
@@ -1,13 +1,12 @@
 package org.onap.simulator.presetGenerator.presets.mso;
 
-import com.google.common.collect.ImmutableMap;
-import org.onap.simulator.presetGenerator.presets.BasePresets.BaseMSOPreset;
-import org.springframework.http.HttpMethod;
+import static java.util.Collections.singletonList;
 
+import com.google.common.collect.ImmutableMap;
 import java.util.List;
 import java.util.Map;
-
-import static java.util.Collections.singletonList;
+import org.onap.simulator.presetGenerator.presets.BasePresets.BaseMSOPreset;
+import org.springframework.http.HttpMethod;
 
 public class PresetMSOOrchestrationRequestsGetByRequestId extends BaseMSOPreset {
 
@@ -57,7 +56,7 @@
                 "      \"requestParameters\": {" +
                 "        \"subscriptionServiceType\": \"Kennedy\"," +
                 "        \"aLaCarte\": true," +
-                "        \"testApi\": \"VNF_API\"" +
+                "        \"testApi\": \"GR_API\"" +
                 "      }," +
                 "      \"project\": {" +
                 "        \"projectName\": \"Kennedy\"" +
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestsGetByServiceInstanceId.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestsGetByServiceInstanceId.java
index 9217765..cbce5a2 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestsGetByServiceInstanceId.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOOrchestrationRequestsGetByServiceInstanceId.java
@@ -1,13 +1,12 @@
 package org.onap.simulator.presetGenerator.presets.mso;
 
-import com.google.common.collect.ImmutableMap;
-import org.onap.simulator.presetGenerator.presets.BasePresets.BaseMSOPreset;
-import org.springframework.http.HttpMethod;
+import static java.util.Collections.singletonList;
 
+import com.google.common.collect.ImmutableMap;
 import java.util.List;
 import java.util.Map;
-
-import static java.util.Collections.singletonList;
+import org.onap.simulator.presetGenerator.presets.BasePresets.BaseMSOPreset;
+import org.springframework.http.HttpMethod;
 
 public class PresetMSOOrchestrationRequestsGetByServiceInstanceId extends BaseMSOPreset {
 
@@ -68,7 +67,7 @@
                 "      \"requestParameters\": {" +
                 "        \"subscriptionServiceType\": \"Kennedy\"," +
                 "        \"aLaCarte\": true," +
-                "        \"testApi\": \"VNF_API\"" +
+                "        \"testApi\": \"GR_API\"" +
                 "      }," +
                 "      \"project\": {" +
                 "        \"projectName\": \"Kennedy\"" +
@@ -138,7 +137,7 @@
                 "        \"lcpCloudRegionId\":\"olson5b\"" +
                 "      }," +
                 "      \"requestParameters\":{" +
-                "        \"testApi\":\"VNF_API\"" +
+                "        \"testApi\":\"GR_API\"" +
                 "      }," +
                 "      \"platform\":{" +
                 "        \"platformName\":\"AIC\"" +
diff --git a/vid-automation/src/main/java/vid/automation/test/test/ALaCarteflowTest.java b/vid-automation/src/main/java/vid/automation/test/test/ALaCarteflowTest.java
index 92b01d1..99107ae 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/ALaCarteflowTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/ALaCarteflowTest.java
@@ -39,7 +39,7 @@
     static final String SERVICE_NAME = "ggghhh";
     static final String SERVICE_ID = "537d3eb0-b7ab-4fe8-a438-6166ab6af49b";
     static final String VNF_ID = "0eb38f69-d96b-4d5e-b8c9-3736c292f0f7";
-    static final String DEFAULT_TEST_API_VALUE = "VNF_API";
+    static final String DEFAULT_TEST_API_VALUE = "GR_API";
     public static final String SERVICE_INSTANCE_ID = "SERVICE_INSTANCE_ID";
     public static final String A_LACARTE_FLOW_GET_ORCHESTRATION = "aLacarteFlow/get_orchestration_request_status.json";
     public static final String ORCHESTRATION_REQUEST_ID = "orchestrationRequestId";
@@ -71,7 +71,7 @@
 
 
     @Test(dataProvider = "msoTestApiOptions")
-    private void testAddVfModule(String msoTestApiOption, String msoTestApiValue) {
+    public void testAddVfModule(String msoTestApiOption, String msoTestApiValue) {
         withMsoTestApiConfiguration(msoTestApiOption, msoTestApiValue, () -> {
             final String REQUEST_ID = "dbe54591-c8ed-46d3-abc7-d3a24873bddd";
             final String MODEL_UUID = "d205e01d-e5da-4e68-8c52-f95cb0607959";
@@ -104,7 +104,7 @@
     }
 
     @Test
-    private void testTenant() throws Exception {
+    public void testTenant() throws Exception {
         ViewEditPage viewEditPage = new ViewEditPage();
         User user = usersService.getUser("Emanuel_with_tenant");
         relogin(user.credentials);
@@ -120,7 +120,7 @@
     }
 
     @Test(dataProvider = "msoTestApiOptions")
-    private void testAddVnf(String msoTestApiOption, String msoTestApiValue) {
+    public void testAddVnf(String msoTestApiOption, String msoTestApiValue) {
         withMsoTestApiConfiguration(msoTestApiOption, msoTestApiValue, () -> {
             final String MODEL_UUID = MODEL;
             String instanceName = new VidBasePage().generateInstanceName(Constants.ViewEdit.VNF_INSTANCE_NAME_PREFIX);
@@ -145,7 +145,7 @@
     }
 
     @Test(dataProvider = "msoTestApiOptions")
-    private void requiredLineOfBussiness_confirmVnfWithNoLob(String msoTestApiOption, String msoTestApiValue) throws Exception {
+    public void requiredLineOfBussiness_confirmVnfWithNoLob(String msoTestApiOption, String msoTestApiValue) throws Exception {
         withMsoTestApiConfiguration(msoTestApiOption, msoTestApiValue, () -> {
             goToInstance();
             String instanceName = new VidBasePage().generateInstanceName(Constants.ViewEdit.VNF_INSTANCE_NAME_PREFIX);
@@ -170,7 +170,7 @@
     }
 
     @Test
-    private void emptyLobAfterReopenCreateVnfDialog() throws Exception {
+    public void emptyLobAfterReopenCreateVnfDialog() throws Exception {
         final String lobToSelect = "ONAP";
         goToInstance();
         ViewEditPage viewEditPage = new ViewEditPage();
@@ -185,7 +185,7 @@
     }
 
     @Test(dataProvider = "msoTestApiOptions")
-    private void testAddVolumeGroup(String msoTestApiOption, String msoTestApiValue) throws Exception {
+    public void testAddVolumeGroup(String msoTestApiOption, String msoTestApiValue) throws Exception {
         withMsoTestApiConfiguration(msoTestApiOption, msoTestApiValue, () -> {
             final String REQUEST_ID = "dbe54591-c8ed-46d3-abc7-d3a24873bdaa";
             final String MODEL_UUID = "13f022c4-651e-4326-b8e1-61e9a8c7a7ad";
@@ -230,8 +230,8 @@
     @DataProvider
     public static Object[][] msoTestApiOptions() {
         return new Object[][]{
-                {"VNF_API (old)", DEFAULT_TEST_API_VALUE}
-                , {"GR_API (new)", "GR_API"}
+                {"GR_API (new)", DEFAULT_TEST_API_VALUE}
+                , {"VNF_API (old)", "VNF_API"}
         };
     }
 
@@ -244,7 +244,7 @@
                 test.run();
             } finally {
                 // back to default
-                selectMsoTestApiOption("VNF_API (old)");
+                selectMsoTestApiOption("GR_API (new)");
             }
         }
     }
diff --git a/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java b/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java
index 351e5b0..e092ad3 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/ChangeManagementTest.java
@@ -649,7 +649,7 @@
                                 .put("workflow", "" + workflowName + "")
                                 .put("policyYN", "Y")
                                 .put("sniroYN", "Y")
-                                .put("testApi", "VNF_API")
+                                .put("testApi", "GR_API")
                                 .put("vnfType", "vMobileDNS")
                                 .putAll(workflowParams)
                                 .build()
diff --git a/vid-automation/src/main/java/vid/automation/test/test/VidBaseTestCase.java b/vid-automation/src/main/java/vid/automation/test/test/VidBaseTestCase.java
index fd3dd47..8421427 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/VidBaseTestCase.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/VidBaseTestCase.java
@@ -113,7 +113,7 @@
         } catch (URISyntaxException e) {
             throw new RuntimeException(e);
         }
-        this.uri = new JerseyUriBuilder().host(envUrI.getHost()).port(envUrI.getPort()).scheme("http").path("vid").build();
+        this.uri = new JerseyUriBuilder().host(envUrI.getHost()).port(envUrI.getPort()).scheme(envUrI.getScheme()).path("vid").build();
     }
 
     public void login() {
diff --git a/vid-automation/src/main/java/vid/automation/test/test/ViewEditServiceInstanceTest.java b/vid-automation/src/main/java/vid/automation/test/test/ViewEditServiceInstanceTest.java
index cbc28d0..94af659 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/ViewEditServiceInstanceTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/ViewEditServiceInstanceTest.java
@@ -4,8 +4,8 @@
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.matchesPattern;
 import static org.hamcrest.collection.IsEmptyCollection.empty;
-import static org.testng.AssertJUnit.assertEquals;
 import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.APPEND;
 
 import com.google.common.collect.ImmutableMap;
@@ -14,6 +14,7 @@
 import java.time.LocalDate;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -55,7 +56,7 @@
     private final String crNetworkText ="NETWORK INSTANCE GROUP: l3network-id-rs804s | ROLE: RosemaProtectedOam.OAM | TYPE: Tenant_Layer_3 | # OF NETWORKS: 3";
     private final String crCollectionText ="COLLECTION: collection-name | TYPE: L3-NETWORK";
     private final String crInfoText = "\"requestState\": \"COMPLETE\"";
-    SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss");
+    SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss", Locale.US);
     static final String LCP_REGION = "hvf6";
     static final String CLOUD_OWNER = "AIC";
     static final String TENANT = "bae71557c5bb4d5aac6743a4e5f1d054";
@@ -284,6 +285,7 @@
         viewEditPage.clickCloseButton();
     }
 
+    //this test works only if your browser run at UTC timezone
     @Test
     public void testTimestampOnDeactivateAndInfoServiceInstance() throws ParseException {
         SimulatorApi.clearAll();
@@ -296,7 +298,7 @@
         goToExistingInstanceById(serviceInstanceId);
         Click.byClass("service-info");
         GeneralUIUtils.ultimateWait();
-        assertEquals("Timestamp isn't the finished time", getTimeatampValue(Constants.ViewEdit.DETAILS_LOG), "Tue, 24 Oct 2017 02:28:39");
+        assertThat("Timestamp isn't the finished time", getTimeatampValue(Constants.ViewEdit.DETAILS_LOG), matchesPattern("Mon, 23 Oct 2017 [0-9]{1,2}:28:39")); //timezone insensitive
         viewEditPage.clickCloseButton();
         viewEditPage.clickDeactivateButton();
         GeneralUIUtils.ultimateWait();
diff --git a/vid-automation/src/main/resources/NewServiceInstanceTest/createNewServiceInstance_macro_validPopupDataAndUI__dynamicFieldsEcompNamingFalse.json b/vid-automation/src/main/resources/NewServiceInstanceTest/createNewServiceInstance_macro_validPopupDataAndUI__dynamicFieldsEcompNamingFalse.json
index d8aebc7..222f895 100644
--- a/vid-automation/src/main/resources/NewServiceInstanceTest/createNewServiceInstance_macro_validPopupDataAndUI__dynamicFieldsEcompNamingFalse.json
+++ b/vid-automation/src/main/resources/NewServiceInstanceTest/createNewServiceInstance_macro_validPopupDataAndUI__dynamicFieldsEcompNamingFalse.json
@@ -1943,7 +1943,7 @@
         "bulkSize": "3",
         "aicZoneName": "NFTJSSSS-NFT1",
         "owningEntityName": "WayneHolland",
-        "testApi": "VNF_API",
+        "testApi": "GR_API",
         "tenantName": "AIN Web Tool-15-D-testalexandria",
         "modelInfo": {
           "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
diff --git a/vid-automation/src/main/resources/asyncInstantiation/vidRequestCreateALaCarte.json b/vid-automation/src/main/resources/asyncInstantiation/vidRequestCreateALaCarte.json
index 71ba536..0496266 100644
--- a/vid-automation/src/main/resources/asyncInstantiation/vidRequestCreateALaCarte.json
+++ b/vid-automation/src/main/resources/asyncInstantiation/vidRequestCreateALaCarte.json
@@ -20,7 +20,7 @@
   "tenantId" : "c85f0e80-0636-44a4-8cb2-4ec00d056e79",
   "tenantName" : "Hedvika Wendelin",
   "bulkSize": "1",
-  "testApi": "VNF_API",
+  "testApi": "GR_API",
   "isALaCarte": true
 }
 
diff --git a/vid-automation/src/main/resources/asyncInstantiation/vidRequestCreateALaCarteForTemplate.json b/vid-automation/src/main/resources/asyncInstantiation/vidRequestCreateALaCarteForTemplate.json
index 5b831b9..3abb41f 100644
--- a/vid-automation/src/main/resources/asyncInstantiation/vidRequestCreateALaCarteForTemplate.json
+++ b/vid-automation/src/main/resources/asyncInstantiation/vidRequestCreateALaCarteForTemplate.json
@@ -26,7 +26,7 @@
   "rollbackOnFailure": true,
   "aicZoneName": null,
   "owningEntityName": "WayneHolland",
-  "testApi": "VNF_API",
+  "testApi": "GR_API",
   "tenantName": null,
   "modelInfo": {
     "modelInvariantId": "d1068db8-b933-4919-8972-8bc1aed366c8",
diff --git a/vid-automation/src/main/resources/asyncInstantiation/vidRequestCreateALaCarteWithVnf.json b/vid-automation/src/main/resources/asyncInstantiation/vidRequestCreateALaCarteWithVnf.json
index c6529c8..b145f3e 100644
--- a/vid-automation/src/main/resources/asyncInstantiation/vidRequestCreateALaCarteWithVnf.json
+++ b/vid-automation/src/main/resources/asyncInstantiation/vidRequestCreateALaCarteWithVnf.json
@@ -41,7 +41,7 @@
   "tenantId" : "c85f0e80-0636-44a4-8cb2-4ec00d056e79",
   "tenantName" : "Hedvika Wendelin",
   "bulkSize": "BULK_SIZE",
-  "testApi": "VNF_API",
+  "testApi": "GR_API",
   "isALaCarte": true
 }
 
diff --git a/vid-automation/src/main/resources/registration_to_simulator/add_network/mso_add_network_error.json b/vid-automation/src/main/resources/registration_to_simulator/add_network/mso_add_network_error.json
index 3e31a39..a6b8088 100644
--- a/vid-automation/src/main/resources/registration_to_simulator/add_network/mso_add_network_error.json
+++ b/vid-automation/src/main/resources/registration_to_simulator/add_network/mso_add_network_error.json
@@ -22,7 +22,7 @@
           "modelCustomizationName": "AIC30_CONTRAIL_BASIC 0"
         },
         "requestParameters": {
-          "testApi": "VNF_API",
+          "testApi": "GR_API",
           "userParams": []
         },
         "cloudConfiguration": {
diff --git a/vid-automation/src/main/resources/registration_to_simulator/create_new_instance/deploy/mso_create_svc_instance.json b/vid-automation/src/main/resources/registration_to_simulator/create_new_instance/deploy/mso_create_svc_instance.json
index 5cf1c34..d6c4ec3 100644
--- a/vid-automation/src/main/resources/registration_to_simulator/create_new_instance/deploy/mso_create_svc_instance.json
+++ b/vid-automation/src/main/resources/registration_to_simulator/create_new_instance/deploy/mso_create_svc_instance.json
@@ -21,7 +21,7 @@
           "userParams": [],
           "subscriptionServiceType": "TYLER SILVIA",
           "aLaCarte": true,
-          "testApi": "VNF_API"
+          "testApi": "GR_API"
         },
         "subscriberInfo": {
           "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
diff --git a/vid-automation/src/main/resources/registration_to_simulator/search_for_service_instance/mso_instance_orch_status_req.json b/vid-automation/src/main/resources/registration_to_simulator/search_for_service_instance/mso_instance_orch_status_req.json
index 1106697..e45de76 100644
--- a/vid-automation/src/main/resources/registration_to_simulator/search_for_service_instance/mso_instance_orch_status_req.json
+++ b/vid-automation/src/main/resources/registration_to_simulator/search_for_service_instance/mso_instance_orch_status_req.json
@@ -13,7 +13,7 @@
         {
           "request": {
             "requestId": "678cc766-b673-4a50-b9c5-471f68914590",
-            "startTime": "Mon, 23 Oct 2017 23:28:39 GMT",
+            "startTime": "Mon, 23 Oct 2017 15:28:39 GMT",
             "requestScope": "service",
             "requestType": "createInstance",
             "instanceReferences": {
@@ -24,7 +24,7 @@
               "requestState": "COMPLETE",
               "statusMessage": "Service Instance was created successfully.",
               "percentProgress": 100,
-              "finishTime": "Mon, 23 Oct 2017 23:28:39 GMT"
+              "finishTime": "Mon, 23 Oct 2017 15:28:39 GMT"
             }
           }
         }
diff --git a/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java b/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java
index 9651002..962a786 100644
--- a/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java
@@ -18,7 +18,6 @@
 import static vid.automation.test.services.SimulatorApi.retrieveRecordedRequests;
 
 import com.fasterxml.jackson.databind.JsonNode;
-
 import java.lang.reflect.Method;
 import java.net.URI;
 import java.util.ArrayList;
@@ -28,12 +27,15 @@
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
+import java.util.Random;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.exception.ExceptionUtils;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.jetbrains.annotations.NotNull;
 import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
 import org.onap.vid.api.BaseApiTest;
+import org.springframework.web.client.RestClientException;
 import org.springframework.web.client.RestTemplate;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.DataProvider;
@@ -234,12 +236,29 @@
     }
 
     private JsonNode getCheckerResults (String logtype, String logLines){
+
+        final int MAX_RETRIES = 3;
+
         Map<String, String> params = new HashMap<>();
         params.put("format", "raw");
         params.put("type", logtype);
         params.put("component", "vid");
         params.put("data", logLines);
 
-        return restTemplate.postForObject(logChecker, params, JsonNode.class);
+        for (int i=0; i< MAX_RETRIES; i++) {
+            try {
+                return restTemplate.postForObject(logChecker, params, JsonNode.class);
+            } catch (RestClientException exception) { //retry for cases that logchecker is not available immediately
+                logger.error("Failed to call to logChecker try: " + i, exception);
+                if (i<(MAX_RETRIES-1)) { //no need to sleep on last retry
+                    try {
+                        Thread.sleep((new Random().nextInt(2000) + 1000)); //random sleep between 1-3 seconds
+                    } catch (InterruptedException e) {
+                        ExceptionUtils.rethrow(e);
+                    }
+                }
+            }
+        }
+        throw new AssertionError("failed to call to logChecker after max retries: "+MAX_RETRIES);
     }
 }
diff --git a/vid-automation/src/test/resources/VnfGroup/ServiceWithVnfGroupsDeleteRequest.json b/vid-automation/src/test/resources/VnfGroup/ServiceWithVnfGroupsDeleteRequest.json
index d1a7770..34805e1 100644
--- a/vid-automation/src/test/resources/VnfGroup/ServiceWithVnfGroupsDeleteRequest.json
+++ b/vid-automation/src/test/resources/VnfGroup/ServiceWithVnfGroupsDeleteRequest.json
@@ -43,6 +43,6 @@
     "modelType": "service",
     "modelVersion": "1.0"
   },
-  "testApi": "VNF_API",
+  "testApi": "GR_API",
   "action": "Delete"
 }
diff --git a/vid-automation/src/test/resources/VnfGroup/VnfGroupCreate1Delete1None1Request.json b/vid-automation/src/test/resources/VnfGroup/VnfGroupCreate1Delete1None1Request.json
index cb2f201..88757da 100644
--- a/vid-automation/src/test/resources/VnfGroup/VnfGroupCreate1Delete1None1Request.json
+++ b/vid-automation/src/test/resources/VnfGroup/VnfGroupCreate1Delete1None1Request.json
@@ -208,5 +208,5 @@
     "modelVersion": "1.0"
   },
 
-  "testApi": "VNF_API"
+  "testApi": "GR_API"
 }
diff --git a/vid-automation/src/test/resources/VnfGroup/deleteServiceWith2VnfGroupsRequest_AndThreeGroupMembers.json b/vid-automation/src/test/resources/VnfGroup/deleteServiceWith2VnfGroupsRequest_AndThreeGroupMembers.json
index b7c6dc2..7dfe064 100644
--- a/vid-automation/src/test/resources/VnfGroup/deleteServiceWith2VnfGroupsRequest_AndThreeGroupMembers.json
+++ b/vid-automation/src/test/resources/VnfGroup/deleteServiceWith2VnfGroupsRequest_AndThreeGroupMembers.json
@@ -163,7 +163,7 @@
   "instanceName": "SERVICE_INSTANCE_NAME",
   "owningEntityName": null,
   "rollbackOnFailure": false,
-  "testApi": "VNF_API",
+  "testApi": "GR_API",
   "isALaCarte": true,
   "vidNotions": {
     "instantiationUI": "serviceWithVnfGrouping",
diff --git a/vid-automation/src/test/resources/VnfGroup/payloadTemplate1VnfGroupWith3MembersRequest.json b/vid-automation/src/test/resources/VnfGroup/payloadTemplate1VnfGroupWith3MembersRequest.json
index d6cf636..5d8843a 100644
--- a/vid-automation/src/test/resources/VnfGroup/payloadTemplate1VnfGroupWith3MembersRequest.json
+++ b/vid-automation/src/test/resources/VnfGroup/payloadTemplate1VnfGroupWith3MembersRequest.json
@@ -182,5 +182,5 @@
     "modelType": "service",
     "modelVersion": "1.0"
   },
-  "testApi": "VNF_API"
+  "testApi": "GR_API"
 }
diff --git a/vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroupCreateRequest.json b/vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroupCreateRequest.json
index bb0334b..478c32a 100644
--- a/vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroupCreateRequest.json
+++ b/vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroupCreateRequest.json
@@ -64,7 +64,7 @@
   "subscriberName": "SILVIA ROBBINS",
   "owningEntityName": "WayneHolland",
   "rollbackOnFailure": true,
-  "testApi": "VNF_API",
+  "testApi": "GR_API",
   "isALaCarte": true,
   "isDirty":true,
   "action": "Create"
diff --git a/vid-automation/src/test/resources/VnfGroup/vnfGroupCreate1VnfGroupAndDelete2VnfGroupsRequest.json b/vid-automation/src/test/resources/VnfGroup/vnfGroupCreate1VnfGroupAndDelete2VnfGroupsRequest.json
index 2e0f85e..e294712 100644
--- a/vid-automation/src/test/resources/VnfGroup/vnfGroupCreate1VnfGroupAndDelete2VnfGroupsRequest.json
+++ b/vid-automation/src/test/resources/VnfGroup/vnfGroupCreate1VnfGroupAndDelete2VnfGroupsRequest.json
@@ -119,5 +119,5 @@
     "modelVersion": "1.0"
   },
 
-  "testApi": "VNF_API"
+  "testApi": "GR_API"
 }
diff --git a/vid-automation/src/test/resources/VnfGroup/vnfGroupWithExistingAndNewVnfMembers.json b/vid-automation/src/test/resources/VnfGroup/vnfGroupWithExistingAndNewVnfMembers.json
index cabdbca..aeaf6b6 100644
--- a/vid-automation/src/test/resources/VnfGroup/vnfGroupWithExistingAndNewVnfMembers.json
+++ b/vid-automation/src/test/resources/VnfGroup/vnfGroupWithExistingAndNewVnfMembers.json
@@ -43,7 +43,7 @@
   "subscriptionServiceType": "service-instance-type",
   "tenantId": null,
   "tenantName": null,
-  "testApi": "VNF_API",
+  "testApi": "GR_API",
   "validationCounter": 0,
   "vnfGroups": {
     "VNF_GROUP1_INSTANCE_ID": {
diff --git a/vid-automation/src/test/resources/asyncInstantiation/ServiceTreeForRetry_serviceInstance.json b/vid-automation/src/test/resources/asyncInstantiation/ServiceTreeForRetry_serviceInstance.json
index d5b282e..aa1945f 100644
--- a/vid-automation/src/test/resources/asyncInstantiation/ServiceTreeForRetry_serviceInstance.json
+++ b/vid-automation/src/test/resources/asyncInstantiation/ServiceTreeForRetry_serviceInstance.json
@@ -57,7 +57,7 @@
   "bulkSize": 1,
   "rollbackOnFailure": "false",
   "isALaCarte": true,
-  "testApi": "VNF_API",
+  "testApi": "GR_API",
   "instanceId": "INSTANCE_ID",
   "action": "None",
   "trackById": "TRACK_BY_ID",
diff --git a/vid-automation/src/test/resources/asyncInstantiation/ServiceWithFailedServiceInstance.json b/vid-automation/src/test/resources/asyncInstantiation/ServiceWithFailedServiceInstance.json
index 28761f3..0d840da 100644
--- a/vid-automation/src/test/resources/asyncInstantiation/ServiceWithFailedServiceInstance.json
+++ b/vid-automation/src/test/resources/asyncInstantiation/ServiceWithFailedServiceInstance.json
@@ -33,7 +33,7 @@
   "subscriptionServiceType": "TYLER SILVIA",
   "tenantId": "c85f0e80-0636-44a4-8cb2-4ec00d056e79",
   "tenantName": "Hedvika Wendelin",
-  "testApi": "VNF_API",
+  "testApi": "GR_API",
   "trackById": "TRACK_BY_ID",
   "vnfGroups": {
   },
diff --git a/vid-automation/src/test/resources/asyncInstantiation/templates__instance_from_template__set_without_modify1.json b/vid-automation/src/test/resources/asyncInstantiation/templates__instance_from_template__set_without_modify1.json
index d2e1d6d..15d506b 100644
--- a/vid-automation/src/test/resources/asyncInstantiation/templates__instance_from_template__set_without_modify1.json
+++ b/vid-automation/src/test/resources/asyncInstantiation/templates__instance_from_template__set_without_modify1.json
@@ -75,7 +75,7 @@
       "action": "Create",
       "instanceId": null,
       "instanceName": "hvf6arlba007",
-      "originalName": "vProbe_NC_VNF 0",
+      "originalName": "024a417d-ca46-40bf-95ce-809c6a269011",
       "vnfStoreKey": "vProbe_NC_VNF 0",
       "instanceParams": [
         {
@@ -169,7 +169,7 @@
       },
       "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
       "instanceName": "hvf6arlba008",
-      "originalName": "vProbe_NC_VNF 0",
+      "originalName": "024a417d-ca46-40bf-95ce-809c6a269011",
       "vnfStoreKey": "vProbe_NC_VNF 0_1",
       "action": "Create",
       "platformName": "xxx1",
diff --git a/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json b/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json
index 296ad31..daccff0 100644
--- a/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json
+++ b/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json
@@ -45,7 +45,7 @@
       },
       "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
       "instanceName": "hvf6arlba007",
-      "originalName": "vProbe_NC_VNF 0",
+      "originalName": "024a417d-ca46-40bf-95ce-809c6a269011",
       "action": "Create",
       "platformName": "xxx1",
       "lcpCloudRegionId": "hvf6",
@@ -123,7 +123,7 @@
       },
       "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
       "instanceName": "hvf6arlba008",
-      "originalName": "vProbe_NC_VNF 0",
+      "originalName": "024a417d-ca46-40bf-95ce-809c6a269011",
       "action": "Create",
       "platformName": "xxx1",
       "lcpCloudRegionId": "hvf6",
diff --git a/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarte.json b/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarte.json
index 71ba536..0496266 100644
--- a/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarte.json
+++ b/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarte.json
@@ -20,7 +20,7 @@
   "tenantId" : "c85f0e80-0636-44a4-8cb2-4ec00d056e79",
   "tenantName" : "Hedvika Wendelin",
   "bulkSize": "1",
-  "testApi": "VNF_API",
+  "testApi": "GR_API",
   "isALaCarte": true
 }
 
diff --git a/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarteWithVnfGroup.json b/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarteWithVnfGroup.json
index 4306752..d458b63 100644
--- a/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarteWithVnfGroup.json
+++ b/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarteWithVnfGroup.json
@@ -38,7 +38,7 @@
   "tenantId" : "c85f0e80-0636-44a4-8cb2-4ec00d056e79",
   "tenantName" : "Hedvika Wendelin",
   "bulkSize": "1",
-  "testApi": "VNF_API",
+  "testApi": "GR_API",
   "isALaCarte": true
 }
 
diff --git a/vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Vnf.json b/vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Vnf.json
index f6373bf..0dc9321 100644
--- a/vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Vnf.json
+++ b/vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Vnf.json
@@ -291,5 +291,5 @@
   },
   "orchStatus": "Active",
   "modelInavariantId": "6b528779-44a3-4472-bdff-9cd15ec93450",
-  "testApi": "VNF_API"
+  "testApi": "GR_API"
 }
diff --git a/vid-automation/src/test/resources/asyncInstantiation/vidRequestDeleteServiceWithVnf.json b/vid-automation/src/test/resources/asyncInstantiation/vidRequestDeleteServiceWithVnf.json
index ac5f7fa..9cbbfce 100644
--- a/vid-automation/src/test/resources/asyncInstantiation/vidRequestDeleteServiceWithVnf.json
+++ b/vid-automation/src/test/resources/asyncInstantiation/vidRequestDeleteServiceWithVnf.json
@@ -67,5 +67,5 @@
   "isALaCarte": true,
   "orchStatus": "Active",
   "modelInavariantId": "6b528779-44a3-4472-bdff-9cd15ec93450",
-  "testApi": "VNF_API"
+  "testApi": "GR_API"
 }
\ No newline at end of file
diff --git a/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_delete_or_unassign_service_instance.json b/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_delete_or_unassign_service_instance.json
index 3b0204a..951eac1 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_delete_or_unassign_service_instance.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_delete_or_unassign_service_instance.json
@@ -12,7 +12,7 @@
       "requestorId": "16807000"
     },
     "requestParameters": {
-      "testApi": "VNF_API",
+      "testApi": "GR_API",
       "aLaCarte": false
     }
   }
diff --git a/vid-automation/src/test/resources/vrf/vrfServiceCreateRequest.json b/vid-automation/src/test/resources/vrf/vrfServiceCreateRequest.json
index a3fcd0e..2d71217 100644
--- a/vid-automation/src/test/resources/vrf/vrfServiceCreateRequest.json
+++ b/vid-automation/src/test/resources/vrf/vrfServiceCreateRequest.json
@@ -183,7 +183,7 @@
   "rollbackOnFailure": true,
   "aicZoneName": null,
   "owningEntityName": "WayneHolland",
-  "testApi": "VNF_API",
+  "testApi": "GR_API",
   "modelInfo": {
     "modelInvariantId": "dfc2c44c-2429-44ca-ae26-1e6dc1f207fb",
     "modelVersionId": "f028b2e2-7080-4b13-91b2-94944d4c42d8",
diff --git a/vid-ext-services-simulator/src/main/resources/download_files/service-PASQUALEVmxVpeBvService488-csar-annotations.zip b/vid-ext-services-simulator/src/main/resources/download_files/service-PASQUALEVmxVpeBvService488-csar-annotations.zip
deleted file mode 100644
index a1f1f5d..0000000
--- a/vid-ext-services-simulator/src/main/resources/download_files/service-PASQUALEVmxVpeBvService488-csar-annotations.zip
+++ /dev/null
Binary files differ
diff --git a/vid-ext-services-simulator/src/main/resources/download_files/service-vDOROTHEASrv-csar.zip b/vid-ext-services-simulator/src/main/resources/download_files/service-vDOROTHEASrv-csar.zip
deleted file mode 100644
index 2967a50..0000000
--- a/vid-ext-services-simulator/src/main/resources/download_files/service-vDOROTHEASrv-csar.zip
+++ /dev/null
Binary files differ
diff --git a/vid-ext-services-simulator/src/main/resources/download_files/service-vDOROTHEASrv-csar_ecomp_false6.zip b/vid-ext-services-simulator/src/main/resources/download_files/service-vDOROTHEASrv-csar_ecomp_false6.zip
deleted file mode 100644
index dfd9298..0000000
--- a/vid-ext-services-simulator/src/main/resources/download_files/service-vDOROTHEASrv-csar_ecomp_false6.zip
+++ /dev/null
Binary files differ
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
index 0973447..87875f1 100644
--- a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
@@ -133,7 +133,7 @@
 
     beforeEach(() => {
       cy.clearSessionStorage();
-      cy.setTestApiParamToVNF();
+      cy.setTestApiParamToGR();
       cy.initVidMock();
       cy.login();
     });
diff --git a/vid-webpack-master/cypress/integration/iFrames/vnfGroups.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/vnfGroups.e2e.ts
index dc1b4bb..60fbfea 100644
--- a/vid-webpack-master/cypress/integration/iFrames/vnfGroups.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/vnfGroups.e2e.ts
@@ -12,7 +12,7 @@
       cy.initAAIMock();
       cy.initVidMock();
       cy.permissionVidMock();
-      cy.setTestApiParamToVNF();
+      cy.setTestApiParamToGR();
       cy.login();
   });
 
diff --git a/vid-webpack-master/cypress/integration/iFrames/vrf.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/vrf.e2e.ts
index 6700ff4..529d96a 100644
--- a/vid-webpack-master/cypress/integration/iFrames/vrf.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/vrf.e2e.ts
@@ -480,7 +480,7 @@
             "rollbackOnFailure": "true",
             "aicZoneName": null,
             "owningEntityName": "WayneHolland",
-            "testApi": "VNF_API",
+            "testApi": "GR_API",
             "modelInfo": {
               "modelInvariantId": "dfc2c44c-2429-44ca-ae26-1e6dc1f207fb",
               "modelVersionId": "f028b2e2-7080-4b13-91b2-94944d4c42d8",
diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/defect710619/expectedResumeWithVGResults.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/defect710619/expectedResumeWithVGResults.json
index d10c2bd..d0c734b 100644
--- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/defect710619/expectedResumeWithVGResults.json
+++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/defect710619/expectedResumeWithVGResults.json
@@ -17,7 +17,7 @@
     },
     "requestParameters": {
       "userParams": [],
-      "testApi": "VNF_API",
+      "testApi": "GR_API",
       "usePreload": false
     },
     "cloudConfiguration": {
diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/vnfGroupBasicServiceInstance.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/vnfGroupBasicServiceInstance.json
index bc37b6b..847ebf0 100644
--- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/vnfGroupBasicServiceInstance.json
+++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/vnfGroupBasicServiceInstance.json
@@ -32,7 +32,7 @@
   "subscriberName":"SILVIA ROBBINS",
   "owningEntityName":"WayneHolland",
   "rollbackOnFailure":"true",
-  "testApi": "VNF_API",
+  "testApi": "GR_API",
   "isALaCarte":true,
   "action": "Create"
 }
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.spec.ts
index f8ce819..f3f9518 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.spec.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.spec.ts
@@ -24,7 +24,7 @@
   let collectionResourceModel: CollectionResourceModelInfo;
   let  _sharedTreeService : SharedTreeService;
 
-  beforeEach(() => {
+  beforeEach(done => (async () => {
     TestBed.configureTestingModule({
       imports: [HttpClientTestingModule, NgReduxTestingModule],
       providers: [
@@ -38,16 +38,17 @@
         FeatureFlagsService,
         ComponentInfoService,
         IframeService]
-    }).compileComponents();
-
+    });
+    await TestBed.compileComponents();
     injector = getTestBed();
     _store = injector.get(NgRedux);
     _componentInfoService = injector.get(ComponentInfoService);
+    _sharedTreeService = injector.get(SharedTreeService);
 
     collectionResourceModel = new CollectionResourceModelInfo(_store, _sharedTreeService);
 
 
-  });
+  })().then(done).catch(done.fail));
 
   test('collection resource should be defined', () => {
     expect(collectionResourceModel).toBeDefined();
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.ts
index 564e04b..339951d 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.ts
@@ -30,7 +30,7 @@
 
   getModel = (collectionResourceModelId: string, instance: CollectionResourceInstance, serviceHierarchy): CollectionResourceModel => {
     const originalModelName = instance.originalName ? instance.originalName : collectionResourceModelId;
-    return new CollectionResourceModel(serviceHierarchy[this.name][originalModelName]);
+    return new CollectionResourceModel(this._sharedTreeService.modelByIdentifier(serviceHierarchy, this.name, originalModelName));
   };
 
 
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/configuration/configuration.model.info.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/configuration/configuration.model.info.spec.ts
index 6b67de6..d1d6817 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/configuration/configuration.model.info.spec.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/configuration/configuration.model.info.spec.ts
@@ -1,11 +1,12 @@
 import {HttpClientTestingModule} from "@angular/common/http/testing";
-import {TestBed} from "@angular/core/testing";
+import {getTestBed, TestBed} from "@angular/core/testing";
 import {MockNgRedux, NgReduxTestingModule} from "@angular-redux/store/testing";
 import {DynamicInputsService} from "../../dynamicInputs.service";
 import {ConfigurationModelInfo} from "./configuration.model.info";
 import {SharedTreeService} from "../../shared.tree.service";
 
 describe('Vnf Model Info', () => {
+  let injector;
   let  _dynamicInputsService : DynamicInputsService;
   let  _sharedTreeService : SharedTreeService;
 
@@ -18,6 +19,9 @@
         DynamicInputsService]
     });
     await TestBed.compileComponents();
+
+    injector = getTestBed();
+    _sharedTreeService = injector.get(SharedTreeService);
   })().then(done).catch(done.fail));
 
   test('ConfigurationModelInfo should be defined', () => {
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/configuration/configuration.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/configuration/configuration.model.info.ts
index 0d1a9aa..d9702b4 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/configuration/configuration.model.info.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/configuration/configuration.model.info.ts
@@ -31,10 +31,9 @@
    * @param serviceHierarchy - serviceHierarchy
    ************************************************************/
   getModel = (configurationModelId : string, serviceHierarchy) : any =>{
-    if(!_.isNil(serviceHierarchy)){
-      if(!_.isNil(serviceHierarchy[this.name]) && !_.isNil(serviceHierarchy[this.name][configurationModelId])){
-        return serviceHierarchy[this.name][configurationModelId];
-      }
+    const model = this._sharedTreeService.modelByIdentifier(serviceHierarchy, this.name, configurationModelId);
+    if (!_.isNil(model)) {
+      return model;
     }
     return {};
   };
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/network/network.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/network/network.model.info.ts
index b03d37f..7c240a9 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/network/network.model.info.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/network/network.model.info.ts
@@ -7,7 +7,10 @@
 import {InputType} from "../../../../../shared/models/inputTypes";
 import {NgRedux} from "@angular-redux/store";
 import {AppState} from "../../../../../shared/store/reducers";
-import {GenericFormPopupComponent, PopupType} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component";
+import {
+  GenericFormPopupComponent,
+  PopupType
+} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component";
 import {DialogService} from "ng2-bootstrap-modal";
 import {NetworkPopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/network/network.popup.service";
 import * as _ from "lodash";
@@ -18,7 +21,11 @@
 import {IframeService} from "../../../../../shared/utils/iframe.service";
 import {DuplicateService} from "../../../duplicate/duplicate.service";
 import {ServiceInstanceActions} from "../../../../../shared/models/serviceInstanceActions";
-import {deleteActionNetworkInstance, undoDeleteActionNetworkInstance, updateNetworkPosition} from "../../../../../shared/storeUtil/utils/network/network.actions";
+import {
+  deleteActionNetworkInstance,
+  undoDeleteActionNetworkInstance,
+  updateNetworkPosition
+} from "../../../../../shared/storeUtil/utils/network/network.actions";
 import {IModalConfig} from "onap-ui-angular/dist/modals/models/modal-config";
 import {ComponentInfoType} from "../../../component-info/component-info-model";
 import {ModelInformationItem} from "../../../../../shared/components/model-information/model-information.component";
@@ -65,7 +72,9 @@
    ************************************************************/
   getModel = (networkModelId: string, instance: NetworkInstance, serviceHierarchy): NetworkModel => {
     const originalModelName = instance.originalName ? instance.originalName : networkModelId;
-    return new NetworkModel(serviceHierarchy[this.name][originalModelName], this._featureFlagsService.getAllFlags());
+    return new NetworkModel(
+      this._sharedTreeService.modelByIdentifier(serviceHierarchy, this.name, originalModelName),
+      this._featureFlagsService.getAllFlags());
   };
 
 
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/pnf/pnf.model.info.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/pnf/pnf.model.info.spec.ts
index ca041e0..8a09372 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/pnf/pnf.model.info.spec.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/pnf/pnf.model.info.spec.ts
@@ -20,8 +20,9 @@
   let injector;
   let _componentInfoService: ComponentInfoService;
   let _store: NgRedux<AppState>;
-  let pnfModel: PnfModelInfo =  new PnfModelInfo();
-  beforeEach(() => {
+  let _sharedTreeService;
+  let pnfModel: PnfModelInfo;
+  beforeEach(done => (async () => {
     TestBed.configureTestingModule({
       imports: [HttpClientTestingModule, NgReduxTestingModule],
       providers: [
@@ -35,12 +36,14 @@
         FeatureFlagsService,
         ComponentInfoService,
         IframeService]
-    }).compileComponents();
-
+    });
+    await TestBed.compileComponents();
     injector = getTestBed();
     _store = injector.get(NgRedux);
+    _sharedTreeService = injector.get(SharedTreeService);
+    pnfModel = new PnfModelInfo(_sharedTreeService);
     _componentInfoService = injector.get(ComponentInfoService);
-  });
+  })().then(done).catch(done.fail));
 
   test('pnf model should be defined', () => {
     expect(pnfModel).toBeDefined();
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/pnf/pnf.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/pnf/pnf.model.info.ts
index dc01b87..05e05a7 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/pnf/pnf.model.info.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/pnf/pnf.model.info.ts
@@ -6,11 +6,14 @@
 import {PnfInstance} from "app/shared/models/pnfInstance";
 import {PNFModel} from "../../../../../shared/models/pnfModel";
 import {PnfTreeNode} from "../../../../../shared/models/pnfTreeNode";
+import {SharedTreeService} from "../../shared.tree.service";
 
 
 export class PnfModelInfo implements ILevelNodeInfo{
 
-  constructor(){}
+  constructor(
+    private _sharedTreeService: SharedTreeService,
+  ){}
 
   name: string = 'pnfs';
   type: string ='PNF';
@@ -30,7 +33,7 @@
 
   getModel = (pnfModelId: string, instance: PnfInstance, serviceHierarchy): PNFModel => {
     const originalModelName = instance.originalName ? instance.originalName : pnfModelId;
-    return new PNFModel(serviceHierarchy[this.name][originalModelName]);
+    return new PNFModel(this._sharedTreeService.modelByIdentifier(serviceHierarchy, this.name, originalModelName));
   };
 
   getNextLevelObject(): any { return null;  }
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/relatedVnfMember/relatedVnfMember.info.model.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/relatedVnfMember/relatedVnfMember.info.model.ts
index c8807e8..86455ce 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/relatedVnfMember/relatedVnfMember.info.model.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/relatedVnfMember/relatedVnfMember.info.model.ts
@@ -55,7 +55,7 @@
    ************************************************************/
   getModel = (vnfModelId: string, instance: VnfInstance, serviceHierarchy): VNFModel => {
     const originalModelName = instance.originalName ? instance.originalName : vnfModelId;
-    return new VNFModel(serviceHierarchy[this.name][originalModelName]);
+    return new VNFModel(this._sharedTreeService.modelByIdentifier(serviceHierarchy, this.name, originalModelName));
   };
 
 
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts
index 36b5ed0..1b92eb8 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts
@@ -79,10 +79,9 @@
    * @param serviceHierarchy - serviceHierarchy
    ************************************************************/
   getModel = (vfModuleModelId: string, instance, serviceHierarchy): Partial<VfModule> => {
-    if (!_.isNil(serviceHierarchy)) {
-      if (!_.isNil(serviceHierarchy[this.name]) && !_.isNil(serviceHierarchy[this.name][vfModuleModelId])) {
-        return new VfModule(serviceHierarchy[this.name][vfModuleModelId], this._featureFlagsService.getAllFlags());
-      }
+    const model = this._sharedTreeService.modelByIdentifier(serviceHierarchy, this.name, vfModuleModelId);
+    if (!_.isNil(model)) {
+      return new VfModule(model, this._featureFlagsService.getAllFlags());
     }
     return {};
   };
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts
index c3c33a1..1215bb8 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts
@@ -9,7 +9,10 @@
 import {NgRedux} from "@angular-redux/store";
 import {AppState} from "../../../../../shared/store/reducers";
 import {DefaultDataGeneratorService} from "../../../../../shared/services/defaultDataServiceGenerator/default.data.generator.service";
-import {GenericFormPopupComponent, PopupType} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component";
+import {
+  GenericFormPopupComponent,
+  PopupType
+} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component";
 import {DialogService} from 'ng2-bootstrap-modal';
 import {VnfPopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service";
 import {VfModulePopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
@@ -17,13 +20,18 @@
 import {AvailableNodeIcons} from "../../../available-models-tree/available-models-tree.service";
 import {DuplicateService} from "../../../duplicate/duplicate.service";
 import {DuplicateVnfComponent} from "../../../duplicate/duplicate-vnf.component";
-import {SdcUiServices} from "onap-ui-angular";
 import {IframeService} from "../../../../../shared/utils/iframe.service";
 import {changeInstanceCounter, removeInstance} from "../../../../../shared/storeUtil/utils/general/general.actions";
 import {MessageBoxData} from "../../../../../shared/components/messageBox/messageBox.data";
 import {MessageBoxService} from "../../../../../shared/components/messageBox/messageBox.service";
 import {ServiceInstanceActions} from "../../../../../shared/models/serviceInstanceActions";
-import {deleteActionVnfInstance, undoDeleteActionVnfInstance, undoUpgradeVnf, updateVnfPosition, upgradeVnf} from "../../../../../shared/storeUtil/utils/vnf/vnf.actions";
+import {
+  deleteActionVnfInstance,
+  undoDeleteActionVnfInstance,
+  undoUpgradeVnf,
+  updateVnfPosition,
+  upgradeVnf
+} from "../../../../../shared/storeUtil/utils/vnf/vnf.actions";
 import * as _ from 'lodash';
 import {IModalConfig} from "onap-ui-angular/dist/modals/models/modal-config";
 import {ComponentInfoType} from "../../../component-info/component-info-model";
@@ -81,7 +89,9 @@
    ************************************************************/
   getModel = (vnfModelId: string, instance: VnfInstance, serviceHierarchy): VNFModel => {
     const originalModelName = instance.originalName ? instance.originalName : vnfModelId;
-    return new VNFModel(serviceHierarchy[this.name][originalModelName], this._featureFlagsService.getAllFlags());
+    return new VNFModel(
+      this._sharedTreeService.modelByIdentifier(serviceHierarchy, this.name, originalModelName),
+      this._featureFlagsService.getAllFlags());
   };
 
 
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnfGrouping/vnfGrouping.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnfGrouping/vnfGrouping.model.info.ts
index 148ce22..fa785bc 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnfGrouping/vnfGrouping.model.info.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnfGrouping/vnfGrouping.model.info.ts
@@ -97,7 +97,7 @@
 
   getModel(modelId: string, instance: any, serviceHierarchy): any {
     const originalModelName = instance.originalName ? instance.originalName : modelId;
-    return new VnfGroupModel(serviceHierarchy[this.name][originalModelName]);
+    return new VnfGroupModel(this._sharedTreeService.modelByIdentifier(serviceHierarchy, this.name, originalModelName));
   }
 
   hasMissingData(instance, dynamicInputs: any, isEcompGeneratedNaming: boolean): boolean {
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vrf/vrf.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vrf/vrf.model.info.ts
index 3dbc60a..03f6021 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vrf/vrf.model.info.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vrf/vrf.model.info.ts
@@ -52,7 +52,7 @@
 
   getModel = (vrfModelId: string, instance: VrfInstance, serviceHierarchy): VrfModel => {
     const originalModelName = instance.originalName ? instance.originalName : vrfModelId;
-    return new VrfModel(serviceHierarchy[this.name][originalModelName]);
+    return new VrfModel(this._sharedTreeService.modelByIdentifier(serviceHierarchy, this.name, originalModelName));
   };
 
 
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToTree.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToTree.service.ts
index 8eef4a0..a70b7ef 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToTree.service.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToTree.service.ts
@@ -23,7 +23,7 @@
 import {VrfModelInfo} from "./models/vrf/vrf.model.info";
 import {NetworkStepService} from "./models/vrf/vrfModal/networkStep/network.step.service";
 import {VpnStepService} from "./models/vrf/vrfModal/vpnStep/vpn.step.service";
-import { VfModuleUpgradePopupService } from "../../../shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service";
+import {VfModuleUpgradePopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service";
 import {FeatureFlagsService} from "../../../shared/services/featureFlag/feature-flags.service";
 import {ModalService} from "../../../shared/components/customModal/services/modal.service";
 
@@ -56,7 +56,7 @@
   getFirstLevelOptions(): ILevelNodeInfo[] {
     return [new VnfModelInfo(this._dynamicInputsService, this._sharedTreeService, this._defaultDataGeneratorService, this._dialogService, this._vnfPopupService, this._vfModulePopupService, this._vfModuleUpgradePopupService,this._duplicateService, this._modalService, this._iframeService, this._componentInfoService, this._featureFlagsService, this._store)
       , new NetworkModelInfo(this._dynamicInputsService, this._sharedTreeService, this._dialogService, this._networkPopupService, this._duplicateService, this._modalService, this._iframeService,  this._featureFlagsService, this._store),
-      new PnfModelInfo(),
+      new PnfModelInfo(this._sharedTreeService),
       new VrfModelInfo(this._store, this._sharedTreeService, this._dialogService, this._iframeService, this._featureFlagsService, this._networkStepService, this._vpnStepService),
       new CollectionResourceModelInfo(this._store, this._sharedTreeService),
       new ConfigurationModelInfo(this._dynamicInputsService, this._sharedTreeService),
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts
index f89950c..87094e3 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts
@@ -166,6 +166,36 @@
     expect(MessageBoxService.openModal.next).toHaveBeenCalled();
   });
 
+  each([
+    ['volumeGroups by entry name', "volumeGroups",
+      "2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1", "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1"],
+    ['vfmodule by customizationUuid', "vfModules",
+      "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401", "2017488PasqualeVpe..PASQUALE_vRE_BV..module-1"],
+    ['vnf by customizationUuid', "vnfs",
+      "1da7b585-5e61-4993-b95e-8e6606c81e45", "2017-488_PASQUALE-vPE 0"],
+    ['vnfGroups by invariantUuid because no customizationUuid', "vnfGroups",
+      "4bb2e27e-ddab-4790-9c6d-1f731bc14a45", "groupingservicefortest..ResourceInstanceGroup..0"],
+  ]).test('modelByIdentifier should success: %s', (description, modelTypeName, modelUniqueIdOrName, expectedModelCustomizationName) => {
+    let serviceModelFromHierarchy =
+      getStore().service.serviceHierarchy["1a80c596-27e5-4ca9-b5bb-e03a7fd4c0fd"];
+
+    expect(service.modelByIdentifier(serviceModelFromHierarchy, modelTypeName, modelUniqueIdOrName))
+      .toHaveProperty("modelCustomizationName", expectedModelCustomizationName);
+  });
+
+  each([
+    ['vfmodule by invariantUuid when there is customizationUuid', "vfModules", "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1"],
+    ['network by non-existing modelUniqueIdOrName', "networks", "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1"],
+    ['collectionResource has no resource', "collectionResources", "whatever"],
+    ['non-existing model-type', "fooBar", "whatever"],
+  ]).test('modelByIdentifier should fail: %s', (description, modelTypeName, modelUniqueIdOrName) => {
+    let serviceModelFromHierarchy =
+      getStore().service.serviceHierarchy["1a80c596-27e5-4ca9-b5bb-e03a7fd4c0fd"];
+
+    expect(service.modelByIdentifier(serviceModelFromHierarchy, modelTypeName, modelUniqueIdOrName))
+      .toBeUndefined();
+  });
+
   test('openAuditInfoModal should open modal for failed instance', () => {
     jest.spyOn(AuditInfoModalComponent.openInstanceAuditInfoModal, 'next');
 
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
index 1115d1b..6c985ec 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.ts
@@ -54,6 +54,25 @@
       : (nodeInstance.modelInfo.modelCustomizationId || nodeInstance.modelInfo.modelInvariantId);
   };
 
+  /**
+   * Finds a model inside a full service model
+   * @param serviceModelFromHierarchy
+   * @param modelTypeName "vnfs" | "networks" | "vfModules" | "collectionResources" | ...
+   * @param modelUniqueIdOrName Either an entry name (i.e. "originalName"), modelCustomizationId or modelInvariantId.
+   *                      Note that modelInvariantId will work only where model lacks a modelCustomizationId.
+   */
+  modelByIdentifier = (serviceModelFromHierarchy, modelTypeName: string, modelUniqueIdOrName: string): any => {
+    if (_.isNil(serviceModelFromHierarchy)) return undefined;
+
+    const modelsOfType = serviceModelFromHierarchy[modelTypeName];
+    if (_.isNil(modelsOfType)) return undefined;
+
+    const modelIfModelIdentifierIsEntryName = modelsOfType[modelUniqueIdOrName];
+    return _.isNil(modelIfModelIdentifierIsEntryName)
+      ? _.find(modelsOfType, o => (o.customizationUuid || o.invariantUuid) === modelUniqueIdOrName)
+      : modelIfModelIdentifierIsEntryName;
+  };
+
   hasMissingData(instance, dynamicInputs: any, isEcompGeneratedNaming: boolean, requiredFields: string[]): boolean {
     if (!isEcompGeneratedNaming && _.isEmpty(instance.instanceName)) {
       return true;
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts
index f3d32b9..b3bb1fe 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.spec.ts
@@ -6,12 +6,17 @@
 import {GenericFormService} from "../../generic-form.service";
 import {FormBuilder} from "@angular/forms";
 import {LogService} from "../../../../utils/log/log.service";
-import {FormControlModel, ValidatorModel, ValidatorOptions} from "../../../../models/formControlModels/formControl.model";
+import {
+  FormControlModel,
+  ValidatorModel,
+  ValidatorOptions
+} from "../../../../models/formControlModels/formControl.model";
 import {FormControlNames, VfModuleControlGenerator} from "./vfModule.control.generator";
 import {FeatureFlagsService} from "../../../../services/featureFlag/feature-flags.service";
 import {VfModuleInstance} from "../../../../models/vfModuleInstance";
 import {VfModule} from "../../../../models/vfModule";
 import {SharedControllersService} from "../sharedControlles/shared.controllers.service";
+import {SharedTreeService} from "../../../../../drawingBoard/service-planning/objectsToTree/shared.tree.service";
 
 class MockAppStore<T> {
   getState() {
@@ -925,6 +930,7 @@
         AaiService,
         FormBuilder,
         LogService,
+        SharedTreeService,
         {provide:FeatureFlagsService, useClass: MockFeatureFlagsService},
         {provide: NgRedux, useClass: MockAppStore}]
     });
diff --git a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.ts b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.ts
index 60ffc3e..b00312d 100644
--- a/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.ts
+++ b/vid-webpack-master/src/app/shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator.ts
@@ -20,6 +20,7 @@
 import {VnfInstance} from "../../../../models/vnfInstance";
 import * as _ from 'lodash';
 import {SharedControllersService} from "../sharedControlles/shared.controllers.service";
+import {SharedTreeService} from "../../../../../drawingBoard/service-planning/objectsToTree/shared.tree.service";
 
 export enum FormControlNames {
   INSTANCE_NAME = 'instanceName',
@@ -40,6 +41,7 @@
   constructor(private genericFormService: GenericFormService,
               private _basicControlGenerator: ControlGeneratorUtil,
               private _sharedControllersService: SharedControllersService,
+              private _sharedTreeService: SharedTreeService,
               private store: NgRedux<AppState>,
               private http: HttpClient,
               private _aaiService: AaiService,
@@ -76,8 +78,7 @@
     const vfModuleInstance = this._basicControlGenerator.retrieveInstanceIfUpdateMode(this.store, this.getVfModuleInstance(serviceId, vnfStoreKey, uuidData, isUpdateMode));
     const vfModuleModel = this.vfModuleModel;
     const vnf: VnfInstance = this.store.getState().service.serviceInstance[serviceId].vnfs[vnfStoreKey];
-    const vnfModelName: string = vnf.originalName;
-    const vnfModel = new VNFModel(this.store.getState().service.serviceHierarchy[serviceId].vnfs[vnfModelName]);
+    const vnfModel = this.newVNFModel(serviceId, vnf);
 
     let result: FormControlModel[] = [];
 
@@ -90,6 +91,14 @@
     return result;
   }
 
+  private newVNFModel(serviceId: string, vnf: VnfInstance) {
+    const vnfModelName: string = vnf.originalName;
+
+    const serviceModelFromHierarchy = this.store.getState().service.serviceHierarchy[serviceId];
+    const model = this._sharedTreeService.modelByIdentifier(serviceModelFromHierarchy, "vnfs", vnfModelName);
+    return new VNFModel(model);
+  }
+
   pushInstanceAndVGToForm(result: FormControlModel[], vfModuleElement: any, serviceId: string, vnfModel: any, isALaCarte: boolean) :FormControlModel[]{
     result.push(this.getInstanceName(vfModuleElement, serviceId, vnfModel.isEcompGeneratedNaming));
     if (this.vfModuleModel.volumeGroupAllowed) {
@@ -108,8 +117,7 @@
       }
     }
     const vnf: VnfInstance = this.store.getState().service.serviceInstance[serviceId].vnfs[vnfStoreKey] ;
-    const vnfModelName: string = vnf.originalName;
-    const vnfModel = new VNFModel(this.store.getState().service.serviceHierarchy[serviceId].vnfs[vnfModelName]);
+    const vnfModel = this.newVNFModel(serviceId, vnf);
 
     const vfModuleInstance = this._basicControlGenerator.retrieveInstanceIfUpdateMode(this.store, this.getVfModuleInstance(serviceId, vnfStoreKey, uuidData, isUpdateMode));
     let result: FormControlModel[] = [];
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts
index 9680c06..e69cd56 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts
@@ -24,6 +24,7 @@
 import {SharedControllersService} from "../genericForm/formControlsServices/sharedControlles/shared.controllers.service";
 import {AppState} from "../../store/reducers";
 import each from 'jest-each';
+import {SharedTreeService} from "../../../drawingBoard/service-planning/objectsToTree/shared.tree.service";
 
 class MockAppStore<T>{
   getState() {
@@ -977,6 +978,7 @@
         VfModuleUpgradePopupService,
         VfModuleControlGenerator,
         FeatureFlagsService,
+        SharedTreeService,
         {provide: ActivatedRoute, useClass: ActivatedRouteMock},
         {provide: NgRedux, useClass: MockAppStore}]
     });
diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service.spec.ts b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service.spec.ts
index 8562652..b8a5922 100644
--- a/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service.spec.ts
+++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service.spec.ts
@@ -14,6 +14,7 @@
 import {getTestBed, TestBed} from "@angular/core/testing";
 import {SharedControllersService} from "../../../genericForm/formControlsServices/sharedControlles/shared.controllers.service";
 import {ModalService} from "../../../customModal/services/modal.service";
+import {SharedTreeService} from "../../../../../drawingBoard/service-planning/objectsToTree/shared.tree.service";
 
 class MockModalService<T> {}
 
@@ -1993,6 +1994,7 @@
         AaiService,
         LogService,
         BasicPopupService,
+        SharedTreeService,
         {provide:FeatureFlagsService, useClass: MockFeatureFlagsService},
         {provide: NgRedux, useClass: MockReduxStore},
         {provide: HttpClient, useClass: MockAppStore},