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'
99 "cmHandle": "my-cm-handle-01",
101 "errorText": "cm-handle already exists"
104 failedUpdatedCmHandles:
107 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
110 "cmHandle": "my-cm-handle-02",
112 "errorText": "cm-handle does not exist"
115 failedRemovedCmHandles:
118 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
121 "cmHandle": "my-cm-handle-02",
123 "errorText": "cm-handle does not exist"
126 CmHandlerRegistrationErrorResponse:
131 example: my-cm-handle
137 example: 'cm-handle already exists'
146 example: my-cm-handle
148 $ref: '#/components/schemas/RestCmHandleProperties'
149 publicCmHandleProperties:
150 $ref: '#/components/schemas/RestCmHandleProperties'
151 RestCmHandleProperties:
153 additionalProperties:
161 $ref: '#/components/schemas/ConditionsData'
166 $ref: '#/components/schemas/ConditionProperties'
171 example: hasAllModules
173 $ref: '#/components/schemas/ModuleNamesAsJsonArray'
174 ModuleNamesAsJsonArray:
178 $ref: '#/components/schemas/ModuleNameAsJsonObject'
179 example: [my-module-1, my-module-2, my-module-3]
180 ModuleNameAsJsonObject:
191 $ref: '#/components/schemas/CmHandleProperties'
196 $ref: '#/components/schemas/CmHandleProperty'
201 example: my-cm-handle-id
205 title: Module reference details
209 example: my-module-name
212 example: my-module-revision
216 title: CM handle Details
220 example: my-cm-handle1
221 publicCmHandleProperties:
222 $ref: '#/components/schemas/CmHandlePublicProperties'
223 CmHandlePublicProperties:
227 additionalProperties:
233 summary: Sample request
234 description: Sample request body
237 bookstore-name: Chapters
251 dataSamplePatchRequest:
252 summary: Sample patch request
253 description: Sample patch request body
255 ietf-restconf:yang-patch:
263 bookstore-name: Chapters
281 bookstore-name: Novels
296 summary: Sample response
297 description: Sample response for selecting 'sample 1'.
317 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
321 example: my-cm-handle
330 requiredXpathInQuery:
337 includeDescendantsOptionInQuery:
338 name: include-descendants
340 description: include-descendants
348 description: cps-path
353 resourceIdentifierInQuery:
354 name: resourceIdentifier
356 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.
364 resourceIdentifier: \shops\bookstore
367 resourceIdentifier: \shops\bookstore\categories[@code=1]
370 resourceIdentifier: parent=shops,child=bookstore
374 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.
385 options: (fields=book)
388 options: (depth=2,fields=book/authors)
392 description: topic parameter in query.
401 contentParamInHeader:
405 description: Content parameter for request, if content parameter is null, default value is application/json.
408 default: application/json
409 example: application/yang-data+json
413 description: The specified resource was not found
417 $ref: '#/components/schemas/ErrorMessage'
420 message: Not found error message
421 details: Not found error details
423 description: Unauthorized
427 $ref: '#/components/schemas/ErrorMessage'
430 message: Unauthorized error message
431 details: Unauthorized error details
433 description: Forbidden
437 $ref: '#/components/schemas/ErrorMessage'
440 message: Forbidden error message
441 details: Forbidden error details
443 description: Bad Request
447 $ref: '#/components/schemas/ErrorMessage'
449 status: 400 BAD_REQUEST
450 message: Bad request error message
451 details: Bad request error details
453 description: Conflict
457 $ref: '#/components/schemas/ErrorMessage'
460 message: Conflict error message
461 details: Conflict error details
463 description: The given path has not been implemented
467 $ref: '#/components/schemas/ErrorMessage'
470 message: Not implemented error message
471 details: Not implemented error details
482 description: No Content
485 description: Internal Server Error
489 $ref: "#/components/schemas/ErrorMessage"
492 message: Internal Server Error
493 details: Internal Server Error occurred
495 description: Bad Gateway
499 $ref: "#/components/schemas/DmiErrorMessage"
501 message: "Bad Gateway Error Message NCMP"