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"
139 RestCmHandleProperties:
141 additionalProperties:
144 #Module upgrade schema
154 example: [ my-cm-handle1, my-cm-handle2, my-cm-handle3 ]
157 example: 'my-module-set-tag'
162 title: Module reference details
166 example: my-module-name
169 example: my-module-revision
171 RestModuleDefinition:
173 title: Module definitions
177 example: my-module-name
186 namespace 'org:onap:ccsdk:sample';
188 revision '2020-09-15' {
194 CmHandleQueryParameters:
196 title: Cm Handle query parameters for executing cm handle search
198 cmHandleQueryParameters:
201 $ref: '#/components/schemas/ConditionProperties'
206 $ref: '#/components/schemas/OldConditionProperties'
207 description: not necessary, it is just for backward compatibility
217 additionalProperties:
219 OldConditionProperties:
227 $ref: '#/components/schemas/ModuleNameAsJsonObject'
228 ModuleNameAsJsonObject:
236 title: CM handle Details
240 example: my-cm-handle1
241 publicCmHandleProperties:
242 $ref: '#/components/schemas/CmHandlePublicProperties'
244 $ref: '#/components/schemas/CmHandleCompositeState'
245 CmHandlePublicProperties:
249 additionalProperties:
252 CmHandleCompositeState:
259 $ref: '#/components/schemas/lock-reason'
262 example: 2022-12-31T20:30:40.000+0000
267 $ref: '#/components/schemas/dataStores'
274 example: LOCKED_MISBEHAVING
277 example: locked due to failure in module sync
283 $ref: '#/components/schemas/sync-state'
285 $ref: '#/components/schemas/sync-state'
292 example: NONE_REQUESTED
295 example: 2022-12-31T20:30:40.000+0000
297 RestOutputCmHandlePublicProperties:
300 publicCmHandleProperties:
301 $ref: '#/components/schemas/CmHandlePublicProperties'
303 RestOutputCmHandleCompositeState:
307 $ref: '#/components/schemas/CmHandleCompositeState'
308 # Data Operation Request Schemas
309 DataOperationRequest:
311 title: execute data operation for given array of operations
316 $ref: '#/components/schemas/DataOperationDefinition'
317 description: contains group of data operation requests
318 DataOperationDefinition:
332 example: 'ncmp-datastore:passthrough-operational'
335 example: '(fields=schemas/schema)'
338 example: 'parent/child'
343 example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
347 summary: Sample request
348 description: Sample request body
351 bookstore-name: Chapters
365 dataSamplePatchRequest:
366 summary: Sample patch request
367 description: Sample patch request body
369 ietf-restconf:yang-patch:
377 bookstore-name: Chapters
395 bookstore-name: Novels
410 summary: Sample response
411 description: Sample response for selecting 'sample 1'.
427 allCmHandleQueryParameters:
429 cmHandleQueryParameters:
430 - conditionName: hasAllModules
432 - { "moduleName": "my-module-1" }
433 - { "moduleName": "my-module-2" }
434 - { "moduleName": "my-module-3" }
435 - conditionName: hasAllProperties
437 - { "Color": "yellow" }
438 - { "Shape": "circle" }
439 - { "Size": "small" }
440 - conditionName: cmHandleWithCpsPath
442 - { "cpsPath": "//state[@cm-handle-state='ADVISED']" }
443 pubPropCmHandleQueryParameters:
445 cmHandleQueryParameters:
446 - conditionName: hasAllProperties
448 - { "Color": "yellow" }
449 - { "Shape": "circle" }
450 - { "Size": "small" }
451 modulesCmHandleQueryParameters:
453 cmHandleQueryParameters:
454 - conditionName: hasAllModules
456 - { "moduleName": "my-module-1" }
457 - { "moduleName": "my-module-2" }
458 - { "moduleName": "my-module-3" }
459 cpsPathCmHandleStateQueryParameters:
461 cmHandleQueryParameters:
462 - conditionName: cmHandleWithCpsPath
464 - { "cpsPath": "//state[@cm-handle-state='LOCKED']" }
465 cpsPathCmHandleDataSyncQueryParameters:
467 cmHandleQueryParameters:
468 - conditionName: cmHandleWithCpsPath
470 - { "cpsPath": "//state[@data-sync-enabled='true']" }
476 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
480 example: my-cm-handle
482 name: dataSyncEnabled
484 description: Is used to enable or disable the data synchronization flag
497 requiredXpathInQuery:
504 includeDescendantsOptionInQuery:
505 name: include-descendants
507 description: Determines if descendants are included in response
515 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
523 list attributes cps path:
524 value: //categories[@code=1]
525 dmiPluginIdentifierInQuery:
526 name: dmi-plugin-identifier
528 description: dmi-plugin-identifier
532 example: my-dmi-plugin
533 resourceIdentifierInQuery:
534 name: resourceIdentifier
536 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.
544 resourceIdentifier: \shops\bookstore
547 resourceIdentifier: \shops\bookstore\categories[@code=1]
550 resourceIdentifier: parent=shops,child=bookstore
554 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.
565 options: (fields=book)
568 options: (depth=2,fields=book/authors)
572 description: topic parameter in query.
581 requiredTopicParamInQuery:
584 description: mandatory topic parameter in query.
593 contentParamInHeader:
597 description: Content parameter for request, if content parameter is null, default value is application/json.
600 default: application/json
601 example: application/yang-data+json
605 description: The type of the requested data
609 example: ncmp-datastore:running
613 description: The specified resource was not found
617 $ref: '#/components/schemas/ErrorMessage'
620 message: Not found error message
621 details: Not found error details
623 description: Unauthorized
627 $ref: '#/components/schemas/ErrorMessage'
630 message: Unauthorized error message
631 details: Unauthorized error details
633 description: Forbidden
637 $ref: '#/components/schemas/ErrorMessage'
640 message: Forbidden error message
641 details: Forbidden error details
643 description: Bad Request
647 $ref: '#/components/schemas/ErrorMessage'
649 status: 400 BAD_REQUEST
650 message: Bad request error message
651 details: Bad request error details
653 description: Conflict
657 $ref: '#/components/schemas/ErrorMessage'
660 message: Conflict error message
661 details: Conflict error details
663 description: The given path has not been implemented
667 $ref: '#/components/schemas/ErrorMessage'
670 message: Not implemented error message
671 details: Not implemented error details
682 description: No Content
685 description: Internal Server Error
689 $ref: "#/components/schemas/ErrorMessage"
692 message: Internal Server Error
693 details: Internal Server Error occurred
695 description: Bad Gateway
699 $ref: "#/components/schemas/DmiErrorMessage"
701 message: "Bad Gateway Error Message NCMP"