1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2021-2024 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 ]
91 $ref: '#/components/schemas/UpgradedCmHandles'
92 DmiPluginRegistrationErrorResponse:
95 failedCreatedCmHandles:
98 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
99 failedUpdatedCmHandles:
102 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
103 failedRemovedCmHandles:
106 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
107 failedUpgradeCmHandles:
110 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
111 CmHandlerRegistrationErrorResponse:
116 example: my-cm-handle
122 example: 'Unknown error. <error-details>'
131 example: my-cm-handle
133 $ref: '#/components/schemas/RestCmHandleProperties'
134 publicCmHandleProperties:
135 $ref: '#/components/schemas/RestCmHandleProperties'
138 example: "my-module-set-tag"
141 enum: [COMPLETE, NONE]
145 example: "my-alternate-id"
146 RestCmHandleProperties:
148 additionalProperties:
151 #Module upgrade schema
161 example: [ my-cm-handle1, my-cm-handle2, my-cm-handle3 ]
165 example: 'my-module-set-tag'
170 title: Module reference details
174 example: my-module-name
177 example: my-module-revision
179 RestModuleDefinition:
181 title: Module definitions
185 example: my-module-name
194 namespace 'org:onap:ccsdk:sample';
196 revision '2020-09-15' {
202 CmHandleQueryParameters:
204 title: Cm Handle query parameters for executing cm handle search
206 cmHandleQueryParameters:
209 $ref: '#/components/schemas/ConditionProperties'
214 $ref: '#/components/schemas/OldConditionProperties'
215 description: not necessary, it is just for backward compatibility
225 additionalProperties:
227 OldConditionProperties:
235 $ref: '#/components/schemas/ModuleNameAsJsonObject'
236 ModuleNameAsJsonObject:
244 title: CM handle Details
248 example: my-cm-handle1
249 publicCmHandleProperties:
250 $ref: '#/components/schemas/CmHandlePublicProperties'
252 $ref: '#/components/schemas/CmHandleCompositeState'
254 $ref: '#/components/schemas/CmHandleTrustLevel'
255 CmHandlePublicProperties:
259 additionalProperties:
262 CmHandleCompositeState:
269 $ref: '#/components/schemas/lock-reason'
272 example: 2022-12-31T20:30:40.000+0000
277 $ref: '#/components/schemas/dataStores'
280 description: Current trust level of the relevant CM handle ID.
288 example: LOCKED_MISBEHAVING
291 example: locked due to failure in module sync
297 $ref: '#/components/schemas/sync-state'
299 $ref: '#/components/schemas/sync-state'
306 example: NONE_REQUESTED
309 example: 2022-12-31T20:30:40.000+0000
311 RestOutputCmHandlePublicProperties:
314 publicCmHandleProperties:
315 $ref: '#/components/schemas/CmHandlePublicProperties'
317 RestOutputCmHandleCompositeState:
321 $ref: '#/components/schemas/CmHandleCompositeState'
322 # Data Operation Request Schemas
323 DataOperationRequest:
325 title: execute data operation for given array of operations
330 $ref: '#/components/schemas/DataOperationDefinition'
331 description: contains group of data operation requests
332 DataOperationDefinition:
346 example: 'ncmp-datastore:passthrough-operational'
349 example: '(fields=schemas/schema)'
352 example: 'parent/child'
357 example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
361 summary: Sample request
362 description: Sample request body
365 bookstore-name: Chapters
379 dataSamplePatchRequest:
380 summary: Sample patch request
381 description: Sample patch request body
383 ietf-restconf:yang-patch:
391 bookstore-name: Chapters
409 bookstore-name: Novels
424 summary: Sample response
425 description: Sample response for selecting 'sample 1'.
441 allCmHandleQueryParameters:
443 cmHandleQueryParameters:
444 - conditionName: hasAllModules
446 - { "moduleName": "my-module-1" }
447 - { "moduleName": "my-module-2" }
448 - { "moduleName": "my-module-3" }
449 - conditionName: hasAllProperties
451 - { "Color": "yellow" }
452 - { "Shape": "circle" }
453 - { "Size": "small" }
454 - conditionName: cmHandleWithCpsPath
456 - { "cpsPath": "//state[@cm-handle-state='ADVISED']" }
457 pubPropCmHandleQueryParameters:
459 cmHandleQueryParameters:
460 - conditionName: hasAllProperties
462 - { "Color": "yellow" }
463 - { "Shape": "circle" }
464 - { "Size": "small" }
465 modulesCmHandleQueryParameters:
467 cmHandleQueryParameters:
468 - conditionName: hasAllModules
470 - { "moduleName": "my-module-1" }
471 - { "moduleName": "my-module-2" }
472 - { "moduleName": "my-module-3" }
473 cpsPathCmHandleStateQueryParameters:
475 cmHandleQueryParameters:
476 - conditionName: cmHandleWithCpsPath
478 - { "cpsPath": "//state[@cm-handle-state='LOCKED']" }
479 cpsPathCmHandleDataSyncQueryParameters:
481 cmHandleQueryParameters:
482 - conditionName: cmHandleWithCpsPath
484 - { "cpsPath": "//state[@data-sync-enabled='true']" }
490 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
494 example: my-cm-handle
498 description: Filter for a module name.This is an optional parameter
506 description: Filter for a module revision.This is an optional parameter and ignored when no module name is supplied
512 name: dataSyncEnabled
514 description: Is used to enable or disable the data synchronization flag
527 requiredXpathInQuery:
534 includeDescendantsOptionInQuery:
535 name: include-descendants
537 description: Determines if descendants are included in response
545 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
553 list attributes cps path:
554 value: //categories[@code=1]
555 dmiPluginIdentifierInQuery:
556 name: dmi-plugin-identifier
558 description: dmi-plugin-identifier
562 example: my-dmi-plugin
563 resourceIdentifierInQuery:
564 name: resourceIdentifier
566 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.
574 resourceIdentifier: \shops\bookstore
577 resourceIdentifier: \shops\bookstore\categories[@code=1]
580 resourceIdentifier: parent=shops,child=bookstore
584 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.
595 options: (fields=book)
598 options: (depth=2,fields=book/authors)
602 description: topic parameter in query.
611 requiredTopicParamInQuery:
614 description: mandatory topic parameter in query.
623 contentParamInHeader:
627 description: Content parameter for request, if content parameter is null, default value is application/json.
630 default: application/json
631 example: application/yang-data+json
632 authorizationParamInHeader:
636 description: Authorization parameter for request.
642 description: The type of the requested data
646 example: ncmp-datastore:running
650 description: The specified resource was not found
654 $ref: '#/components/schemas/ErrorMessage'
657 message: Not found error message
658 details: Not found error details
660 description: Unauthorized
664 $ref: '#/components/schemas/ErrorMessage'
667 message: Unauthorized error message
668 details: Unauthorized error details
670 description: Forbidden
674 $ref: '#/components/schemas/ErrorMessage'
677 message: Forbidden error message
678 details: Forbidden error details
680 description: Bad Request
684 $ref: '#/components/schemas/ErrorMessage'
686 status: 400 BAD_REQUEST
687 message: Bad request error message
688 details: Bad request error details
690 description: Conflict
694 $ref: '#/components/schemas/ErrorMessage'
697 message: Conflict error message
698 details: Conflict error details
700 description: The given path has not been implemented
704 $ref: '#/components/schemas/ErrorMessage'
707 message: Not implemented error message
708 details: Not implemented error details
719 description: No Content
722 description: Internal Server Error
726 $ref: "#/components/schemas/ErrorMessage"
729 message: Internal Server Error
730 details: Internal Server Error occurred
732 description: Bad Gateway
736 $ref: "#/components/schemas/DmiErrorMessage"
738 message: "Bad Gateway Error Message NCMP"