1 | Bulk Get Request |
Code Block |
---|
title | /v1/batch/data/ds/{datastore-name} |
---|
collapse | true |
---|
| body:
["cm-1",...,"cm-n"] |
Code Block |
---|
title | Example CURL cmd : curl --location --request POST |
---|
collapse | true |
---|
| 'http://localhost:8080/ncmp/v1/batch/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=parent/child%26options=(a=1,b=2)&topic=my-topic-name&options=(fields=schemas/schema)' \
--header 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' \
--header 'Content-Type: application/json' \
--data '[ "40137a9771f84459affa795fa1d633ab", "f5a92ec7a7db4d6fbb0e0ce2803a86cc" ]' |
| Define new get operation "getResourceDataForCmHandles" into ncmp.yml |
2 | Ack clent client Request |
Code Block |
---|
title | Response 202 (Accepted) |
---|
collapse | true |
---|
| {"requestId":"123"} |
|
|
3 | DMI Bulk Request |
Code Block |
---|
title | /v1/ch/batch/data/ds/{datastore-name}&topic=topicParamInQuery |
---|
collapse | true |
---|
| body: {"Cmhandles":["cm-1",...,"cm-n"],"requestId":123} |
| The DMI PLugin Plugin should be told (included in request) the client topic so that NCMP does not have to 'remember' to relation between request id and client topic!
|
4 | Ack NCMP Request |
Code Block |
---|
title | Response 202 |
---|
collapse | true |
---|
| |
| 202 is non-committal, meaning that there is no way for the HTTP to later send an asynchronous response indicating the outcome of processing the request. It is intended for cases where another process or server handles the request, or for batch processing. |
5 | Kafka Messages from DMI to NCMP |
Code Block |
---|
title | Batch Event Headers |
---|
collapse | true |
---|
| {
"eventId": "4cb32729-85e3-44d1-aa6e-c923b9b059a5",
"eventCorrelationId": "68f15800-8ed4-4bae-9e53-27a9e03e1911",
"eventTime": "2023-03-28T14:29:23.876+0000",
"eventTarget": "client-topic"
"eventSource": "dmi-plugin:enm-1"(dmi service name)
"eventType": "org.onap.cps.ncmp.event.model.BulkResponseEvent",
"eventSchema": "urn:cps:org.onap.cps.ncmp.events.async:batch-event-schema:1.0.0",
"schemaVersion": "1.0.0",
} |
Code Block |
---|
title | Batch Event Payload |
---|
collapse | true |
---|
| {
"event": {
"payload": "response of batch cm handles"
}
} |
|
|
6 | Kafka Message(s) from NCMP to Client Table
|
Code Block |
---|
title | Batch Event Headers |
---|
collapse | true |
---|
| {
"eventId": "4cb32729-85e3-44d1-aa6e-c923b9b059a5",
"eventCorrelationId": "68f15800-8ed4-4bae-9e53-27a9e03e1911",
"eventTime": "2023-03-28T14:29:23.876+0000",
"eventSource": "dmi-plugin:enm-1"(dmi service name)
"eventType": "org.onap.cps.ncmp.event.model.BulkResponseEvent",
"eventSchema": "urn:cps:org.onap.cps.ncmp.events.async:batch-event-schema:1.0.0",
"schemaVersion": "1.0.0",
} |
Code Block |
---|
title | Batch Event Payload |
---|
collapse | true |
---|
| {
"event": {
"payload": "response of batch cm handles"
}
} |
|
|
7 | Alternative for 4/5 → Non responding DMI. NCMP will have to create error message detailing cm-handles |
| See decision # 8 and 9 |
8 | Response message structure ? (Flow no. 5) Non responding DMI-plugin |
Code Block |
---|
title | Non responding DMI-plugin |
---|
collapse | true |
---|
| {
"timestamp":"2023-03-01T23:00:00.345-0400",
"requestId":123,
"error": "DMI Service Unavailable, {service-name}",
"Cmhandles":["cm-1",...,"cm-n"]
} |
|
|
9 | Response message structure ? (Flow no. 5) Non existing cm handles |
Code Block |
---|
title | Non existing cm handles |
---|
collapse | true |
---|
| {
"timestamp":"2023-03-01T23:00:00.345-0400",
"requestId":123,
"error":"Cm-Handle not found",
"Cmhandles":["cm-1",...,"cm-n"]
} |
|
|
10 | Non Ready cm handles |
Code Block |
---|
title | Non READY existing cm handles |
---|
collapse | true |
---|
| {
"timestamp":"2023-03-01T23:00:00.345-0400",
"requestId":123,
"error":"Cm-Handle not in READY state.",
"Cmhandles":["cm-1",...,"cm-n"]
} |
|
|
11 | URL pattern for DMI-Plugin bulk endpoints | Existing DMI endpoints are : /v1/ch/{cmHandle}/data/ds/{datastore-name}
datastore-name: - ncmp-datastore:passthrough-operational
- ncmp-datastore:passthrough-running
...&topic=topicParamInQuery
CPS Proposed : /v1/ch/batch/data/ds/{datastore-name} ...&topic=topicParamInQuery cm handle ids and requestid into body |
|