diff options
author | Lukasz Muszkieta <lukasz.muszkieta@nokia.com> | 2021-04-15 13:53:12 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-04-15 13:53:12 +0000 |
commit | 2aefbb9e2ca30af1f9cba3f5cb8f88937e01c5d2 (patch) | |
tree | 1e98e49adf8ca4f9c42d00def6508f7f0a542201 | |
parent | f62f81f372ff497294266af8ad1df9362e5a1424 (diff) | |
parent | a11600939784ed7d4f53e60436474a04b2c196c6 (diff) |
Merge "Fix for invalid CNF release name" into guilin1.7.12
3 files changed, 22 insertions, 6 deletions
diff --git a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/BpmnInstanceRequest.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/BpmnInstanceRequest.java index 25e086c59b..f6691a4789 100644 --- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/BpmnInstanceRequest.java +++ b/adapters/mso-cnf-adapter/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/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/MulticloudInstanceRequest.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/MulticloudInstanceRequest.java index b1719cbd7d..20af63e886 100644 --- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/model/MulticloudInstanceRequest.java +++ b/adapters/mso-cnf-adapter/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/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/service/CnfAdapterService.java b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/service/CnfAdapterService.java index a134bace1f..9f02c53a99 100644 --- a/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/service/CnfAdapterService.java +++ b/adapters/mso-cnf-adapter/src/main/java/org/onap/so/adapters/cnf/service/CnfAdapterService.java @@ -90,7 +90,12 @@ public class CnfAdapterService { 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; |