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 ]
90 DmiPluginRegistrationErrorResponse:
93 failedCreatedCmHandles:
96 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
97 failedUpdatedCmHandles:
100 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
101 failedRemovedCmHandles:
104 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
105 CmHandlerRegistrationErrorResponse:
110 example: my-cm-handle
116 example: 'Unknown error. <error-details>'
125 example: my-cm-handle
127 $ref: '#/components/schemas/RestCmHandleProperties'
128 publicCmHandleProperties:
129 $ref: '#/components/schemas/RestCmHandleProperties'
130 RestCmHandleProperties:
132 additionalProperties:
139 title: Module reference details
143 example: my-module-name
146 example: my-module-revision
148 RestModuleDefinition:
150 title: Module definitions
154 example: my-module-name
163 namespace "org:onap:ccsdk:sample";
165 revision "2020-09-15" {
171 CmHandleQueryParameters:
173 title: Cm Handle query parameters for executing cm handle search
175 cmHandleQueryParameters:
179 $ref: '#/components/schemas/ConditionProperties'
185 $ref: '#/components/schemas/OldConditionProperties'
186 description: not necessary, it is just for backward compatibility
196 additionalProperties:
198 OldConditionProperties:
207 $ref: '#/components/schemas/ModuleNameAsJsonObject'
208 ModuleNameAsJsonObject:
216 title: CM handle Details
220 example: my-cm-handle1
221 publicCmHandleProperties:
222 $ref: '#/components/schemas/CmHandlePublicProperties'
224 $ref: '#/components/schemas/CmHandleCompositeState'
225 CmHandlePublicProperties:
229 additionalProperties:
232 CmHandleCompositeState:
239 $ref: '#/components/schemas/lock-reason'
242 example: 2022-12-31T20:30:40.000+0000
247 $ref: '#/components/schemas/dataStores'
254 example: LOCKED_MISBEHAVING
257 example: locked due to failure in module sync
263 $ref: '#/components/schemas/sync-state'
265 $ref: '#/components/schemas/sync-state'
272 example: NONE_REQUESTED
275 example: 2022-12-31T20:30:40.000+0000
277 RestOutputCmHandlePublicProperties:
280 publicCmHandleProperties:
281 $ref: '#/components/schemas/CmHandlePublicProperties'
283 RestOutputCmHandleCompositeState:
287 $ref: '#/components/schemas/CmHandleCompositeState'
288 # Batch Request Schemas
289 ResourceDataBatchRequest:
291 title: get resource data for given array of operations
297 $ref: '#/components/schemas/BatchOperationDefinition'
298 description: contains batch request details
299 BatchOperationDefinition:
313 example: 'ncmp-datastore:passthrough-operational'
316 example: '(fields=schemas/schema)'
319 example: 'parent/child'
324 example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
328 summary: Sample request
329 description: Sample request body
332 bookstore-name: Chapters
346 dataSamplePatchRequest:
347 summary: Sample patch request
348 description: Sample patch request body
350 ietf-restconf:yang-patch:
358 bookstore-name: Chapters
376 bookstore-name: Novels
391 summary: Sample response
392 description: Sample response for selecting 'sample 1'.
408 allCmHandleQueryParameters:
410 cmHandleQueryParameters:
411 - conditionName: hasAllModules
413 - { "moduleName": "my-module-1" }
414 - { "moduleName": "my-module-2" }
415 - { "moduleName": "my-module-3" }
416 - conditionName: hasAllProperties
418 - { "Color": "yellow" }
419 - { "Shape": "circle" }
420 - { "Size": "small" }
421 - conditionName: cmHandleWithCpsPath
423 - { "cpsPath": "//state[@cm-handle-state='ADVISED']" }
424 pubPropCmHandleQueryParameters:
426 cmHandleQueryParameters:
427 - conditionName: hasAllProperties
429 - { "Color": "yellow" }
430 - { "Shape": "circle" }
431 - { "Size": "small" }
432 modulesCmHandleQueryParameters:
434 cmHandleQueryParameters:
435 - conditionName: hasAllModules
437 - { "moduleName": "my-module-1" }
438 - { "moduleName": "my-module-2" }
439 - { "moduleName": "my-module-3" }
440 cpsPathCmHandleStateQueryParameters:
442 cmHandleQueryParameters:
443 - conditionName: cmHandleWithCpsPath
445 - { "cpsPath": "//state[@cm-handle-state='LOCKED']" }
446 cpsPathCmHandleDataSyncQueryParameters:
448 cmHandleQueryParameters:
449 - conditionName: cmHandleWithCpsPath
451 - { "cpsPath": "//state[@data-sync-enabled='true']" }
457 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
461 example: my-cm-handle
463 name: dataSyncEnabled
465 description: Is used to enable or disable the data synchronization flag
478 requiredXpathInQuery:
485 includeDescendantsOptionInQuery:
486 name: include-descendants
488 description: Determines if descendants are included in response
496 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
504 list attributes cps path:
505 value: //categories[@code=1]
506 dmiPluginIdentifierInQuery:
507 name: dmi-plugin-identifier
509 description: dmi-plugin-identifier
513 example: my-dmi-plugin
514 resourceIdentifierInQuery:
515 name: resourceIdentifier
517 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.
525 resourceIdentifier: \shops\bookstore
528 resourceIdentifier: \shops\bookstore\categories[@code=1]
531 resourceIdentifier: parent=shops,child=bookstore
535 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.
546 options: (fields=book)
549 options: (depth=2,fields=book/authors)
553 description: topic parameter in query.
562 requiredTopicParamInQuery:
565 description: mandatory topic parameter in query.
574 contentParamInHeader:
578 description: Content parameter for request, if content parameter is null, default value is application/json.
581 default: application/json
582 example: application/yang-data+json
586 description: The type of the requested data
590 example: ncmp-datastore:running
594 description: The specified resource was not found
598 $ref: '#/components/schemas/ErrorMessage'
601 message: Not found error message
602 details: Not found error details
604 description: Unauthorized
608 $ref: '#/components/schemas/ErrorMessage'
611 message: Unauthorized error message
612 details: Unauthorized error details
614 description: Forbidden
618 $ref: '#/components/schemas/ErrorMessage'
621 message: Forbidden error message
622 details: Forbidden error details
624 description: Bad Request
628 $ref: '#/components/schemas/ErrorMessage'
630 status: 400 BAD_REQUEST
631 message: Bad request error message
632 details: Bad request error details
634 description: Conflict
638 $ref: '#/components/schemas/ErrorMessage'
641 message: Conflict error message
642 details: Conflict error details
644 description: The given path has not been implemented
648 $ref: '#/components/schemas/ErrorMessage'
651 message: Not implemented error message
652 details: Not implemented error details
663 description: No Content
666 description: Internal Server Error
670 $ref: "#/components/schemas/ErrorMessage"
673 message: Internal Server Error
674 details: Internal Server Error occurred
676 description: Bad Gateway
680 $ref: "#/components/schemas/DmiErrorMessage"
682 message: "Bad Gateway Error Message NCMP"