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'
130 RestCmHandleProperties:
132 additionalProperties:
139 title: Module reference details
143 example: my-module-name
146 example: my-module-revision
148 RestModuleDefinition:
150 title: Module definitions
154 example: my-module-name
163 namespace 'org:onap:ccsdk:sample';
165 revision '2020-09-15' {
171 CmHandleQueryParameters:
173 title: Cm Handle query parameters for executing cm handle search
175 cmHandleQueryParameters:
178 $ref: '#/components/schemas/ConditionProperties'
183 $ref: '#/components/schemas/OldConditionProperties'
184 description: not necessary, it is just for backward compatibility
194 additionalProperties:
196 OldConditionProperties:
204 $ref: '#/components/schemas/ModuleNameAsJsonObject'
205 ModuleNameAsJsonObject:
213 title: CM handle Details
217 example: my-cm-handle1
218 publicCmHandleProperties:
219 $ref: '#/components/schemas/CmHandlePublicProperties'
221 $ref: '#/components/schemas/CmHandleCompositeState'
222 CmHandlePublicProperties:
226 additionalProperties:
229 CmHandleCompositeState:
236 $ref: '#/components/schemas/lock-reason'
239 example: 2022-12-31T20:30:40.000+0000
244 $ref: '#/components/schemas/dataStores'
251 example: LOCKED_MISBEHAVING
254 example: locked due to failure in module sync
260 $ref: '#/components/schemas/sync-state'
262 $ref: '#/components/schemas/sync-state'
269 example: NONE_REQUESTED
272 example: 2022-12-31T20:30:40.000+0000
274 RestOutputCmHandlePublicProperties:
277 publicCmHandleProperties:
278 $ref: '#/components/schemas/CmHandlePublicProperties'
280 RestOutputCmHandleCompositeState:
284 $ref: '#/components/schemas/CmHandleCompositeState'
285 # Data Operation Request Schemas
286 DataOperationRequest:
288 title: execute data operation for given array of operations
293 $ref: '#/components/schemas/DataOperationDefinition'
294 description: contains group of data operation requests
295 DataOperationDefinition:
309 example: 'ncmp-datastore:passthrough-operational'
312 example: '(fields=schemas/schema)'
315 example: 'parent/child'
320 example: [ "da310eecdb8d44c2acc0ddaae01174b1","c748c58f8e0b438f9fd1f28370b17d47" ]
324 summary: Sample request
325 description: Sample request body
328 bookstore-name: Chapters
342 dataSamplePatchRequest:
343 summary: Sample patch request
344 description: Sample patch request body
346 ietf-restconf:yang-patch:
354 bookstore-name: Chapters
372 bookstore-name: Novels
387 summary: Sample response
388 description: Sample response for selecting 'sample 1'.
404 allCmHandleQueryParameters:
406 cmHandleQueryParameters:
407 - conditionName: hasAllModules
409 - { "moduleName": "my-module-1" }
410 - { "moduleName": "my-module-2" }
411 - { "moduleName": "my-module-3" }
412 - conditionName: hasAllProperties
414 - { "Color": "yellow" }
415 - { "Shape": "circle" }
416 - { "Size": "small" }
417 - conditionName: cmHandleWithCpsPath
419 - { "cpsPath": "//state[@cm-handle-state='ADVISED']" }
420 pubPropCmHandleQueryParameters:
422 cmHandleQueryParameters:
423 - conditionName: hasAllProperties
425 - { "Color": "yellow" }
426 - { "Shape": "circle" }
427 - { "Size": "small" }
428 modulesCmHandleQueryParameters:
430 cmHandleQueryParameters:
431 - conditionName: hasAllModules
433 - { "moduleName": "my-module-1" }
434 - { "moduleName": "my-module-2" }
435 - { "moduleName": "my-module-3" }
436 cpsPathCmHandleStateQueryParameters:
438 cmHandleQueryParameters:
439 - conditionName: cmHandleWithCpsPath
441 - { "cpsPath": "//state[@cm-handle-state='LOCKED']" }
442 cpsPathCmHandleDataSyncQueryParameters:
444 cmHandleQueryParameters:
445 - conditionName: cmHandleWithCpsPath
447 - { "cpsPath": "//state[@data-sync-enabled='true']" }
453 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
457 example: my-cm-handle
459 name: dataSyncEnabled
461 description: Is used to enable or disable the data synchronization flag
474 requiredXpathInQuery:
481 includeDescendantsOptionInQuery:
482 name: include-descendants
484 description: Determines if descendants are included in response
492 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
500 list attributes cps path:
501 value: //categories[@code=1]
502 dmiPluginIdentifierInQuery:
503 name: dmi-plugin-identifier
505 description: dmi-plugin-identifier
509 example: my-dmi-plugin
510 resourceIdentifierInQuery:
511 name: resourceIdentifier
513 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.
521 resourceIdentifier: \shops\bookstore
524 resourceIdentifier: \shops\bookstore\categories[@code=1]
527 resourceIdentifier: parent=shops,child=bookstore
531 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.
542 options: (fields=book)
545 options: (depth=2,fields=book/authors)
549 description: topic parameter in query.
558 requiredTopicParamInQuery:
561 description: mandatory topic parameter in query.
570 contentParamInHeader:
574 description: Content parameter for request, if content parameter is null, default value is application/json.
577 default: application/json
578 example: application/yang-data+json
582 description: The type of the requested data
586 example: ncmp-datastore:running
590 description: The specified resource was not found
594 $ref: '#/components/schemas/ErrorMessage'
597 message: Not found error message
598 details: Not found error details
600 description: Unauthorized
604 $ref: '#/components/schemas/ErrorMessage'
607 message: Unauthorized error message
608 details: Unauthorized error details
610 description: Forbidden
614 $ref: '#/components/schemas/ErrorMessage'
617 message: Forbidden error message
618 details: Forbidden error details
620 description: Bad Request
624 $ref: '#/components/schemas/ErrorMessage'
626 status: 400 BAD_REQUEST
627 message: Bad request error message
628 details: Bad request error details
630 description: Conflict
634 $ref: '#/components/schemas/ErrorMessage'
637 message: Conflict error message
638 details: Conflict error details
640 description: The given path has not been implemented
644 $ref: '#/components/schemas/ErrorMessage'
647 message: Not implemented error message
648 details: Not implemented error details
659 description: No Content
662 description: Internal Server Error
666 $ref: "#/components/schemas/ErrorMessage"
669 message: Internal Server Error
670 details: Internal Server Error occurred
672 description: Bad Gateway
676 $ref: "#/components/schemas/DmiErrorMessage"
678 message: "Bad Gateway Error Message NCMP"