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'
246 $ref: '#/components/schemas/CmHandleTrustLevel'
247 CmHandlePublicProperties:
251 additionalProperties:
254 CmHandleCompositeState:
261 $ref: '#/components/schemas/lock-reason'
264 example: 2022-12-31T20:30:40.000+0000
269 $ref: '#/components/schemas/dataStores'
272 description: Current trust level of the relevant CM handle ID.
280 example: LOCKED_MISBEHAVING
283 example: locked due to failure in module sync
289 $ref: '#/components/schemas/sync-state'
291 $ref: '#/components/schemas/sync-state'
298 example: NONE_REQUESTED
301 example: 2022-12-31T20:30:40.000+0000
303 RestOutputCmHandlePublicProperties:
306 publicCmHandleProperties:
307 $ref: '#/components/schemas/CmHandlePublicProperties'
309 RestOutputCmHandleCompositeState:
313 $ref: '#/components/schemas/CmHandleCompositeState'
314 # Data Operation Request Schemas
315 DataOperationRequest:
317 title: execute data operation for given array of operations
322 $ref: '#/components/schemas/DataOperationDefinition'
323 description: contains group of data operation requests
324 DataOperationDefinition:
338 example: 'ncmp-datastore:passthrough-operational'
341 example: '(fields=schemas/schema)'
344 example: 'parent/child'
349 example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
353 summary: Sample request
354 description: Sample request body
357 bookstore-name: Chapters
371 dataSamplePatchRequest:
372 summary: Sample patch request
373 description: Sample patch request body
375 ietf-restconf:yang-patch:
383 bookstore-name: Chapters
401 bookstore-name: Novels
416 summary: Sample response
417 description: Sample response for selecting 'sample 1'.
433 allCmHandleQueryParameters:
435 cmHandleQueryParameters:
436 - conditionName: hasAllModules
438 - { "moduleName": "my-module-1" }
439 - { "moduleName": "my-module-2" }
440 - { "moduleName": "my-module-3" }
441 - conditionName: hasAllProperties
443 - { "Color": "yellow" }
444 - { "Shape": "circle" }
445 - { "Size": "small" }
446 - conditionName: cmHandleWithCpsPath
448 - { "cpsPath": "//state[@cm-handle-state='ADVISED']" }
449 pubPropCmHandleQueryParameters:
451 cmHandleQueryParameters:
452 - conditionName: hasAllProperties
454 - { "Color": "yellow" }
455 - { "Shape": "circle" }
456 - { "Size": "small" }
457 modulesCmHandleQueryParameters:
459 cmHandleQueryParameters:
460 - conditionName: hasAllModules
462 - { "moduleName": "my-module-1" }
463 - { "moduleName": "my-module-2" }
464 - { "moduleName": "my-module-3" }
465 cpsPathCmHandleStateQueryParameters:
467 cmHandleQueryParameters:
468 - conditionName: cmHandleWithCpsPath
470 - { "cpsPath": "//state[@cm-handle-state='LOCKED']" }
471 cpsPathCmHandleDataSyncQueryParameters:
473 cmHandleQueryParameters:
474 - conditionName: cmHandleWithCpsPath
476 - { "cpsPath": "//state[@data-sync-enabled='true']" }
482 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
486 example: my-cm-handle
488 name: dataSyncEnabled
490 description: Is used to enable or disable the data synchronization flag
503 requiredXpathInQuery:
510 includeDescendantsOptionInQuery:
511 name: include-descendants
513 description: Determines if descendants are included in response
521 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
529 list attributes cps path:
530 value: //categories[@code=1]
531 dmiPluginIdentifierInQuery:
532 name: dmi-plugin-identifier
534 description: dmi-plugin-identifier
538 example: my-dmi-plugin
539 resourceIdentifierInQuery:
540 name: resourceIdentifier
542 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.
550 resourceIdentifier: \shops\bookstore
553 resourceIdentifier: \shops\bookstore\categories[@code=1]
556 resourceIdentifier: parent=shops,child=bookstore
560 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.
571 options: (fields=book)
574 options: (depth=2,fields=book/authors)
578 description: topic parameter in query.
587 requiredTopicParamInQuery:
590 description: mandatory topic parameter in query.
599 contentParamInHeader:
603 description: Content parameter for request, if content parameter is null, default value is application/json.
606 default: application/json
607 example: application/yang-data+json
611 description: The type of the requested data
615 example: ncmp-datastore:running
619 description: The specified resource was not found
623 $ref: '#/components/schemas/ErrorMessage'
626 message: Not found error message
627 details: Not found error details
629 description: Unauthorized
633 $ref: '#/components/schemas/ErrorMessage'
636 message: Unauthorized error message
637 details: Unauthorized error details
639 description: Forbidden
643 $ref: '#/components/schemas/ErrorMessage'
646 message: Forbidden error message
647 details: Forbidden error details
649 description: Bad Request
653 $ref: '#/components/schemas/ErrorMessage'
655 status: 400 BAD_REQUEST
656 message: Bad request error message
657 details: Bad request error details
659 description: Conflict
663 $ref: '#/components/schemas/ErrorMessage'
666 message: Conflict error message
667 details: Conflict error details
669 description: The given path has not been implemented
673 $ref: '#/components/schemas/ErrorMessage'
676 message: Not implemented error message
677 details: Not implemented error details
688 description: No Content
691 description: Internal Server Error
695 $ref: "#/components/schemas/ErrorMessage"
698 message: Internal Server Error
699 details: Internal Server Error occurred
701 description: Bad Gateway
705 $ref: "#/components/schemas/DmiErrorMessage"
707 message: "Bad Gateway Error Message NCMP"