summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorraviteja.karumuri <raviteja.karumuri@est.tech>2023-06-19 16:43:32 +0100
committerraviteja.karumuri <raviteja.karumuri@est.tech>2023-06-20 09:47:05 +0100
commit9784384be364246ae07efbf0383661d6d32adec4 (patch)
tree49313c17051fabe6b3c29238b5555baa7f5db0b5 /src
parent7272f11fa4a3876cf61451a21916a7244c2d045b (diff)
DMI-Plugin : Replacing the word 'Batch' as 'DataOperation'.
Issue-ID: CPS-1754 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: I8a1d6e329bb79d3762da17e9740854048b2aeace
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/cps/ncmp/dmi/rest/controller/DmiRestController.java12
-rw-r--r--src/test/groovy/org/onap/cps/ncmp/dmi/rest/controller/DmiRestControllerSpec.groovy12
2 files changed, 12 insertions, 12 deletions
diff --git a/src/main/java/org/onap/cps/ncmp/dmi/rest/controller/DmiRestController.java b/src/main/java/org/onap/cps/ncmp/dmi/rest/controller/DmiRestController.java
index 6a404c6a..b0ee4cf0 100644
--- a/src/main/java/org/onap/cps/ncmp/dmi/rest/controller/DmiRestController.java
+++ b/src/main/java/org/onap/cps/ncmp/dmi/rest/controller/DmiRestController.java
@@ -32,10 +32,10 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.onap.cps.ncmp.dmi.model.CmHandles;
import org.onap.cps.ncmp.dmi.model.DataAccessRequest;
+import org.onap.cps.ncmp.dmi.model.DataOperationRequest;
import org.onap.cps.ncmp.dmi.model.ModuleReferencesRequest;
import org.onap.cps.ncmp.dmi.model.ModuleResourcesReadRequest;
import org.onap.cps.ncmp.dmi.model.ModuleSet;
-import org.onap.cps.ncmp.dmi.model.ResourceBatchRequest;
import org.onap.cps.ncmp.dmi.model.YangResources;
import org.onap.cps.ncmp.dmi.notifications.async.AsyncTaskExecutor;
import org.onap.cps.ncmp.dmi.rest.api.DmiPluginApi;
@@ -107,14 +107,14 @@ public class DmiRestController implements DmiPluginApi, DmiPluginInternalApi {
/**
* This method is not implemented for ONAP DMI plugin.
*
- * @param requestId requestId generated by NCMP as an ack for client
- * @param topic client given topic name
- * @param resourceDataBatchRequest list of operation details
+ * @param requestId requestId generated by NCMP as an ack for client
+ * @param topic client given topic name
+ * @param dataOperationRequests list of operation details
* @return (@ code ResponseEntity) response entity
*/
@Override
- public ResponseEntity<Void> getResourceDataForCmHandleBatch(final String requestId, final String topic,
- final List<ResourceBatchRequest> resourceDataBatchRequest) {
+ public ResponseEntity<Void> getResourceDataForCmHandleDataOperation(final String requestId, final String topic,
+ final List<DataOperationRequest> dataOperationRequests) {
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
}
diff --git a/src/test/groovy/org/onap/cps/ncmp/dmi/rest/controller/DmiRestControllerSpec.groovy b/src/test/groovy/org/onap/cps/ncmp/dmi/rest/controller/DmiRestControllerSpec.groovy
index 8499ae25..5caef07f 100644
--- a/src/test/groovy/org/onap/cps/ncmp/dmi/rest/controller/DmiRestControllerSpec.groovy
+++ b/src/test/groovy/org/onap/cps/ncmp/dmi/rest/controller/DmiRestControllerSpec.groovy
@@ -312,17 +312,17 @@ class DmiRestControllerSpec extends Specification {
}
- def 'Get resource data for a list of operations.'() {
- given: 'an endpoint for a batch data request with list of cmhandles in request body'
+ def 'Execute a data operation for a list of operations.'() {
+ given: 'an endpoint for a data operation request with list of cmhandles in request body'
def resourceDataUrl = "$basePathV1/data?topic=client-topic-name&requestId=some-requestId"
and: 'list of operation details are received into request body'
- def batchDataRequestBody = '[{"operation": "read", "operationId": "14", "datastore": "ncmp-datastore:passthrough-operational", "options": "some options", "resourceIdentifier": "some resourceIdentifier",' +
+ def dataOperationRequestBody = '[{"operation": "read", "operationId": "14", "datastore": "ncmp-datastore:passthrough-operational", "options": "some options", "resourceIdentifier": "some resourceIdentifier",' +
' "cmhandles": [ {"id": "cmHanlde123", "cmHandleProperties": { "myProp`": "some value", "otherProp": "other value"}}]}]'
- when: 'the dmi resource data for batch operation api is called.'
+ when: 'the dmi resource data for dataOperation api is called.'
def response = mvc.perform(
- post(resourceDataUrl).contentType(MediaType.APPLICATION_JSON).content(batchDataRequestBody)
+ post(resourceDataUrl).contentType(MediaType.APPLICATION_JSON).content(dataOperationRequestBody)
).andReturn().response
- then: 'the batch data endpoint returns the not implemented response'
+ then: 'the resource data operation endpoint returns the not implemented response'
assert response.status == 501
}
} \ No newline at end of file