summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-09-24 08:11:01 +0000
committerGerrit Code Review <gerrit@onap.org>2019-09-24 08:11:01 +0000
commit607af7badab5f694a0689cb9d359d543c9275809 (patch)
tree2e8274258ce54302d4044e58231c5fab6e3cdcbb /vid-app-common/src
parente5922e48d5ef9a2cbf19693135e11b5b7747a04f (diff)
parent2edfe7ed72d64e37fe98e99418d28400c59a9c12 (diff)
Merge "Add a position field to BaseResource"
Diffstat (limited to 'vid-app-common/src')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt1
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/BaseResource.java35
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroup.java20
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/InstanceGroupMember.java12
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Network.java34
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/ServiceInstantiation.java3
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java39
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/Vnf.java36
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/job/command/ResourceCommandTest.java17
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBaseTest.java14
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java2
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/services/MsoRequestBuilderTest.java3
12 files changed, 124 insertions, 92 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt
index 8c769d68d..ac5c2751c 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/ResourceCommand.kt
@@ -22,6 +22,7 @@ package org.onap.vid.job.command
import com.fasterxml.jackson.module.kotlin.convertValue
+import org.apache.commons.lang3.ObjectUtils.defaultIfNull
import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate
import org.onap.vid.changeManagement.RequestDetailsWrapper
import org.onap.vid.exceptions.AbortingException
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 75658f2b1..642843a0c 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
@@ -58,6 +58,9 @@ public abstract class BaseResource implements JobAdapter.AsyncJobRequest {
protected String statusMessage;
+ protected Integer position;
+
+
private static final Map<String, Action> actionStingToEnumMap = ImmutableMap.<String, Action>builder()
.put("Delete", Action.Delete)
.put("Create", Action.Create)
@@ -70,17 +73,18 @@ public abstract class BaseResource implements JobAdapter.AsyncJobRequest {
protected BaseResource(@JsonProperty("modelInfo") ModelInfo modelInfo,
- @JsonProperty("instanceName") String instanceName,
- @JsonProperty("action") String action,
- @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
- @JsonProperty("legacyRegion") String legacyRegion,
- @JsonProperty("tenantId") String tenantId,
- @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
- @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
- @JsonProperty("instanceId") String instanceId,
- @JsonProperty("trackById") String trackById,
- @JsonProperty("isFailed") Boolean isFailed,
- @JsonProperty("statusMessage") String statusMessage) {
+ @JsonProperty("instanceName") String instanceName,
+ @JsonProperty("action") String action,
+ @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
+ @JsonProperty("legacyRegion") String legacyRegion,
+ @JsonProperty("tenantId") String tenantId,
+ @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
+ @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
+ @JsonProperty("instanceId") String instanceId,
+ @JsonProperty("trackById") String trackById,
+ @JsonProperty("isFailed") Boolean isFailed,
+ @JsonProperty("statusMessage") String statusMessage,
+ @JsonProperty("position") Integer position) {
this.modelInfo = modelInfo;
this.modelInfo.setModelType(getModelType());
this.rollbackOnFailure = rollbackOnFailure;
@@ -93,6 +97,7 @@ public abstract class BaseResource implements JobAdapter.AsyncJobRequest {
this.trackById = trackById;
this.isFailed = isFailed!= null ? isFailed: false;
this.statusMessage = statusMessage;
+ this.position = position;
}
private Action actionStringToEnum(String actionAsString) {
@@ -163,6 +168,14 @@ public abstract class BaseResource implements JobAdapter.AsyncJobRequest {
this.statusMessage = statusMessage;
}
+ public Integer getPosition() {
+ return position;
+ }
+
+ public void setPosition(Integer position) {
+ this.position = position;
+ }
+
@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 b945f1327..f23c2e73e 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
@@ -34,16 +34,18 @@ public class InstanceGroup extends BaseResource implements JobAdapter.AsyncJobRe
private final Map<String, InstanceGroupMember> vnfGroupMembers;
public InstanceGroup(@JsonProperty("modelInfo") ModelInfo modelInfo,
- @JsonProperty("instanceName") String instanceName,
- @JsonProperty("action") String action,
- @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
- @JsonProperty("instanceId") String instanceId,
- @JsonProperty("vnfs") Map<String, InstanceGroupMember> vnfGroupMembers,
- @JsonProperty("trackById") String trackById,
- @JsonProperty("isFailed") Boolean isFailed,
- @JsonProperty("statusMessage") String statusMessage) {
+ @JsonProperty("instanceName") String instanceName,
+ @JsonProperty("action") String action,
+ @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
+ @JsonProperty("instanceId") String instanceId,
+ @JsonProperty("vnfs") Map<String, InstanceGroupMember> vnfGroupMembers,
+ @JsonProperty("trackById") String trackById,
+ @JsonProperty("isFailed") Boolean isFailed,
+ @JsonProperty("statusMessage") String statusMessage,
+ @JsonProperty("position") Integer position) {
- super(modelInfo, instanceName, action, null, null, null, null, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage);
+ super(modelInfo, instanceName, action, null, null, null, null, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage,
+ position);
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 7bfaf02b1..e9f34ccfb 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
@@ -30,11 +30,13 @@ import org.onap.vid.mso.model.ModelInfo;
public class InstanceGroupMember extends BaseResource implements JobAdapter.AsyncJobRequest{
public InstanceGroupMember(@JsonProperty("instanceId") String instanceId,
- @JsonProperty("action") String action,
- @JsonProperty("trackById") String trackById,
- @JsonProperty("isFailed") Boolean isFailed,
- @JsonProperty("statusMessage") String statusMessage) {
- super(new ModelInfo(), null, action, null, null, null, null, false, instanceId, trackById, isFailed, statusMessage);
+ @JsonProperty("action") String action,
+ @JsonProperty("trackById") String trackById,
+ @JsonProperty("isFailed") Boolean isFailed,
+ @JsonProperty("statusMessage") String statusMessage,
+ @JsonProperty("position") Integer position) {
+ super(new ModelInfo(), null, action, null, null, null, null, false, instanceId, trackById, isFailed, statusMessage,
+ position);
}
@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 797e28a02..b9a0aeb85 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
@@ -39,22 +39,24 @@ public class Network extends BaseResource implements JobAdapter.AsyncJobRequest
private final String lineOfBusiness;
public Network(@JsonProperty("modelInfo") ModelInfo modelInfo,
- @JsonProperty("productFamilyId") String productFamilyId,
- @JsonProperty("instanceName") String instanceName,
- @JsonProperty("action") String action,
- @JsonProperty("platformName") String platformName,
- @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
- @JsonProperty("legacyRegion") String legacyRegion,
- @JsonProperty("tenantId") String tenantId,
- @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
- @JsonProperty("lineOfBusinessName") String lineOfBusiness,
- @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
- @JsonProperty("instanceId") String instanceId,
- @JsonProperty("trackById") String trackById,
- @JsonProperty("isFailed") Boolean isFailed,
- @JsonProperty("statusMessage") String statusMessage) {
-
- super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage);
+ @JsonProperty("productFamilyId") String productFamilyId,
+ @JsonProperty("instanceName") String instanceName,
+ @JsonProperty("action") String action,
+ @JsonProperty("platformName") String platformName,
+ @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
+ @JsonProperty("legacyRegion") String legacyRegion,
+ @JsonProperty("tenantId") String tenantId,
+ @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
+ @JsonProperty("lineOfBusinessName") String lineOfBusiness,
+ @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
+ @JsonProperty("instanceId") String instanceId,
+ @JsonProperty("trackById") String trackById,
+ @JsonProperty("isFailed") Boolean isFailed,
+ @JsonProperty("statusMessage") String statusMessage,
+ @JsonProperty("position") Integer position) {
+
+ super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage,
+ position);
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 afc8534a1..8828faf1d 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,7 +104,8 @@ public class ServiceInstantiation extends BaseResource implements JobAdapter.Asy
@JsonProperty("isFailed") Boolean isFailed,
@JsonProperty("statusMessage") String statusMessage,
@JsonProperty("vidNotions") VidNotions vidNotions) {
- super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage);
+ super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage,
+ null);
this.owningEntityId = owningEntityId;
this.owningEntityName = owningEntityName;
this.projectName = projectName;
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 233850d58..41da85e35 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
@@ -42,22 +42,24 @@ public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest
@JsonInclude(NON_NULL) private Boolean usePreload;
private Map<String, String> supplementaryParams;
- public VfModule( @JsonProperty("modelInfo") ModelInfo modelInfo,
- @JsonProperty("instanceName") String instanceName,
- @JsonProperty("volumeGroupName") String volumeGroupInstanceName,
- @JsonProperty("action") String action,
- @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
- @JsonProperty("legacyRegion") String legacyRegion,
- @JsonProperty("tenantId") String tenantId,
- @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
- @JsonProperty("supplementaryFileContent") Map<String, String> supplementaryParams,
- @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
- @JsonProperty("sdncPreLoad") Boolean usePreload,
- @JsonProperty("instanceId") String instanceId,
- @JsonProperty("trackById") String trackById,
- @JsonProperty("isFailed") Boolean isFailed,
- @JsonProperty("statusMessage") String statusMessage) {
- super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage);
+ public VfModule(@JsonProperty("modelInfo") ModelInfo modelInfo,
+ @JsonProperty("instanceName") String instanceName,
+ @JsonProperty("volumeGroupName") String volumeGroupInstanceName,
+ @JsonProperty("action") String action,
+ @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
+ @JsonProperty("legacyRegion") String legacyRegion,
+ @JsonProperty("tenantId") String tenantId,
+ @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
+ @JsonProperty("supplementaryFileContent") Map<String, String> supplementaryParams,
+ @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
+ @JsonProperty("sdncPreLoad") Boolean usePreload,
+ @JsonProperty("instanceId") String instanceId,
+ @JsonProperty("trackById") String trackById,
+ @JsonProperty("isFailed") Boolean isFailed,
+ @JsonProperty("statusMessage") String statusMessage,
+ @JsonProperty("position") Integer position) {
+ super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage,
+ position);
this.volumeGroupInstanceName = volumeGroupInstanceName;
this.usePreload = usePreload;
this.supplementaryParams = supplementaryParams;
@@ -107,8 +109,7 @@ public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest
this.getInstanceId(),
this.getTrackById(),
this.getIsFailed(),
- this.getStatusMessage()
- );
-
+ this.getStatusMessage(),
+ this.getPosition());
}
} \ 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 0da3f0695..fc71f279f 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
@@ -44,23 +44,25 @@ public class Vnf extends BaseResource implements JobAdapter.AsyncJobRequest {
private final Map<String, Map<String, VfModule>> vfModules;
public Vnf(@JsonProperty("modelInfo") ModelInfo modelInfo,
- @JsonProperty("productFamilyId") String productFamilyId,
- @JsonProperty("instanceName") String instanceName,
- @JsonProperty("action") String action,
- @JsonProperty("platformName") String platformName,
- @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
- @JsonProperty("legacyRegion") String legacyRegion,
- @JsonProperty("tenantId") String tenantId,
- @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
- @JsonProperty("lineOfBusinessName") String lineOfBusiness,
- @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
- @JsonProperty("instanceId") String instanceId,
- @JsonProperty("vfModules") Map<String, Map<String, VfModule>> vfModules,
- @JsonProperty("trackById") String trackById,
- @JsonProperty("isFailed") Boolean isFailed,
- @JsonProperty("statusMessage") String statusMessage) {
-
- super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage);
+ @JsonProperty("productFamilyId") String productFamilyId,
+ @JsonProperty("instanceName") String instanceName,
+ @JsonProperty("action") String action,
+ @JsonProperty("platformName") String platformName,
+ @JsonProperty("lcpCloudRegionId") String lcpCloudRegionId,
+ @JsonProperty("legacyRegion") String legacyRegion,
+ @JsonProperty("tenantId") String tenantId,
+ @JsonProperty("instanceParams") List<Map<String, String>> instanceParams,
+ @JsonProperty("lineOfBusinessName") String lineOfBusiness,
+ @JsonProperty("rollbackOnFailure") boolean rollbackOnFailure,
+ @JsonProperty("instanceId") String instanceId,
+ @JsonProperty("vfModules") Map<String, Map<String, VfModule>> vfModules,
+ @JsonProperty("trackById") String trackById,
+ @JsonProperty("isFailed") Boolean isFailed,
+ @JsonProperty("statusMessage") String statusMessage,
+ @JsonProperty("position") Integer position) {
+
+ super(modelInfo, instanceName, action, lcpCloudRegionId, legacyRegion, tenantId, instanceParams, rollbackOnFailure, instanceId, trackById, isFailed, statusMessage,
+ position);
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 2780e1515..9501614b7 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
@@ -273,30 +273,35 @@ 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);
+ return new InstanceGroup(mock(ModelInfo.class), null, action.name(), false, null, convertToMap(groupMembers), null, null, null,
+ null);
}
static InstanceGroupMember createMember(Action action) {
- return new InstanceGroupMember(null, action.toString(), null, null, null);
+ return new InstanceGroupMember(null, action.toString(), null, null, null, null);
}
static Vnf createVnf(List<VfModule> vfModules, Action action) {
Map<String, Map<String, VfModule>> vfModulesMap = new HashMap<>();
vfModulesMap.put("abc",convertToMap(vfModules));
- return new Vnf(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, null, vfModulesMap, null, null, null);
+ return new Vnf(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, null, vfModulesMap, 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);
+ return new Vnf(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, 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);
+ return new VfModule(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, false, false, 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);
+ return new Network(mock(ModelInfo.class), null, null, action.toString(), null, null, null, null, null, null, false, null, null, null, null,
+ null);
}
}
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 9cc97116b..9c0260e85 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
@@ -171,11 +171,12 @@ public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests
vfModuleInfo.setModelInvariantId("22222222-f63c-463e-ba94-286933b895f9");
vfModuleInfo.setModelVersion("10.0");
return new VfModule(vfModuleInfo, instanceName, volumeGroupInstanceName, Action.Create.name(), "mdt1", null,
- "88a6ca3ee0394ade9403f075db23167e", instanceParams, supplementaryParams, false, true, null, UUID.randomUUID().toString(), null, null);
+ "88a6ca3ee0394ade9403f075db23167e", instanceParams, supplementaryParams, false, true, null, UUID.randomUUID().toString(), null, null,
+ null);
}
return new VfModule(vfModuleInfo, instanceName, volumeGroupInstanceName, Action.Create.name(), null, null, null,
- instanceParams, supplementaryParams, false, false, null, UUID.randomUUID().toString(), null, null);
+ instanceParams, supplementaryParams, false, false, null, UUID.randomUUID().toString(), null, null, null);
}
protected ModelInfo createVfModuleModelInfo(String modelName, String modelVersion, String modelVersionId, String modelInvariantId, String modelCustomizationId, String modelCustomizationName) {
@@ -184,7 +185,7 @@ public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests
protected VfModule createVfModuleForReplace(ModelInfo vfModuleModelInfo, String instanceName, String lcpCloudRegionId, String tenantId) {
return new VfModule( vfModuleModelInfo, instanceName, null, Action.Upgrade.name(), lcpCloudRegionId, null, tenantId,
- null, null, true, null, null, UUID.randomUUID().toString(), null, null);
+ null, null, true, null, null, UUID.randomUUID().toString(), null, null, null);
}
protected ModelInfo createVnfModelInfo(boolean isAlacarte) {
@@ -267,7 +268,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);
+ UUID.randomUUID().toString(), null, null, null);
vnfs.put(vnf.getModelInfo().getModelName(), vnf);
return vnfs;
@@ -320,7 +321,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));
+ false, null, UUID.randomUUID().toString(), null, null, null));
// I can't tell why compiler don't like the statement if it's only one line...
return networkStream.collect(Collectors.toMap(network -> network.getModelInfo().getModelCustomizationId(), network -> network));
}
@@ -335,7 +336,8 @@ public class AsyncInstantiationBaseTest extends AbstractTestNGSpringContextTests
modelInfo.setModelInvariantId("11111111-f63c-463e-ba94-286933b895f9");
modelInfo.setModelVersion("10.0");
- return new InstanceGroup(modelInfo, (isUserProvidedNaming ? VNF_GROUP_NAME : null), action.name(), false, null, emptyMap(), UUID.randomUUID().toString(), null, null);
+ return new InstanceGroup(modelInfo, (isUserProvidedNaming ? VNF_GROUP_NAME : null), action.name(), false, null, emptyMap(), UUID.randomUUID().toString(), null, null,
+ null);
}
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 ce0aa42f2..c1a6abc73 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
@@ -1048,7 +1048,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, false, null, null, UUID.randomUUID().toString(), null, null, null);
assertThat(vnf.getLcpCloudRegionId(), equalTo(legacyCloudRegion));
}
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 2c70b3ddc..e28ea304f 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
@@ -533,7 +533,8 @@ 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);
+ "092eb9e8e4b7412e8787dd091bc58e86", null, null, false, "VNF_INSTANCE_ID", null, UUID.randomUUID().toString(), null, null,
+ null);
RequestDetailsWrapper<VnfInstantiationRequestDetails> result =
msoRequestBuilder.generateDeleteVnfRequest(vnfDetails, "az2018");
MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result);