From eeef2ae7d17fcff7fbd33614972ad42f495e7998 Mon Sep 17 00:00:00 2001 From: DylanB95EST Date: Tue, 30 Nov 2021 15:07:35 +0000 Subject: Support Delete operation for ds Passtrough-Running in NCMP 1/3 Add delete operation for passthrough running within cps-ncmp. Issue-ID: CPS-638 Change-Id: I360672adc1f0f5c8eb351391c94f2d4fa913d0b4 Signed-off-by: DylanB95EST --- .../rest/controller/NetworkCmProxyController.java | 26 ++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'cps-ncmp-rest/src/main/java/org/onap') 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 f95d4a2f52..3b44b80f6d 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 @@ -23,6 +23,7 @@ package org.onap.cps.ncmp.rest.controller; import static org.onap.cps.ncmp.api.impl.operations.DmiRequestBody.OperationEnum.CREATE; +import static org.onap.cps.ncmp.api.impl.operations.DmiRequestBody.OperationEnum.DELETE; import static org.onap.cps.ncmp.api.impl.operations.DmiRequestBody.OperationEnum.PATCH; import static org.onap.cps.ncmp.api.impl.operations.DmiRequestBody.OperationEnum.UPDATE; @@ -200,7 +201,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi { } /** - * Create resource data in datastore pass through running for given cm-handle. + * Create resource data in datastore pass-through running for given cm-handle. * * @param resourceIdentifier resource identifier * @param cmHandle cm handle identifier @@ -219,7 +220,7 @@ public class NetworkCmProxyController implements NetworkCmProxyApi { } /** - * Update resource data in datastore pass through running for given cm-handle. + * Update resource data in datastore pass-through running for given cm-handle. * * @param resourceIdentifier resource identifier * @param cmHandle cm handle identifier @@ -237,6 +238,27 @@ public class NetworkCmProxyController implements NetworkCmProxyApi { return new ResponseEntity<>(HttpStatus.OK); } + + /** + * Delete resource data in datastore pass-through running for a given cm-handle. + * + * @param resourceIdentifier resource identifier + * @param cmHandle cm handle identifier + * @param requestBody the request body + * @param contentType content type of the body + * @return response entity no content if request is successful + */ + @Override + public ResponseEntity deleteResourceDataRunningForCmHandle(final String resourceIdentifier, + final String cmHandle, + final String requestBody, + final String contentType) { + + networkCmProxyDataService.writeResourceDataPassThroughRunningForCmHandle(cmHandle, + resourceIdentifier, DELETE, requestBody, contentType); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + /** * Execute cm handle search. * -- cgit 1.2.3-korg