From fd9cba6af0486e479ae5e953e880ae99aa3f2432 Mon Sep 17 00:00:00 2001 From: "Plummer, Brittany" Date: Thu, 24 Oct 2019 14:42:15 -0400 Subject: add new query for requestdb Updated RequestDbClient to call new request mapping to query for IN_PROGRESS volumeGroup and vfModule requests older than two minutes. Issue-ID: SO-2490 Signed-off-by: Benjamin, Max (mb388a) Change-Id: Idd4c077a13c15dd6c22ef168d164f2df2aed4cff --- .../java/org/onap/so/db/request/client/RequestsDbClient.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mso-api-handlers/mso-requests-db/src/main/java/org/onap') diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java index 99c1d1ea72..ef946bfcc8 100644 --- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java +++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java @@ -115,6 +115,8 @@ public class RequestsDbClient { private String getInfraActiveRequests = "/infraActiveRequests/v1/getInfraActiveRequests"; + private String getInProgressVolumeGroupsAndVfModules = "/infraActiveRequests/getInProgressVolumeGroupsAndVfModules"; + private static final String findBySoRequestIdAndGroupIdAndName = "/requestProcessingData/search/findOneBySoRequestIdAndGroupingIdAndName"; @@ -185,6 +187,15 @@ public class RequestsDbClient { } } + public List getInProgressVolumeGroupsAndVfModules() { + HttpHeaders headers = getHttpHeaders(); + URI uri = getUri(endpoint + getInProgressVolumeGroupsAndVfModules); + HttpEntity>> entity = new HttpEntity<>(headers); + return restTemplate + .exchange(uri, HttpMethod.GET, entity, new ParameterizedTypeReference>() {}) + .getBody(); + } + public InfraActiveRequests getInfraActiveRequestbyRequestId(String requestId) { try { HttpEntity entity = getHttpEntity(); -- cgit 1.2.3-korg