diff options
author | Ramesh Parthasarathy <ramesh.parthasarathy@att.com> | 2020-12-11 13:30:38 -0800 |
---|---|---|
committer | Ramesh Parthasarathy <ramesh.parthasarathy@att.com> | 2020-12-11 13:30:38 -0800 |
commit | eba6552bb893c6408c2a4fcaf4b9ab97ee581792 (patch) | |
tree | fda960ff2aebd84651c904b91a689d26ab93cf33 /adapters/mso-adapter-utils/src/main/java/org | |
parent | a0e765a046b0ca7f55845df1c110eef6d6621cf7 (diff) |
Address openstack adapter requestdb update exception
When openstack adapter updates requestdb it fails
with an exception. It is being addressed here.
Issue-ID: SO-3400
Signed-off-by: Ramesh Parthasarathy(rp6768)<ramesh.parthasarathy@att.com>
Change-Id: I803b8a80459f04cc2c1375e12d927e404cb241cb
Diffstat (limited to 'adapters/mso-adapter-utils/src/main/java/org')
2 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 a7c47f8f53..c4ef3678c3 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 @@ -363,7 +363,8 @@ public class MsoHeatUtils extends MsoCommonUtils implements VduPlugin { if (latestStack == null && notFoundIsSuccess) { return null; } else if (latestStack != null) { - statusHandler.updateStackStatus(latestStack); + String requestId = MDC.get(ONAPLogConstants.MDCs.REQUEST_ID); + statusHandler.updateStackStatus(latestStack, requestId); if (stackStatus.equals(latestStack.getStackStatus())) { if (LocalDateTime.now().isAfter(stopPolling)) { logger.error("Polling of stack timed out with Status: {}", latestStack.getStackStatus()); diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/StackStatusHandler.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/StackStatusHandler.java index bf29c39f99..8f1543e561 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/StackStatusHandler.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/StackStatusHandler.java @@ -43,9 +43,8 @@ public class StackStatusHandler { private RequestsDbClient requestDBClient; @Async - public void updateStackStatus(Stack stack) { + public void updateStackStatus(Stack stack, String requestId) { try { - String requestId = MDC.get(ONAPLogConstants.MDCs.REQUEST_ID); String stackStatus = mapper.writeValueAsString(stack); RequestProcessingData requestProcessingData = requestDBClient.getRequestProcessingDataBySoRequestIdAndNameAndGrouping(requestId, |