From c1b9665d9f74d39df21d116682e507006479a2f2 Mon Sep 17 00:00:00 2001 From: romaingimbert Date: Tue, 22 Oct 2019 14:30:35 +0200 Subject: NBI to SO: cloudowner value - cloudowner value to be taken from application.properties Issue-ID: EXTAPI-343 Signed-off-by: romaingimbert Change-Id: I8eafb7e6e8f7ec12c6542ec93f8dd452ad1f137d --- .../model/consumer/CloudConfiguration.java | 20 +++++++++++++++++--- .../apis/serviceorder/workflow/PostSoProcessor.java | 4 +++- 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/CloudConfiguration.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/CloudConfiguration.java index 9cb6b40..0dca118 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/CloudConfiguration.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/CloudConfiguration.java @@ -21,9 +21,12 @@ public class CloudConfiguration { private String tenantId; - public CloudConfiguration(String lcpCloudRegionId, String tenantId) { + private String cloudOwner; + + public CloudConfiguration(String lcpCloudRegionId, String tenantId, String cloudOwner) { this.lcpCloudRegionId = lcpCloudRegionId; this.tenantId = tenantId; + this.cloudOwner = cloudOwner; } public String getLcpCloudRegionId() { @@ -42,9 +45,20 @@ public class CloudConfiguration { this.tenantId = tenantId; } + public String getCloudOwner() { + return cloudOwner; + } + + public void setCloudOwner(String cloudOwner) { + this.cloudOwner = cloudOwner; + } + @Override public String toString() { - return "CloudConfiguration{" + "lcpCloudRegionId='" + lcpCloudRegionId + '\'' + ", tenantId='" + tenantId + '\'' - + '}'; + return "CloudConfiguration{" + + "lcpCloudRegionId='" + lcpCloudRegionId + '\'' + + ", tenantId='" + tenantId + '\'' + + ", cloudOwner='" + cloudOwner + '\'' + + '}'; } } diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java index 0caa093..deb4e55 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java @@ -74,6 +74,8 @@ public class PostSoProcessor { @Value("${so.project.name}") private String soProjectName; + @Value("${onap.cloudOwner}") + private String cloudOwner; @Autowired private ServiceOrderService serviceOrderService; @@ -217,7 +219,7 @@ public class PostSoProcessor { requestParameters.setaLaCarte(true); requestDetails.setRequestParameters(requestParameters); - CloudConfiguration cloudConfiguration = new CloudConfiguration(lcpCloudRegionId, tenantId); + CloudConfiguration cloudConfiguration = new CloudConfiguration(lcpCloudRegionId, tenantId, cloudOwner); requestDetails.setCloudConfiguration(cloudConfiguration); OwningEntity owningEntity = new OwningEntity(); -- cgit 1.2.3-korg