From d4313c4df202ce4c024dfd65331b324042b2141a Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Sun, 12 Jan 2020 16:21:09 +0200 Subject: Provide literal usePreload=false when usePreload is Issue-ID: VID-746 Change-Id: Iab121726177397d1dbde37a1f7b93b30275a9ded Signed-off-by: Ittay Stern --- .../org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'vid-app-common/src/main/java/org') 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 bba4081dd..bf9e41ad9 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 @@ -103,7 +103,7 @@ data class VfModuleOrVolumeGroupRequestDetails( open class RequestParametersVfModuleOrVolumeGroup internal constructor( userParams: List, - @get:JsonInclude(NON_NULL) val isUsePreload: Boolean?, + val isUsePreload: Boolean, testApi: String? ) : BaseResourceInstantiationRequestDetails.RequestParameters(userParams, testApi) @@ -111,7 +111,7 @@ class RequestParametersVfModuleOrVolumeGroupInstantiation( userParams: List, usePreload: Boolean?, testApi: String? -) : RequestParametersVfModuleOrVolumeGroup(userParams, usePreload, testApi) +) : RequestParametersVfModuleOrVolumeGroup(userParams, usePreload.orFalse(), testApi) class RequestParametersVfModuleUpgrade( userParams: List, @@ -119,7 +119,8 @@ class RequestParametersVfModuleUpgrade( testApi: String?, @get:JsonInclude(NON_NULL) val retainAssignments: Boolean?, @get:JsonInclude(NON_NULL) val rebuildVolumeGroups: Boolean? -) : RequestParametersVfModuleOrVolumeGroup(userParams, usePreload, testApi) +) : RequestParametersVfModuleOrVolumeGroup(userParams, usePreload.orFalse(), testApi) class UserParamMap : HashMap(), UserParamTypes, MutableMap +private fun Boolean?.orFalse(): Boolean = this ?: false -- cgit 1.2.3-korg