1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2021-2022 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:
179 $ref: '#/components/schemas/ConditionProperties'
185 $ref: '#/components/schemas/OldConditionProperties'
186 description: not necessary, it is just for backward compatibility
196 additionalProperties:
198 OldConditionProperties:
207 $ref: '#/components/schemas/ModuleNameAsJsonObject'
208 ModuleNameAsJsonObject:
216 title: CM handle Details
220 example: my-cm-handle1
221 publicCmHandleProperties:
222 $ref: '#/components/schemas/CmHandlePublicProperties'
224 $ref: '#/components/schemas/CmHandleCompositeState'
225 CmHandlePublicProperties:
229 additionalProperties:
232 CmHandleCompositeState:
239 $ref: '#/components/schemas/lock-reason'
242 example: 2022-12-31T20:30:40.000+0000
247 $ref: '#/components/schemas/dataStores'
254 example: LOCKED_MISBEHAVING
257 example: locked due to failure in module sync
263 $ref: '#/components/schemas/sync-state'
265 $ref: '#/components/schemas/sync-state'
272 example: NONE_REQUESTED
275 example: 2022-12-31T20:30:40.000+0000
277 RestOutputCmHandlePublicProperties:
280 publicCmHandleProperties:
281 $ref: '#/components/schemas/CmHandlePublicProperties'
283 RestOutputCmHandleCompositeState:
287 $ref: '#/components/schemas/CmHandleCompositeState'
291 summary: Sample request
292 description: Sample request body
295 bookstore-name: Chapters
309 dataSamplePatchRequest:
310 summary: Sample patch request
311 description: Sample patch request body
313 ietf-restconf:yang-patch:
321 bookstore-name: Chapters
339 bookstore-name: Novels
354 summary: Sample response
355 description: Sample response for selecting 'sample 1'.
371 allCmHandleQueryParameters:
373 cmHandleQueryParameters:
374 - conditionName: hasAllModules
376 - { "moduleName": "my-module-1" }
377 - { "moduleName": "my-module-2" }
378 - { "moduleName": "my-module-3" }
379 - conditionName: hasAllProperties
381 - { "Color": "yellow" }
382 - { "Shape": "circle" }
383 - { "Size": "small" }
384 - conditionName: cmHandleWithCpsPath
386 - { "cpsPath": "//state[@cm-handle-state='ADVISED']" }
387 pubPropCmHandleQueryParameters:
389 cmHandleQueryParameters:
390 - conditionName: hasAllProperties
392 - { "Color": "yellow" }
393 - { "Shape": "circle" }
394 - { "Size": "small" }
395 modulesCmHandleQueryParameters:
397 cmHandleQueryParameters:
398 - conditionName: hasAllModules
400 - { "moduleName": "my-module-1" }
401 - { "moduleName": "my-module-2" }
402 - { "moduleName": "my-module-3" }
403 cpsPathCmHandleStateQueryParameters:
405 cmHandleQueryParameters:
406 - conditionName: cmHandleWithCpsPath
408 - { "cpsPath": "//state[@cm-handle-state='LOCKED']" }
409 cpsPathCmHandleDataSyncQueryParameters:
411 cmHandleQueryParameters:
412 - conditionName: cmHandleWithCpsPath
414 - { "cpsPath": "//state[@data-sync-enabled='true']" }
420 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
424 example: my-cm-handle
426 name: dataSyncEnabled
428 description: Is used to enable or disable the data synchronization flag
441 requiredXpathInQuery:
448 includeDescendantsOptionInQuery:
449 name: include-descendants
451 description: Determines if descendants are included in response
459 description: For more details on cps path, please refer https://docs.onap.org/projects/onap-cps/en/latest/cps-path.html
467 list attributes cps path:
468 value: //categories[@code=1]
469 dmiPluginIdentifierInQuery:
470 name: dmi-plugin-identifier
472 description: dmi-plugin-identifier
476 example: my-dmi-plugin
477 resourceIdentifierInQuery:
478 name: resourceIdentifier
480 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.
488 resourceIdentifier: \shops\bookstore
491 resourceIdentifier: \shops\bookstore\categories[@code=1]
494 resourceIdentifier: parent=shops,child=bookstore
498 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.
509 options: (fields=book)
512 options: (depth=2,fields=book/authors)
516 description: topic parameter in query.
525 contentParamInHeader:
529 description: Content parameter for request, if content parameter is null, default value is application/json.
532 default: application/json
533 example: application/yang-data+json
537 description: The type of the requested data
541 example: ncmp-datastore:operational
545 description: The specified resource was not found
549 $ref: '#/components/schemas/ErrorMessage'
552 message: Not found error message
553 details: Not found error details
555 description: Unauthorized
559 $ref: '#/components/schemas/ErrorMessage'
562 message: Unauthorized error message
563 details: Unauthorized error details
565 description: Forbidden
569 $ref: '#/components/schemas/ErrorMessage'
572 message: Forbidden error message
573 details: Forbidden error details
575 description: Bad Request
579 $ref: '#/components/schemas/ErrorMessage'
581 status: 400 BAD_REQUEST
582 message: Bad request error message
583 details: Bad request error details
585 description: Conflict
589 $ref: '#/components/schemas/ErrorMessage'
592 message: Conflict error message
593 details: Conflict error details
595 description: The given path has not been implemented
599 $ref: '#/components/schemas/ErrorMessage'
602 message: Not implemented error message
603 details: Not implemented error details
614 description: No Content
617 description: Internal Server Error
621 $ref: "#/components/schemas/ErrorMessage"
624 message: Internal Server Error
625 details: Internal Server Error occurred
627 description: Bad Gateway
631 $ref: "#/components/schemas/DmiErrorMessage"
633 message: "Bad Gateway Error Message NCMP"