summaryrefslogtreecommitdiffstats
path: root/vid-app-common
diff options
context:
space:
mode:
authorAmichai Hemli <amichai.hemli@intl.att.com>2020-01-19 14:22:53 +0000
committerGerrit Code Review <gerrit@onap.org>2020-01-19 14:22:53 +0000
commit4eec8e17cd8bec3192b7c6f5f225ef03186f8cde (patch)
tree206f4ce5de3e20bfdd55adc24c971569c13829e9 /vid-app-common
parent874c62c8052147a3a3e0c3aed107f7128eefa351 (diff)
parent284de1d0f9e93bf661bbca4074b6531d6d5385c1 (diff)
Merge "originalName stored and sent to frontend in a template"
Diffstat (limited to 'vid-app-common')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/BaseResource.java23
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroup.java12
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroupMember.java5
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Network.java12
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiation.java5
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiationTemplate.java3
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java9
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Vnf.java16
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/job/command/ResourceCommandTest.java14
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/model/serviceInstantiation/InstantiationModelSerializationTest.java13
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBaseTest.java16
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java6
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/services/MsoRequestBuilderTest.java2
13 files changed, 80 insertions, 56 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/BaseResource.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/BaseResource.java
index 1079fbe92..7617d7778 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/BaseResource.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/BaseResource.java
@@ -20,20 +20,22 @@
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;
@@ -60,6 +62,9 @@ public abstract class BaseResource implements JobAdapter.AsyncJobRequest {
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)
@@ -85,7 +90,8 @@ public abstract class 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) {
this.modelInfo = modelInfo;
this.modelInfo.setModelType(getModelType());
this.rollbackOnFailure = rollbackOnFailure;
@@ -99,6 +105,7 @@ public abstract class BaseResource implements JobAdapter.AsyncJobRequest {
this.isFailed = isFailed!= null ? isFailed: false;
this.statusMessage = statusMessage;
this.position = position;
+ this.originalName = originalName;
}
private Action actionStringToEnum(String actionAsString) {
@@ -177,6 +184,10 @@ public abstract class BaseResource implements JobAdapter.AsyncJobRequest {
this.position = position;
}
+ public String getOriginalName() {
+ return originalName;
+ }
+
@JsonIgnore
public abstract Collection<? extends BaseResource> getChildren();
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroup.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroup.java
index f23c2e73e..642e28b36 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroup.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroup.java
@@ -21,13 +21,12 @@
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 {
@@ -42,10 +41,11 @@ public class InstanceGroup extends BaseResource implements JobAdapter.AsyncJobRe
@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;
}
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroupMember.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroupMember.java
index e9f34ccfb..758ee0694 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroupMember.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroupMember.java
@@ -34,9 +34,10 @@ public class InstanceGroupMember extends BaseResource implements JobAdapter.Asyn
@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
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Network.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Network.java
index b9a0aeb85..cec61f6b7 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Network.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Network.java
@@ -21,14 +21,13 @@
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 {
@@ -53,10 +52,11 @@ 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;
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiation.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiation.java
index e7e5783c4..7c04a91dc 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiation.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiation.java
@@ -104,9 +104,10 @@ public class ServiceInstantiation extends BaseResource implements JobAdapter.Asy
@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;
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiationTemplate.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiationTemplate.java
index 4872ce2c8..9499beb50 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiationTemplate.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiationTemplate.java
@@ -52,7 +52,8 @@ public class ServiceInstantiationTemplate extends ServiceInstantiation implement
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;
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java
index d04e679e6..0b9a2a7b7 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java
@@ -68,9 +68,10 @@ public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest
@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;
@@ -135,6 +136,8 @@ public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest
this.getStatusMessage(),
this.isRetainAssignments(),
this.isRetainVolumeGroups(),
- this.getPosition());
+ this.getPosition(),
+ this.getOriginalName()
+ );
}
} \ No newline at end of file
diff --git a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Vnf.java b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Vnf.java
index fc71f279f..2ed219637 100644
--- a/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Vnf.java
+++ b/vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Vnf.java
@@ -21,15 +21,18 @@
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.
*/
@@ -59,10 +62,11 @@ public class Vnf 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;
diff --git a/vid-app-common/src/test/java/org/onap/vid/job/command/ResourceCommandTest.java b/vid-app-common/src/test/java/org/onap/vid/job/command/ResourceCommandTest.java
index db856d757..b916347d2 100644
--- a/vid-app-common/src/test/java/org/onap/vid/job/command/ResourceCommandTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/job/command/ResourceCommandTest.java
@@ -279,7 +279,7 @@ public class ResourceCommandTest {
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) {
@@ -298,11 +298,11 @@ public class ResourceCommandTest {
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) {
@@ -310,22 +310,22 @@ public class ResourceCommandTest {
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);
}
}
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
index b7ae76915..f0c96b839 100644
--- 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
@@ -94,7 +94,8 @@ public class InstantiationModelSerializationTest {
new VidNotions(InstantiationUI.ANY_ALACARTE_WHICH_NOT_EXCLUDED,
ModelCategory.INFRASTRUCTURE_VPN,
InstantiationUI.INFRASTRUCTURE_VPN,
- InstantiationType.Macro)
+ InstantiationType.Macro),
+ "originalName"
);
verifySerializationAndDeserialization(serviceInstantiation);
@@ -119,7 +120,8 @@ public class InstantiationModelSerializationTest {
"trackById",
true,
"statusMessage",
- 5);
+ 5,
+ "originalName");
verifySerializationAndDeserialization(vnf);
}
@@ -151,7 +153,8 @@ public class InstantiationModelSerializationTest {
"statusMessage",
true,
true,
- 1);
+ 1,
+ "originalName");
verifySerializationAndDeserialization(vfModule);
}
@@ -164,7 +167,7 @@ public class InstantiationModelSerializationTest {
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"));
@@ -179,7 +182,7 @@ public class InstantiationModelSerializationTest {
/* 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"));
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBaseTest.java b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBaseTest.java
index e2fd38c4a..f61131770 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBaseTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBaseTest.java
@@ -237,7 +237,7 @@ public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests
testApi,
instanceId,
action.name(),
- UUID.randomUUID().toString(), null, null, null);
+ UUID.randomUUID().toString(), null, null, null, null);
}
private List<Map<String,String>> createInstanceParams() {
@@ -266,12 +266,12 @@ public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests
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) {
@@ -281,7 +281,7 @@ public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests
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) {
@@ -366,7 +366,7 @@ public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests
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;
@@ -398,7 +398,7 @@ public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests
"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;
}
@@ -419,7 +419,7 @@ public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests
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));
}
@@ -435,7 +435,7 @@ public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests
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() {
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java
index a1e4af2c4..284efce45 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java
@@ -1056,7 +1056,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT
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));
}
@@ -1065,7 +1065,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT
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));
}
@@ -1089,7 +1089,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT
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
diff --git a/vid-app-common/src/test/java/org/onap/vid/services/MsoRequestBuilderTest.java b/vid-app-common/src/test/java/org/onap/vid/services/MsoRequestBuilderTest.java
index 58a069ba2..71d38b3f8 100644
--- a/vid-app-common/src/test/java/org/onap/vid/services/MsoRequestBuilderTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/services/MsoRequestBuilderTest.java
@@ -526,7 +526,7 @@ public class MsoRequestBuilderTest extends AsyncInstantiationBaseTest {
"}";
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);