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/CmHandleCompositeState'
213 CmHandlePublicProperties:
217 additionalProperties:
220 CmHandleCompositeState:
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'
271 RestOutputCmHandleCompositeState:
275 $ref: '#/components/schemas/CmHandleCompositeState'
279 summary: Sample request
280 description: Sample request body
283 bookstore-name: Chapters
297 dataSamplePatchRequest:
298 summary: Sample patch request
299 description: Sample patch request body
301 ietf-restconf:yang-patch:
309 bookstore-name: Chapters
327 bookstore-name: Novels
342 summary: Sample response
343 description: Sample response for selecting 'sample 1'.
363 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
367 example: my-cm-handle
376 requiredXpathInQuery:
383 includeDescendantsOptionInQuery:
384 name: include-descendants
386 description: include-descendants
394 description: cps-path
399 resourceIdentifierInQuery:
400 name: resourceIdentifier
402 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.
410 resourceIdentifier: \shops\bookstore
413 resourceIdentifier: \shops\bookstore\categories[@code=1]
416 resourceIdentifier: parent=shops,child=bookstore
420 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.
431 options: (fields=book)
434 options: (depth=2,fields=book/authors)
438 description: topic parameter in query.
447 contentParamInHeader:
451 description: Content parameter for request, if content parameter is null, default value is application/json.
454 default: application/json
455 example: application/yang-data+json
459 description: The specified resource was not found
463 $ref: '#/components/schemas/ErrorMessage'
466 message: Not found error message
467 details: Not found error details
469 description: Unauthorized
473 $ref: '#/components/schemas/ErrorMessage'
476 message: Unauthorized error message
477 details: Unauthorized error details
479 description: Forbidden
483 $ref: '#/components/schemas/ErrorMessage'
486 message: Forbidden error message
487 details: Forbidden error details
489 description: Bad Request
493 $ref: '#/components/schemas/ErrorMessage'
495 status: 400 BAD_REQUEST
496 message: Bad request error message
497 details: Bad request error details
499 description: Conflict
503 $ref: '#/components/schemas/ErrorMessage'
506 message: Conflict error message
507 details: Conflict error details
509 description: The given path has not been implemented
513 $ref: '#/components/schemas/ErrorMessage'
516 message: Not implemented error message
517 details: Not implemented error details
528 description: No Content
531 description: Internal Server Error
535 $ref: "#/components/schemas/ErrorMessage"
538 message: Internal Server Error
539 details: Internal Server Error occurred
541 description: Bad Gateway
545 $ref: "#/components/schemas/DmiErrorMessage"
547 message: "Bad Gateway Error Message NCMP"