aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java2
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java5
2 files changed, 6 insertions, 1 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java
index f25d4b440a..5f0cab3da8 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/util/OofInfraUtils.java
@@ -52,7 +52,7 @@ public class OofInfraUtils {
getCloudsite = Optional.ofNullable(client.getCloudSite(cloudSite.getId(), endpoint + "/cloudSite/"))
.orElse(new CloudSite());
if (!cloudSite.getId().equals(getCloudsite.getId())) {
- client.postCloudSite(cloudSite);
+ client.postOofHomingCloudSite(cloudSite);
logger.debug("Did not findd cloudsite : {}", cloudSite.getId());
logger.debug("Will create cloudSite: {}", cloudSite.toString());
} else {
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
index a68ed44ee7..8d342b673d 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
@@ -797,6 +797,11 @@ public class CatalogDbClient {
return this.getSingleResource(cloudSiteClient, getUri(uri + id));
}
+ // Bring back old version of methind since the caller - OofInfraUtils.java - is not running in a spring context
+ public void postOofHomingCloudSite(CloudSite cloudSite) {
+ this.postSingleResource(cloudSiteClient, cloudSite);
+ }
+
public CloudSite postCloudSite(CloudSite cloudSite) {
if (cloudSite == null) {
throw new EntityNotFoundException("CloudSite passed as null");