summaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils/src/main/java
diff options
context:
space:
mode:
authorSmokowski, Steven <steve.smokowski@att.com>2019-06-09 10:39:47 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-06-09 10:39:53 -0400
commit6370f8f99b9cea4e1b3e2010c380f6e9c22aa18f (patch)
treeacd482f3cd1954fc0f5d95c97d5be479a398c096 /adapters/mso-adapter-utils/src/main/java
parent242e71883f59b8ad971f77c9bbdf032527fd77c0 (diff)
Update stack save to only save the params object
use get parameters not store entire request of stack Update stack save to only save off the params object Change-Id: I41e0e03b412e37f12d348c84a1512c9bf4403748 Issue-ID: SO-2002 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'adapters/mso-adapter-utils/src/main/java')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
index b634b0c3a5..c323bb699d 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
@@ -253,7 +253,7 @@ public class MsoHeatUtils extends MsoCommonUtils implements VduPlugin {
protected Stack createStack(CreateStackParam stack, String cloudSiteId, String tenantId) throws MsoException {
try {
OpenStackRequest<Stack> request = getHeatClient(cloudSiteId, tenantId).getStacks().create(stack);
- saveStackRequest(request, MDC.get(ONAPLogConstants.MDCs.REQUEST_ID), stack.getStackName());
+ saveStackRequest(stack, MDC.get(ONAPLogConstants.MDCs.REQUEST_ID), stack.getStackName());
return executeAndRecordOpenstackRequest(request);
} catch (OpenStackResponseException e) {
if (e.getStatus() == 409) {
@@ -341,11 +341,11 @@ public class MsoHeatUtils extends MsoCommonUtils implements VduPlugin {
}
}
- protected void saveStackRequest(OpenStackRequest<Stack> request, String requestId, String stackName) {
+ protected void saveStackRequest(CreateStackParam request, String requestId, String stackName) {
try {
ObjectMapper mapper = new ObjectMapper();
InfraActiveRequests foundRequest = requestDBClient.getInfraActiveRequestbyRequestId(requestId);
- String stackRequest = mapper.writeValueAsString(request.entity());
+ String stackRequest = mapper.writeValueAsString(request.getParameters());
CloudApiRequests cloudReq = new CloudApiRequests();
cloudReq.setCloudIdentifier(stackName);
cloudReq.setRequestBody(stackRequest);