Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Flow Step

Short description

Message Details

Notes

1

Bulk Get Request


Code Block
languagebash
titleNCMP batch endpoint
collapsetrue
curl --location 'http: //localhost:8080/ncmp/v1/data?topic=my-topic-name' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' \
--data '{
    "operations": [
        {
            "operation": "read",
            "operationId": "12",
            "datastore": "ncmp-datastore:passthrough-operational",
            "options": "some option",
            "resourceIdentifier": "parent/child",
            "targetIds": [
                "836bb62201f34a7aa056a47bd95a81ed",
                "202acb75b4a54e43bb1ff8c0c17a8e08"
            ]
        },
        {
            "operation": "read",
            "operationId": "14",
            "datastore": "ncmp-datastore:passthrough-running",
            "targetIds": [
                "ec2e9495679a43c58659c07d87025e72",
                "0df4d39af6514d99b816758148389cfd"
            ]
        }
    ]
}'


Define new get operation "getResourceDataForCmHandles" into ncmp.yml

2Ack client Request


Code Block
languagebash
titleNCMP batch endpoint response (202->Accepted)
collapsetrue
{
    "requestId": "4753fc1f-7de2-449a-b306-a6204b5370b3"
}



3DMI Bulk Request


Code Block
languagebash
titleDMI service batch endpoint
collapsetrue
DMI Service 1 (POST): http://172.26.202.25:8783/dmi/v1/data?topic=my-topic-name&requestId=4753fc1f-7de2-449a-b306-a6204b5370b3 -> 

[
    {
        "operationType": "read",
        "operationId": "14",
        "datastore": "ncmp-datastore:passthrough-running",
        "cmHandles": [
            {
                "id": "ec2e9495679a43c58659c07d87025e72",
                "cmHandleProperties": {
                    "neType": "RadioNode"
                }
            },
            {
                "id": "0df4d39af6514d99b816758148389cfd",
                "cmHandleProperties": {
                    "neType": "RadioNode"
                }
            }
        ]
    }
]

DMI Service 2 (POST) : http://172.26.202.26:8783/dmi/v1/data?topic=my-topic-name&requestId=4753fc1f-7de2-449a-b306-a6204b5370b3 -> 

   [
    {
        "operationType": "read",
        "operationId": "12",
        "datastore": "ncmp-datastore:passthrough-operational",
        "options": "some option",
        "resourceIdentifier": "parent/child",
        "cmHandles": [
            {
                "id": "836bb62201f34a7aa056a47bd95a81ed",
                "cmHandleProperties": {
                    "neType": "RadioNode"
                }
            },
            {
                "id": "202acb75b4a54e43bb1ff8c0c17a8e08",
                "cmHandleProperties": {
                    "neType": "RadioNode"
                }
            }
        ]
    }
]


    New JIRA

Jira
serverONAP Jira
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyCPS-1833
is created to address it.

Discussed with Csaba Kocsis and agreed to send identical data request body as NCMP where data operation requat body is as follows:


Client App→ NCMPNCMP→ DMI Agreed 
operationoperationTypeoperation
operation details are wrapped into parent attribute "operations"  like "operations": [ ...operation details ar not wrapped wrap operation details into parent attribute "operations"



NCMP→ DMICurrent NCMP→ DMIProposed NCMP→ DMI

{
    "operations": [
        {
            "operation""read",
            "operationId""operational-10",
            "datastore""ncmp-datastore:passthrough-running",
            "resourceIdentifier""parent/child",
            "targetIds": [
                "cd4473a732724092a97cebe157604a83"
            ]
        }
    ]
}

[
    {
        "operationType""read",
        "operationId""operational-10",
        "datastore""ncmp-datastore:passthrough-running",
        "cmHandles": [
            {
                "id""cd4473a732724092a97cebe157604a83",
                "cmHandleProperties": {
                    "neType""RadioNode"
                }
            }
        ]
    }
]

{
    "operations": [
        {
            "operation""read",
            "operationId""operational-10",
            "datastore""ncmp-datastore:passthrough-running",
            "resourceIdentifier""parent/child",
            "cmHandles": [
                {
                    "id""cd4473a732724092a97cebe157604a83",
                    "cmHandleProperties": {
                        "neType""RadioNode"
                    }
                }
            ]
        }
    ]
}


4Ack NCMP Request


Code Block
languagejava
titleResponse 202
collapsetrue


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.
5Kafka Messages from DMI to NCMP


Code Block
titleBatch Event Payload Schema
collapsetrue
{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "$id": "urn:cps:org.onap.cps.ncmp.events.async:batch-event-schema:1.0.0",
  "$ref": "#/definitions/BatchDataResponseEvent",
  "definitions": {
    "BatchDataResponseEvent": {
      "description": "The payload of batch event.",
      "type": "object",
      "javaType" : "org.onap.cps.ncmp.events.async.v1.BatchEvent",
      "properties": {
        "event": {
          "description": "The content of Batch event.",
          "type": "object",
          "existingJavaType": "java.lang.Object",
          "additionalProperties": false
        }
      },
      "required": [
        "event"
      ],
      "additionalProperties": false
    }
  }
}  


Code Block
titleBatch Event Payload
collapsetrue
{     
  "event": {
     "payload": "response of batch cm handles"
  } 
}



6Kafka Message(s) from NCMP to Client 
Table



Code Block
titleBatch Event Payload
collapsetrue
{     
  "event": {
     "payload": "response of batch cm handles"
  } 
}


Single response format for all scenarios bot positive and error, just using optional fields instead
7Error for 4/5 → Non responding DMI, non existing CM Handles or any other error. NCMP will have to create error message detailing all cm-handle ids affect by that error.


Code Block
titleNon responding DMI-plugin 
collapsetrue
{
  "timestamp":"2023-03-01T23:00:00.345-0400", 
  "requestId":123,
  "error": "<error-message>",
  "Cmhandles":["cm-1",...,"cm-n"]
  }


Single response format for all scenarios bot positive and error, just using optional fields instead
See decision # 8

...