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 RestModuleDefinition:
150 title: Module definitions
154 example: my-module-name
163 namespace "org:onap:ccsdk:sample";
165 revision "2020-09-15" {
172 CmHandleQueryParameters:
174 title: Cm Handle query parameters for executing cm handle search
176 cmHandleQueryParameters:
180 $ref: '#/components/schemas/ConditionProperties'
186 $ref: '#/components/schemas/OldConditionProperties'
187 description: not necessary, it is just for backward compatibility
197 additionalProperties:
199 OldConditionProperties:
208 $ref: '#/components/schemas/ModuleNameAsJsonObject'
209 ModuleNameAsJsonObject:
217 title: CM handle Details
221 example: my-cm-handle1
222 publicCmHandleProperties:
223 $ref: '#/components/schemas/CmHandlePublicProperties'
225 $ref: '#/components/schemas/CmHandleCompositeState'
226 CmHandlePublicProperties:
230 additionalProperties:
233 CmHandleCompositeState:
240 $ref: '#/components/schemas/lock-reason'
243 example: 2022-12-31T20:30:40.000+0000
248 $ref: '#/components/schemas/dataStores'
255 example: LOCKED_MISBEHAVING
258 example: locked due to failure in module sync
264 $ref: '#/components/schemas/sync-state'
266 $ref: '#/components/schemas/sync-state'
273 example: NONE_REQUESTED
276 example: 2022-12-31T20:30:40.000+0000
278 RestOutputCmHandlePublicProperties:
281 publicCmHandleProperties:
282 $ref: '#/components/schemas/CmHandlePublicProperties'
284 RestOutputCmHandleCompositeState:
288 $ref: '#/components/schemas/CmHandleCompositeState'
292 summary: Sample request
293 description: Sample request body
296 bookstore-name: Chapters
310 dataSamplePatchRequest:
311 summary: Sample patch request
312 description: Sample patch request body
314 ietf-restconf:yang-patch:
322 bookstore-name: Chapters
340 bookstore-name: Novels
355 summary: Sample response
356 description: Sample response for selecting 'sample 1'.
372 allCmHandleQueryParameters:
374 cmHandleQueryParameters:
375 - conditionName: hasAllModules
377 - { "moduleName": "my-module-1" }
378 - { "moduleName": "my-module-2" }
379 - { "moduleName": "my-module-3" }
380 - conditionName: hasAllProperties
382 - { "Color": "yellow" }
383 - { "Shape": "circle" }
384 - { "Size": "small" }
385 - conditionName: cmHandleWithCpsPath
387 - { "cpsPath": "//state[@cm-handle-state='ADVISED']" }
388 pubPropCmHandleQueryParameters:
390 cmHandleQueryParameters:
391 - conditionName: hasAllProperties
393 - { "Color": "yellow" }
394 - { "Shape": "circle" }
395 - { "Size": "small" }
396 modulesCmHandleQueryParameters:
398 cmHandleQueryParameters:
399 - conditionName: hasAllModules
401 - { "moduleName": "my-module-1" }
402 - { "moduleName": "my-module-2" }
403 - { "moduleName": "my-module-3" }
404 cpsPathCmHandleStateQueryParameters:
406 cmHandleQueryParameters:
407 - conditionName: cmHandleWithCpsPath
409 - { "cpsPath": "//state[@cm-handle-state='LOCKED']" }
410 cpsPathCmHandleDataSyncQueryParameters:
412 cmHandleQueryParameters:
413 - conditionName: cmHandleWithCpsPath
415 - { "cpsPath": "//state[@data-sync-enabled='true']" }
421 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
425 example: my-cm-handle
427 name: dataSyncEnabled
429 description: Is used to enable or disable the data synchronization flag
442 requiredXpathInQuery:
449 includeDescendantsOptionInQuery:
450 name: include-descendants
452 description: include-descendants
460 description: cps-path
465 resourceIdentifierInQuery:
466 name: resourceIdentifier
468 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.
476 resourceIdentifier: \shops\bookstore
479 resourceIdentifier: \shops\bookstore\categories[@code=1]
482 resourceIdentifier: parent=shops,child=bookstore
486 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.
497 options: (fields=book)
500 options: (depth=2,fields=book/authors)
504 description: topic parameter in query.
513 contentParamInHeader:
517 description: Content parameter for request, if content parameter is null, default value is application/json.
520 default: application/json
521 example: application/yang-data+json
525 description: The specified resource was not found
529 $ref: '#/components/schemas/ErrorMessage'
532 message: Not found error message
533 details: Not found error details
535 description: Unauthorized
539 $ref: '#/components/schemas/ErrorMessage'
542 message: Unauthorized error message
543 details: Unauthorized error details
545 description: Forbidden
549 $ref: '#/components/schemas/ErrorMessage'
552 message: Forbidden error message
553 details: Forbidden error details
555 description: Bad Request
559 $ref: '#/components/schemas/ErrorMessage'
561 status: 400 BAD_REQUEST
562 message: Bad request error message
563 details: Bad request error details
565 description: Conflict
569 $ref: '#/components/schemas/ErrorMessage'
572 message: Conflict error message
573 details: Conflict error details
575 description: The given path has not been implemented
579 $ref: '#/components/schemas/ErrorMessage'
582 message: Not implemented error message
583 details: Not implemented error details
594 description: No Content
597 description: Internal Server Error
601 $ref: "#/components/schemas/ErrorMessage"
604 message: Internal Server Error
605 details: Internal Server Error occurred
607 description: Bad Gateway
611 $ref: "#/components/schemas/DmiErrorMessage"
613 message: "Bad Gateway Error Message NCMP"