From 888dcd495ecb63bf678e7234e9dc34e0743cb412 Mon Sep 17 00:00:00 2001 From: tragait Date: Thu, 19 Aug 2021 15:17:56 +0100 Subject: Get resource data from pass through running (Ncmp impl.) Issue-ID: CPS-580 Signed-off-by: tragait Change-Id: I6dc37d9516078c87efc3f0c5bbd2b7b8a7155d48 --- .../rest/controller/NetworkCmProxyController.java | 28 ++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'cps-ncmp-rest/src/main/java') diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java index b35b245aab..587787e2df 100755 --- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java +++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java @@ -153,7 +153,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi { } /** - * Get resource data for for operational datastore. + * Get resource data from operational datastore. * * @param cmHandle cm handle identifier * @param resourceIdentifier resource identifier @@ -168,7 +168,31 @@ public class NetworkCmProxyController implements NetworkCmProxyApi { final String accept, final @Valid String fields, final @Min(1) @Valid Integer depth) { - final var responseObject = networkCmProxyDataService.getResourceDataOperationalFoCmHandle(cmHandle, + final Object responseObject = networkCmProxyDataService.getResourceDataOperationalForCmHandle(cmHandle, + resourceIdentifier, + accept, + fields, + depth); + return ResponseEntity.ok(responseObject); + } + + /** + * Get resource data from pass-through running datastore. + * + * @param cmHandle cm handle identifier + * @param resourceIdentifier resource identifier + * @param accept accept header parameter + * @param fields fields query parameter + * @param depth depth query parameter + * @return {@code ResponseEntity} response from dmi plugin + */ + @Override + public ResponseEntity getResourceDataRunningForCmHandle(final String cmHandle, + final String resourceIdentifier, + final String accept, + final @Valid String fields, + final @Min(1) @Valid Integer depth) { + final Object responseObject = networkCmProxyDataService.getResourceDataPassThroughRunningForCmHandle(cmHandle, resourceIdentifier, accept, fields, -- cgit 1.2.3-korg