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'
132 example: "my-module-set-tag"
133 RestCmHandleProperties:
135 additionalProperties:
142 title: Module reference details
146 example: my-module-name
149 example: my-module-revision
151 RestModuleDefinition:
153 title: Module definitions
157 example: my-module-name
166 namespace 'org:onap:ccsdk:sample';
168 revision '2020-09-15' {
174 CmHandleQueryParameters:
176 title: Cm Handle query parameters for executing cm handle search
178 cmHandleQueryParameters:
181 $ref: '#/components/schemas/ConditionProperties'
186 $ref: '#/components/schemas/OldConditionProperties'
187 description: not necessary, it is just for backward compatibility
197 additionalProperties:
199 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 # Data Operation Request Schemas
289 DataOperationRequest:
291 title: execute data operation for given array of operations
296 $ref: '#/components/schemas/DataOperationDefinition'
297 description: contains group of data operation requests
298 DataOperationDefinition:
312 example: 'ncmp-datastore:passthrough-operational'
315 example: '(fields=schemas/schema)'
318 example: 'parent/child'
323 example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
327 summary: Sample request
328 description: Sample request body
331 bookstore-name: Chapters
345 dataSamplePatchRequest:
346 summary: Sample patch request
347 description: Sample patch request body
349 ietf-restconf:yang-patch:
357 bookstore-name: Chapters
375 bookstore-name: Novels
390 summary: Sample response
391 description: Sample response for selecting 'sample 1'.
407 allCmHandleQueryParameters:
409 cmHandleQueryParameters:
410 - conditionName: hasAllModules
412 - { "moduleName": "my-module-1" }
413 - { "moduleName": "my-module-2" }
414 - { "moduleName": "my-module-3" }
415 - conditionName: hasAllProperties
417 - { "Color": "yellow" }
418 - { "Shape": "circle" }
419 - { "Size": "small" }
420 - conditionName: cmHandleWithCpsPath
422 - { "cpsPath": "//state[@cm-handle-state='ADVISED']" }
423 pubPropCmHandleQueryParameters:
425 cmHandleQueryParameters:
426 - conditionName: hasAllProperties
428 - { "Color": "yellow" }
429 - { "Shape": "circle" }
430 - { "Size": "small" }
431 modulesCmHandleQueryParameters:
433 cmHandleQueryParameters:
434 - conditionName: hasAllModules
436 - { "moduleName": "my-module-1" }
437 - { "moduleName": "my-module-2" }
438 - { "moduleName": "my-module-3" }
439 cpsPathCmHandleStateQueryParameters:
441 cmHandleQueryParameters:
442 - conditionName: cmHandleWithCpsPath
444 - { "cpsPath": "//state[@cm-handle-state='LOCKED']" }
445 cpsPathCmHandleDataSyncQueryParameters:
447 cmHandleQueryParameters:
448 - conditionName: cmHandleWithCpsPath
450 - { "cpsPath": "//state[@data-sync-enabled='true']" }
456 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
460 example: my-cm-handle
462 name: dataSyncEnabled
464 description: Is used to enable or disable the data synchronization flag
477 requiredXpathInQuery:
484 includeDescendantsOptionInQuery:
485 name: include-descendants
487 description: Determines if descendants are included in response
495 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
503 list attributes cps path:
504 value: //categories[@code=1]
505 dmiPluginIdentifierInQuery:
506 name: dmi-plugin-identifier
508 description: dmi-plugin-identifier
512 example: my-dmi-plugin
513 resourceIdentifierInQuery:
514 name: resourceIdentifier
516 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.
524 resourceIdentifier: \shops\bookstore
527 resourceIdentifier: \shops\bookstore\categories[@code=1]
530 resourceIdentifier: parent=shops,child=bookstore
534 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.
545 options: (fields=book)
548 options: (depth=2,fields=book/authors)
552 description: topic parameter in query.
561 requiredTopicParamInQuery:
564 description: mandatory topic parameter in query.
573 contentParamInHeader:
577 description: Content parameter for request, if content parameter is null, default value is application/json.
580 default: application/json
581 example: application/yang-data+json
585 description: The type of the requested data
589 example: ncmp-datastore:running
593 description: The specified resource was not found
597 $ref: '#/components/schemas/ErrorMessage'
600 message: Not found error message
601 details: Not found error details
603 description: Unauthorized
607 $ref: '#/components/schemas/ErrorMessage'
610 message: Unauthorized error message
611 details: Unauthorized error details
613 description: Forbidden
617 $ref: '#/components/schemas/ErrorMessage'
620 message: Forbidden error message
621 details: Forbidden error details
623 description: Bad Request
627 $ref: '#/components/schemas/ErrorMessage'
629 status: 400 BAD_REQUEST
630 message: Bad request error message
631 details: Bad request error details
633 description: Conflict
637 $ref: '#/components/schemas/ErrorMessage'
640 message: Conflict error message
641 details: Conflict error details
643 description: The given path has not been implemented
647 $ref: '#/components/schemas/ErrorMessage'
650 message: Not implemented error message
651 details: Not implemented error details
662 description: No Content
665 description: Internal Server Error
669 $ref: "#/components/schemas/ErrorMessage"
672 message: Internal Server Error
673 details: Internal Server Error occurred
675 description: Bad Gateway
679 $ref: "#/components/schemas/DmiErrorMessage"
681 message: "Bad Gateway Error Message NCMP"