cmHandleProperties:
$ref: '#/components/schemas/cmHandleProperties'
- ResourceBatchDataRequest:
+ ResourceDataOperationRequests:
type: array
items:
type: object
- title: 'ResourceBatchRequest'
+ title: 'DataOperationRequest'
properties:
operation:
type: string
post:
tags:
- dmi-plugin
- summary: Get resource data for batch of cm handle ids.
- description: Get resource data for batch of cm handle ids by supplied operation details
- operationId: getResourceDataForCmHandleBatch
+ summary: Execute a data operation for group of cm handle ids.
+ description: Execute a data operation for group of cm handle ids by supplied operation details
+ operationId: getResourceDataForCmHandleDataOperation
parameters:
- $ref: 'components.yml#/components/parameters/requiredTopicParamInQuery'
- $ref: 'components.yml#/components/parameters/requiredRequestIdParamInQuery'
content:
application/json:
schema:
- $ref: 'components.yml#/components/schemas/ResourceBatchDataRequest'
+ $ref: 'components.yml#/components/schemas/ResourceDataOperationRequests'
responses:
'202':
description: Accepted
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;
/**
* 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);
}
}
- 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