1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2021-2024 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 dataProducerIdentifier:
148 example: "my-data-producer-identifier"
149 RestCmHandleProperties:
151 additionalProperties:
154 #Module upgrade schema
164 example: [ my-cm-handle1, my-cm-handle2, my-cm-handle3 ]
168 example: 'my-module-set-tag'
173 title: Module reference details
177 example: my-module-name
180 example: my-module-revision
182 RestModuleDefinition:
184 title: Module definitions
188 example: my-module-name
197 namespace 'org:onap:ccsdk:sample';
199 revision '2020-09-15' {
205 CmHandleQueryParameters:
207 title: Cm Handle query parameters for executing cm handle search
209 cmHandleQueryParameters:
212 $ref: '#/components/schemas/ConditionProperties'
217 $ref: '#/components/schemas/OldConditionProperties'
218 description: not necessary, it is just for backward compatibility
228 additionalProperties:
230 OldConditionProperties:
238 $ref: '#/components/schemas/ModuleNameAsJsonObject'
239 ModuleNameAsJsonObject:
247 title: CM handle Details
251 example: my-cm-handle1
252 publicCmHandleProperties:
253 $ref: '#/components/schemas/CmHandlePublicProperties'
255 $ref: '#/components/schemas/CmHandleCompositeState'
257 $ref: '#/components/schemas/CmHandleTrustLevel'
260 example: my-module-set-tag
263 example: my-alternate-id
264 dataProducerIdentifier:
266 example: my-data-producer-identifier
267 CmHandlePublicProperties:
271 additionalProperties:
274 CmHandleCompositeState:
281 $ref: '#/components/schemas/lock-reason'
284 example: 2022-12-31T20:30:40.000+0000
289 $ref: '#/components/schemas/dataStores'
292 description: Current trust level of the relevant CM handle ID.
300 example: LOCKED_MISBEHAVING
303 example: locked due to failure in module sync
309 $ref: '#/components/schemas/sync-state'
311 $ref: '#/components/schemas/sync-state'
318 example: NONE_REQUESTED
321 example: 2022-12-31T20:30:40.000+0000
323 RestOutputCmHandlePublicProperties:
326 publicCmHandleProperties:
327 $ref: '#/components/schemas/CmHandlePublicProperties'
329 RestOutputCmHandleCompositeState:
333 $ref: '#/components/schemas/CmHandleCompositeState'
334 # Data Operation Request Schemas
335 DataOperationRequest:
337 title: execute data operation for given array of operations
342 $ref: '#/components/schemas/DataOperationDefinition'
343 description: contains group of data operation requests
344 DataOperationDefinition:
358 example: 'ncmp-datastore:passthrough-operational'
361 example: '(fields=schemas/schema)'
364 example: 'parent/child'
369 description: targeted cm handles, maximum of 50 supported. If this limit is exceeded the request wil be refused.
370 example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
374 summary: Sample request
375 description: Sample request body
378 bookstore-name: Chapters
392 dataSamplePatchRequest:
393 summary: Sample patch request
394 description: Sample patch request body
396 ietf-restconf:yang-patch:
404 bookstore-name: Chapters
422 bookstore-name: Novels
437 summary: Sample response
438 description: Sample response for selecting 'sample 1'.
454 allCmHandleQueryParameters:
456 cmHandleQueryParameters:
457 - conditionName: hasAllModules
459 - { "moduleName": "my-module-1" }
460 - { "moduleName": "my-module-2" }
461 - { "moduleName": "my-module-3" }
462 - conditionName: hasAllProperties
464 - { "Color": "yellow" }
465 - { "Shape": "circle" }
466 - { "Size": "small" }
467 - conditionName: cmHandleWithCpsPath
469 - { "cpsPath": "//state[@cm-handle-state='ADVISED']" }
470 pubPropCmHandleQueryParameters:
472 cmHandleQueryParameters:
473 - conditionName: hasAllProperties
475 - { "Color": "yellow" }
476 - { "Shape": "circle" }
477 - { "Size": "small" }
478 modulesCmHandleQueryParameters:
480 cmHandleQueryParameters:
481 - conditionName: hasAllModules
483 - { "moduleName": "my-module-1" }
484 - { "moduleName": "my-module-2" }
485 - { "moduleName": "my-module-3" }
486 cpsPathCmHandleStateQueryParameters:
488 cmHandleQueryParameters:
489 - conditionName: cmHandleWithCpsPath
491 - { "cpsPath": "//state[@cm-handle-state='LOCKED']" }
492 cpsPathCmHandleDataSyncQueryParameters:
494 cmHandleQueryParameters:
495 - conditionName: cmHandleWithCpsPath
497 - { "cpsPath": "//state[@data-sync-enabled='true']" }
503 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
507 example: my-cm-handle
511 description: Filter for a module name.This is an optional parameter
519 description: Filter for a module revision.This is an optional parameter and ignored when no module name is supplied
525 name: dataSyncEnabled
527 description: Is used to enable or disable the data synchronization flag
540 requiredXpathInQuery:
547 includeDescendantsOptionInQuery:
548 name: include-descendants
550 description: Determines if descendants are included in response
558 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
566 list attributes cps path:
567 value: //categories[@code=1]
568 dmiPluginIdentifierInQuery:
569 name: dmi-plugin-identifier
571 description: dmi-plugin-identifier
575 example: my-dmi-plugin
576 resourceIdentifierInQuery:
577 name: resourceIdentifier
579 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.
587 resourceIdentifier: \shops\bookstore
590 resourceIdentifier: \shops\bookstore\categories[@code=1]
593 resourceIdentifier: parent=shops,child=bookstore
597 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.
608 options: (fields=book)
611 options: (depth=2,fields=book/authors)
615 description: topic parameter in query.
624 requiredTopicParamInQuery:
627 description: mandatory topic parameter in query.
636 contentParamInHeader:
640 description: Content parameter for request, if content parameter is null, default value is application/json.
643 default: application/json
644 example: application/yang-data+json
645 authorizationParamInHeader:
649 description: Authorization parameter for request.
655 description: The type of the requested data
659 example: ncmp-datastore:running
663 description: The specified resource was not found
667 $ref: '#/components/schemas/ErrorMessage'
670 message: Not found error message
671 details: Not found error details
673 description: Unauthorized
677 $ref: '#/components/schemas/ErrorMessage'
680 message: Unauthorized error message
681 details: Unauthorized error details
683 description: Forbidden
687 $ref: '#/components/schemas/ErrorMessage'
690 message: Forbidden error message
691 details: Forbidden error details
693 description: Bad Request
697 $ref: '#/components/schemas/ErrorMessage'
700 message: Bad request error message
701 details: Bad request error details
703 description: Conflict
707 $ref: '#/components/schemas/ErrorMessage'
710 message: Conflict error message
711 details: Conflict error details
713 description: The request is larger than the server is willing or able to process
717 $ref: '#/components/schemas/ErrorMessage'
720 message: Payload Too Large error message
721 details: Payload Too Large error details
723 description: The given path has not been implemented
727 $ref: '#/components/schemas/ErrorMessage'
730 message: Not implemented error message
731 details: Not implemented error details
742 description: No Content
745 description: Internal Server Error
749 $ref: "#/components/schemas/ErrorMessage"
752 message: Internal Server Error
753 details: Internal Server Error occurred
755 description: Bad Gateway
759 $ref: "#/components/schemas/DmiErrorMessage"
761 message: "Bad Gateway Error Message NCMP"