1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2021-2022 Nordix Foundation
3 # Modifications Copyright (C) 2021 Pantheon.tech
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
33 # DMI Server Exception Schema
35 title: DMI Error Message
40 example: "Bad Gateway Error Message NCMP"
51 RestDmiPluginRegistration:
56 example: my-dmi-plugin
60 example: my-dmi-data-plugin
64 example: my-dmi-model-plugin
69 $ref: '#/components/schemas/RestInputCmHandle'
73 $ref: '#/components/schemas/RestInputCmHandle'
75 cmHandle: my-cm-handle
77 add-my-property: add-property
78 update-my-property: updated-property
79 delete-my-property: '~'
80 publicCmHandleProperties:
81 add-my-property: add-property
82 update-my-property: updated-property
83 delete-my-property: '~'
88 example: [my-cm-handle1, my-cm-handle2, my-cm-handle3]
89 DmiPluginRegistrationErrorResponse:
92 failedCreatedCmHandles:
95 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
98 "cmHandle": "my-cm-handle-01",
100 "errorText": "cm-handle already exists"
103 failedUpdatedCmHandles:
106 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
109 "cmHandle": "my-cm-handle-02",
111 "errorText": "cm-handle does not exist"
114 failedRemovedCmHandles:
117 $ref: '#/components/schemas/CmHandlerRegistrationErrorResponse'
120 "cmHandle": "my-cm-handle-02",
122 "errorText": "cm-handle does not exist"
125 CmHandlerRegistrationErrorResponse:
130 example: my-cm-handle
136 example: 'cm-handle already exists'
145 example: my-cm-handle
147 $ref: '#/components/schemas/RestCmHandleProperties'
148 publicCmHandleProperties:
149 $ref: '#/components/schemas/RestCmHandleProperties'
150 RestCmHandleProperties:
152 additionalProperties:
160 $ref: '#/components/schemas/ConditionsData'
165 $ref: '#/components/schemas/ConditionProperties'
170 example: hasAllModules
172 $ref: '#/components/schemas/ModuleNamesAsJsonArray'
173 ModuleNamesAsJsonArray:
177 $ref: '#/components/schemas/ModuleNameAsJsonObject'
178 example: [my-module-1, my-module-2, my-module-3]
179 ModuleNameAsJsonObject:
190 $ref: '#/components/schemas/CmHandleProperties'
195 $ref: '#/components/schemas/CmHandleProperty'
200 example: my-cm-handle-id
204 title: Module reference details
208 example: my-module-name
211 example: my-module-revision
215 title: CM handle Details
219 example: my-cm-handle1
220 publicCmHandleProperties:
221 $ref: '#/components/schemas/CmHandlePublicProperties'
222 CmHandlePublicProperties:
226 additionalProperties:
232 summary: Sample request
233 description: Sample request body
236 bookstore-name: Chapters
250 dataSamplePatchRequest:
251 summary: Sample patch request
252 description: Sample patch request body
254 ietf-restconf:yang-patch:
262 bookstore-name: Chapters
280 bookstore-name: Novels
295 summary: Sample response
296 description: Sample response for selecting 'sample 1'.
316 description: The identifier for a network function, network element, subnetwork or any other cm object by managed Network CM Proxy
320 example: my-cm-handle
329 requiredXpathInQuery:
336 includeDescendantsOptionInQuery:
337 name: include-descendants
339 description: include-descendants
347 description: cps-path
352 resourceIdentifierInQuery:
353 name: resourceIdentifier
355 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.
363 resourceIdentifier: \shops\bookstore
366 resourceIdentifier: \shops\bookstore\categories[@code=1]
369 resourceIdentifier: parent=shops,child=bookstore
374 description: Accept parameter for response, if accept parameter is null, that means client can accept any format.
377 enum: [ application/json, application/yang-data+json ]
381 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.
392 options: (fields=book)
395 options: (depth=2,fields=book/authors)
399 description: topic parameter in query.
408 contentParamInHeader:
412 description: Content parameter for request, if content parameter is null, default value is application/json.
415 default: application/json
416 example: application/yang-data+json
420 description: The specified resource was not found
424 $ref: '#/components/schemas/ErrorMessage'
427 message: Not found error message
428 details: Not found error details
430 description: Unauthorized
434 $ref: '#/components/schemas/ErrorMessage'
437 message: Unauthorized error message
438 details: Unauthorized error details
440 description: Forbidden
444 $ref: '#/components/schemas/ErrorMessage'
447 message: Forbidden error message
448 details: Forbidden error details
450 description: Bad Request
454 $ref: '#/components/schemas/ErrorMessage'
456 status: 400 BAD_REQUEST
457 message: Bad request error message
458 details: Bad request error details
460 description: Conflict
464 $ref: '#/components/schemas/ErrorMessage'
467 message: Conflict error message
468 details: Conflict error details
470 description: The given path has not been implemented
474 $ref: '#/components/schemas/ErrorMessage'
477 message: Not implemented error message
478 details: Not implemented error details
489 description: No Content
492 description: Internal Server Error
496 $ref: "#/components/schemas/ErrorMessage"
499 message: Internal Server Error
500 details: Internal Server Error occurred
502 description: Bad Gateway
506 $ref: "#/components/schemas/DmiErrorMessage"
508 message: "Bad Gateway Error Message NCMP"