summaryrefslogtreecommitdiffstats
path: root/so-cnf-adapter-application/src
diff options
context:
space:
mode:
Diffstat (limited to 'so-cnf-adapter-application/src')
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/BpmnInstanceRequest.java11
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/MulticloudInstanceRequest.java10
-rw-r--r--so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/service/CnfAdapterService.java9
3 files changed, 23 insertions, 7 deletions
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/BpmnInstanceRequest.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/BpmnInstanceRequest.java
index 2e76d51..842ef8b 100644
--- a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/BpmnInstanceRequest.java
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/BpmnInstanceRequest.java
@@ -13,6 +13,9 @@ public class BpmnInstanceRequest {
@JsonProperty(value = "modelVersionId")
private String modelVersionId;
+ @JsonProperty(value = "k8sRBInstanceReleaseName")
+ private String k8sRBInstanceReleaseName;
+
@JsonProperty(value = "k8sRBProfileName")
private String k8sRBProfileName;
@@ -52,6 +55,14 @@ public class BpmnInstanceRequest {
this.k8sRBProfileName = k8sRBProfileName;
}
+ public String getK8sRBInstanceReleaseName() {
+ return k8sRBInstanceReleaseName;
+ }
+
+ public void setK8sRBInstanceReleaseName(String k8sRBInstanceReleaseName) {
+ this.k8sRBInstanceReleaseName = k8sRBInstanceReleaseName;
+ }
+
public String getCloudRegionId() {
return cloudRegionId;
}
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/MulticloudInstanceRequest.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/MulticloudInstanceRequest.java
index b1719cb..20af63e 100644
--- a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/MulticloudInstanceRequest.java
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/model/MulticloudInstanceRequest.java
@@ -26,7 +26,7 @@ public class MulticloudInstanceRequest {
private Map<String, String> overrideValues;
@JsonProperty(value = "release-name")
- private String vfModuleUuid;
+ private String releaseName;
public String getCloudRegion() {
return cloudRegion;
@@ -76,12 +76,12 @@ public class MulticloudInstanceRequest {
this.overrideValues = overrideValues;
}
- public String getVfModuleUuid() {
- return vfModuleUuid;
+ public String getReleaseName() {
+ return releaseName;
}
- public void setVfModuleUuid(String vfModuleUuid) {
- this.vfModuleUuid = vfModuleUuid;
+ public void setReleaseName(String releaseName) {
+ this.releaseName = releaseName;
}
}
diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/service/CnfAdapterService.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/service/CnfAdapterService.java
index a134bac..d1314dd 100644
--- a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/service/CnfAdapterService.java
+++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/service/CnfAdapterService.java
@@ -83,14 +83,19 @@ public class CnfAdapterService {
logger.info("CnfAdapterService createInstance called");
MulticloudInstanceRequest multicloudInstanceRequest = new MulticloudInstanceRequest();
ResponseEntity<String> instanceResponse = null;
- if (bpmnInstanceRequest.getK8sRBProfileName() != null) {
+ if (bpmnInstanceRequest.getK8sRBProfileName() != null) {
multicloudInstanceRequest.setCloudRegion(bpmnInstanceRequest.getCloudRegionId());
multicloudInstanceRequest.setLabels(bpmnInstanceRequest.getLabels());
multicloudInstanceRequest.setOverrideValues(bpmnInstanceRequest.getOverrideValues());
multicloudInstanceRequest.setProfileName(bpmnInstanceRequest.getK8sRBProfileName());
multicloudInstanceRequest.setRbName(bpmnInstanceRequest.getModelInvariantId());
multicloudInstanceRequest.setRbVersion(bpmnInstanceRequest.getModelVersionId());
- multicloudInstanceRequest.setVfModuleUuid(bpmnInstanceRequest.getVfModuleUUID());
+
+ if (bpmnInstanceRequest.getK8sRBInstanceReleaseName() != null)
+ multicloudInstanceRequest.setReleaseName(bpmnInstanceRequest.getK8sRBInstanceReleaseName());
+ else
+ multicloudInstanceRequest.setReleaseName(
+ bpmnInstanceRequest.getK8sRBProfileName() + "-" + bpmnInstanceRequest.getVfModuleUUID());
} else {
logger.error("k8sProfileName should not be null");
// return instanceResponse;