summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src/main/java/org')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt10
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/mso/model/VfModuleOrVolumeGroupRequestDetails.kt12
2 files changed, 12 insertions, 10 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 c3fdcdaeb..c31e69300 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
@@ -341,11 +341,13 @@ class MsoRequestBuilder
return subscriberInfo
}
- private fun generateCloudConfiguration(lcpCloudRegionId: String?, tenantId: String?): CloudConfiguration {
+ private fun generateCloudConfiguration(lcpCloudRegionId: String?, tenantId: String?): CloudConfiguration? {
+
+ if (lcpCloudRegionId.isNullOrEmpty()) return null
+
val cloudConfiguration = CloudConfiguration(lcpCloudRegionId, tenantId)
- if (lcpCloudRegionId != null) {
- cloudOwnerService.enrichCloudConfigurationWithCloudOwner(cloudConfiguration, lcpCloudRegionId)
- }
+ cloudOwnerService.enrichCloudConfigurationWithCloudOwner(cloudConfiguration, lcpCloudRegionId)
+
return cloudConfiguration
}
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 bf9e41ad9..51910c45a 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
@@ -93,12 +93,12 @@ import java.util.*
*/
-data class VfModuleOrVolumeGroupRequestDetails(
- val modelInfo: ModelInfo,
- val cloudConfiguration: CloudConfiguration,
- val requestInfo: RequestInfo,
- val relatedInstanceList: List<RelatedInstance>?,
- val requestParameters: RequestParametersVfModuleOrVolumeGroup?)
+class VfModuleOrVolumeGroupRequestDetails(
+ modelInfo: ModelInfo,
+ cloudConfiguration: CloudConfiguration?,
+ requestInfo: RequestInfo,
+ relatedInstanceList: List<RelatedInstance>?,
+ requestParameters: RequestParametersVfModuleOrVolumeGroup?)
: BaseResourceInstantiationRequestDetails(modelInfo, cloudConfiguration, requestInfo, relatedInstanceList, requestParameters)
open class RequestParametersVfModuleOrVolumeGroup internal constructor(