1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
.. Copyright (C) 2023-2024 Nordix Foundation
.. DO NOT CHANGE THIS LABEL FOR RELEASE NOTES - EVEN THOUGH IT GIVES A WARNING
.. _cmHandleDataOperation:
Data Operations Endpoint
########################
.. toctree::
:maxdepth: 1
Introduction
============
For all data operations on cm handle(s), we have a post endpoint:
- /ncmp/v1/data?topic={client-topic-name} forward request to it's dmi plugin service.
- When asynchronous (with topic) operations are executed, a request id (UUID) will be returned.
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 references |
+--------------------------+-------------+-------------------------------------------------------------------------+
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 purposes only. Please refer to link below for latest schema.
:download:`Data operation event schema <schemas/data-operation-event-schema-1.0.0.json>`
|