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 ]
164 example: 'my-module-set-tag'
169 title: Module reference details
173 example: my-module-name
176 example: my-module-revision
178 RestModuleDefinition:
180 title: Module definitions
184 example: my-module-name
193 namespace 'org:onap:ccsdk:sample';
195 revision '2020-09-15' {
201 CmHandleQueryParameters:
203 title: Cm Handle query parameters for executing cm handle search
205 cmHandleQueryParameters:
208 $ref: '#/components/schemas/ConditionProperties'
213 $ref: '#/components/schemas/OldConditionProperties'
214 description: not necessary, it is just for backward compatibility
224 additionalProperties:
226 OldConditionProperties:
234 $ref: '#/components/schemas/ModuleNameAsJsonObject'
235 ModuleNameAsJsonObject:
243 title: CM handle Details
247 example: my-cm-handle1
248 publicCmHandleProperties:
249 $ref: '#/components/schemas/CmHandlePublicProperties'
251 $ref: '#/components/schemas/CmHandleCompositeState'
253 $ref: '#/components/schemas/CmHandleTrustLevel'
254 CmHandlePublicProperties:
258 additionalProperties:
261 CmHandleCompositeState:
268 $ref: '#/components/schemas/lock-reason'
271 example: 2022-12-31T20:30:40.000+0000
276 $ref: '#/components/schemas/dataStores'
279 description: Current trust level of the relevant CM handle ID.
287 example: LOCKED_MISBEHAVING
290 example: locked due to failure in module sync
296 $ref: '#/components/schemas/sync-state'
298 $ref: '#/components/schemas/sync-state'
305 example: NONE_REQUESTED
308 example: 2022-12-31T20:30:40.000+0000
310 RestOutputCmHandlePublicProperties:
313 publicCmHandleProperties:
314 $ref: '#/components/schemas/CmHandlePublicProperties'
316 RestOutputCmHandleCompositeState:
320 $ref: '#/components/schemas/CmHandleCompositeState'
321 # Data Operation Request Schemas
322 DataOperationRequest:
324 title: execute data operation for given array of operations
329 $ref: '#/components/schemas/DataOperationDefinition'
330 description: contains group of data operation requests
331 DataOperationDefinition:
345 example: 'ncmp-datastore:passthrough-operational'
348 example: '(fields=schemas/schema)'
351 example: 'parent/child'
356 example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
360 summary: Sample request
361 description: Sample request body
364 bookstore-name: Chapters
378 dataSamplePatchRequest:
379 summary: Sample patch request
380 description: Sample patch request body
382 ietf-restconf:yang-patch:
390 bookstore-name: Chapters
408 bookstore-name: Novels
423 summary: Sample response
424 description: Sample response for selecting 'sample 1'.
440 allCmHandleQueryParameters:
442 cmHandleQueryParameters:
443 - conditionName: hasAllModules
445 - { "moduleName": "my-module-1" }
446 - { "moduleName": "my-module-2" }
447 - { "moduleName": "my-module-3" }
448 - conditionName: hasAllProperties
450 - { "Color": "yellow" }
451 - { "Shape": "circle" }
452 - { "Size": "small" }
453 - conditionName: cmHandleWithCpsPath
455 - { "cpsPath": "//state[@cm-handle-state='ADVISED']" }
456 pubPropCmHandleQueryParameters:
458 cmHandleQueryParameters:
459 - conditionName: hasAllProperties
461 - { "Color": "yellow" }
462 - { "Shape": "circle" }
463 - { "Size": "small" }
464 modulesCmHandleQueryParameters:
466 cmHandleQueryParameters:
467 - conditionName: hasAllModules
469 - { "moduleName": "my-module-1" }
470 - { "moduleName": "my-module-2" }
471 - { "moduleName": "my-module-3" }
472 cpsPathCmHandleStateQueryParameters:
474 cmHandleQueryParameters:
475 - conditionName: cmHandleWithCpsPath
477 - { "cpsPath": "//state[@cm-handle-state='LOCKED']" }
478 cpsPathCmHandleDataSyncQueryParameters:
480 cmHandleQueryParameters:
481 - conditionName: cmHandleWithCpsPath
483 - { "cpsPath": "//state[@data-sync-enabled='true']" }
489 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
493 example: my-cm-handle
495 name: dataSyncEnabled
497 description: Is used to enable or disable the data synchronization flag
510 requiredXpathInQuery:
517 includeDescendantsOptionInQuery:
518 name: include-descendants
520 description: Determines if descendants are included in response
528 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
536 list attributes cps path:
537 value: //categories[@code=1]
538 dmiPluginIdentifierInQuery:
539 name: dmi-plugin-identifier
541 description: dmi-plugin-identifier
545 example: my-dmi-plugin
546 resourceIdentifierInQuery:
547 name: resourceIdentifier
549 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.
557 resourceIdentifier: \shops\bookstore
560 resourceIdentifier: \shops\bookstore\categories[@code=1]
563 resourceIdentifier: parent=shops,child=bookstore
567 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.
578 options: (fields=book)
581 options: (depth=2,fields=book/authors)
585 description: topic parameter in query.
594 requiredTopicParamInQuery:
597 description: mandatory topic parameter in query.
606 contentParamInHeader:
610 description: Content parameter for request, if content parameter is null, default value is application/json.
613 default: application/json
614 example: application/yang-data+json
618 description: The type of the requested data
622 example: ncmp-datastore:running
626 description: The specified resource was not found
630 $ref: '#/components/schemas/ErrorMessage'
633 message: Not found error message
634 details: Not found error details
636 description: Unauthorized
640 $ref: '#/components/schemas/ErrorMessage'
643 message: Unauthorized error message
644 details: Unauthorized error details
646 description: Forbidden
650 $ref: '#/components/schemas/ErrorMessage'
653 message: Forbidden error message
654 details: Forbidden error details
656 description: Bad Request
660 $ref: '#/components/schemas/ErrorMessage'
662 status: 400 BAD_REQUEST
663 message: Bad request error message
664 details: Bad request error details
666 description: Conflict
670 $ref: '#/components/schemas/ErrorMessage'
673 message: Conflict error message
674 details: Conflict error details
676 description: The given path has not been implemented
680 $ref: '#/components/schemas/ErrorMessage'
683 message: Not implemented error message
684 details: Not implemented error details
695 description: No Content
698 description: Internal Server Error
702 $ref: "#/components/schemas/ErrorMessage"
705 message: Internal Server Error
706 details: Internal Server Error occurred
708 description: Bad Gateway
712 $ref: "#/components/schemas/DmiErrorMessage"
714 message: "Bad Gateway Error Message NCMP"