1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright (C) 2023 Nordix Foundation
5 .. DO NOT CHANGE THIS LABEL FOR RELEASE NOTES - EVEN THOUGH IT GIVES A WARNING
6 .. _cmHandleDataOperation:
9 CM Handles Data Operation Endpoints
10 ###################################
18 For data operation CM Handles we have a Post endpoints:
20 - /ncmp/v1/data?topic={client-topic-name} forward request to it's dmi plugin service.
22 - Returns request id (UUID) with http status 202.
27 This endpoint executes data operation for given array of operations:
29 +--------------------------+-------------+-------------------------------------------------------------------------+
30 | Operation attributes | Mandatory | Description |
31 +==========================+=============+=========================================================================+
32 | operation | Yes | Only read operation is allowed. |
33 +--------------------------+-------------+-------------------------------------------------------------------------+
34 | operationId | Yes | Unique operation id for each operation. |
35 +--------------------------+-------------+-------------------------------------------------------------------------+
36 | datastore | Yes | Supports only ncmp-datastore:passthrough-operational and |
37 | | | ncmp-datastore:passthrough-running. |
38 +--------------------------+-------------+-------------------------------------------------------------------------+
39 | options | No | It is mandatory to wrap key(s)=value(s) in parenthesis'()'. The format |
40 | | | of options parameter depend on the associated DMI Plugin implementation.|
41 +--------------------------+-------------+-------------------------------------------------------------------------+
42 | resourceIdentifier | No | The format of resource identifier depend on the associated DMI Plugin |
43 | | | implementation. For ONAP DMI Plugin it will be RESTConf paths but it can|
44 | | | really be anything. |
45 +--------------------------+-------------+-------------------------------------------------------------------------+
46 | targetIds | Yes | List of cm handle ids. |
47 +--------------------------+-------------+-------------------------------------------------------------------------+
49 The status codes used in the events resulting from these operations are defined here:
54 cps-ncmp-message-status-codes.rst
56 Request Body example from client app to NCMP endpoint:
60 curl --location 'http: //{ncmp-host-name}:{ncmp-port}/ncmp/v1/data?topic=my-topic-name' \
61 --header 'Content-Type: application/json' \
62 --header 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' \
67 "operationId": "operational-12",
68 "datastore": "ncmp-datastore:passthrough-operational",
69 "options": "some option",
70 "resourceIdentifier": "parent/child",
72 "836bb62201f34a7aa056a47bd95a81ed",
73 "202acb75b4a54e43bb1ff8c0c17a8e08"
78 "operationId": "running-14",
79 "datastore": "ncmp-datastore:passthrough-running",
81 "ec2e9495679a43c58659c07d87025e72",
82 "0df4d39af6514d99b816758148389cfd"
89 DMI service batch endpoint
90 --------------------------
92 DMI Service 1 (POST): `http://{dmi-host-name}:{dmi-port}/dmi/v1/data?topic=my-topic-name&requestId=4753fc1f-7de2-449a-b306-a6204b5370b3`
98 "operationType": "read",
99 "operationId": "running-14",
100 "datastore": "ncmp-datastore:passthrough-running",
103 "id": "ec2e9495679a43c58659c07d87025e72",
104 "cmHandleProperties": {
105 "neType": "RadioNode"
109 "id": "0df4d39af6514d99b816758148389cfd",
110 "cmHandleProperties": {
111 "neType": "RadioNode"
118 DMI Service 2 (POST) : `http://{dmi-host-name}:{dmi-port}/dmi/v1/data?topic=my-topic-name&requestId=4753fc1f-7de2-449a-b306-a6204b5370b3`
124 "operationType": "read",
125 "operationId": "operational-12",
126 "datastore": "ncmp-datastore:passthrough-operational",
127 "options": "some option",
128 "resourceIdentifier": "parent/child",
131 "id": "836bb62201f34a7aa056a47bd95a81ed",
132 "cmHandleProperties": {
133 "neType": "RadioNode"
137 "id": "202acb75b4a54e43bb1ff8c0c17a8e08",
138 "cmHandleProperties": {
139 "neType": "RadioNode"
146 Above examples are for illustration purpose only please refer link below for latest schema.
148 :download:`Data operation event schema <schemas/data-operation-event-schema-1.0.0.json>`