1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2021-2023 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]
143 RestCmHandleProperties:
145 additionalProperties:
148 #Module upgrade schema
158 example: [ my-cm-handle1, my-cm-handle2, my-cm-handle3 ]
161 example: 'my-module-set-tag'
166 title: Module reference details
170 example: my-module-name
173 example: my-module-revision
175 RestModuleDefinition:
177 title: Module definitions
181 example: my-module-name
190 namespace 'org:onap:ccsdk:sample';
192 revision '2020-09-15' {
198 CmHandleQueryParameters:
200 title: Cm Handle query parameters for executing cm handle search
202 cmHandleQueryParameters:
205 $ref: '#/components/schemas/ConditionProperties'
210 $ref: '#/components/schemas/OldConditionProperties'
211 description: not necessary, it is just for backward compatibility
221 additionalProperties:
223 OldConditionProperties:
231 $ref: '#/components/schemas/ModuleNameAsJsonObject'
232 ModuleNameAsJsonObject:
240 title: CM handle Details
244 example: my-cm-handle1
245 publicCmHandleProperties:
246 $ref: '#/components/schemas/CmHandlePublicProperties'
248 $ref: '#/components/schemas/CmHandleCompositeState'
250 $ref: '#/components/schemas/CmHandleTrustLevel'
251 CmHandlePublicProperties:
255 additionalProperties:
258 CmHandleCompositeState:
265 $ref: '#/components/schemas/lock-reason'
268 example: 2022-12-31T20:30:40.000+0000
273 $ref: '#/components/schemas/dataStores'
276 description: Current trust level of the relevant CM handle ID.
284 example: LOCKED_MISBEHAVING
287 example: locked due to failure in module sync
293 $ref: '#/components/schemas/sync-state'
295 $ref: '#/components/schemas/sync-state'
302 example: NONE_REQUESTED
305 example: 2022-12-31T20:30:40.000+0000
307 RestOutputCmHandlePublicProperties:
310 publicCmHandleProperties:
311 $ref: '#/components/schemas/CmHandlePublicProperties'
313 RestOutputCmHandleCompositeState:
317 $ref: '#/components/schemas/CmHandleCompositeState'
318 # Data Operation Request Schemas
319 DataOperationRequest:
321 title: execute data operation for given array of operations
326 $ref: '#/components/schemas/DataOperationDefinition'
327 description: contains group of data operation requests
328 DataOperationDefinition:
342 example: 'ncmp-datastore:passthrough-operational'
345 example: '(fields=schemas/schema)'
348 example: 'parent/child'
353 example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
357 summary: Sample request
358 description: Sample request body
361 bookstore-name: Chapters
375 dataSamplePatchRequest:
376 summary: Sample patch request
377 description: Sample patch request body
379 ietf-restconf:yang-patch:
387 bookstore-name: Chapters
405 bookstore-name: Novels
420 summary: Sample response
421 description: Sample response for selecting 'sample 1'.
437 allCmHandleQueryParameters:
439 cmHandleQueryParameters:
440 - conditionName: hasAllModules
442 - { "moduleName": "my-module-1" }
443 - { "moduleName": "my-module-2" }
444 - { "moduleName": "my-module-3" }
445 - conditionName: hasAllProperties
447 - { "Color": "yellow" }
448 - { "Shape": "circle" }
449 - { "Size": "small" }
450 - conditionName: cmHandleWithCpsPath
452 - { "cpsPath": "//state[@cm-handle-state='ADVISED']" }
453 pubPropCmHandleQueryParameters:
455 cmHandleQueryParameters:
456 - conditionName: hasAllProperties
458 - { "Color": "yellow" }
459 - { "Shape": "circle" }
460 - { "Size": "small" }
461 modulesCmHandleQueryParameters:
463 cmHandleQueryParameters:
464 - conditionName: hasAllModules
466 - { "moduleName": "my-module-1" }
467 - { "moduleName": "my-module-2" }
468 - { "moduleName": "my-module-3" }
469 cpsPathCmHandleStateQueryParameters:
471 cmHandleQueryParameters:
472 - conditionName: cmHandleWithCpsPath
474 - { "cpsPath": "//state[@cm-handle-state='LOCKED']" }
475 cpsPathCmHandleDataSyncQueryParameters:
477 cmHandleQueryParameters:
478 - conditionName: cmHandleWithCpsPath
480 - { "cpsPath": "//state[@data-sync-enabled='true']" }
486 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
490 example: my-cm-handle
492 name: dataSyncEnabled
494 description: Is used to enable or disable the data synchronization flag
507 requiredXpathInQuery:
514 includeDescendantsOptionInQuery:
515 name: include-descendants
517 description: Determines if descendants are included in response
525 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
533 list attributes cps path:
534 value: //categories[@code=1]
535 dmiPluginIdentifierInQuery:
536 name: dmi-plugin-identifier
538 description: dmi-plugin-identifier
542 example: my-dmi-plugin
543 resourceIdentifierInQuery:
544 name: resourceIdentifier
546 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.
554 resourceIdentifier: \shops\bookstore
557 resourceIdentifier: \shops\bookstore\categories[@code=1]
560 resourceIdentifier: parent=shops,child=bookstore
564 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.
575 options: (fields=book)
578 options: (depth=2,fields=book/authors)
582 description: topic parameter in query.
591 requiredTopicParamInQuery:
594 description: mandatory topic parameter in query.
603 contentParamInHeader:
607 description: Content parameter for request, if content parameter is null, default value is application/json.
610 default: application/json
611 example: application/yang-data+json
615 description: The type of the requested data
619 example: ncmp-datastore:running
623 description: The specified resource was not found
627 $ref: '#/components/schemas/ErrorMessage'
630 message: Not found error message
631 details: Not found error details
633 description: Unauthorized
637 $ref: '#/components/schemas/ErrorMessage'
640 message: Unauthorized error message
641 details: Unauthorized error details
643 description: Forbidden
647 $ref: '#/components/schemas/ErrorMessage'
650 message: Forbidden error message
651 details: Forbidden error details
653 description: Bad Request
657 $ref: '#/components/schemas/ErrorMessage'
659 status: 400 BAD_REQUEST
660 message: Bad request error message
661 details: Bad request error details
663 description: Conflict
667 $ref: '#/components/schemas/ErrorMessage'
670 message: Conflict error message
671 details: Conflict error details
673 description: The given path has not been implemented
677 $ref: '#/components/schemas/ErrorMessage'
680 message: Not implemented error message
681 details: Not implemented error details
692 description: No Content
695 description: Internal Server Error
699 $ref: "#/components/schemas/ErrorMessage"
702 message: Internal Server Error
703 details: Internal Server Error occurred
705 description: Bad Gateway
709 $ref: "#/components/schemas/DmiErrorMessage"
711 message: "Bad Gateway Error Message NCMP"