diff options
6 files changed, 25 insertions, 21 deletions
diff --git a/csit/plans/dmi/pnfsim/docker-compose.yml b/csit/plans/dmi/pnfsim/docker-compose.yml index d8610b43..99befa7e 100644 --- a/csit/plans/dmi/pnfsim/docker-compose.yml +++ b/csit/plans/dmi/pnfsim/docker-compose.yml @@ -16,7 +16,7 @@ services: netconf-pnp-simulator: - image: nexus3.onap.org:10001/onap/integration/simulators/netconf-pnp-simulator:2.8.6 + image: blueonap/netconf-pnp-simulator:v2.8.6 container_name: netconf-simulator restart: always ports: diff --git a/dmi-service/openapi/openapi-datajob.yml b/dmi-service/openapi/openapi-datajob.yml index 09e23a9e..569fa19f 100644 --- a/dmi-service/openapi/openapi-datajob.yml +++ b/dmi-service/openapi/openapi-datajob.yml @@ -73,14 +73,13 @@ paths: responses: "501": $ref: '#/components/responses/NotImplemented' - /v1/dataJob/{requestId}/dataProducerJob/{dataProducerJobId}/result: + /v1/cmwriteJob/dataProducer/{dataProducerId}/dataProducerJob/{dataProducerJobId}/result: get: description: Retrieve the result of a data job. operationId: getDataJobResult parameters: - - $ref: '#/components/parameters/requestIdInPath' + - $ref: '#/components/parameters/dataProducerIdInPath' - $ref: '#/components/parameters/dataProducerJobIdInPath' - - $ref: '#/components/parameters/dataProducerIdInQuery' - $ref: '#/components/parameters/destinationInQuery' tags: - dmi-datajob diff --git a/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/datajobs/rest/controller/DmiDatajobsRestController.java b/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/datajobs/rest/controller/DmiDatajobsRestController.java index 6ab56f57..8376e4a3 100644 --- a/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/datajobs/rest/controller/DmiDatajobsRestController.java +++ b/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/datajobs/rest/controller/DmiDatajobsRestController.java @@ -70,15 +70,14 @@ public class DmiDatajobsRestController implements DmiDatajobApi { /** * This method is not implemented for ONAP DMI plugin. * - * @param dataProducerJobId Identifier for the data producer job (required) * @param dataProducerId Identifier for the data producer as a query parameter (required) + * @param dataProducerJobId Identifier for the data producer job (required) * @param destination The destination of the results, Kafka topic name or s3 bucket name (required) * @return ResponseEntity Response entity indicating the method is not implemented */ @Override - public ResponseEntity<Void> getDataJobResult(final String requestId, + public ResponseEntity<Void> getDataJobResult(final String dataProducerId, final String dataProducerJobId, - final String dataProducerId, final String destination) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/dmi-service/src/test/groovy/org/onap/cps/ncmp/dmi/datajobs/rest/controller/DmiDatajobsRestControllerSpec.groovy b/dmi-service/src/test/groovy/org/onap/cps/ncmp/dmi/datajobs/rest/controller/DmiDatajobsRestControllerSpec.groovy index 17354e65..e2669c46 100644 --- a/dmi-service/src/test/groovy/org/onap/cps/ncmp/dmi/datajobs/rest/controller/DmiDatajobsRestControllerSpec.groovy +++ b/dmi-service/src/test/groovy/org/onap/cps/ncmp/dmi/datajobs/rest/controller/DmiDatajobsRestControllerSpec.groovy @@ -82,7 +82,7 @@ class DmiDatajobsRestControllerSpec extends Specification{ def 'get result request should return 501 HTTP Status' () { given: 'URL to get the result of a data job' - def getStatus = "${basePathV1}/dataJob/some-identifier/dataProducerJob/some-producer-job-identifier/result?dataProducerId=some-data-producer-identifier&destination=some-destination" + def getStatus = "${basePathV1}/cmwriteJob/dataProducer/some-identifier/dataProducerJob/some-producer-job-identifier/result?destination=some-destination" when: 'the request is performed' def response = mvc.perform( get(getStatus) diff --git a/dmi-stub/dmi-plugin-demo-and-csit-stub-service/src/main/java/org/onap/cps/ncmp/dmi/rest/stub/controller/DmiRestStubController.java b/dmi-stub/dmi-plugin-demo-and-csit-stub-service/src/main/java/org/onap/cps/ncmp/dmi/rest/stub/controller/DmiRestStubController.java index 5218db43..2f026f98 100644 --- a/dmi-stub/dmi-plugin-demo-and-csit-stub-service/src/main/java/org/onap/cps/ncmp/dmi/rest/stub/controller/DmiRestStubController.java +++ b/dmi-stub/dmi-plugin-demo-and-csit-stub-service/src/main/java/org/onap/cps/ncmp/dmi/rest/stub/controller/DmiRestStubController.java @@ -298,21 +298,19 @@ public class DmiRestStubController { /** * Retrieves the result of a given data job identified by {@code requestId} and {@code dataProducerJobId}. * - * @param requestId Identifier for the overall Datajob (required) - * @param dataProducerJobId Identifier for the data producer job (required) * @param dataProducerId Identifier for the data producer as a query parameter (required) + * @param dataProducerJobId Identifier for the data producer job (required) * @param destination The destination of the results, Kafka topic name or s3 bucket name (required) * @return A ResponseEntity with HTTP status 200 (OK) and the data job's result as an Object. */ - @GetMapping("/v1/dataJob/{requestId}/dataProducerJob/{dataProducerJobId}/result") + @GetMapping("/v1/cmwriteJob/dataProducer/{dataProducerId}/dataProducerJob/{dataProducerJobId}/result") public ResponseEntity<Object> retrieveDataJobResult( - @PathVariable("requestId") final String requestId, + @PathVariable("dataProducerId") final String dataProducerId, @PathVariable("dataProducerJobId") final String dataProducerJobId, - @RequestParam(name = "dataProducerId") String dataProducerId, @RequestParam(name = "destination") String destination) { - log.debug("Received request to retrieve data job result. Request ID: {}, Data Producer Job ID: {}, " + - "Data Producer ID: {}, Destination: {}", - requestId, dataProducerJobId, dataProducerId, destination); + log.debug("Received request to retrieve data job result. Data Producer ID: {}, " + + "Data Producer Job ID: {}, Destination: {}", + dataProducerId, dataProducerJobId, destination); return ResponseEntity.ok(Map.of("result", "some status")); } diff --git a/docs/api/swagger/openapi-datajob.yaml b/docs/api/swagger/openapi-datajob.yaml index ea2c3a9e..54ce0660 100644 --- a/docs/api/swagger/openapi-datajob.yaml +++ b/docs/api/swagger/openapi-datajob.yaml @@ -97,6 +97,14 @@ paths: example: some-producer-job-identifier type: string style: simple + - description: Identifier for the data producer + in: query + name: dataProducerId + required: true + schema: + example: some-data-producer-identifier + type: string + style: form responses: "501": content: @@ -110,17 +118,17 @@ paths: description: Not Implemented tags: - dmi-datajob - /v1/dataJob/{requestId}/dataProducerJob/{dataProducerJobId}/result: + /v1/cmwriteJob/dataProducer/{dataProducerId}/dataProducerJob/{dataProducerJobId}/result: get: description: Retrieve the result of a data job. operationId: getDataJobResult parameters: - - description: Identifier for the overall Datajob + - description: Identifier for the data producer in: path - name: requestId + name: dataProducerId required: true schema: - example: some-identifier + example: some-data-producer-identifier type: string style: simple - description: Identifier for the data producer job @@ -277,7 +285,7 @@ components: type: string dataJobId: description: Identifier for the overall Data Job - example: my-data-producer-identifier + example: my-data-job-identifier type: string data: example: |