package org.onap.vid.model.serviceInstantiation;
+import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
+
import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableMap;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.onap.vid.job.JobAdapter;
import org.onap.vid.job.JobType;
import org.onap.vid.model.Action;
import org.onap.vid.mso.model.ModelInfo;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
public abstract class BaseResource implements JobAdapter.AsyncJobRequest {
protected String instanceId;
protected Integer position;
+ @JsonInclude(NON_NULL)
+ protected String originalName; //not used at backend, but stored for fronted
+
private static final Map<String, Action> actionStingToEnumMap = ImmutableMap.<String, Action>builder()
.put("Delete", Action.Delete)
@JsonProperty("trackById") String trackById,
@JsonProperty("isFailed") Boolean isFailed,
@JsonProperty("statusMessage") String statusMessage,
- @JsonProperty("position") Integer position) {
+ @JsonProperty("position") Integer position,
+ @JsonProperty("originalName") String originalName) {
this.modelInfo = modelInfo;
this.modelInfo.setModelType(getModelType());
this.rollbackOnFailure = rollbackOnFailure;
this.isFailed = isFailed!= null ? isFailed: false;
this.statusMessage = statusMessage;
this.position = position;
+ this.originalName = originalName;
}
private Action actionStringToEnum(String actionAsString) {
this.position = position;
}
+ public String getOriginalName() {
+ return originalName;
+ }
+
@JsonIgnore
public abstract Collection<? extends BaseResource> getChildren();
package org.onap.vid.model.serviceInstantiation;
import com.fasterxml.jackson.annotation.JsonProperty;
-import org.onap.vid.job.JobAdapter;
-import org.onap.vid.job.JobType;
-import org.onap.vid.mso.model.ModelInfo;
-
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
+import org.onap.vid.job.JobAdapter;
+import org.onap.vid.job.JobType;
+import org.onap.vid.mso.model.ModelInfo;
public class InstanceGroup extends BaseResource implements JobAdapter.AsyncJobRequest {
@JsonProperty("trackById") String trackById,
@JsonProperty("isFailed") Boolean isFailed,
@JsonProperty("statusMessage") String statusMessage,
- @JsonProperty("position") Integer position) {
+ @JsonProperty("position") Integer position,
+ @JsonProperty("originalName") String originalName) {
super(modelInfo, instanceName, action, null, null, null, null, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage,
- position);
+ position, originalName);
this.vnfGroupMembers = vnfGroupMembers;
}
@JsonProperty("trackById") String trackById,
@JsonProperty("isFailed") Boolean isFailed,
@JsonProperty("statusMessage") String statusMessage,
- @JsonProperty("position") Integer position) {
+ @JsonProperty("position") Integer position,
+ @JsonProperty("originalName") String originalName) {
super(new ModelInfo(), null, action, null, null, null, null, false, instanceId, trackById, isFailed, statusMessage,
- position);
+ position, originalName);
}
@Override
package org.onap.vid.model.serviceInstantiation;
import com.fasterxml.jackson.annotation.JsonProperty;
-import org.onap.vid.job.JobAdapter;
-import org.onap.vid.job.JobType;
-import org.onap.vid.mso.model.ModelInfo;
-
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
+import org.onap.vid.job.JobAdapter;
+import org.onap.vid.job.JobType;
+import org.onap.vid.mso.model.ModelInfo;
public class Network extends BaseResource implements JobAdapter.AsyncJobRequest {
@JsonProperty("trackById") String trackById,
@JsonProperty("isFailed") Boolean isFailed,
@JsonProperty("statusMessage") String statusMessage,
- @JsonProperty("position") Integer position) {
+ @JsonProperty("position") Integer position,
+ @JsonProperty("originalName") String originalName) {
super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage,
- position);
+ position, originalName);
this.productFamilyId = productFamilyId;
this.platformName = platformName;
this.lineOfBusiness = lineOfBusiness;
@JsonProperty("trackById") String trackById,
@JsonProperty("isFailed") Boolean isFailed,
@JsonProperty("statusMessage") String statusMessage,
- @JsonProperty("vidNotions") VidNotions vidNotions) {
+ @JsonProperty("vidNotions") VidNotions vidNotions,
+ @JsonProperty("originalName") String originalName) {
super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage,
- null);
+ null, originalName);
this.owningEntityId = owningEntityId;
this.owningEntityName = owningEntityName;
this.projectName = projectName;
baseService.isRollbackOnFailure(), baseService.isALaCarte(), baseService.getTestApi(),
baseService.getInstanceId(), Objects.toString(baseService.getAction(), null),
baseService.getTrackById(), baseService.getIsFailed(), baseService.getStatusMessage(),
- baseService.getVidNotions()
+ baseService.getVidNotions(),
+ baseService.getOriginalName()
);
this.existingVNFCounterMap = vnfCounterMap;
@JsonProperty("statusMessage") String statusMessage,
@Nullable @JsonProperty("retainAssignments") Boolean retainAssignments,
@Nullable @JsonProperty("retainVolumeGroups") Boolean retainVolumeGroups,
- @JsonProperty("position") Integer position) {
+ @JsonProperty("position") Integer position,
+ @JsonProperty("originalName") String originalName) {
super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage,
- position);
+ position, originalName);
this.volumeGroupInstanceName = volumeGroupInstanceName;
this.usePreload = usePreload;
this.supplementaryParams = supplementaryParams;
this.getStatusMessage(),
this.isRetainAssignments(),
this.isRetainVolumeGroups(),
- this.getPosition());
+ this.getPosition(),
+ this.getOriginalName()
+ );
}
}
\ No newline at end of file
package org.onap.vid.model.serviceInstantiation;
+import static java.util.stream.Collectors.toList;
+
import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
import org.onap.vid.job.JobAdapter;
import org.onap.vid.job.JobType;
import org.onap.vid.mso.model.ModelInfo;
-import java.util.*;
-
-import static java.util.stream.Collectors.toList;
-
/**
* The Class VNF.
*/
@JsonProperty("trackById") String trackById,
@JsonProperty("isFailed") Boolean isFailed,
@JsonProperty("statusMessage") String statusMessage,
- @JsonProperty("position") Integer position) {
+ @JsonProperty("position") Integer position,
+ @JsonProperty("originalName") String originalName) {
super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage,
- position);
+ position, originalName);
this.productFamilyId = productFamilyId;
this.platformName = platformName;
this.lineOfBusiness = lineOfBusiness;
convertToMap(networks),
convertToMap(vnfGroups),
null,
- null, false, 1, false,false,null, null, null, null, null, null, null);
+ null, false, 1, false,false,null, null, null, null, null, null, null, null);
}
public static ServiceInstantiation createServiceWith2InstancesInEachLevel(Action action) {
static InstanceGroup createGroup(List<InstanceGroupMember> groupMembers, Action action) {
return new InstanceGroup(mock(ModelInfo.class), null, action.name(), false, null, convertToMap(groupMembers), null, null, null,
- null);
+ null, null);
}
static InstanceGroupMember createMember(Action action) {
- return new InstanceGroupMember(null, action.toString(), null, null, null, null);
+ return new InstanceGroupMember(null, action.toString(), null, null, null, null, null);
}
static Vnf createVnf(List<VfModule> vfModules, Action action) {
vfModulesMap.put("abc",convertToMap(vfModules));
return new Vnf(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, null, vfModulesMap, null, null, null,
- null);
+ null, null);
}
static Vnf createVnf(Action action) {
return new Vnf(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, null,null, null, null, null,
- null);
+ null, null);
}
static VfModule createVfModule(Action action) {
return new VfModule(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null,
- false, false, null, null, null, null, null, null, null);
+ false, false, null, null, null, null, null, null, null, null);
}
static Network createNetwork(Action action) {
return new Network(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, null, null, null, null,
- null);
+ null, null);
}
}
new VidNotions(InstantiationUI.ANY_ALACARTE_WHICH_NOT_EXCLUDED,
ModelCategory.INFRASTRUCTURE_VPN,
InstantiationUI.INFRASTRUCTURE_VPN,
- InstantiationType.Macro)
+ InstantiationType.Macro),
+ "originalName"
);
verifySerializationAndDeserialization(serviceInstantiation);
"trackById",
true,
"statusMessage",
- 5);
+ 5,
+ "originalName");
verifySerializationAndDeserialization(vnf);
}
"statusMessage",
true,
true,
- 1);
+ 1,
+ "originalName");
verifySerializationAndDeserialization(vfModule);
}
VfModule vfModule = new VfModule(newModelInfo(), null, null, null,
null, null, null, null, null, false,
/* HERE ====> */ USE_PRELOAD,
- null, null, null, null, null, null, null);
+ null, null, null, null, null, null, null, null);
assertThat(vfModule, jsonPartEquals("sdncPreLoad", USE_PRELOAD));
assertThat(vfModule, jsonNodeAbsent("usePreload"));
/* HERE ====> */ VOLUME_GROUP_INSTANCE_NAME,
null, null, null, null, null, null,
false, null, null, null, null, null,
- null, null, null);
+ null, null, null, null);
assertThat(vfModule, jsonPartEquals("volumeGroupName", VOLUME_GROUP_INSTANCE_NAME));
assertThat(vfModule, jsonNodeAbsent("volumeGroupInstanceName"));
testApi,
instanceId,
action.name(),
- UUID.randomUUID().toString(), null, null, null);
+ UUID.randomUUID().toString(), null, null, null, null);
}
private List<Map<String,String>> createInstanceParams() {
return new VfModule(vfModuleInfo, instanceName, volumeGroupInstanceName, Action.Create.name(), "mdt1", null,
"88a6ca3ee0394ade9403f075db23167e", instanceParams, supplementaryParams, false,
usePreload, null, UUID.randomUUID().toString(), null, null,
- null, null, null);
+ null, null, null, "originalName");
}
return new VfModule(vfModuleInfo, instanceName, volumeGroupInstanceName, Action.Create.name(), null, null, null,
instanceParams, supplementaryParams, false, false, null, UUID.randomUUID().toString(), null,
- null, null, null, null);
+ null, null, null, null, "originalName");
}
protected ModelInfo createVfModuleModelInfo(String modelName, String modelVersion, String modelVersionId, String modelInvariantId, String modelCustomizationId, String modelCustomizationName) {
protected VfModule createVfModuleForReplace(ModelInfo vfModuleModelInfo, String instanceName,
String lcpCloudRegionId, String tenantId, Boolean retainAssignments, Boolean retainVolumeGroups, List<UserParamNameAndValue> supplementaryParams) {
return new VfModule( vfModuleModelInfo, instanceName, null, Action.Upgrade.name(), lcpCloudRegionId, null, tenantId,
- null, supplementaryParams, true, null, null, UUID.randomUUID().toString(), null, null, retainAssignments, retainVolumeGroups, null);
+ null, supplementaryParams, true, null, null, UUID.randomUUID().toString(), null, null, retainAssignments, retainVolumeGroups, null, "originalName");
}
protected ModelInfo createVnfModelInfo(boolean isAlacarte) {
Vnf vnf = new Vnf(vnfModelInfo, "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", (isUserProvidedNaming ? VNF_NAME : null), Action.Create.name(),
"platformName", "mdt1", null, "88a6ca3ee0394ade9403f075db23167e", vnfInstanceParams,"lineOfBusinessName" , false, null, vfModules,
- UUID.randomUUID().toString(), null, null, null);
+ UUID.randomUUID().toString(), null, null, null, "originalName");
vnfs.put(vnf.getModelInfo().getModelName(), vnf);
return vnfs;
"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", null, "MOG", lcpCloudRegionId, null, tenantId,
null, null, null, Collections.EMPTY_MAP, Collections.EMPTY_MAP, Collections.EMPTY_MAP, Collections.EMPTY_MAP, instanceParams, false, 1, false, false,
null, null, null, null, null, null,
- new VidNotions(InstantiationUI.TRANSPORT_SERVICE, ModelCategory.Transport, InstantiationUI.TRANSPORT_SERVICE, InstantiationType.Macro)
+ new VidNotions(InstantiationUI.TRANSPORT_SERVICE, ModelCategory.Transport, InstantiationUI.TRANSPORT_SERVICE, InstantiationType.Macro), "originalName"
);
return serviceInstantiation;
}
details->new Network(createNetworkModelInfo(isALaCarte, details.modelCustomizationId), "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
details.name, Action.Create.name(),
"platformName", "mdt1", null, "88a6ca3ee0394ade9403f075db23167e", instanceParams,"lineOfBusinessName" ,
- false, null, UUID.randomUUID().toString(), null, null, null));
+ false, null, UUID.randomUUID().toString(), null, null, null, "originalName"));
// I can't tell why compiler don't like the statement if it's only one line...
return networkStream.collect(Collectors.toMap(network -> network.getModelInfo().getModelCustomizationId(), network -> network));
}
modelInfo.setModelVersion("10.0");
return new InstanceGroup(modelInfo, (isUserProvidedNaming ? VNF_GROUP_NAME : null), action.name(), false, null, emptyMap(), UUID.randomUUID().toString(), null, null,
- null);
+ null, "originalName");
}
protected ModelInfo createServiceModelInfo() {
public void whenLcpRegionNotEmpty_thenCloudRegionIdOfResourceIsLegacy() {
String legacyCloudRegion = "legacyCloudRegion";
Vnf vnf = new Vnf(new ModelInfo(), null, null, Action.Create.name(), null, "anyCloudRegion", legacyCloudRegion,
- null, null, null, false, null, null, UUID.randomUUID().toString(), null, null, null);
+ null, null, null, false, null, null, UUID.randomUUID().toString(), null, null, null, "originalName");
assertThat(vnf.getLcpCloudRegionId(), equalTo(legacyCloudRegion));
}
String legacyCloudRegion = "legacyCloudRegion";
ServiceInstantiation service = new ServiceInstantiation(new ModelInfo(), null, null, null, null, null, null,
null, null, "anyCloudRegion", legacyCloudRegion, null, null, null, null, null, null, null, null, null,
- false, 1,false, false, null, null, Action.Create.name(), UUID.randomUUID().toString(), null, null, null);
+ false, 1,false, false, null, null, Action.Create.name(), UUID.randomUUID().toString(), null, null, null, "originalName");
assertThat(service.getLcpCloudRegionId(), equalTo(legacyCloudRegion));
}
return new ServiceInstantiation(new ModelInfo(), null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null, null,
false, 1, false, isALaCarte, null, null, action.name(),
- UUID.randomUUID().toString(), null, null, null);
+ UUID.randomUUID().toString(), null, null, null, "originalName");
}
@DataProvider
"}";
Vnf vnfDetails = new Vnf(createVnfModelInfo(true), "productFamily", "instanceName", Action.Delete.name(), "platform", "AAIAIC25", null,
"092eb9e8e4b7412e8787dd091bc58e86", null, null, false, "VNF_INSTANCE_ID", null, UUID.randomUUID().toString(), null, null,
- null);
+ null, "originalName");
RequestDetailsWrapper<VnfInstantiationRequestDetails> result =
msoRequestBuilder.generateDeleteVnfRequest(vnfDetails, "az2018");
MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result);
"existingNetworksCounterMap": {
},
"existingVNFCounterMap": {
- "024a417d-ca46-40bf-95ce-809c6a269011": 1
+ "024a417d-ca46-40bf-95ce-809c6a269011": 2
},
"existingVnfGroupCounterMap": {
},
"action": "Create",
"instanceId": null,
"instanceName": "hvf6arlba007",
+ "originalName": "vProbe_NC_VNF 0",
"vnfStoreKey": "vProbe_NC_VNF 0",
"instanceParams": [
{
}
}
}
+ },
+ "vProbe_NC_VNF 0_1": {
+ "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": "hvf6arlba008",
+ "originalName": "vProbe_NC_VNF 0",
+ "vnfStoreKey": "vProbe_NC_VNF 0_1",
+ "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_02",
+ "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_02",
+ "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"
}
},
"vrfs": {
"testApi": "GR_API",
"trackById": "36601560-f8e3-4020-bdef-3e4709c51e84",
"existingVNFCounterMap": {
- "024a417d-ca46-40bf-95ce-809c6a269011": 1
+ "024a417d-ca46-40bf-95ce-809c6a269011": 2
},
"existingVRFCounterMap": {},
"existingVnfGroupCounterMap": {},
},
"productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
"instanceName": "hvf6arlba007",
+ "originalName": "vProbe_NC_VNF 0",
"action": "Create",
"platformName": "xxx1",
"lcpCloudRegionId": "hvf6",
"statusMessage": null,
"position": null,
"lineOfBusiness": "zzz1"
+ },
+ "vProbe_NC_VNF 0_1": {
+ "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": "hvf6arlba008",
+ "originalName": "vProbe_NC_VNF 0",
+ "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_02",
+ "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_02",
+ "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": {},
loadDrawingBoardWithRecreateMode();
+ removeVNFWithVFModules('node-21ae311e-432f-4c54-b855-446d0b8ded72-vProbe_NC_VNF 0');
removeVNFWithVFModules('node-21ae311e-432f-4c54-b855-446d0b8ded72-vProbe_NC_VNF 0');
cy.getDrawingBoardDeployBtn().click();
.fillVnfPopup()
.getDrawingBoardDeployBtn().click()
.wait('@expectedPostAsyncInstantiation').then(xhr => {
- const vnfRequest = bodyOf(xhr).vnfs['vProbe_NC_VNF 0_1'];
+ const vnfRequest = bodyOf(xhr).vnfs['vProbe_NC_VNF 0_2'];
expect(vnfRequest.action).equals("Create");
expect(vnfRequest.rollbackOnFailure).equals("true");
.getTagElementContainsText('button', 'Duplicate').click()
.getDrawingBoardDeployBtn().click()
.wait('@expectedPostAsyncInstantiation').then(xhr => {
- expect(Object.keys(bodyOf(xhr).vnfs).length).equals(numberOfDuplicate + 1);
+ expect(Object.keys(bodyOf(xhr).vnfs).length).equals(numberOfDuplicate + 2);
});
});
assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd([
{path: [...vnfPath, "vnfStoreKey"], value: "vProbe_NC_VNF 0"}, // side-effect
+ {path: [...vnfPath2, "vnfStoreKey"], value: "vProbe_NC_VNF 0_1"},
]);
});
let module1CustomizationId = `vprobe_nc_vnf0..${module1ModelId}`;
// Click target VNF on right tree
- cy.getElementByDataTestsId('node-21ae311e-432f-4c54-b855-446d0b8ded72-vProbe_NC_VNF 0').click();
+ cy.getElementByDataTestsId('node-21ae311e-432f-4c54-b855-446d0b8ded72-vProbe_NC_VNF 0').first().click();
// Click [+] vfModule on left tree
cy.drawingBoardPressAddButtonByElementName(`node-${module1CustomizationId}`)
assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd([
{path: [...vnfPath, "vnfStoreKey"], value: "vProbe_NC_VNF 0"}, // side-effect
+ {path: [...vnfPath2, "vnfStoreKey"], value: "vProbe_NC_VNF 0_1"},
{path: ["existingNames", newVfModuleName], value: ""},
{path: ["existingNames", `${newVfModuleName}_vol`], value: ""},
{path: latestVfModule_1Path, value: latestVfModule_1ExpectedValue},
assertThatBodyFromDeployRequestEqualsToTemplateFromBackEnd([
{path: [...vnfPath, "vnfStoreKey"], value: "vProbe_NC_VNF 0"}, // side-effect
+ {path: [...vnfPath2, "vnfStoreKey"], value: "vProbe_NC_VNF 0_1"},
{path: [...removed_vfModule_Path], value: undefined},
]);
});
"vnfs", "vProbe_NC_VNF 0"
];
+const vnfPath2 = [
+ "vnfs", "vProbe_NC_VNF 0_1"
+];
+
function loadDrawingBoardWithRecreateMode() {
loadDrawingBoardWithRecreateModeInternal(
'../../' + templateWithVnfSetup.instanceTemplateFile,