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]
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
496 name: dataSyncEnabled
498 description: Is used to enable or disable the data synchronization flag
511 requiredXpathInQuery:
518 includeDescendantsOptionInQuery:
519 name: include-descendants
521 description: Determines if descendants are included in response
529 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
537 list attributes cps path:
538 value: //categories[@code=1]
539 dmiPluginIdentifierInQuery:
540 name: dmi-plugin-identifier
542 description: dmi-plugin-identifier
546 example: my-dmi-plugin
547 resourceIdentifierInQuery:
548 name: resourceIdentifier
550 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.
558 resourceIdentifier: \shops\bookstore
561 resourceIdentifier: \shops\bookstore\categories[@code=1]
564 resourceIdentifier: parent=shops,child=bookstore
568 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.
579 options: (fields=book)
582 options: (depth=2,fields=book/authors)
586 description: topic parameter in query.
595 requiredTopicParamInQuery:
598 description: mandatory topic parameter in query.
607 contentParamInHeader:
611 description: Content parameter for request, if content parameter is null, default value is application/json.
614 default: application/json
615 example: application/yang-data+json
619 description: The type of the requested data
623 example: ncmp-datastore:running
627 description: The specified resource was not found
631 $ref: '#/components/schemas/ErrorMessage'
634 message: Not found error message
635 details: Not found error details
637 description: Unauthorized
641 $ref: '#/components/schemas/ErrorMessage'
644 message: Unauthorized error message
645 details: Unauthorized error details
647 description: Forbidden
651 $ref: '#/components/schemas/ErrorMessage'
654 message: Forbidden error message
655 details: Forbidden error details
657 description: Bad Request
661 $ref: '#/components/schemas/ErrorMessage'
663 status: 400 BAD_REQUEST
664 message: Bad request error message
665 details: Bad request error details
667 description: Conflict
671 $ref: '#/components/schemas/ErrorMessage'
674 message: Conflict error message
675 details: Conflict error details
677 description: The given path has not been implemented
681 $ref: '#/components/schemas/ErrorMessage'
684 message: Not implemented error message
685 details: Not implemented error details
696 description: No Content
699 description: Internal Server Error
703 $ref: "#/components/schemas/ErrorMessage"
706 message: Internal Server Error
707 details: Internal Server Error occurred
709 description: Bad Gateway
713 $ref: "#/components/schemas/DmiErrorMessage"
715 message: "Bad Gateway Error Message NCMP"