summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorromaingimbert <romain.gimbert@orange.com>2019-10-22 14:30:35 +0200
committerromaingimbert <romain.gimbert@orange.com>2019-10-22 14:30:35 +0200
commitc1b9665d9f74d39df21d116682e507006479a2f2 (patch)
tree637d801a883bdafc0679d3f09b4a7457991e6c83 /src/main/java/org
parent784caaab0f643aecede5b2d8e5f435d896c8ec17 (diff)
NBI to SO: cloudowner value
- cloudowner value to be taken from application.properties Issue-ID: EXTAPI-343 Signed-off-by: romaingimbert <romain.gimbert@orange.com> Change-Id: I8eafb7e6e8f7ec12c6542ec93f8dd452ad1f137d
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/CloudConfiguration.java20
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java4
2 files changed, 20 insertions, 4 deletions
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();