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]
143 RestCmHandleProperties:
145 additionalProperties:
148 #Module upgrade schema
158 example: [ my-cm-handle1, my-cm-handle2, my-cm-handle3 ]
162 example: 'my-module-set-tag'
167 title: Module reference details
171 example: my-module-name
174 example: my-module-revision
176 RestModuleDefinition:
178 title: Module definitions
182 example: my-module-name
191 namespace 'org:onap:ccsdk:sample';
193 revision '2020-09-15' {
199 CmHandleQueryParameters:
201 title: Cm Handle query parameters for executing cm handle search
203 cmHandleQueryParameters:
206 $ref: '#/components/schemas/ConditionProperties'
211 $ref: '#/components/schemas/OldConditionProperties'
212 description: not necessary, it is just for backward compatibility
222 additionalProperties:
224 OldConditionProperties:
232 $ref: '#/components/schemas/ModuleNameAsJsonObject'
233 ModuleNameAsJsonObject:
241 title: CM handle Details
245 example: my-cm-handle1
246 publicCmHandleProperties:
247 $ref: '#/components/schemas/CmHandlePublicProperties'
249 $ref: '#/components/schemas/CmHandleCompositeState'
251 $ref: '#/components/schemas/CmHandleTrustLevel'
252 CmHandlePublicProperties:
256 additionalProperties:
259 CmHandleCompositeState:
266 $ref: '#/components/schemas/lock-reason'
269 example: 2022-12-31T20:30:40.000+0000
274 $ref: '#/components/schemas/dataStores'
277 description: Current trust level of the relevant CM handle ID.
285 example: LOCKED_MISBEHAVING
288 example: locked due to failure in module sync
294 $ref: '#/components/schemas/sync-state'
296 $ref: '#/components/schemas/sync-state'
303 example: NONE_REQUESTED
306 example: 2022-12-31T20:30:40.000+0000
308 RestOutputCmHandlePublicProperties:
311 publicCmHandleProperties:
312 $ref: '#/components/schemas/CmHandlePublicProperties'
314 RestOutputCmHandleCompositeState:
318 $ref: '#/components/schemas/CmHandleCompositeState'
319 # Data Operation Request Schemas
320 DataOperationRequest:
322 title: execute data operation for given array of operations
327 $ref: '#/components/schemas/DataOperationDefinition'
328 description: contains group of data operation requests
329 DataOperationDefinition:
343 example: 'ncmp-datastore:passthrough-operational'
346 example: '(fields=schemas/schema)'
349 example: 'parent/child'
354 example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
358 summary: Sample request
359 description: Sample request body
362 bookstore-name: Chapters
376 dataSamplePatchRequest:
377 summary: Sample patch request
378 description: Sample patch request body
380 ietf-restconf:yang-patch:
388 bookstore-name: Chapters
406 bookstore-name: Novels
421 summary: Sample response
422 description: Sample response for selecting 'sample 1'.
438 allCmHandleQueryParameters:
440 cmHandleQueryParameters:
441 - conditionName: hasAllModules
443 - { "moduleName": "my-module-1" }
444 - { "moduleName": "my-module-2" }
445 - { "moduleName": "my-module-3" }
446 - conditionName: hasAllProperties
448 - { "Color": "yellow" }
449 - { "Shape": "circle" }
450 - { "Size": "small" }
451 - conditionName: cmHandleWithCpsPath
453 - { "cpsPath": "//state[@cm-handle-state='ADVISED']" }
454 pubPropCmHandleQueryParameters:
456 cmHandleQueryParameters:
457 - conditionName: hasAllProperties
459 - { "Color": "yellow" }
460 - { "Shape": "circle" }
461 - { "Size": "small" }
462 modulesCmHandleQueryParameters:
464 cmHandleQueryParameters:
465 - conditionName: hasAllModules
467 - { "moduleName": "my-module-1" }
468 - { "moduleName": "my-module-2" }
469 - { "moduleName": "my-module-3" }
470 cpsPathCmHandleStateQueryParameters:
472 cmHandleQueryParameters:
473 - conditionName: cmHandleWithCpsPath
475 - { "cpsPath": "//state[@cm-handle-state='LOCKED']" }
476 cpsPathCmHandleDataSyncQueryParameters:
478 cmHandleQueryParameters:
479 - conditionName: cmHandleWithCpsPath
481 - { "cpsPath": "//state[@data-sync-enabled='true']" }
487 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
491 example: my-cm-handle
493 name: dataSyncEnabled
495 description: Is used to enable or disable the data synchronization flag
508 requiredXpathInQuery:
515 includeDescendantsOptionInQuery:
516 name: include-descendants
518 description: Determines if descendants are included in response
526 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
534 list attributes cps path:
535 value: //categories[@code=1]
536 dmiPluginIdentifierInQuery:
537 name: dmi-plugin-identifier
539 description: dmi-plugin-identifier
543 example: my-dmi-plugin
544 resourceIdentifierInQuery:
545 name: resourceIdentifier
547 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.
555 resourceIdentifier: \shops\bookstore
558 resourceIdentifier: \shops\bookstore\categories[@code=1]
561 resourceIdentifier: parent=shops,child=bookstore
565 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.
576 options: (fields=book)
579 options: (depth=2,fields=book/authors)
583 description: topic parameter in query.
592 requiredTopicParamInQuery:
595 description: mandatory topic parameter in query.
604 contentParamInHeader:
608 description: Content parameter for request, if content parameter is null, default value is application/json.
611 default: application/json
612 example: application/yang-data+json
616 description: The type of the requested data
620 example: ncmp-datastore:running
624 description: The specified resource was not found
628 $ref: '#/components/schemas/ErrorMessage'
631 message: Not found error message
632 details: Not found error details
634 description: Unauthorized
638 $ref: '#/components/schemas/ErrorMessage'
641 message: Unauthorized error message
642 details: Unauthorized error details
644 description: Forbidden
648 $ref: '#/components/schemas/ErrorMessage'
651 message: Forbidden error message
652 details: Forbidden error details
654 description: Bad Request
658 $ref: '#/components/schemas/ErrorMessage'
660 status: 400 BAD_REQUEST
661 message: Bad request error message
662 details: Bad request error details
664 description: Conflict
668 $ref: '#/components/schemas/ErrorMessage'
671 message: Conflict error message
672 details: Conflict error details
674 description: The given path has not been implemented
678 $ref: '#/components/schemas/ErrorMessage'
681 message: Not implemented error message
682 details: Not implemented error details
693 description: No Content
696 description: Internal Server Error
700 $ref: "#/components/schemas/ErrorMessage"
703 message: Internal Server Error
704 details: Internal Server Error occurred
706 description: Bad Gateway
710 $ref: "#/components/schemas/DmiErrorMessage"
712 message: "Bad Gateway Error Message NCMP"