Merge "default maven build of vid-webpack-master to run build and unit tests"
authorIttay Stern <ittay.stern@att.com>
Tue, 17 Dec 2019 11:04:51 +0000 (11:04 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 17 Dec 2019 11:04:51 +0000 (11:04 +0000)
39 files changed:
vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiationTemplate.java
vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java
vid-app-common/src/main/webapp/app/vid/scripts/services/aaiService.js
vid-app-common/src/main/webapp/app/vid/scripts/services/dataService.js
vid-app-common/src/test/java/org/onap/vid/model/serviceInstantiation/InstantiationModelSerializationTest.java [new file with mode: 0644]
vid-automation/src/test/java/org/onap/vid/api/InstantiationTemplatesApiTest.java
vid-automation/src/test/resources/aaiGetInstanceTopology/ServiceTreeWithMultipleChildren_serviceModel.json
vid-automation/src/test/resources/asyncInstantiation/templates__instance_from_template__set_without_modify.json [new file with mode: 0644]
vid-automation/src/test/resources/asyncInstantiation/templates__instance_template.json
vid-webpack-master/cypress/integration/iFrames/instantiation-templates.e2e.ts
vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/upgradeVfModule/upgrade_vfmodule_e2e__service_instance.json
vid-webpack-master/package.json
vid-webpack-master/src/app/drawingBoard/service-planning/available-models-tree/available-models-tree.component.ts
vid-webpack-master/src/app/drawingBoard/service-planning/drawing-board-tree/drawing-board-tree.component.ts
vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/relatedVnfMember/relatedVnfMember.info.model.spec.ts
vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.spec.ts
vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vfModule/vfModule.model.info.ts
vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.spec.ts
vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/vnf/vnf.model.info.ts
vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToInstanceTree/objectToInstanceTree.service.spec.ts
vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToModelTree/objectToModelTree.service.spec.ts
vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/objectToTree.service.ts
vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/shared.tree.service.spec.ts
vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.service.spec.ts
vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service.spec.ts [moved from vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service.spec.ts with 99% similarity]
vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service.ts [moved from vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service.ts with 97% similarity]
vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service.ts
vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popup.service.spec.ts
vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service.spec.ts
vid-webpack-master/src/app/shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service.spec.ts
vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.html
vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.scss
vid-webpack-master/src/app/shared/components/genericFormPopup/instantiationTemplatesModal/instantiation.templates.modal.component.ts
vid-webpack-master/src/app/shared/models/vfModule.ts
vid-webpack-master/src/app/shared/shared.module.ts
vid-webpack-master/src/app/shared/storeUtil/utils/vfModule/vfModule.actions.ts
vid-webpack-master/src/app/shared/storeUtil/utils/vfModule/vfModule.reducers.spec.ts
vid-webpack-master/src/app/shared/storeUtil/utils/vfModule/vfModule.reducers.ts

index 17ce1bc..4872ce2 100644 (file)
@@ -20,6 +20,8 @@
 
 package org.onap.vid.model.serviceInstantiation;
 
+import static java.util.Collections.emptyMap;
+
 import java.util.Map;
 import java.util.Objects;
 import org.onap.vid.model.aaiTree.ExistingElementsCounterMaps;
@@ -30,6 +32,7 @@ public class ServiceInstantiationTemplate extends ServiceInstantiation implement
     private final Map<String, Long> existingNetworksCounterMap;
     private final Map<String, Long> existingVnfGroupCounterMap;
     private final Map<String, Long> existingVRFCounterMap;
+    private final Map<String, String> existingNames = emptyMap();
 
     public ServiceInstantiationTemplate(
         ServiceInstantiation baseService,
@@ -78,4 +81,7 @@ public class ServiceInstantiationTemplate extends ServiceInstantiation implement
         return existingVRFCounterMap;
     }
 
+    public Map<String, String> getExistingNames() {
+        return existingNames;
+    }
 }
index ad5b39e..89e25e6 100644 (file)
@@ -22,6 +22,7 @@ package org.onap.vid.model.serviceInstantiation;
 
 import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
 
