summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-11-24 18:13:17 +0200
committerIttay Stern <ittay.stern@att.com>2019-11-25 10:22:16 +0200
commit58c6808ac71bf5f771345e305b6d27e77af88780 (patch)
treea455e6f197232a3ce93d1db32245c65c76ff96b0 /vid-app-common/src/main
parent74985d50a82de427c57aac05266ab28ce9bd52ab (diff)
Replace vfmodule: expect optional retainAssignments param
Issue-ID: VID-603 Change-Id: Ifda72845f2c5b473bba7ac64deab8d4b0f11ef10 Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src/main')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt3
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/model/serviceInstantiation/VfModule.java14
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt1
3 files changed, 15 insertions, 3 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt
index ecf7fc933..c392d0758 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt
@@ -140,7 +140,8 @@ class MsoRequestBuilder
vgInstanceId: String?, userId: String, testApi: String?
): RequestDetailsWrapper<VfModuleOrVolumeGroupRequestDetails> {
val requestParameters = { userParams: List<UserParamTypes> ->
- RequestParametersVfModuleUpgrade(userParams, vfModuleDetails.isUsePreload, testApi, nullSafeNegate(vfModuleDetails.isRetainVolumeGroups))
+ RequestParametersVfModuleUpgrade(userParams, vfModuleDetails.isUsePreload, testApi,
+ vfModuleDetails.isRetainAssignments, nullSafeNegate(vfModuleDetails.isRetainVolumeGroups))
}
return generateVfModuleRequestWithRequestParams(vfModuleDetails, serviceModelInfo, serviceInstanceId,
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 5c847b87c..ad5b39e28 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
@@ -44,9 +44,11 @@ public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest
private Map<String, String> supplementaryParams;
@JsonInclude(NON_NULL)
- @Nullable
private final Boolean retainVolumeGroups;
+ @JsonInclude(NON_NULL)
+ private Boolean retainAssignments;
+
public VfModule(@JsonProperty("modelInfo") ModelInfo modelInfo,
@JsonProperty("instanceName") String instanceName,
@JsonProperty("volumeGroupName") String volumeGroupInstanceName,
@@ -62,13 +64,15 @@ public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest
@JsonProperty("trackById") String trackById,
@JsonProperty("isFailed") Boolean isFailed,
@JsonProperty("statusMessage") String statusMessage,
- @JsonProperty("retainVolumeGroups") Boolean retainVolumeGroups,
+ @Nullable @JsonProperty("retainAssignments") Boolean retainAssignments,
+ @Nullable @JsonProperty("retainVolumeGroups") Boolean retainVolumeGroups,
@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;
+ this.retainAssignments = retainAssignments;
this.retainVolumeGroups = retainVolumeGroups;
}
@@ -101,6 +105,11 @@ public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest
}
@Nullable
+ public Boolean isRetainAssignments() {
+ return retainAssignments;
+ }
+
+ @Nullable
public Boolean isRetainVolumeGroups() {
return retainVolumeGroups;
}
@@ -122,6 +131,7 @@ public class VfModule extends BaseResource implements JobAdapter.AsyncJobRequest
this.getTrackById(),
this.getIsFailed(),
this.getStatusMessage(),
+ this.isRetainAssignments(),
this.isRetainVolumeGroups(),
this.getPosition());
}
diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt b/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt
index f4318719d..bba4081dd 100644
--- a/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt
@@ -117,6 +117,7 @@ class RequestParametersVfModuleUpgrade(
userParams: List<UserParamTypes>,
usePreload: Boolean?,
testApi: String?,
+ @get:JsonInclude(NON_NULL) val retainAssignments: Boolean?,
@get:JsonInclude(NON_NULL) val rebuildVolumeGroups: Boolean?
) : RequestParametersVfModuleOrVolumeGroup(userParams, usePreload, testApi)