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: cps-path
464 dmiPluginIdentifierInQuery:
465 name: dmi-plugin-identifier
467 description: dmi-plugin-identifier
471 example: my-dmi-plugin
472 resourceIdentifierInQuery:
473 name: resourceIdentifier
475 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.
483 resourceIdentifier: \shops\bookstore
486 resourceIdentifier: \shops\bookstore\categories[@code=1]
489 resourceIdentifier: parent=shops,child=bookstore
493 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.
504 options: (fields=book)
507 options: (depth=2,fields=book/authors)
511 description: topic parameter in query.
520 contentParamInHeader:
524 description: Content parameter for request, if content parameter is null, default value is application/json.
527 default: application/json
528 example: application/yang-data+json
530 name: ncmp-datastore-name
532 description: The type of the requested data
536 example: ncmp-datastore:operational
540 description: The specified resource was not found
544 $ref: '#/components/schemas/ErrorMessage'
547 message: Not found error message
548 details: Not found error details
550 description: Unauthorized
554 $ref: '#/components/schemas/ErrorMessage'
557 message: Unauthorized error message
558 details: Unauthorized error details
560 description: Forbidden
564 $ref: '#/components/schemas/ErrorMessage'
567 message: Forbidden error message
568 details: Forbidden error details
570 description: Bad Request
574 $ref: '#/components/schemas/ErrorMessage'
576 status: 400 BAD_REQUEST
577 message: Bad request error message
578 details: Bad request error details
580 description: Conflict
584 $ref: '#/components/schemas/ErrorMessage'
587 message: Conflict error message
588 details: Conflict error details
590 description: The given path has not been implemented
594 $ref: '#/components/schemas/ErrorMessage'
597 message: Not implemented error message
598 details: Not implemented error details
609 description: No Content
612 description: Internal Server Error
616 $ref: "#/components/schemas/ErrorMessage"
619 message: Internal Server Error
620 details: Internal Server Error occurred
622 description: Bad Gateway
626 $ref: "#/components/schemas/DmiErrorMessage"
628 message: "Bad Gateway Error Message NCMP"