+import com.fasterxml.jackson.annotation.JsonAlias;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import java.util.Collection;
@@ -39,8 +40,8 @@ import org.onap.vid.mso.model.ModelInfo;
 @JsonInclude(NON_NULL)
 public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest {
 
-       @JsonInclude(NON_NULL) private final String volumeGroupInstanceName;
-       @JsonInclude(NON_NULL) private Boolean usePreload;
+       @JsonInclude(NON_NULL) @JsonProperty("volumeGroupName") private final String volumeGroupInstanceName;
+       @JsonInclude(NON_NULL) @JsonProperty("sdncPreLoad") private Boolean usePreload;
        private Map<String, String> supplementaryParams;
 
        @JsonInclude(NON_NULL)
@@ -51,7 +52,7 @@ public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest
 
        public VfModule(@JsonProperty("modelInfo") ModelInfo modelInfo,
                @JsonProperty("instanceName") String instanceName,
-               @JsonProperty("volumeGroupName") String volumeGroupInstanceName,
+               @JsonProperty("volumeGroupName") @JsonAlias("volumeGroupInstanceName") String volumeGroupInstanceName,
                @JsonProperty("action") String action,
                @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
                @JsonProperty("legacyRegion") String legacyRegion,
@@ -59,7 +60,7 @@ public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest
                @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
                @JsonProperty("supplementaryFileContent") Map<String, String> supplementaryParams,
                @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
-               @JsonProperty("sdncPreLoad") Boolean usePreload,
+               @JsonProperty("sdncPreLoad") @JsonAlias("usePreload") Boolean usePreload,
                @JsonProperty("instanceId") String instanceId,
                @JsonProperty("trackById") String trackById,
                @JsonProperty("isFailed") Boolean isFailed,
index d307576..cfab522 100755 (executable)
@@ -347,13 +347,9 @@ var AaiService = function ($http, $log, PropertyService, UtilityService, COMPONE
         getJoinedQueryString: getJoinedQueryString,
 
         getServices2: function (successCallback, errorCallback) {
-
             $http.get(FIELD.ID.AAI_GET_SERVICES, {}, {
-
-
                 timeout: PropertyService.getServerResponseTimeoutMsec()
             }).then(function (response) {
-                var customerList = [];
                 if (response.data != null) {
                     var serviceIdList = [];
                     angular.forEach(response.data, function (value, key) {
index 95bdb3a..56729f2 100755 (executable)
-/*-\r
- * ============LICENSE_START=======================================================\r
- * VID\r
- * ================================================================================\r
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-"use strict";\r
-\r
-var DataService = function($log, DataService) {\r
-\r
-       var _this = this;\r
-\r
-       return {\r
-               getAvailableVolumeGroupList : function() {\r
-                       return _this.availableVolumeGroupList;\r
-               },\r
-               setAvailableVolumeGroupList : function(availableVolumeGroupList) {\r
-                       _this.availableVolumeGroupList = availableVolumeGroupList;\r
-               },\r
-               getCloudRegionTenantList : function() {\r
-                       return _this.cloudRegionTenantList;\r
-               },\r
-               setCloudRegionTenantList : function(cloudRegionTenantList) {\r
-                       _this.cloudRegionTenantList = cloudRegionTenantList;\r
-               },\r
-               getCloudOwnerAndLcpCloudRegionFromOptionId : function (cloudRegionOptionId) {\r
-                       var cloudRegionTenantList = this.getCloudRegionTenantList();\r
-                       var cloudRegionTenant = _.find(cloudRegionTenantList, {"cloudRegionOptionId": cloudRegionOptionId});\r
-                       return {\r
-                               cloudOwner: cloudRegionTenant.cloudOwner,\r
-                               cloudRegionId: cloudRegionTenant.cloudRegionId\r
-                       };\r
-               },\r
-               getGlobalCustomerId : function() {\r
-                       return _this.globalCustomerId;\r
-               },\r
-               setGlobalCustomerId : function(globalCustomerId) {\r
-                       _this.globalCustomerId = globalCustomerId;\r
-               },\r
-               getCustomizationUuid : function() {\r
-                       return _this.customizationUUID;\r
-               },\r
-               setCustomizationUuid : function(customizationUUID) {\r
-                       _this.customizationUUID = customizationUUID;\r
-               },\r
-               getResCustomizationUuid : function() {\r
-                       return _this.rescustomizationUUID;\r
-               },\r
-               setResCustomizationUuid : function(rescustomizationUUID) {\r
-                       _this.rescustomizationUUID = rescustomizationUUID;\r
-               },\r
-               getInventoryItem : function() {\r
-                       return _this.inventoryItem;\r
-               },\r
-               setInventoryItem : function(inventoryItem) {\r
-                       _this.inventoryItem = inventoryItem;\r
-               },\r
-               getModelId : function() {\r
-                       return _this.modelId;\r
-               },\r
-               setModelId : function(modelId) {\r
-                       _this.modelId = modelId;\r
-               },\r
-               getModelInstanceName : function() {\r
-                       return _this.modelInstanceName;\r
-               },\r
-               setModelInstanceName : function(modelInstanceName) {\r
-                       _this.modelInstanceName = modelInstanceName;\r
-               },\r
-               getModelInfo : function(componentId) {\r
-                       return _this.modelInfo[componentId];\r
-               },\r
-               setModelInfo : function(componentId, modelInfo) {\r
-                       if (_this.modelInfo === undefined) {\r
-                               _this.modelInfo = new Object;\r
-                       }\r
-                       _this.modelInfo[componentId] = modelInfo;\r
-               },\r
-               getNetworkInstanceId : function() {\r
-                       return _this.networkInstanceId;\r
-               },\r
-               setNetworkInstanceId : function(networkInstanceId) {\r
-                       _this.networkInstanceId = networkInstanceId;\r
-               },\r
-               getServiceIdList : function() {\r
-                       return _this.serviceIdList;\r
-               },\r
-               setServiceIdList : function(serviceIdList) {\r
-                       _this.serviceIdList = serviceIdList;\r
-               },\r
-               setAicZones : function(aicZones) {\r
-                       _this.aicZones = aicZones;\r
-               },\r
-               getAicZones : function(){\r
-                       return _this.aicZones;\r
-               },\r
-        setAicZoneForPNF: function(aicZone) {\r
-            _this.aicZone = aicZone;\r
-        },\r
-        getAicZoneForPNF : function(){\r
-            return _this.aicZone;\r
-        },\r
-               getServiceInstanceId : function() {\r
-                       return _this.serviceInstanceId;\r
-               },\r
-               setServiceInstanceId : function(serviceInstanceId) {\r
-                       _this.serviceInstanceId = serviceInstanceId;\r
-               },\r
-               getServiceInstanceName : function() {\r
-                       return _this.serviceInstanceName;\r
-               },\r
-               setServiceInstanceName : function(serviceInstanceName) {\r
-                       _this.serviceInstanceName = serviceInstanceName;\r
-               },\r
-               getServiceName : function() {\r
-                       return _this.serviceName;\r
-               },\r
-               setServiceName : function(serviceName) {\r
-                       _this.serviceName = serviceName;\r
-               },\r
-               getServiceType : function() {\r
-                       return _this.serviceType;\r
-               },\r
-               setServiceType : function(serviceType) {\r
-                       _this.serviceType = serviceType;\r
-               },\r
-               getServiceUuid : function() {\r
-                       return _this.serviceUuid;\r
-               },\r
-               setServiceUuid : function(serviceUuid) {\r
-                       _this.serviceUuid = serviceUuid;\r
-               },\r
-               getServiceTypeName : function() {\r
-                       return _this.serviceTypeName;\r
-               },\r
-               setServiceTypeName : function(serviceTypeName) {\r
-                       _this.serviceTypeName = serviceTypeName;\r
-               },\r
-               getCreateSubscriberName : function() {\r
-                       return _this.createSubscriberName;\r
-               },\r
-               setCreateSubscriberName : function(createSubscriberName) {\r
-                       _this.createSubscriberName = createSubscriberName;\r
-               },\r
-               getSdncPreload : function() {\r
-                       return _this.sdncPreload;\r
-               },\r
-               setSdncPreload : function(sdncPreload) {\r
-                       _this.sdncPreload = sdncPreload;\r
-               },\r
-               getUploadSupplementoryDataFile : function() {\r
-                       return _this.uploadSupplementoryDataFile;\r
-               },\r
-               setUploadSupplementoryDataFile : function(uploadSupplementoryDataFile) {\r
-                       _this.uploadSupplementoryDataFile = uploadSupplementoryDataFile;\r
-               },\r
-               getSupplementoryDataFile : function() {\r
-                       return _this.supplementoryDataFile;\r
-               },\r
-               setSupplementoryDataFile : function(supplementoryDataFile) {\r
-                       _this.supplementoryDataFile = supplementoryDataFile;\r
-               },\r
-               getSubscriberId : function() {\r
-                       return _this.subscriberId;\r
-               },\r
-               setSubscriberId : function(subscriberId) {\r
-                       _this.subscriberId = subscriberId;\r
-               },\r
-               getLoggedInUserId : function() {\r
-                       return _this.loggedInUserId;\r
-               },\r
-               setLoggedInUserId : function(loggedInUserId) {\r
-                       _this.loggedInUserId = loggedInUserId;\r
-               },\r
-               getSubscriberName : function() {\r
-                       return _this.subscriberName;\r
-               },\r
-               setSubscriberName : function(subscriberName) {\r
-                       _this.subscriberName = subscriberName;\r
-               },\r
-               getSubscribers : function() {\r
-                       return _this.subscribers;\r
-               },\r
-               setSubscribers : function(subscribers) {\r
-                       _this.subscribers = subscribers;\r
-               },\r
-               getSubscriptionServiceTypeList : function() {\r
-                       return _this.subscriptionServiceTypeList;\r
-               },\r
-               setSubscriptionServiceTypeList : function(subscriptionServiceTypeList) {\r
-                       _this.subscriptionServiceTypeList = subscriptionServiceTypeList;\r
-               },\r
-               getUserParams : function() {\r
-                       return _this.userParams;\r
-               },\r
-               setUserParams : function(userParams) {\r
-                       _this.userParams = userParams;\r
-               },\r
-               getUserServiceInstanceName : function() {\r
-                       return _this.userServiceInstanceName;\r
-               },\r
-               setUserServiceInstanceName : function(userServiceInstanceName) {\r
-                       _this.userServiceInstanceName = userServiceInstanceName;\r
-               },\r
-               getVfModuleInstanceId : function() {\r
-                       return _this.vfModuleInstanceId;\r
-               },\r
-               setVfModuleInstanceId : function(vfModuleInstanceId) {\r
-                       _this.vfModuleInstanceId = vfModuleInstanceId;\r
-               },\r
-               getVnfInstanceId : function() {\r
-                       return _this.vnfInstanceId;\r
-               },\r
-               setVnfInstanceId : function(vnfInstanceId) {\r
-                       _this.vnfInstanceId = vnfInstanceId;\r
-               },\r
-        getVfModuleInstanceName : function() {\r
-            return _this.vfModuleInstanceName;\r
-        },\r
-        setVfModuleInstanceName : function(vfModuleInstanceName) {\r
-            _this.vfModuleInstanceName = vfModuleInstanceName;\r
-        },\r
-               getVolumeGroupInstanceId : function() {\r
-                       return _this.volumeGroupInstanceId;\r
-               },\r
-               setVolumeGroupInstanceId : function(volumeGroupInstanceId) {\r
-                       _this.volumeGroupInstanceId = volumeGroupInstanceId;\r
-               },\r
-               getLcpRegion : function() {\r
-                       return _this.lcpRegion;\r
-               },\r
-               setLcpRegion : function(lcpRegion) {\r
-                       _this.lcpRegion = lcpRegion;\r
-               },\r
-               getTenant : function() {\r
-                       return _this.tenant;\r
-               },\r
-               setTenant : function(tenant) {\r
-                       _this.tenant = tenant;\r
-               },\r
-               getTreeHandle : function() {\r
-                       return _this.treeHandle;\r
-               },\r
-               setTreeHandle : function(treeHandle) {\r
-                       _this.treeHandle = treeHandle;\r
-               },\r
-               setServiceInstanceToCustomer : function(serviceInstanceToCustomer) {\r
-                       _this.serviceInstanceToCustomer = [];\r
-                       _this.serviceInstanceToCustomer = serviceInstanceToCustomer;\r
-               },\r
-               getServiceInstanceToCustomer : function() {\r
-                       return _this.serviceInstanceToCustomer;\r
-               },\r
-        getMsoRequestParametersTestApi: function(){\r
-            return sessionStorage.getItem("msoRequestParametersTestApiValue");\r
-               },\r
-               setALaCarte : function(aval) {\r
-                       _this.aLaCarte = aval;\r
-               },\r
-               getALaCarte : function() {\r
-                       // if not set return true\r
-                       if (_this.aLaCarte === undefined) {\r
-                               return true;\r
-                       }\r
-                       return _this.aLaCarte;\r
-               },\r
-        setShouldIncludeInAsyncInstantiationFlow: function (val) {\r
-            _this.shouldIncludeInAsyncInstantiationFlow = val;\r
-        },\r
-        getShouldIncludeInAsyncInstantiationFlow: function(){\r
-            if (_this.shouldIncludeInAsyncInstantiationFlow === undefined) {\r
-                return false;\r
-            }\r
-            return _this.shouldIncludeInAsyncInstantiationFlow;\r
-        },\r
-               setMacro : function(aval) {\r
-                       _this.macro = aval;\r
-               },\r
-               getMacro : function() {\r
-                       if (_this.macro === undefined) {\r
-                               return false;\r
-                       }\r
-                       return _this.macro;\r
-               },\r
-               getResources : function() {\r
-                       return _this.resources;\r
-               },\r
-               setResources : function(r) {\r
-                       _this.resources = r;\r
-               },\r
-               getSystemPropProvStatus : function() {\r
-                       return _this.syspropProvStatusList;\r
-               },\r
-               setSystemPropProvStatus : function(r) {\r
-                       _this.syspropProvStatusList = r;\r
-               },\r
-               getUpdatedVNFProvStatus : function() {\r
-                       return _this.updatedvnfProvStatus;\r
-               },\r
-               setUpdatedVNFProvStatus : function(r) {\r
-                       _this.updatedvnfProvStatus = r;\r
-               },\r
-               setArbitraryParameters : function (pList) {\r
-                       _this.arbitraryParameters = pList;\r
-               },\r
-               getArbitraryParameters : function () {\r
-                       return _this.arbitraryParameters;\r
-               },\r
-               setE2EService:function(b){\r
-                       _this.e2eService=b;\r
-               },\r
-               getE2EService:function(){\r
-                       return _this.e2eService;\r
-               },\r
-               setHideServiceFields:function(b){\r
-                       _this.hideServiceFields=b;\r
-               },\r
-               getHideServiceFields:function(){\r
-                       return _this.hideServiceFields;\r
-               },\r
-               getServiceProxies:function(){\r
-            return _this.serviceProxies;\r
-        },\r
-        setServiceProxies:function(serviceProxies){\r
-             _this.serviceProxies = serviceProxies;\r
-        },\r
-        getSourceServiceProxies:function(){\r
-            return _this.sourceServiceProxies;\r
-        },\r
-        setSourceServiceProxies:function(sourceServiceProxies){\r
-            _this.sourceServiceProxies = sourceServiceProxies;\r
-        },\r
-        getCollectorServiceProxies:function(){\r
-            return _this.collectorServiceProxies;\r
-        },\r
-        setCollectorServiceProxies:function(collectorServiceProxies){\r
-            _this.collectorServiceProxies = collectorServiceProxies;\r
-        },\r
-               getConfigurationByPolicy:function() {\r
-               return _this.configurationByPolicy;\r
-               },\r
-        setConfigurationByPolicy:function (configurationByPolicy) {\r
-                       _this.configurationByPolicy = configurationByPolicy;\r
-        },\r
-        getSuppressRollback:function(){\r
-            return _this.suppressRollback;\r
-        },\r
-        setSuppressRollback:function(suppressRollback){\r
-            _this.suppressRollback = suppressRollback;\r
-        },\r
-        getPortMirroningConfigFields:function(){\r
-            return _this.portMirroningConfigFields;\r
-        },\r
-        setPortMirroningConfigFields:function(portMirroningConfigFields){\r
-            _this.portMirroningConfigFields = portMirroningConfigFields;\r
-        },\r
-        getConfigurationInstanceId : function() {\r
-            return _this.configurationInstanceId;\r
-        },\r
-        setConfigurationInstanceId : function(configurationInstanceId) {\r
-            _this.configurationInstanceId = configurationInstanceId;\r
-        },\r
-               getConfigurationStatus: function () {\r
-                       return _this.configurationStatus;\r
-        },\r
-        setConfigurationStatus: function (configurationStatus) {\r
-                       _this.configurationStatus = configurationStatus;\r
-        },\r
-        getPortStatus: function () {\r
-            return _this.portStatus;\r
-        },\r
-        setPortStatus: function (portStatus) {\r
-            _this.portStatus = portStatus;\r
-        },\r
-        getPortId: function () {\r
-            return _this.portId;\r
-        },\r
-        setPortId: function (portId) {\r
-            _this.portId = portId;\r
-        },\r
-        getPnf: function () {\r
-            return _this.pnf;\r
-        },\r
-        setPnf: function (pnf) {\r
-            _this.pnf = pnf;\r
-        },\r
-        getOwningEntityProperties: function () {\r
-            return _this.owningEntityProperties;\r
-        },\r
-        setOwningEntityProperties: function (properties) {\r
-            _this.owningEntityProperties = properties;\r
-        }\r
-\r
-       };\r
-};\r
-\r
-appDS2.factory("DataService", [ "$log", DataService ]);\r
+/*-
+ * ============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=========================================================
+ */
+
+"use strict";
+
+var DataService = function($log, DataService) {
+
+       var _this = this;
+
+       return {
+               getAvailableVolumeGroupList : function() {
+                       return _this.availableVolumeGroupList;
+               },
+               setAvailableVolumeGroupList : function(availableVolumeGroupList) {
+                       _this.availableVolumeGroupList = availableVolumeGroupList;
+               },
+               getCloudRegionTenantList : function() {
+                       return _this.cloudRegionTenantList;
+               },
+               setCloudRegionTenantList : function(cloudRegionTenantList) {
+                       _this.cloudRegionTenantList = cloudRegionTenantList;
+               },
+               getCloudOwnerAndLcpCloudRegionFromOptionId : function (cloudRegionOptionId) {
+                       var cloudRegionTenantList = this.getCloudRegionTenantList();
+                       var cloudRegionTenant = _.find(cloudRegionTenantList, {"cloudRegionOptionId": cloudRegionOptionId});
+                       return {
+                               cloudOwner: cloudRegionTenant.cloudOwner,
+                               cloudRegionId: cloudRegionTenant.cloudRegionId
+                       };
+               },
+               getGlobalCustomerId : function() {
+                       return _this.globalCustomerId;
+               },
+               setGlobalCustomerId : function(globalCustomerId) {
+                       _this.globalCustomerId = globalCustomerId;
+               },
+               getCustomizationUuid : function() {
+                       return _this.customizationUUID;
+               },
+               setCustomizationUuid : function(customizationUUID) {
+                       _this.customizationUUID = customizationUUID;
+               },
+               getResCustomizationUuid : function() {
+                       return _this.rescustomizationUUID;
+               },
+               setResCustomizationUuid : function(rescustomizationUUID) {
+                       _this.rescustomizationUUID = rescustomizationUUID;
+               },
+               getInventoryItem : function() {
+                       return _this.inventoryItem;
+               },
+               setInventoryItem : function(inventoryItem) {
+                       _this.inventoryItem = inventoryItem;
+               },
+               getModelId : function() {
+                       return _this.modelId;
+               },
+               setModelId : function(modelId) {
+                       _this.modelId = modelId;
+               },
+               setModelInstanceName : function(modelInstanceName) {
+                       _this.modelInstanceName = modelInstanceName;
+               },
+               getModelInfo : function(componentId) {
+                       return _this.modelInfo[componentId];
+               },
+               setModelInfo : function(componentId, modelInfo) {
+                       if (_this.modelInfo === undefined) {
+                               _this.modelInfo = new Object;
+                       }
+                       _this.modelInfo[componentId] = modelInfo;
+               },
+               getNetworkInstanceId : function() {
+                       return _this.networkInstanceId;
+               },
+               setNetworkInstanceId : function(networkInstanceId) {
+                       _this.networkInstanceId = networkInstanceId;
+               },
+               getServiceIdList : function() {
+                       return _this.serviceIdList;
+               },
+               setServiceIdList : function(serviceIdList) {
+                       _this.serviceIdList = serviceIdList;
+               },
+               setAicZones : function(aicZones) {
+                       _this.aicZones = aicZones;
+               },
+               getAicZones : function(){
+                       return _this.aicZones;
+               },
+               getAicZoneForPNF : function(){
+                               return _this.aicZone;
+               },
+               getServiceInstanceId : function() {
+                       return _this.serviceInstanceId;
+               },
+               setServiceInstanceId : function(serviceInstanceId) {
+                       _this.serviceInstanceId = serviceInstanceId;
+               },
+               getServiceInstanceName : function() {
+                       return _this.serviceInstanceName;
+               },
+               setServiceInstanceName : function(serviceInstanceName) {
+                       _this.serviceInstanceName = serviceInstanceName;
+               },
+               getServiceName : function() {
+                       return _this.serviceName;
+               },
+               setServiceName : function(serviceName) {
+                       _this.serviceName = serviceName;
+               },
+               getServiceType : function() {
+                       return _this.serviceType;
+               },
+               setServiceType : function(serviceType) {
+                       _this.serviceType = serviceType;
+               },
+               getServiceUuid : function() {
+                       return _this.serviceUuid;
+               },
+               setServiceUuid : function(serviceUuid) {
+                       _this.serviceUuid = serviceUuid;
+               },
+               getLoggedInUserId : function() {
+                       return _this.loggedInUserId;
+               },
+               setLoggedInUserId : function(loggedInUserId) {
+                       _this.loggedInUserId = loggedInUserId;
+               },
+               getSubscriberName : function() {
+                       return _this.subscriberName;
+               },
+               setSubscriberName : function(subscriberName) {
+                       _this.subscriberName = subscriberName;
+               },
+               getSubscribers : function() {
+                       return _this.subscribers;
+               },
+               setSubscribers : function(subscribers) {
+                       _this.subscribers = subscribers;
+               },
+               getSubscriptionServiceTypeList : function() {
+                       return _this.subscriptionServiceTypeList;
+               },
+               setSubscriptionServiceTypeList : function(subscriptionServiceTypeList) {
+                       _this.subscriptionServiceTypeList = subscriptionServiceTypeList;
+               },
+               setUserServiceInstanceName : function(userServiceInstanceName) {
+                       _this.userServiceInstanceName = userServiceInstanceName;
+               },
+               getVfModuleInstanceId : function() {
+                       return _this.vfModuleInstanceId;
+               },
+               setVfModuleInstanceId : function(vfModuleInstanceId) {
+                       _this.vfModuleInstanceId = vfModuleInstanceId;
+               },
+               getVnfInstanceId : function() {
+                       return _this.vnfInstanceId;
+               },
+               setVnfInstanceId : function(vnfInstanceId) {
+                       _this.vnfInstanceId = vnfInstanceId;
+               },
+               getVfModuleInstanceName : function() {
+                               return _this.vfModuleInstanceName;
+               },
+               setVfModuleInstanceName : function(vfModuleInstanceName) {
+                               _this.vfModuleInstanceName = vfModuleInstanceName;
+               },
+               getVolumeGroupInstanceId : function() {
+                       return _this.volumeGroupInstanceId;
+               },
+               setVolumeGroupInstanceId : function(volumeGroupInstanceId) {
+                       _this.volumeGroupInstanceId = volumeGroupInstanceId;
+               },
+               getLcpRegion : function() {
+                       return _this.lcpRegion;
+               },
+               setLcpRegion : function(lcpRegion) {
+                       _this.lcpRegion = lcpRegion;
+               },
+               getTenant : function() {
+                       return _this.tenant;
+               },
+               setTenant : function(tenant) {
+                       _this.tenant = tenant;
+               },
+               setServiceInstanceToCustomer : function(serviceInstanceToCustomer) {
+                       _this.serviceInstanceToCustomer = [];
+                       _this.serviceInstanceToCustomer = serviceInstanceToCustomer;
+               },
+               getMsoRequestParametersTestApi: function(){
+                       return sessionStorage.getItem("msoRequestParametersTestApiValue");
+               },
+               setALaCarte : function(aval) {
+                       _this.aLaCarte = aval;
+               },
+               getALaCarte : function() {
+                       // if not set return true
+                       if (_this.aLaCarte === undefined) {
+                               return true;
+                       }
+                       return _this.aLaCarte;
+               },
+               setShouldIncludeInAsyncInstantiationFlow: function (val) {
+                               _this.shouldIncludeInAsyncInstantiationFlow = val;
+               },
+               getShouldIncludeInAsyncInstantiationFlow: function(){
+                       if (_this.shouldIncludeInAsyncInstantiationFlow === undefined) {
+                                       return false;
+                       }
+                       return _this.shouldIncludeInAsyncInstantiationFlow;
+               },
+               setMacro : function(aval) {
+                       _this.macro = aval;
+               },
+               getMacro : function() {
+                       if (_this.macro === undefined) {
+                               return false;
+                       }
+                       return _this.macro;
+               },
+               getResources : function() {
+                       return _this.resources;
+               },
+               setResources : function(r) {
+                       _this.resources = r;
+               },
+               getSystemPropProvStatus : function() {
+                       return _this.syspropProvStatusList;
+               },
+               setSystemPropProvStatus : function(r) {
+                       _this.syspropProvStatusList = r;
+               },
+               getUpdatedVNFProvStatus : function() {
+                       return _this.updatedvnfProvStatus;
+               },
+               setUpdatedVNFProvStatus : function(r) {
+                       _this.updatedvnfProvStatus = r;
+               },
+               setArbitraryParameters : function (pList) {
+                       _this.arbitraryParameters = pList;
+               },
+               getArbitraryParameters : function () {
+                       return _this.arbitraryParameters;
+               },
+               setE2EService:function(b){
+                       _this.e2eService=b;
+               },
+               getE2EService:function(){
+                       return _this.e2eService;
+               },
+               setHideServiceFields:function(b){
+                       _this.hideServiceFields=b;
+               },
+               getHideServiceFields:function(){
+                       return _this.hideServiceFields;
+               },
+               getServiceProxies:function(){
+            return _this.serviceProxies;
+               },
+               setServiceProxies:function(serviceProxies){
+                                _this.serviceProxies = serviceProxies;
+               },
+               getSourceServiceProxies:function(){
+                               return _this.sourceServiceProxies;
+               },
+               setSourceServiceProxies:function(sourceServiceProxies){
+                               _this.sourceServiceProxies = sourceServiceProxies;
+               },
+               getCollectorServiceProxies:function(){
+                               return _this.collectorServiceProxies;
+               },
+               setCollectorServiceProxies:function(collectorServiceProxies){
+                               _this.collectorServiceProxies = collectorServiceProxies;
+               },
+               getConfigurationByPolicy:function() {
+               return _this.configurationByPolicy;
+               },
+               setConfigurationByPolicy:function (configurationByPolicy) {
+                       _this.configurationByPolicy = configurationByPolicy;
+                               },
+               getPortMirroningConfigFields:function(){
+                               return _this.portMirroningConfigFields;
+               },
+               setPortMirroningConfigFields:function(portMirroningConfigFields){
+                               _this.portMirroningConfigFields = portMirroningConfigFields;
+               },
+               getConfigurationInstanceId : function() {
+                               return _this.configurationInstanceId;
+               },
+               setConfigurationInstanceId : function(configurationInstanceId) {
+                               _this.configurationInstanceId = configurationInstanceId;
+               },
+               getPnf: function () {
+                               return _this.pnf;
+               },
+               setPnf: function (pnf) {
+                               _this.pnf = pnf;
+               },
+               getOwningEntityProperties: function () {
+                               return _this.owningEntityProperties;
+               },
+               setOwningEntityProperties: function (properties) {
+                               _this.owningEntityProperties = properties;
+               }
+       };
+};
+
+appDS2.factory("DataService", [ "$log", DataService ]);
diff --git a/vid-app-common/src/test/java/org/onap/vid/model/serviceInstantiation/InstantiationModelSerializationTest.java b/vid-app-common/src/test/java/org/onap/vid/model/serviceInstantiation/InstantiationModelSerializationTest.java
new file mode 100644 (file)
index 0000000..b5d2816
--- /dev/null
@@ -0,0 +1,215 @@
+/*-
+ * ============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 static java.util.Collections.emptyMap;
+import static net.javacrumbs.jsonunit.JsonMatchers.jsonNodeAbsent;
+import static net.javacrumbs.jsonunit.JsonMatchers.jsonPartEquals;
+import static org.hamcrest.CoreMatchers.either;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.hasItem;
+import static org.hamcrest.Matchers.hasProperty;
+import static org.hamcrest.Matchers.nullValue;
+import static org.hamcrest.Matchers.samePropertyValuesAs;
+import static org.onap.vid.model.Action.Create;
+import static org.onap.vid.testUtils.TestUtils.setStringsInStringProperties;
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Map;
+import org.apache.commons.beanutils.PropertyUtils;
+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.mso.model.ModelInfo;
+import org.testng.annotations.Test;
+
+public class InstantiationModelSerializationTest {
+
+    final ImmutableList<Map<String, String>> instanceParams =
+        ImmutableList.of(
+            ImmutableMap.of("one", "1"),
+            ImmutableMap.of("two", "2")
+        );
+
+    @Test
+    public void serializeAndDeserializeServiceInstantiation() throws Exception {
+
+        ServiceInstantiation serviceInstantiation = new ServiceInstantiation(
+            newModelInfo(),
+            "owningEntityId",
+            "owningEntityName",
+            "projectName",
+            "globalSubscriberId",
+            "subscriberName",
+            "productFamilyId",
+            "instanceName",
+            "subscriptionServiceType",
+            "lcpCloudRegionId",
+            "legacyRegion",
+            "tenantId",
+            "tenantName",
+            "aicZoneId",
+            "aicZoneName",
+            emptyMap(),
+            emptyMap(),
+            emptyMap(),
+            emptyMap(),
+            instanceParams,
+            true,
+            1,
+            true,
+            true,
+            "testApi",
+            "instanceId",
+            "Delete",
+            "trackById",
+            true,
+            "statusMessage",
+            new VidNotions(InstantiationUI.ANY_ALACARTE_WHICH_NOT_EXCLUDED,
+                ModelCategory.INFRASTRUCTURE_VPN,
+                InstantiationUI.INFRASTRUCTURE_VPN,
+                InstantiationType.Macro)
+        );
+
+        verifySerializationAndDeserialization(serviceInstantiation);
+    }
+
+    @Test
+    public void serializeAndDeserializeVnf() throws Exception {
+
+        Vnf vnf = new Vnf(
+            newModelInfo(), "productFamilyId",
+            "instanceName",
+            "Upgrade",
+            "platformName",
+            "lcpCloudRegionId",
+            "legacyRegion",
+            "tenantId",
+            instanceParams,
+            "lineOfBusinessName",
+            true,
+            "instanceId",
+            emptyMap(),
+            "trackById",
+            true,
+            "statusMessage",
+            5);
+
+        verifySerializationAndDeserialization(vnf);
+    }
+
+    @Test
+    public void serializeAndDeserializeVfModule() throws Exception {
+
+        ImmutableMap<String, String> supplementaryParams = ImmutableMap.of(
+            "uno", "1",
+            "dos", "2",
+            "tres", "3"
+        );
+
+        VfModule vfModule = new VfModule(
+            newModelInfo(),
+            "instanceName",
+            "volumeGroupInstanceName",
+            "Delete",
+            "lcpCloudRegionId",
+            "legacyRegion",
+            "tenantId",
+            instanceParams,
+            supplementaryParams,
+            true,
+            true,
+            "instanceId",
+            "trackById",
+            true,
+            "statusMessage",
+            true,
+            true,
+            1);
+
+        verifySerializationAndDeserialization(vfModule);
+    }
+
+    @Test
+    public void VfModule_sdncPreLoad_shouldBeSerializedWithCorrectName() {
+
+        final boolean USE_PRELOAD = true;
+
+        VfModule vfModule = new VfModule(newModelInfo(), null, null, null,
+            null, null, null, null, null, false,
+            /* HERE ====> */ USE_PRELOAD,
+            null, null, null, null, null, null, null);
+
+        assertThat(vfModule, jsonPartEquals("sdncPreLoad", USE_PRELOAD));
+        assertThat(vfModule, jsonNodeAbsent("usePreload"));
+    }
+
+    @Test
+    public void VfModule_volumeGroupName_shouldBeSerializedWithCorrectName() {
+
+        final String VOLUME_GROUP_INSTANCE_NAME = "my volume group name";
+
+        VfModule vfModule = new VfModule(newModelInfo(), null,
+            /* HERE ====> */ VOLUME_GROUP_INSTANCE_NAME,
+            null, null, null, null, null, null,
+            false, null, null, null, null, null,
+            null, null, null);
+
+        assertThat(vfModule, jsonPartEquals("volumeGroupName", VOLUME_GROUP_INSTANCE_NAME));
+        assertThat(vfModule, jsonNodeAbsent("volumeGroupInstanceName"));
+    }
+
+    private ModelInfo newModelInfo() {
+        ModelInfo modelInfo = new ModelInfo();
+        setStringsInStringProperties(modelInfo);
+        return modelInfo;
+    }
+
+    private void verifySerializationAndDeserialization(Object object) throws Exception {
+
+        assertThatAllValuesAreNotDefaultValues(object);
+
+        String valueAsString = JACKSON_OBJECT_MAPPER.writeValueAsString(object);
+        Object objectReconstructed = JACKSON_OBJECT_MAPPER.readValue(valueAsString, object.getClass());
+
+        // verify that all fields' values were reconstructed
+        assertThat(objectReconstructed, samePropertyValuesAs(object));
+    }
+
+    private void assertThatAllValuesAreNotDefaultValues(Object object)
+        throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
+        assertThat("setup is expected to have no field with a default Java value",
+            PropertyUtils.describe(object).entrySet(),
+            not(hasItem(hasProperty("value",
+                either(nullValue())
+                    .or(equalTo(0))
+                    .or(equalTo(""))
+                    .or(equalTo(false))
+                    .or(equalTo(Create))))));
+    }
+
+}
index ab59f08..721c9ea 100644 (file)
@@ -22,7 +22,6 @@ import org.springframework.http.HttpEntity;
 import org.springframework.http.HttpMethod;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.Test;
-import vid.automation.test.Constants;
 import vid.automation.test.Constants.Users;
 import vid.automation.test.model.User;
 import vid.automation.test.services.AsyncJobsService;
@@ -77,18 +76,34 @@ public class InstantiationTemplatesApiTest extends AsyncInstantiationBase {
 
     @Test
     public void templateTopology_givenDeployFromCypressE2E_getTemplateTopologyDataIsEquivalent() throws IOException {
-        templateTopology_givenDeploy_templateTopologyIsEquivalent(objectMapper.readValue(
-            convertRequest(objectMapper, "asyncInstantiation/templates__instance_template.json"),
-            JsonNode.class));
+        templateTopology_givenDeploy_templateTopologyIsEquivalentToBody(
+            fileAsJsonNode("asyncInstantiation/templates__instance_template.json"));
     }
 
-    public void templateTopology_givenDeploy_templateTopologyIsEquivalent(JsonNode body) {
+    @Test
+    public void templateTopology_givenDeployFromEditedTemplateCypressE2E_getTemplateTopologyDataIsEquivalentToOriginalTemplate() throws IOException {
+        templateTopology_givenDeploy_templateTopologyIsEquivalent(
+            fileAsJsonNode("asyncInstantiation/templates__instance_from_template__set_without_modify.json"),
+            fileAsJsonNode("asyncInstantiation/templates__instance_template.json"));
+    }
+
+    private JsonNode fileAsJsonNode(String fileName) throws IOException {
+        return objectMapper.readValue(
+            convertRequest(objectMapper, fileName),
+            JsonNode.class);
+    }
+
+    public void templateTopology_givenDeploy_templateTopologyIsEquivalentToBody(JsonNode body) {
+        templateTopology_givenDeploy_templateTopologyIsEquivalent(body, body);
+    }
+
+    public void templateTopology_givenDeploy_templateTopologyIsEquivalent(JsonNode body, JsonNode expectedTemplateTopology) {
         registerExpectationFromPreset(new PresetAAIGetSubscribersGet(), RegistrationStrategy.CLEAR_THEN_SET);
 
         String uuid1 = postAsyncInstanceRequest(body);
         JsonNode templateTopology1 = restTemplate.getForObject(templateTopologyUri(uuid1), JsonNode.class);
 
-        assertThat(cleanupTemplate(templateTopology1), jsonEquals(cleanupTemplate(body)));
+        assertThat(cleanupTemplate(templateTopology1), jsonEquals(cleanupTemplate(expectedTemplateTopology)));
     }
 
     private JsonNode cleanupTemplate(JsonNode templateTopology) {
index 013745c..d602a15 100644 (file)
         "baseModule": false
       },
       "inputs": {},
-      "volumeGroupAllowed": false
+      "volumeGroupAllowed": true
     },
     "vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2": {
       "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
         "baseModule": true
       },
       "inputs": {},
-      "volumeGroupAllowed": true
+      "volumeGroupAllowed": false
     }
   },
   "volumeGroups": {
-    "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
+    "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-1": {
       "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
       "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
       "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
       "description": null,
-      "name": "VfVgeraldine..base_vflorence..module-0",
+      "name": "VfVgeraldine..base_vflorence..module-1",
       "version": "2",
-      "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
+      "modelCustomizationName": "VfVgeraldine..base_vflorence..module-1",
       "properties": {
         "minCountInstances": 1,
         "maxCountInstances": 1,
diff --git a/vid-automation/src/test/resources/asyncInstantiation/templates__instance_from_template__set_without_modify.json b/vid-automation/src/test/resources/asyncInstantiation/templates__instance_from_template__set_without_modify.json
new file mode 100644 (file)
index 0000000..5a327fd
--- /dev/null
@@ -0,0 +1,132 @@
+{
+  "action": "Create",
+  "instanceName": "vProbe_NC_Service_DG_new_SI",
+  "productFamilyId": null,
+  "lcpCloudRegionId": null,
+  "tenantId": null,
+  "modelInfo": {
+    "modelInvariantId": "90a32d31-8a01-4de2-a91f-7e2414d6f5aa",
+    "modelVersionId": "6cfeeb18-c2b0-49df-987a-da47493c8e38",
+    "modelName": "vProbe_NC_Service",
+    "modelType": "service",
+    "modelVersion": "1.0"
+  },
+  "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+  "subscriptionServiceType": "TYLER SILVIA",
+  "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+  "owningEntityName": "WayneHolland",
+  "tenantName": null,
+  "aicZoneId": null,
+  "aicZoneName": null,
+  "projectName": "WATKINS",
+  "subscriberName": "SILVIA ROBBINS",
+  "rollbackOnFailure": "true",
+  "isALaCarte": true,
+  "testApi": "GR_API",
+  "trackById": "36601560-f8e3-4020-bdef-3e4709c51e84",
+  "existingVNFCounterMap": {
+    "024a417d-ca46-40bf-95ce-809c6a269011": 1
+  },
+  "existingVRFCounterMap": {},
+  "existingVnfGroupCounterMap": {},
+  "existingNetworksCounterMap": {},
+  "existingNames": {
+  },
+  "vnfs": {
+    "vProbe_NC_VNF 0": {
+      "modelInfo": {
+        "modelCustomizationName": "vProbe_NC_VNF 0",
+        "modelCustomizationId": "024a417d-ca46-40bf-95ce-809c6a269011",
+        "modelInvariantId": "a6a96924-b9c5-4c85-ae18-cbfca848095e",
+        "modelVersionId": "21ae311e-432f-4c54-b855-446d0b8ded72",
+        "modelName": "vProbe_NC_VNF",
+        "modelType": "vnf",
+        "modelVersion": "1.0"
+      },
+      "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+      "instanceName": "hvf6arlba007",
+      "action": "Create",
+      "platformName": "xxx1",
+      "lcpCloudRegionId": "hvf6",
+      "tenantId": "4914ab0ab3a743e58f0eefdacc1dde77",
+      "instanceParams": [
+        {}
+      ],
+      "rollbackOnFailure": true,
+      "instanceId": null,
+      "vfModules": {
+        "vprobe_nc_vnf0..VprobeNcVnf..FE_base_module..module-0": {
+          "vprobe_nc_vnf0..VprobeNcVnf..FE_base_module..module-0ahubg": {
+            "modelInfo": {
+              "modelCustomizationName": "VprobeNcVnf..FE_base_module..module-0",
+              "modelCustomizationId": "4d0818cf-eaa9-4a3f-89c2-639953089e14",
+              "modelInvariantId": "29b6fa3c-aeb3-4103-b3f7-6f98e097b005",
+              "modelVersionId": "c5b26cc1-a66f-4b69-aa23-6abc7c647c88",
+              "modelName": "VprobeNcVnf..FE_base_module..module-0",
+              "modelType": "vfModule",
+              "modelVersion": "1"
+            },
+            "instanceName": "hvf6arlba007_lba_Base_01",
+            "action": "Create",
+            "lcpCloudRegionId": "hvf6",
+            "tenantId": "4914ab0ab3a743e58f0eefdacc1dde77",
+            "instanceParams": [
+              {}
+            ],
+            "rollbackOnFailure": true,
+            "trackById": "ea2879a6-10bc-4697-90d7-7bc3e71da0fd",
+            "isFailed": false
+          }
+        },
+        "vprobe_nc_vnf0..VprobeNcVnf..FE_Add_On_Module_vlbagent_eph..module-1": {
+          "vprobe_nc_vnf0..VprobeNcVnf..FE_Add_On_Module_vlbagent_eph..module-1yprvi": {
+            "modelInfo": {
+              "modelCustomizationName": "VprobeNcVnf..FE_Add_On_Module_vlbagent_eph..module-1",
+              "modelCustomizationId": "9b99d340-a80b-45ef-9ff1-993fa3e4c001",
+              "modelInvariantId": "1bcc4824-6c1a-4b51-af7c-076b7fc14d05",
+              "modelVersionId": "c09e4530-8fd8-418f-9483-2f57ce927b05",
+              "modelName": "VprobeNcVnf..FE_Add_On_Module_vlbagent_eph..module-1",
+              "modelType": "vfModule",
+              "modelVersion": "1"
+            },
+            "instanceName": "my_hvf6arlba007_lba_dj_01",
+            "action": "Create",
+            "lcpCloudRegionId": "hvf6",
+            "tenantId": "4914ab0ab3a743e58f0eefdacc1dde77",
+            "instanceParams": [
+              {}
+            ],
+            "rollbackOnFailure": true,
+            "trackById": "b134410e-3bc0-478e-883e-1b6bdf8a28df",
+            "isFailed": false,
+            "volumeGroupName": "my_special_hvf6arlba007_lba_dj_01_vol",
+            "sdncPreLoad": true
+          }
+        }
+      },
+      "trackById": "1d2848a0-3573-4d29-b3dd-60bb263260ea",
+      "isFailed": false,
+      "statusMessage": null,
+      "position": null,
+      "lineOfBusiness": "zzz1"
+    }
+  },
+  "networks": {},
+  "vrfs": {},
+  "vnfGroups": {},
+  "instanceParams": [
+    {}
+  ],
+  "pause": false,
+  "bulkSize": 1,
+  "instanceId": null,
+  "isFailed": false,
+  "statusMessage": null,
+  "vidNotions": {
+    "instantiationUI": "anyAlacarteWhichNotExcluded",
+    "modelCategory": "5G Fabric Configuration",
+    "viewEditUI": "legacy",
+    "instantiationType": "ALaCarte"
+  },
+  "position": null
+}
index a7b3a04..5a327fd 100644 (file)
@@ -30,6 +30,8 @@
   "existingVRFCounterMap": {},
   "existingVnfGroupCounterMap": {},
   "existingNetworksCounterMap": {},
+  "existingNames": {
+  },
   "vnfs": {
     "vProbe_NC_VNF 0": {
       "modelInfo": {
@@ -87,7 +89,7 @@
               "modelType": "vfModule",
               "modelVersion": "1"
             },
-            "instanceName": "hvf6arlba007_lba_dj_01",
+            "instanceName": "my_hvf6arlba007_lba_dj_01",
             "action": "Create",
             "lcpCloudRegionId": "hvf6",
             "tenantId": "4914ab0ab3a743e58f0eefdacc1dde77",
@@ -97,8 +99,8 @@
             "rollbackOnFailure": true,
             "trackById": "b134410e-3bc0-478e-883e-1b6bdf8a28df",
             "isFailed": false,
-            "volumeGroupInstanceName": "hvf6arlba007_lba_dj_01_vol",
-            "usePreload": true
+            "volumeGroupName": "my_special_hvf6arlba007_lba_dj_01_vol",
+            "sdncPreLoad": true
           }
         }
       },
index dbb9bca..f9fe68b 100644 (file)
@@ -1,5 +1,3 @@
-import ObjectLike = Cypress.ObjectLike;
-
 describe('Drawing Board: Instantiation Templates', function () {
 
   describe('Instantiation templates ', () => {
@@ -31,13 +29,12 @@ describe('Drawing Board: Instantiation Templates', function () {
         assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd();
       });
 
-      it('View a template’s details as expected', ()=> {
+      it('Given a stored template - when "edit" vnf and vfmodules are opened - then template’s details are visible as expected', ()=> {
 
         loadDrawingBoardWithRecreateMode();
 
         // Then...
-        cy.drawingBoardTreeOpenContextMenuByElementDataTestId("node-21ae311e-432f-4c54-b855-446d0b8ded72-vProbe_NC_VNF 0")
-        .drawingBoardTreeClickOnContextMenuOptionByName('Edit')
+        editNode("node-21ae311e-432f-4c54-b855-446d0b8ded72-vProbe_NC_VNF 0")
         .getElementByDataTestsId("instanceName").should('have.value', 'hvf6arlba007')
         .getElementByDataTestsId("productFamily").should('contain', 'Emanuel')
         .getElementByDataTestsId("tenant").should('contain', 'DN5242-Nov21-T1')
@@ -47,19 +44,20 @@ describe('Drawing Board: Instantiation Templates', function () {
         .checkPlatformValue('xxx1')
          .getElementByDataTestsId("cancelButton").click();
 
-        cy.drawingBoardTreeOpenContextMenuByElementDataTestId("node-c5b26cc1-a66f-4b69-aa23-6abc7c647c88-vprobe_nc_vnf0..VprobeNcVnf..FE_base_module..module-0")
-        .drawingBoardTreeClickOnContextMenuOptionByName('Edit')
+        editNode("node-c5b26cc1-a66f-4b69-aa23-6abc7c647c88-vprobe_nc_vnf0..VprobeNcVnf..FE_base_module..module-0")
         .getElementByDataTestsId("instanceName").should('have.value', 'hvf6arlba007_lba_Base_01')
         .getElementByDataTestsId("lcpRegion").should('contain', 'hvf6')
         .getElementByDataTestsId("tenant").should('contain', 'DN5242-Nov21-T1')
         .getElementByDataTestsId("rollback").should('contain', 'Rollback')
         .getElementByDataTestsId("cancelButton").click();
 
-        cy.drawingBoardTreeOpenContextMenuByElementDataTestId("node-c09e4530-8fd8-418f-9483-2f57ce927b05-vprobe_nc_vnf0..VprobeNcVnf..FE_Add_On_Module_vlbagent_eph..module-1")
-        .drawingBoardTreeClickOnContextMenuOptionByName('Edit')
+        editNode("node-c09e4530-8fd8-418f-9483-2f57ce927b05-vprobe_nc_vnf0..VprobeNcVnf..FE_Add_On_Module_vlbagent_eph..module-1")
+        .getElementByDataTestsId("instanceName").should('have.value', 'my_hvf6arlba007_lba_dj_01')
+        .getElementByDataTestsId("volumeGroupName").should('have.value', 'my_special_hvf6arlba007_lba_dj_01_vol')
         .getElementByDataTestsId("lcpRegion").should('contain', 'hvf6')
         .getElementByDataTestsId("tenant").should('contain', 'DN5242-Nov21-T1')
         .getElementByDataTestsId("rollback").should('contain', 'Rollback')
+        .getElementByDataTestsId("sdncPreLoad").should('have.value', 'on')
         .getElementByDataTestsId("cancelButton").click();
 
 
@@ -67,7 +65,7 @@ describe('Drawing Board: Instantiation Templates', function () {
         assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd();
         });
 
-      it(`Edit the service`,  function ()  {
+      it(`Given a stored template - when "edit" service is opened - then template’s details are visible as expected`,  function ()  {
 
         loadDrawingBoardWithRecreateMode();
 
@@ -80,10 +78,10 @@ describe('Drawing Board: Instantiation Templates', function () {
         .getElementByDataTestsId("project").should('contain', 'WATKINS')
         .getElementByDataTestsId("rollback").should('contain', 'Rollback');
 
+      });
 
 
 
-      });
       });
     });
   });
@@ -112,6 +110,11 @@ function loadDrawingBoardWithRecreateMode() {
   cy.wait('@templateTopology');
 }
 
+function editNode(dataTestId: string) {
+  return cy.drawingBoardTreeOpenContextMenuByElementDataTestId(dataTestId)
+    .drawingBoardTreeClickOnContextMenuOptionByName('Edit')
+}
+
 function assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd() {
   cy.getDrawingBoardDeployBtn().click();
   cy.wait('@expectedPostAsyncInstantiation').then(xhr => {
index 9f2499f..0973447 100644 (file)
@@ -100,20 +100,20 @@ describe('View Edit Page: Upgrade VFModule', function () {
         `servicePlanning/EDIT?serviceModelId=${serviceUuid}&subscriberId=${SUBSCRIBER_ID}&serviceType=${SERVICE_TYPE}&serviceInstanceId=${SERVICE_INSTANCE_ID}`);
     });
 
-    it(`Upgrade a VFModule`, function () {
+    it(`Upgrade a VF Module`, function () {
       cy.initDrawingBoardUserPermission();
       initServicePlanning("EDIT",
         '../vid-automation/src/test/resources/viewEdit/ServiceTreeWithMultipleChildren_serviceInstance_withUpdatedLatestVersion.json');
-      upgradeTheVFM();
+      upgradeTheVFM('node-522159d5-d6e0-4c2a-aa44-5a542a12a830-vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1', true);
       assertVfModuleActionInRedux("None_Upgrade");
       undoUpgradeForVFM();
       assertVfModuleActionInRedux("None");
-      upgradeTheVFM();
+      upgradeTheVFM('node-522159d5-d6e0-4c2a-aa44-5a542a12a830-vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1',true);
       cy.getDrawingBoardDeployBtn().click();
       cy.wait('@expectedPostAsyncInstantiation').then(xhr => {
         const requestBody = Object(xhr.request.body);
         const vfModuleRequest = requestBody.vnfs['VNF2_INSTANCE_ID'].vfModules['vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1']['2c1ca484-cbc2-408b-ab86-25a2c15ce280'];
-          expect(requestBody.action).to.equal("None_Upgrade");
+        expect(requestBody.action).to.equal("None_Upgrade");
         expect(requestBody.vnfs['VNF2_INSTANCE_ID'].action).to.equal("None_Upgrade");
         expect(vfModuleRequest.action).to.equal("None_Upgrade");
       });
@@ -129,7 +129,7 @@ describe('View Edit Page: Upgrade VFModule', function () {
 
   });
 
-  describe('More UI tests', () => {
+  describe('More UI test', () => {
 
     beforeEach(() => {
       cy.clearSessionStorage();
@@ -174,7 +174,7 @@ describe('View Edit Page: Upgrade VFModule', function () {
 
       cy.openIframe(`app/ui/#/servicePlanning/EDIT?serviceModelId=${serviceModelId}&subscriberId=${subscriberId}&serviceType=${serviceType}&serviceInstanceId=${serviceInstanceId}`);
 
-      upgradeTheVFM('node-04b21d26-9780-4956-8329-b22b049329f4-xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0');
+      upgradeTheVFM('node-04b21d26-9780-4956-8329-b22b049329f4-xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0', false);
 
       mockAsyncBulkResponse();
       cy.getDrawingBoardDeployBtn().click();
@@ -213,13 +213,18 @@ describe('View Edit Page: Upgrade VFModule', function () {
     }).as("expectLatestServiceModelUpgradeVersion");
   }
 
-  function upgradeTheVFM(treeNodeId = 'node-522159d5-d6e0-4c2a-aa44-5a542a12a830-vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1') {
+  function upgradeTheVFM(treeNodeId: string, shouldVGCheckboxExist :boolean) {
     cy.getElementByDataTestsId(`${treeNodeId}-menu-btn`).click()
     .drawingBoardTreeClickOnContextMenuOptionByName("Upgrade");
     // The following is needed when enabling FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS
 
     cy.getElementByDataTestsId('retainAssignments').click();
-    cy.getElementByDataTestsId('retainVolumeGroups').click();
+    if (shouldVGCheckboxExist) {
+      cy.getElementByDataTestsId('retainVolumeGroups').click();
+    }
+    else {
+      cy.getElementByDataTestsId('retainVolumeGroups').should('not.exist');
+    }
     cy.getElementByDataTestsId('sdncPreLoad').click();
     cy.screenshot();
     cy.getElementByDataTestsId('form-set').click();
index 3e22bfe..42ac805 100644 (file)
@@ -80,7 +80,7 @@
             "platformName": null,
             "trackById": "b0732bed-3ddf-43cc-b193-7f18db84e476",
             "isBase": true,
-            "volumeGroupName": null
+            "volumeGroupName": "xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0_vol"
           }
         }
       },
@@ -98,4 +98,4 @@
   "existingNetworksCounterMap": {},
   "existingVnfGroupCounterMap": {},
   "existingVRFCounterMap": {}
-}
\ No newline at end of file
+}
index 4f7b5e2..ee04de1 100644 (file)
@@ -93,7 +93,7 @@
     "hammerjs": "2.0.8",
     "husky": "^1.3.1",
     "istanbul-reports": "2.1.1",
-    "jest": "24.1.0",
+    "jest": "24.9.0",
     "jest-each": "24.0.0",
     "jest-junit": "6.3.0",
     "jest-sonar-reporter": "2.0.0",
index fb11729..e277cb2 100644 (file)
@@ -10,7 +10,7 @@ import {AaiService} from '../../../shared/services/aaiService/aai.service';
 import {ServiceNodeTypes} from '../../../shared/models/ServiceNodeTypes';
 import {IframeService} from "../../../shared/utils/iframe.service";
 import {DefaultDataGeneratorService} from "../../../shared/services/defaultDataServiceGenerator/default.data.generator.service";
-import {VfModulePopuopService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
 import {NetworkPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/network/network.popup.service";
 import {createVFModuleInstance} from "../../../shared/storeUtil/utils/vfModule/vfModule.actions";
 import {VnfPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service";
@@ -56,7 +56,7 @@ export class AvailableModelsTreeComponent {
               private _drawingBoardTreeService: DrawingBoardTreeService,
               private _defaultDataGeneratorService: DefaultDataGeneratorService,
               private _vnfGroupControlGenerator: VnfGroupControlGenerator,
-              private _vfModulePopuopService: VfModulePopuopService,
+              private _vfModulePopuopService: VfModulePopupService,
               private _vnfGroupPopupService: VnfGroupPopupService,
               private _vnfPopupService: VnfPopupService,
               private _networkPopupService: NetworkPopupService,
index f354257..4ad1b06 100644 (file)
@@ -11,7 +11,7 @@ import {IframeService} from "../../../shared/utils/iframe.service";
 import {DuplicateService} from '../duplicate/duplicate.service';
 import {DrawingBoardTreeService, TreeNodeContextMenuModel} from "./drawing-board-tree.service";
 import {NetworkPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/network/network.popup.service";
-import {VfModulePopuopService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
 import {VnfPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service";
 import {SdcUiServices} from "onap-ui-angular";
 import {HighlightPipe} from "../../../shared/pipes/highlight/highlight-filter.pipe";
@@ -63,7 +63,7 @@ export class DrawingBoardTreeComponent implements OnInit, AfterViewInit {
               private modalService: SdcUiServices.ModalService,
               private _drawingBoardTreeService: DrawingBoardTreeService,
               private _networkPopupService: NetworkPopupService,
-              private _vfModulePopuopService: VfModulePopuopService,
+              private _vfModulePopuopService: VfModulePopupService,
               private _vnfPopupService: VnfPopupService,
               private _vnfGroupPopupService: VnfGroupPopupService,
               private _errorMsgService: ErrorMsgService,
index a44c21b..59ef35a 100644 (file)
@@ -8,7 +8,7 @@ import {NgRedux} from "@angular-redux/store";
 import {AppState} from "../../../../../shared/store/reducers";
 import {DefaultDataGeneratorService} from "../../../../../shared/services/defaultDataServiceGenerator/default.data.generator.service";
 import {DialogService} from "ng2-bootstrap-modal";
-import {VfModulePopuopService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
 import {VnfPopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service";
 import {DuplicateService} from "../../../duplicate/duplicate.service";
 import {IframeService} from "../../../../../shared/utils/iframe.service";
@@ -38,7 +38,7 @@ describe('Related Vnf member Model Info', () => {
         MockNgRedux,
         DynamicInputsService,
         DialogService,
-        VfModulePopuopService,
+        VfModulePopupService,
         VfModuleUpgradePopupService,
         VnfPopupService,
         DefaultDataGeneratorService,
index 85e5761..b62794f 100644 (file)
@@ -4,7 +4,7 @@ import {MockNgRedux, NgReduxTestingModule} from "@angular-redux/store/testing";
 import {VFModuleModelInfo} from "./vfModule.model.info";
 import {DynamicInputsService} from "../../dynamicInputs.service";
 import {SharedTreeService} from "../../shared.tree.service";
-import {VfModulePopuopService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
 import {DialogService} from "ng2-bootstrap-modal";
 import {NgRedux} from "@angular-redux/store";
 import {AvailableNodeIcons} from "../../../available-models-tree/available-models-tree.service";
@@ -42,7 +42,7 @@ describe('VFModule Model Info', () => {
   let  _sharedTreeService : SharedTreeService;
   let  vfModuleModel: VFModuleModelInfo;
   let _dialogService : DialogService;
-  let _vfModulePopupService : VfModulePopuopService;
+  let _vfModulePopupService : VfModulePopupService;
   let _vfModuleUpgradePopupService : VfModuleUpgradePopupService;
   let _iframeService : IframeService;
   let _componentInfoService : ComponentInfoService;
@@ -56,7 +56,7 @@ describe('VFModule Model Info', () => {
       providers: [
         DynamicInputsService,
         DialogService,
-        VfModulePopuopService,
+        VfModulePopupService,
         VfModuleUpgradePopupService,
         SharedTreeService,
         IframeService,
index 1e4a22c..bb56b14 100644 (file)
@@ -10,7 +10,7 @@ import {NgRedux} from "@angular-redux/store";
 import {ITreeNode} from "angular-tree-component/dist/defs/api";
 import {GenericFormPopupComponent, PopupType} from "../../../../../shared/components/genericFormPopup/generic-form-popup.component";
 import {DialogService} from "ng2-bootstrap-modal";
-import {VfModulePopuopService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
 import {AppState} from "../../../../../shared/store/reducers";
 import {MessageBoxData} from "../../../../../shared/components/messageBox/messageBox.data";
 import {MessageBoxService} from "../../../../../shared/components/messageBox/messageBox.service";
@@ -28,7 +28,7 @@ export class VFModuleModelInfo implements ILevelNodeInfo {
   constructor(private _dynamicInputsService: DynamicInputsService,
               private _sharedTreeService: SharedTreeService,
               private _dialogService: DialogService,
-              private _vfModulePopupService: VfModulePopuopService,
+              private _vfModulePopupService: VfModulePopupService,
               private _vfModuleUpgradePopupService: VfModuleUpgradePopupService,
               private _iframeService: IframeService,
               private _featureFlagsService: FeatureFlagsService,
@@ -397,9 +397,9 @@ export class VFModuleModelInfo implements ILevelNodeInfo {
           vfModule : _.cloneDeep(node)
         },
         node,
-        isUpdateMode: false
+        isUpdateMode: true
       });
-    }else {
+    } else {
       this._sharedTreeService.upgradeBottomUp(node, serviceModelId);
       this._store.dispatch(upgradeVFModule(node.data.modelName,  node.parent.data.vnfStoreKey, serviceModelId ,node.data.dynamicModelName));
     }
index 3ac6076..f700ed4 100644 (file)
@@ -10,7 +10,7 @@ import {NgRedux} from "@angular-redux/store";
 import {AppState} from "../../../../../shared/store/reducers";
 import {DefaultDataGeneratorService} from "../../../../../shared/services/defaultDataServiceGenerator/default.data.generator.service";
 import {DialogService} from "ng2-bootstrap-modal";
-import {VfModulePopuopService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
 import {VnfPopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service";
 import {AvailableNodeIcons} from "../../../available-models-tree/available-models-tree.service";
 import {DuplicateService} from "../../../duplicate/duplicate.service";
@@ -38,7 +38,7 @@ describe('Vnf Model Info', () => {
  let _serviceInfoService: ServiceInfoService;
  let _defaultDataGeneratorService : DefaultDataGeneratorService;
  let _dialogService : DialogService;
- let _vfModulePopupService : VfModulePopuopService;
+ let _vfModulePopupService : VfModulePopupService;
  let _vfModuleUpgradePopupService : VfModuleUpgradePopupService;
  let _vnfPopupService : VnfPopupService;
  let _duplicateService : DuplicateService;
@@ -55,7 +55,7 @@ describe('Vnf Model Info', () => {
         MockNgRedux,
         DynamicInputsService,
         DialogService,
-        VfModulePopuopService,
+        VfModulePopupService,
         VfModuleUpgradePopupService,
         VnfPopupService,
         DefaultDataGeneratorService,
index a5a85c4..355b5c5 100644 (file)
@@ -12,7 +12,7 @@ import {DefaultDataGeneratorService} from "../../../../../shared/services/defaul
 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 {VfModulePopuopService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
 import {ITreeNode} from "angular-tree-component/dist/defs/api";
 import {AvailableNodeIcons} from "../../../available-models-tree/available-models-tree.service";
 import {DuplicateService} from "../../../duplicate/duplicate.service";
@@ -38,7 +38,7 @@ export class VnfModelInfo implements ILevelNodeInfo {
               private _defaultDataGeneratorService: DefaultDataGeneratorService,
               private _dialogService: DialogService,
               private _vnfPopupService: VnfPopupService,
-              private _vfModulePopupService: VfModulePopuopService,
+              private _vfModulePopupService: VfModulePopupService,
               private _vfModuleUpgradePopupService: VfModuleUpgradePopupService,
               private _duplicateService: DuplicateService,
               private modalService: SdcUiServices.ModalService,
index 9add349..c17d9c7 100644 (file)
@@ -22,7 +22,7 @@ import {IframeService} from "../../../../shared/utils/iframe.service";
 import {BasicPopupService} from "../../../../shared/components/genericFormPopup/genericFormServices/basic.popup.service";
 import {NetworkPopupService} from "../../../../shared/components/genericFormPopup/genericFormServices/network/network.popup.service";
 import {NetworkControlGenerator} from "../../../../shared/components/genericForm/formControlsServices/networkGenerator/network.control.generator";
-import {VfModulePopuopService} from "../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
 import {VfModuleControlGenerator} from "../../../../shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator";
 import {VnfGroupPopupService} from "../../../../shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service";
 import {VnfGroupControlGenerator} from "../../../../shared/components/genericForm/formControlsServices/vnfGroupGenerator/vnfGroup.control.generator";
@@ -73,7 +73,7 @@ describe('Model Tree Generator service', () => {
         BasicPopupService,
         NetworkPopupService,
         NetworkControlGenerator,
-        VfModulePopuopService,
+        VfModulePopupService,
         VfModuleUpgradePopupService,
         VfModuleControlGenerator,
         VnfGroupControlGenerator,
index e5559ee..8674a61 100644 (file)
@@ -22,7 +22,7 @@ import {IframeService} from "../../../../shared/utils/iframe.service";
 import {BasicPopupService} from "../../../../shared/components/genericFormPopup/genericFormServices/basic.popup.service";
 import {NetworkPopupService} from "../../../../shared/components/genericFormPopup/genericFormServices/network/network.popup.service";
 import {NetworkControlGenerator} from "../../../../shared/components/genericForm/formControlsServices/networkGenerator/network.control.generator";
-import {VfModulePopuopService} from "../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
 import {VfModuleControlGenerator} from "../../../../shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator";
 import {FeatureFlagsService} from "../../../../shared/services/featureFlag/feature-flags.service";
 import {VnfControlGenerator} from "../../../../shared/components/genericForm/formControlsServices/vnfGenerator/vnf.control.generator";
@@ -98,7 +98,7 @@ describe('Model Tree Generator service', () => {
         BasicPopupService,
         NetworkPopupService,
         NetworkControlGenerator,
-        VfModulePopuopService,
+        VfModulePopupService,
         VfModuleUpgradePopupService,
         VfModuleControlGenerator,
         VnfGroupControlGenerator,
index 1e68251..9b68627 100644 (file)
@@ -11,7 +11,7 @@ import {AppState} from "../../../shared/store/reducers";
 import {DialogService} from "ng2-bootstrap-modal";
 import {VnfPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vnf/vnf.popup.service";
 import {NetworkPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/network/network.popup.service";
-import {VfModulePopuopService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
 import {VnfGroupingModelInfo} from "./models/vnfGrouping/vnfGrouping.model.info";
 import {VnfGroupPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vnfGroup/vnfGroup.popup.service";
 import {DuplicateService} from "../duplicate/duplicate.service";
@@ -35,7 +35,7 @@ export class ObjectToTreeService {
               private _dialogService : DialogService,
               private _vnfPopupService : VnfPopupService,
               private  _networkPopupService :  NetworkPopupService,
-              private _vfModulePopupService : VfModulePopuopService,
+              private _vfModulePopupService : VfModulePopupService,
               private _vfModuleUpgradePopupService : VfModuleUpgradePopupService,
               private _vnfGroupPopupService : VnfGroupPopupService,
               private _duplicateService : DuplicateService,
index 504dc86..277ea94 100644 (file)
@@ -12,7 +12,7 @@ import {BasicControlGenerator} from "../../../shared/components/genericForm/form
 import {AaiService} from "../../../shared/services/aaiService/aai.service";
 import {NetworkPopupService} from "../../../shared/components/genericFormPopup/genericFormServices/network/network.popup.service";
 import {NetworkControlGenerator} from "../../../shared/components/genericForm/formControlsServices/networkGenerator/network.control.generator";
-import {VfModulePopuopService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../../../shared/components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
 import {VfModuleControlGenerator} from "../../../shared/components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator";
 import {VnfGroupControlGenerator} from "../../../shared/components/genericForm/formControlsServices/vnfGroupGenerator/vnfGroup.control.generator";
 import {FeatureFlagsService} from "../../../shared/services/featureFlag/feature-flags.service";
@@ -96,7 +96,7 @@ describe('Shared Tree Service', () => {
         DynamicInputsService,
         NetworkPopupService,
         NetworkControlGenerator,
-        VfModulePopuopService,
+        VfModulePopupService,
         VfModuleUpgradePopupService,
         VfModuleControlGenerator,
         VnfGroupControlGenerator,
index 63c980c..514b9bf 100644 (file)
@@ -17,7 +17,7 @@ import {UUIDData} from "./generic-form-popup.component";
 import {ITreeNode} from "angular-tree-component/dist/defs/api";
 import {NetworkPopupService} from "./genericFormServices/network/network.popup.service";
 import {NetworkControlGenerator} from "../genericForm/formControlsServices/networkGenerator/network.control.generator";
-import {VfModulePopuopService} from "./genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "./genericFormServices/vfModule/vfModule.popup.service";
 import {VfModuleControlGenerator} from "../genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator";
 import {FeatureFlagsService} from "../../services/featureFlag/feature-flags.service";
 import {VfModuleUpgradePopupService} from "./genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service";
@@ -946,7 +946,7 @@ describe('Generic Form popup Service', () => {
   let form : FormGroup;
   let fb : FormBuilder;
   let netwokPopupService : NetworkPopupService;
-  let vfModulePopupService : VfModulePopuopService;
+  let vfModulePopupService : VfModulePopupService;
   let servicePopupService : ServicePopupService;
   let _aaiService : AaiService;
   let _activatedRoute : ActivatedRoute;
@@ -967,7 +967,7 @@ describe('Generic Form popup Service', () => {
         AaiService,
         NetworkPopupService,
         NetworkControlGenerator,
-        VfModulePopuopService,
+        VfModulePopupService,
         VfModuleUpgradePopupService,
         VfModuleControlGenerator,
         {provide:FeatureFlagsService, useClass: MockFeatureFlagsService},
@@ -981,7 +981,7 @@ describe('Generic Form popup Service', () => {
     httpMock = injector.get(HttpTestingController);
     fb = injector.get(FormBuilder);
     netwokPopupService = injector.get(NetworkPopupService);
-    vfModulePopupService = injector.get(VfModulePopuopService);
+    vfModulePopupService = injector.get(VfModulePopupService);
     servicePopupService = injector.get(ServicePopupService);
     _aaiService = injector.get(AaiService);
     _activatedRoute = injector.get(ActivatedRoute);
@@ -8,7 +8,7 @@ import {FormBuilder} from "@angular/forms";
 import {IframeService} from "../../../../utils/iframe.service";
 import {DefaultDataGeneratorService} from "../../../../services/defaultDataServiceGenerator/default.data.generator.service";
 import {BasicPopupService} from "../basic.popup.service";
-import {VfModulePopuopService} from "./vfModule.popuop.service";
+import {VfModulePopupService} from "./vfModule.popup.service";
 import {VfModuleControlGenerator} from "../../../genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator";
 import {SdcUiServices} from "onap-ui-angular";
 import {FeatureFlagsService} from "../../../../services/featureFlag/feature-flags.service";
@@ -1972,7 +1972,7 @@ class MockFeatureFlagsService {}
 
 describe('VFModule popup service', () => {
   let injector;
-  let service: VfModulePopuopService;
+  let service: VfModulePopupService;
   let genericFormService: GenericFormService
   let defaultDataGeneratorService: DefaultDataGeneratorService;
   let fb: FormBuilder;
@@ -1981,7 +1981,7 @@ describe('VFModule popup service', () => {
   beforeAll(done => (async () => {
     TestBed.configureTestingModule({
       providers : [
-        VfModulePopuopService,
+        VfModulePopupService,
         BasicControlGenerator,
         VfModuleControlGenerator,
         DefaultDataGeneratorService,
@@ -2000,7 +2000,7 @@ describe('VFModule popup service', () => {
     await TestBed.compileComponents();
 
     injector = getTestBed();
-    service = injector.get(VfModulePopuopService);
+    service = injector.get(VfModulePopupService);
     genericFormService = injector.get(GenericFormService);
     defaultDataGeneratorService = injector.get(DefaultDataGeneratorService);
     fb = injector.get(FormBuilder);
@@ -34,7 +34,6 @@ export abstract class VfModulePopupServiceBase {
     formValues.modelInfo = new ModelInfo(that.model);
     formValues.uuid = formValues.modelInfo.uuid;
     formValues.isMissingData = false;
-    const vnf = that._store.getState().service.serviceInstance[that.uuidData.serviceId].vnfs[that.uuidData.vnfStoreKey];
 
     if (!that.uuidData.vFModuleStoreKey) {
       this._store.dispatch(createVFModuleInstance(formValues, that.uuidData.modelName, that.uuidData.serviceId, 0, that.uuidData.vnfStoreKey));
@@ -154,7 +153,7 @@ export abstract class VfModulePopupServiceBase {
 }
 
 @Injectable()
-export class VfModulePopuopService extends VfModulePopupServiceBase implements GenericPopupInterface {
+export class VfModulePopupService extends VfModulePopupServiceBase implements GenericPopupInterface {
 
 
   constructor(_basicControlGenerator: BasicControlGenerator,
index bbfe870..667e796 100644 (file)
@@ -1,7 +1,7 @@
 import {Injectable} from "@angular/core";
 import {ITreeNode} from "angular-tree-component/dist/defs/api";
 import {FormGroup} from "@angular/forms";
-import {VfModulePopupServiceBase} from "../vfModule/vfModule.popuop.service";
+import {VfModulePopupServiceBase} from "../vfModule/vfModule.popup.service";
 import {upgradeVFModule} from "../../../../storeUtil/utils/vfModule/vfModule.actions";
 import {SharedTreeService} from "../../../../../drawingBoard/service-planning/objectsToTree/shared.tree.service";
 import {NgRedux} from "@angular-redux/store";
@@ -16,11 +16,12 @@ import {FormControlModel} from "../../../../models/formControlModels/formControl
 import {CheckboxFormControl} from "../../../../models/formControlModels/checkboxFormControl.model";
 import {FormControlType} from "../../../../models/formControlModels/formControlTypes.enum";
 import {mergeObjectByPathAction} from "../../../../storeUtil/utils/general/general.actions";
+import * as _ from "lodash";
+import {VfModuleInstance} from "../../../../models/vfModuleInstance";
 
 export enum UpgradeFormControlNames {
   RETAIN_VOLUME_GROUPS = 'retainVolumeGroups',
   RETAIN_ASSIGNMENTS = 'retainAssignments',
-  SDN_C_PRE_LOAD = 'sdncPreLoad',
 }
 
 @Injectable()
@@ -43,11 +44,12 @@ export class VfModuleUpgradePopupService extends VfModulePopupServiceBase {
   getControls(serviceId: string, vnfStoreKey: string, vfModuleStoreKey: string, isUpdateMode: boolean): FormControlModel[]  {
     let result: FormControlModel[] =[
       this.getRetainAssignmentsControl(),
-      this.getRetainVolumeGroupsControl(),
       this._basicControlGenerator.getSDNCControl(null)
     ];
-
-    const vfModuleInstance = this._vfModuleControlGenerator.getVfModuleInstance(serviceId, vnfStoreKey, this.uuidData, isUpdateMode);
+    const vfModuleInstance :VfModuleInstance = this._vfModuleControlGenerator.getVfModuleInstance(serviceId, vnfStoreKey, this.uuidData, isUpdateMode);
+    if(this._store.getState().service.serviceHierarchy[serviceId].vfModules[this.uuidData['modelName']].volumeGroupAllowed){
+      result.push(this.getRetainVolumeGroupsControl());
+    }
     result = this._basicControlGenerator.concatSupplementaryFile(result, vfModuleInstance);
     return result;
   };
index 7c1cc08..4003b4d 100644 (file)
@@ -1,6 +1,10 @@
 import {LogService} from "../../../../utils/log/log.service";
 import {NgRedux} from "@angular-redux/store";
-import {BasicControlGenerator, SDN_C_PRE_LOAD, SUPPLEMENTARY_FILE} from "../../../genericForm/formControlsServices/basic.control.generator";
+import {
+  BasicControlGenerator,
+  SDN_C_PRE_LOAD,
+  SUPPLEMENTARY_FILE
+} from "../../../genericForm/formControlsServices/basic.control.generator";
 import {AaiService} from "../../../../services/aaiService/aai.service";
 import {HttpClient} from "@angular/common/http";
 import {GenericFormService} from "../../../genericForm/generic-form.service";
@@ -20,6 +24,7 @@ import {GeneralActions} from "../../../../storeUtil/utils/general/general.action
 import {VfModuleActions} from "../../../../storeUtil/utils/vfModule/vfModule.actions";
 import {ServiceActions} from "../../../../storeUtil/utils/service/service.actions";
 import {FormControlModel} from "../../../../models/formControlModels/formControl.model";
+import * as _ from "lodash";
 
 class MockModalService<T> {}
 
@@ -29,6 +34,15 @@ class MockReduxStore<T> {
   getState() {
     return {
       service: {
+        serviceHierarchy: {
+          serviceId: {
+            vfModules: {
+              vfModuleName: {
+                volumeGroupAllowed: true
+              }
+            }
+          }
+        },
         serviceInstance : {
           serviceId : {
             vnfs : {
@@ -40,7 +54,6 @@ class MockReduxStore<T> {
                     }}}}}}}}
     };
   }
-
   dispatch() {}
 }
 
@@ -101,19 +114,31 @@ describe('VFModule popup service', () => {
     });
   }
 
-  function getControlByNameAndCheckValue(controlName: string, expectedValue: any) {
+  function getControlByNameAndCheckValue(controlName: string, expectedValue: any, shouldControllerExist: boolean) {
     const controls = service.getControls('serviceId', 'vnfStoreKey', 'vfModuleId', true);
     const control = findControlByName(controls, controlName);
-    expect(control).toBeDefined();
-    expect(control.value).toEqual(expectedValue);
+    if(shouldControllerExist){
+      expect(control).toBeDefined();
+      expect(control.value).toEqual(expectedValue);
+    }
+    else{
+      expect(control).toBeUndefined();
+    }
   }
 
   test('get controls should return retainAssignments control with true value', ()=> {
-    getControlByNameAndCheckValue(UpgradeFormControlNames.RETAIN_ASSIGNMENTS, true);
+    getControlByNameAndCheckValue(UpgradeFormControlNames.RETAIN_ASSIGNMENTS, true, true);
   });
 
   test('get controls should return retainVolumeGroup control with true value', ()=> {
-    getControlByNameAndCheckValue(UpgradeFormControlNames.RETAIN_VOLUME_GROUPS, true);
+    getControlByNameAndCheckValue(UpgradeFormControlNames.RETAIN_VOLUME_GROUPS, true, true);
+  });
+
+  test('get controls should NOT return retainVolumeGroup control with true value', ()=> {
+    let stateCopy =_.cloneDeep(store.getState());
+    stateCopy.service.serviceHierarchy['serviceId'].vfModules['vfModuleName'].volumeGroupAllowed = false;
+    jest.spyOn(store, 'getState').mockReturnValue(stateCopy);
+    getControlByNameAndCheckValue(UpgradeFormControlNames.RETAIN_VOLUME_GROUPS, null, false);
   });
 
   test('get controls should contain SUPPLEMENTARY_FILE controller', ()=> {
@@ -196,6 +221,6 @@ describe('VFModule popup service', () => {
 
 
   test( 'get controls should return usePreload with false value', () => {
-    getControlByNameAndCheckValue(SDN_C_PRE_LOAD, false);
+    getControlByNameAndCheckValue(SDN_C_PRE_LOAD, false, true);
   });
 });
index 2f19044..60f0f36 100644 (file)
@@ -1,7 +1,7 @@
 import {DefaultDataGeneratorService} from "../../../../services/defaultDataServiceGenerator/default.data.generator.service";
 import {NgRedux} from "@angular-redux/store";
 import {IframeService} from "../../../../utils/iframe.service";
-import {VfModulePopuopService} from "../vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../vfModule/vfModule.popup.service";
 import {FormBuilder} from "@angular/forms";
 import {GenericFormService} from "../../../genericForm/generic-form.service";
 import {BasicPopupService} from "../basic.popup.service";
@@ -2258,7 +2258,7 @@ describe('vnf new popup service', () => {
         AaiService,
         LogService,
         BasicPopupService,
-        VfModulePopuopService,
+        VfModulePopupService,
         VfModuleUpgradePopupService,
         BasicControlGenerator,
         VnfControlGenerator,
index 3a81e5b..8ee48e6 100644 (file)
@@ -1,7 +1,7 @@
 import {DefaultDataGeneratorService} from "../../../../services/defaultDataServiceGenerator/default.data.generator.service";
 import {NgRedux} from "@angular-redux/store";
 import {IframeService} from "../../../../utils/iframe.service";
-import {VfModulePopuopService} from "../vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "../vfModule/vfModule.popup.service";
 import {FormBuilder} from "@angular/forms";
 import {GenericFormService} from "../../../genericForm/generic-form.service";
 import {BasicPopupService} from "../basic.popup.service";
@@ -2255,7 +2255,7 @@ describe('vnf group new popup service', () => {
         AaiService,
         LogService,
         BasicPopupService,
-        VfModulePopuopService,
+        VfModulePopupService,
         VfModuleUpgradePopupService,
         BasicControlGenerator,
         VnfGroupControlGenerator,
index fe08bf0..9b2ce83 100644 (file)
@@ -33,8 +33,8 @@
           </div>
         </div>
       </div>
-      <div class="row" style="margin-left: 0;margin-right: 0;padding: 20px;">
-        <table id="member-table" class="table table-bordered" style="table-layout: fixed">
+      <div class="row table-container">
+        <table id="member-table" class="table table-bordered table-responsive" style="table-layout: fixed">
           <thead class="thead-dark">
           <tr>
             <th class="header-title" id="header-userId">User ID</th>
index 267d2ce..c0ce0c9 100644 (file)
@@ -6,6 +6,7 @@ $grid-border: 1px #d2d2d2 solid;
   thead {
     background: #F8F8F8;
   }
+
   .left-panel {
     background: #f2f2f2;
     border-right: $grid-border;
@@ -161,7 +162,7 @@ $grid-border: 1px #d2d2d2 solid;
 
   .description-section {
     padding: 20px;
-    font-size: 20px;
+    font-size: 13px;
   }
 
   .filter-input {
@@ -173,6 +174,17 @@ $grid-border: 1px #d2d2d2 solid;
     text-align: right;
   }
 
+  .table-container {
+    overflow: auto;
+    width: 97%;
+    margin: auto;
+    max-height: calc(100% - 122px);
+  }
+
+
+  table {
+    font-size: 12px;
+  }
 
   td.loadTemplateButton {
     text-align: center;
index 7b16b66..9681113 100644 (file)
@@ -46,16 +46,9 @@ export class InstantiationTemplatesModalComponent extends DialogComponent<string
 
   loadTemplate = () => {
     this._instantiationStatusComponentService.navigateToNewViewEdit(this.selectedInstantiation, DrawingBoardModes.RECREATE)
-
   };
 
-
   closeModal(): void {
-    this._iframeService.removeClassCloseModal('content');
     this.dialogService.removeDialog(this);
-    setTimeout(() => {
-      window.parent.postMessage("closeIframe", "*");
-    }, 15);
-
   }
 }
index 8f92ba4..dd73060 100644 (file)
@@ -17,7 +17,6 @@ export interface VFModuleResponseInterface extends NodeModelResponseInterface {
 
 export class VfModule extends NodeModel {
 
-  vgName:string;
   rollbackOnFailure:boolean;
   initial:number;
   customizationUuid: string;
index 273dff4..0f7c920 100644 (file)
@@ -41,7 +41,7 @@ import {VnfControlGenerator} from "./components/genericForm/formControlsServices
 import {NetworkPopupService} from "./components/genericFormPopup/genericFormServices/network/network.popup.service";
 import {NetworkControlGenerator} from "./components/genericForm/formControlsServices/networkGenerator/network.control.generator";
 import {BasicPopupService} from "./components/genericFormPopup/genericFormServices/basic.popup.service";
-import {VfModulePopuopService} from "./components/genericFormPopup/genericFormServices/vfModule/vfModule.popuop.service";
+import {VfModulePopupService} from "./components/genericFormPopup/genericFormServices/vfModule/vfModule.popup.service";
 import {VfModuleUpgradePopupService} from "./components/genericFormPopup/genericFormServices/vfModuleUpgrade/vfModule.upgrade.popuop.service";
 import {VfModuleControlGenerator} from "./components/genericForm/formControlsServices/vfModuleGenerator/vfModule.control.generator";
 import {OrderByPipe} from "./pipes/order/orderBy.pipe";
@@ -193,7 +193,7 @@ import {InstantiationTemplatesService} from "./services/templateService/instanti
     BasicControlGenerator,
     CustomValidators,
     NetworkPopupService,
-    VfModulePopuopService,
+    VfModulePopupService,
     VfModuleUpgradePopupService,
     NetworkControlGenerator,
     VnfGroupControlGenerator,
index 70c10c4..1b80452 100644 (file)
@@ -10,7 +10,7 @@ export enum VfModuleActions {
   UPGRADE_VFMODULE = "UPGRADE_VFMODULE",
   UNDO_UPGRADE_VFMODULE_ACTION = "UNDO_UPGRADE_VFMODULE_ACTION",
   UPDATE_VFMODULE_FEILD = "UPDATE_VFMODULE_FEILD",
-  DELETE_VFMODULE_FEILD = "DELETE_VFMODULE_FEILD",
+  DELETE_VFMODULE_FIELD = "DELETE_VFMODULE_FEILD",
 }
 
 
@@ -163,7 +163,7 @@ export const updateVFModuleField: ActionCreator<UpdateVFModuleField> = (modelNam
 });
 
 export const deleteVFModuleField: ActionCreator<DeleteVFModuleField> = (modelName, vnfStoreKey, serviceId, dynamicModelName, deleteFieldName) => ({
-  type: VfModuleActions.DELETE_VFMODULE_FEILD,
+  type: VfModuleActions.DELETE_VFMODULE_FIELD,
   dynamicModelName,
   modelName,
   vnfStoreKey,
index 7b890b7..9b3a287 100644 (file)
@@ -172,7 +172,7 @@ describe('vfModuleReducer', () => {
       };
       let newState = vfModuleReducer(<any>oldState,
     <DeleteVFModuleField>{
-      type: VfModuleActions.DELETE_VFMODULE_FEILD,
+      type: VfModuleActions.DELETE_VFMODULE_FIELD,
       dynamicModelName: 'dynamicModelName1',
       vnfStoreKey: 'vnfStoreKey',
       serviceId: 'serviceModelId',
index 1bb2b15..2e91f87 100644 (file)
@@ -155,7 +155,7 @@ export function vfModuleReducer(state: ServiceState , action: Action) : ServiceS
 
       return clonedState;
     }
-    case VfModuleActions.DELETE_VFMODULE_FEILD : {
+    case VfModuleActions.DELETE_VFMODULE_FIELD : {
       let clonedState = _.cloneDeep(state);
       let deleteAction =  <DeleteVFModuleField> action;