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'
258 CmHandlePublicProperties:
262 additionalProperties:
265 CmHandleCompositeState:
272 $ref: '#/components/schemas/lock-reason'
275 example: 2022-12-31T20:30:40.000+0000
280 $ref: '#/components/schemas/dataStores'
283 description: Current trust level of the relevant CM handle ID.
291 example: LOCKED_MISBEHAVING
294 example: locked due to failure in module sync
300 $ref: '#/components/schemas/sync-state'
302 $ref: '#/components/schemas/sync-state'
309 example: NONE_REQUESTED
312 example: 2022-12-31T20:30:40.000+0000
314 RestOutputCmHandlePublicProperties:
317 publicCmHandleProperties:
318 $ref: '#/components/schemas/CmHandlePublicProperties'
320 RestOutputCmHandleCompositeState:
324 $ref: '#/components/schemas/CmHandleCompositeState'
325 # Data Operation Request Schemas
326 DataOperationRequest:
328 title: execute data operation for given array of operations
333 $ref: '#/components/schemas/DataOperationDefinition'
334 description: contains group of data operation requests
335 DataOperationDefinition:
349 example: 'ncmp-datastore:passthrough-operational'
352 example: '(fields=schemas/schema)'
355 example: 'parent/child'
360 example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
364 summary: Sample request
365 description: Sample request body
368 bookstore-name: Chapters
382 dataSamplePatchRequest:
383 summary: Sample patch request
384 description: Sample patch request body
386 ietf-restconf:yang-patch:
394 bookstore-name: Chapters
412 bookstore-name: Novels
427 summary: Sample response
428 description: Sample response for selecting 'sample 1'.
444 allCmHandleQueryParameters:
446 cmHandleQueryParameters:
447 - conditionName: hasAllModules
449 - { "moduleName": "my-module-1" }
450 - { "moduleName": "my-module-2" }
451 - { "moduleName": "my-module-3" }
452 - conditionName: hasAllProperties
454 - { "Color": "yellow" }
455 - { "Shape": "circle" }
456 - { "Size": "small" }
457 - conditionName: cmHandleWithCpsPath
459 - { "cpsPath": "//state[@cm-handle-state='ADVISED']" }
460 pubPropCmHandleQueryParameters:
462 cmHandleQueryParameters:
463 - conditionName: hasAllProperties
465 - { "Color": "yellow" }
466 - { "Shape": "circle" }
467 - { "Size": "small" }
468 modulesCmHandleQueryParameters:
470 cmHandleQueryParameters:
471 - conditionName: hasAllModules
473 - { "moduleName": "my-module-1" }
474 - { "moduleName": "my-module-2" }
475 - { "moduleName": "my-module-3" }
476 cpsPathCmHandleStateQueryParameters:
478 cmHandleQueryParameters:
479 - conditionName: cmHandleWithCpsPath
481 - { "cpsPath": "//state[@cm-handle-state='LOCKED']" }
482 cpsPathCmHandleDataSyncQueryParameters:
484 cmHandleQueryParameters:
485 - conditionName: cmHandleWithCpsPath
487 - { "cpsPath": "//state[@data-sync-enabled='true']" }
493 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
497 example: my-cm-handle
501 description: Filter for a module name.This is an optional parameter
509 description: Filter for a module revision.This is an optional parameter and ignored when no module name is supplied
515 name: dataSyncEnabled
517 description: Is used to enable or disable the data synchronization flag
530 requiredXpathInQuery:
537 includeDescendantsOptionInQuery:
538 name: include-descendants
540 description: Determines if descendants are included in response
548 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
556 list attributes cps path:
557 value: //categories[@code=1]
558 dmiPluginIdentifierInQuery:
559 name: dmi-plugin-identifier
561 description: dmi-plugin-identifier
565 example: my-dmi-plugin
566 resourceIdentifierInQuery:
567 name: resourceIdentifier
569 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.
577 resourceIdentifier: \shops\bookstore
580 resourceIdentifier: \shops\bookstore\categories[@code=1]
583 resourceIdentifier: parent=shops,child=bookstore
587 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.
598 options: (fields=book)
601 options: (depth=2,fields=book/authors)
605 description: topic parameter in query.
614 requiredTopicParamInQuery:
617 description: mandatory topic parameter in query.
626 contentParamInHeader:
630 description: Content parameter for request, if content parameter is null, default value is application/json.
633 default: application/json
634 example: application/yang-data+json
635 authorizationParamInHeader:
639 description: Authorization parameter for request.
645 description: The type of the requested data
649 example: ncmp-datastore:running
653 description: The specified resource was not found
657 $ref: '#/components/schemas/ErrorMessage'
660 message: Not found error message
661 details: Not found error details
663 description: Unauthorized
667 $ref: '#/components/schemas/ErrorMessage'
670 message: Unauthorized error message
671 details: Unauthorized error details
673 description: Forbidden
677 $ref: '#/components/schemas/ErrorMessage'
680 message: Forbidden error message
681 details: Forbidden error details
683 description: Bad Request
687 $ref: '#/components/schemas/ErrorMessage'
689 status: 400 BAD_REQUEST
690 message: Bad request error message
691 details: Bad request error details
693 description: Conflict
697 $ref: '#/components/schemas/ErrorMessage'
700 message: Conflict error message
701 details: Conflict error details
703 description: The given path has not been implemented
707 $ref: '#/components/schemas/ErrorMessage'
710 message: Not implemented error message
711 details: Not implemented error details
722 description: No Content
725 description: Internal Server Error
729 $ref: "#/components/schemas/ErrorMessage"
732 message: Internal Server Error
733 details: Internal Server Error occurred
735 description: Bad Gateway
739 $ref: "#/components/schemas/DmiErrorMessage"
741 message: "Bad Gateway Error Message NCMP"