From e4687eeb77d9fddf14935894026aec0b1c9e3ac9 Mon Sep 17 00:00:00 2001 From: "Smokowski, Steven" Date: Wed, 15 May 2019 14:19:49 -0400 Subject: store openstack request status in requestdb Openstack request status now stored in request db Change-Id: Ida8f4f613d406c2b834ab190e01d5aaf2f16dd3d Issue-ID: SO-1867 Signed-off-by: Benjamin, Max (mb388a) --- .../org/onap/so/db/request/client/RequestsDbClient.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'mso-api-handlers/mso-requests-db/src') 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 103410701c..ca2f52690c 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 @@ -67,6 +67,8 @@ public class RequestsDbClient { private static final String SERVICE_ID = "SERVICE_ID"; private static final String OPERATION_ID = "OPERATION_ID"; private static final String SO_REQUEST_ID = "SO_REQUEST_ID"; + private static final String NAME = "NAME"; + private static final String GROUPING_ID = "GROUPING_ID"; private static final String REQUEST_ID = "REQUEST_ID"; private static final String OPERATIONAL_ENVIRONMENT_ID = "OPERATIONAL_ENV_ID"; private static final String SERVICE_MODEL_VERSION_ID = "SERVICE_MODEL_VERSION_ID"; @@ -104,7 +106,10 @@ public class RequestsDbClient { private String requestProcessingDataURI = "/requestProcessingData"; - private final String findBySoRequestIdOrderByGroupingIdDesc = + private static final String findBySoRequestIdAndGroupIdAndName = + "/requestProcessingData/search/findOneBySoRequestIdAndGroupingIdAndName"; + + private static final String findBySoRequestIdOrderByGroupingIdDesc = "/requestProcessingData/search/findBySoRequestIdOrderByGroupingIdDesc"; @@ -339,6 +344,14 @@ public class RequestsDbClient { .queryParam(SO_REQUEST_ID, soRequestId).build().toString())); } + public RequestProcessingData getRequestProcessingDataBySoRequestIdAndNameAndGrouping(String soRequestId, + String name, String groupingId) { + return getClientFactory().create(RequestProcessingData.class) + .get(getUri(UriBuilder.fromUri(endpoint + findBySoRequestIdAndGroupIdAndName) + .queryParam(SO_REQUEST_ID, soRequestId).queryParam(NAME, name) + .queryParam(GROUPING_ID, groupingId).build().toString())); + } + private List getRequestProcessingData(URI uri) { Iterable requestProcessingDataIterator = getClientFactory().create(RequestProcessingData.class).getAll(uri); -- cgit 1.2.3-korg