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 example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
373 summary: Sample request
374 description: Sample request body
377 bookstore-name: Chapters
391 dataSamplePatchRequest:
392 summary: Sample patch request
393 description: Sample patch request body
395 ietf-restconf:yang-patch:
403 bookstore-name: Chapters
421 bookstore-name: Novels
436 summary: Sample response
437 description: Sample response for selecting 'sample 1'.
453 allCmHandleQueryParameters:
455 cmHandleQueryParameters:
456 - conditionName: hasAllModules
458 - { "moduleName": "my-module-1" }
459 - { "moduleName": "my-module-2" }
460 - { "moduleName": "my-module-3" }
461 - conditionName: hasAllProperties
463 - { "Color": "yellow" }
464 - { "Shape": "circle" }
465 - { "Size": "small" }
466 - conditionName: cmHandleWithCpsPath
468 - { "cpsPath": "//state[@cm-handle-state='ADVISED']" }
469 pubPropCmHandleQueryParameters:
471 cmHandleQueryParameters:
472 - conditionName: hasAllProperties
474 - { "Color": "yellow" }
475 - { "Shape": "circle" }
476 - { "Size": "small" }
477 modulesCmHandleQueryParameters:
479 cmHandleQueryParameters:
480 - conditionName: hasAllModules
482 - { "moduleName": "my-module-1" }
483 - { "moduleName": "my-module-2" }
484 - { "moduleName": "my-module-3" }
485 cpsPathCmHandleStateQueryParameters:
487 cmHandleQueryParameters:
488 - conditionName: cmHandleWithCpsPath
490 - { "cpsPath": "//state[@cm-handle-state='LOCKED']" }
491 cpsPathCmHandleDataSyncQueryParameters:
493 cmHandleQueryParameters:
494 - conditionName: cmHandleWithCpsPath
496 - { "cpsPath": "//state[@data-sync-enabled='true']" }
502 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
506 example: my-cm-handle
510 description: Filter for a module name.This is an optional parameter
518 description: Filter for a module revision.This is an optional parameter and ignored when no module name is supplied
524 name: dataSyncEnabled
526 description: Is used to enable or disable the data synchronization flag
539 requiredXpathInQuery:
546 includeDescendantsOptionInQuery:
547 name: include-descendants
549 description: Determines if descendants are included in response
557 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
565 list attributes cps path:
566 value: //categories[@code=1]
567 dmiPluginIdentifierInQuery:
568 name: dmi-plugin-identifier
570 description: dmi-plugin-identifier
574 example: my-dmi-plugin
575 resourceIdentifierInQuery:
576 name: resourceIdentifier
578 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.
586 resourceIdentifier: \shops\bookstore
589 resourceIdentifier: \shops\bookstore\categories[@code=1]
592 resourceIdentifier: parent=shops,child=bookstore
596 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.
607 options: (fields=book)
610 options: (depth=2,fields=book/authors)
614 description: topic parameter in query.
623 requiredTopicParamInQuery:
626 description: mandatory topic parameter in query.
635 contentParamInHeader:
639 description: Content parameter for request, if content parameter is null, default value is application/json.
642 default: application/json
643 example: application/yang-data+json
644 authorizationParamInHeader:
648 description: Authorization parameter for request.
654 description: The type of the requested data
658 example: ncmp-datastore:running
662 description: The specified resource was not found
666 $ref: '#/components/schemas/ErrorMessage'
669 message: Not found error message
670 details: Not found error details
672 description: Unauthorized
676 $ref: '#/components/schemas/ErrorMessage'
679 message: Unauthorized error message
680 details: Unauthorized error details
682 description: Forbidden
686 $ref: '#/components/schemas/ErrorMessage'
689 message: Forbidden error message
690 details: Forbidden error details
692 description: Bad Request
696 $ref: '#/components/schemas/ErrorMessage'
698 status: 400 BAD_REQUEST
699 message: Bad request error message
700 details: Bad request error details
702 description: Conflict
706 $ref: '#/components/schemas/ErrorMessage'
709 message: Conflict error message
710 details: Conflict error details
712 description: The given path has not been implemented
716 $ref: '#/components/schemas/ErrorMessage'
719 message: Not implemented error message
720 details: Not implemented error details
731 description: No Content
734 description: Internal Server Error
738 $ref: "#/components/schemas/ErrorMessage"
741 message: Internal Server Error
742 details: Internal Server Error occurred
744 description: Bad Gateway
748 $ref: "#/components/schemas/DmiErrorMessage"
750 message: "Bad Gateway Error Message NCMP"