diff options
author | sourabh_sourabh <sourabh.sourabh@est.tech> | 2023-07-25 10:58:52 +0100 |
---|---|---|
committer | sourabh_sourabh <sourabh.sourabh@est.tech> | 2023-07-27 13:32:59 +0100 |
commit | 9a76aa39090d0bcbbc41e78c80c2769aa1c5f6d1 (patch) | |
tree | 1869f590dd1c915a66b09286ed90e13dded971b1 /docs/ncmp-data-operation.rst | |
parent | 0eb490aaf48c2abe1f9d911f080bf14692968d80 (diff) |
Update RTD (CPS-1515: Spike: Support Multiple CM-Handles for NCMP Get Operation)
- Added information about data operation NCMP endpoint and kafka event
details.
- Re-structured "CPS-Events" and "Modeling" page.
Issue-ID:CPS-1785
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: I2b077ccd7ccd6144a8f9f2183d927f922075f532
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Diffstat (limited to 'docs/ncmp-data-operation.rst')
-rw-r--r-- | docs/ncmp-data-operation.rst | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/docs/ncmp-data-operation.rst b/docs/ncmp-data-operation.rst new file mode 100644 index 0000000000..617b3ed309 --- /dev/null +++ b/docs/ncmp-data-operation.rst @@ -0,0 +1,148 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright (C) 2023 Nordix Foundation + +.. DO NOT CHANGE THIS LABEL FOR RELEASE NOTES - EVEN THOUGH IT GIVES A WARNING +.. _cmHandleDataOperation: + + +CM Handles Data Operation Endpoints +################################### + +.. toctree:: + :maxdepth: 1 + +Introduction +============ + +For data operation CM Handles we have a Post endpoints: + +- /ncmp/v1/data?topic={client-topic-name} forward request to it's dmi plugin service. + +- Returns request id (UUID) with http status 202. + +Request Body +============ + +This endpoint executes data operation for given array of operations: + + +--------------------------+-------------+-------------------------------------------------------------------------+ + | Operation attributes | Mandatory | Description | + +==========================+=============+=========================================================================+ + | operation | Yes | Only read operation is allowed. | + +--------------------------+-------------+-------------------------------------------------------------------------+ + | operationId | Yes | Unique operation id for each operation. | + +--------------------------+-------------+-------------------------------------------------------------------------+ + | datastore | Yes | Supports only ncmp-datastore:passthrough-operational and | + | | | ncmp-datastore:passthrough-running. | + +--------------------------+-------------+-------------------------------------------------------------------------+ + | options | No | It is mandatory to wrap key(s)=value(s) in parenthesis'()'. The format | + | | | of options parameter depend on the associated DMI Plugin implementation.| + +--------------------------+-------------+-------------------------------------------------------------------------+ + | resourceIdentifier | No | The format of resource identifier depend on the associated DMI Plugin | + | | | implementation. For ONAP DMI Plugin it will be RESTConf paths but it can| + | | | really be anything. | + +--------------------------+-------------+-------------------------------------------------------------------------+ + | targetIds | Yes | List of cm handle ids. | + +--------------------------+-------------+-------------------------------------------------------------------------+ + +The status codes used in the events resulting from these operations are defined here: + +.. toctree:: + :maxdepth: 1 + + cps-ncmp-message-status-codes.rst + +Request Body example from client app to NCMP endpoint: + +.. code-block:: bash + + curl --location 'http: //{ncmp-host-name}:{ncmp-port}/ncmp/v1/data?topic=my-topic-name' \ + --header 'Content-Type: application/json' \ + --header 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' \ + --data '{ + "operations": [ + { + "operation": "read", + "operationId": "operational-12", + "datastore": "ncmp-datastore:passthrough-operational", + "options": "some option", + "resourceIdentifier": "parent/child", + "targetIds": [ + "836bb62201f34a7aa056a47bd95a81ed", + "202acb75b4a54e43bb1ff8c0c17a8e08" + ] + }, + { + "operation": "read", + "operationId": "running-14", + "datastore": "ncmp-datastore:passthrough-running", + "targetIds": [ + "ec2e9495679a43c58659c07d87025e72", + "0df4d39af6514d99b816758148389cfd" + ] + } + ] + }' + + +DMI service batch endpoint +-------------------------- + +DMI Service 1 (POST): `http://{dmi-host-name}:{dmi-port}/dmi/v1/data?topic=my-topic-name&requestId=4753fc1f-7de2-449a-b306-a6204b5370b3` + +.. code-block:: json + + [ + { + "operationType": "read", + "operationId": "running-14", + "datastore": "ncmp-datastore:passthrough-running", + "cmHandles": [ + { + "id": "ec2e9495679a43c58659c07d87025e72", + "cmHandleProperties": { + "neType": "RadioNode" + } + }, + { + "id": "0df4d39af6514d99b816758148389cfd", + "cmHandleProperties": { + "neType": "RadioNode" + } + } + ] + } + ] + +DMI Service 2 (POST) : `http://{dmi-host-name}:{dmi-port}/dmi/v1/data?topic=my-topic-name&requestId=4753fc1f-7de2-449a-b306-a6204b5370b3` + +.. code-block:: json + + [ + { + "operationType": "read", + "operationId": "operational-12", + "datastore": "ncmp-datastore:passthrough-operational", + "options": "some option", + "resourceIdentifier": "parent/child", + "cmHandles": [ + { + "id": "836bb62201f34a7aa056a47bd95a81ed", + "cmHandleProperties": { + "neType": "RadioNode" + } + }, + { + "id": "202acb75b4a54e43bb1ff8c0c17a8e08", + "cmHandleProperties": { + "neType": "RadioNode" + } + } + ] + } + ] + +Above examples are for illustration purpose only please refer link below for latest schema. + +:download:`Data operation event schema <schemas/data-operation-event-schema-1.0.0.json>`
\ No newline at end of file |