1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2021-2022 Nordix Foundation
3 # Modifications Copyright (C) 2021 Pantheon.tech
4 # Modifications Copyright (C) 2022 Bell Canada
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # SPDX-License-Identifier: Apache-2.0
19 # ============LICENSE_END=========================================================
34 # DMI Server Exception Schema
36 title: DMI Error Message
41 example: "Bad Gateway Error Message NCMP"
52 RestDmiPluginRegistration:
57 example: my-dmi-plugin
61 example: my-dmi-data-plugin
65 example: my-dmi-model-plugin
70 $ref: '#/components/schemas/RestInputCmHandle'
74 $ref: '#/components/schemas/RestInputCmHandle'
76 cmHandle: my-cm-handle
78 add-my-property: add-property
79 update-my-property: updated-property
80 delete-my-property: '~'
81 publicCmHandleProperties:
82 add-my-property: add-property
83 update-my-property: updated-property
84 delete-my-property: '~'
89 example: [my-cm-handle1, my-cm-handle2, my-cm-handle3]
90 DmiPluginRegistrationErrorResponse:
93 failedCreatedCmHandles:
96 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
97 failedUpdatedCmHandles:
100 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
101 failedRemovedCmHandles:
104 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
105 CmHandlerRegistrationErrorResponse:
110 example: my-cm-handle
116 example: 'Unknown error. <error-details>'
125 example: my-cm-handle
127 $ref: '#/components/schemas/RestCmHandleProperties'
128 publicCmHandleProperties:
129 $ref: '#/components/schemas/RestCmHandleProperties'
130 RestCmHandleProperties:
132 additionalProperties:
139 title: Module reference details
143 example: my-module-name
146 example: my-module-revision
148 CmHandleQueryParameters:
150 title: Cm Handle query parameters for executing cm handle search
152 cmHandleQueryParameters:
156 $ref: '#/components/schemas/ConditionProperties'
162 $ref: '#/components/schemas/OldConditionProperties'
163 description: not necessary, it is just for backward compatibility
165 cmHandleQueryParameters:
166 - conditionName: hasAllModules
168 - { "moduleName": "my-module-1" }
169 - { "moduleName": "my-module-2" }
170 - { "moduleName": "my-module-3" }
171 - conditionName: hasAllProperties
173 - { "Color": "yellow" }
174 - { "Shape": "circle" }
175 - { "Size": "small" }
184 additionalProperties:
186 OldConditionProperties:
195 $ref: '#/components/schemas/ModuleNameAsJsonObject'
196 ModuleNameAsJsonObject:
204 title: CM handle Details
208 example: my-cm-handle1
209 publicCmHandleProperties:
210 $ref: '#/components/schemas/CmHandlePublicProperties'
212 $ref: '#/components/schemas/RestOutputCmHandleState'
213 CmHandlePublicProperties:
217 additionalProperties:
220 RestOutputCmHandleState:
227 $ref: '#/components/schemas/lock-reason'
230 example: 2022-12-31T20:30:40.000+0000
235 $ref: '#/components/schemas/dataStores'
242 example: LOCKED_OTHER
245 example: locked due to module sync
251 $ref: '#/components/schemas/sync-state'
253 $ref: '#/components/schemas/sync-state'
260 example: NONE_REQUESTED
263 example: 2022-12-31T20:30:40.000+0000
265 RestOutputCmHandlePublicProperties:
268 publicCmHandleProperties:
269 $ref: '#/components/schemas/CmHandlePublicProperties'
273 summary: Sample request
274 description: Sample request body
277 bookstore-name: Chapters
291 dataSamplePatchRequest:
292 summary: Sample patch request
293 description: Sample patch request body
295 ietf-restconf:yang-patch:
303 bookstore-name: Chapters
321 bookstore-name: Novels
336 summary: Sample response
337 description: Sample response for selecting 'sample 1'.
357 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
361 example: my-cm-handle
370 requiredXpathInQuery:
377 includeDescendantsOptionInQuery:
378 name: include-descendants
380 description: include-descendants
388 description: cps-path
393 resourceIdentifierInQuery:
394 name: resourceIdentifier
396 description: 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.
404 resourceIdentifier: \shops\bookstore
407 resourceIdentifier: \shops\bookstore\categories[@code=1]
410 resourceIdentifier: parent=shops,child=bookstore
414 description: options parameter in query, it is mandatory to wrap key(s)=value(s) in parenthesis'()'. The format of options parameter depend on the associated DMI Plugin implementation.
425 options: (fields=book)
428 options: (depth=2,fields=book/authors)
432 description: topic parameter in query.
441 contentParamInHeader:
445 description: Content parameter for request, if content parameter is null, default value is application/json.
448 default: application/json
449 example: application/yang-data+json
453 description: The specified resource was not found
457 $ref: '#/components/schemas/ErrorMessage'
460 message: Not found error message
461 details: Not found error details
463 description: Unauthorized
467 $ref: '#/components/schemas/ErrorMessage'
470 message: Unauthorized error message
471 details: Unauthorized error details
473 description: Forbidden
477 $ref: '#/components/schemas/ErrorMessage'
480 message: Forbidden error message
481 details: Forbidden error details
483 description: Bad Request
487 $ref: '#/components/schemas/ErrorMessage'
489 status: 400 BAD_REQUEST
490 message: Bad request error message
491 details: Bad request error details
493 description: Conflict
497 $ref: '#/components/schemas/ErrorMessage'
500 message: Conflict error message
501 details: Conflict error details
503 description: The given path has not been implemented
507 $ref: '#/components/schemas/ErrorMessage'
510 message: Not implemented error message
511 details: Not implemented error details
522 description: No Content
525 description: Internal Server Error
529 $ref: "#/components/schemas/ErrorMessage"
532 message: Internal Server Error
533 details: Internal Server Error occurred
535 description: Bad Gateway
539 $ref: "#/components/schemas/DmiErrorMessage"
541 message: "Bad Gateway Error Message NCMP"