Renu Kumari | 139e822 | 2021-10-04 20:59:18 -0400 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
| 2 | # Copyright (C) 2021 Bell Canada |
JosephKeenan | e0873dd | 2022-01-28 11:22:22 +0000 | [diff] [blame] | 3 | # Modifications Copyright (C) 2021-2022 Nordix Foundation |
Renu Kumari | 139e822 | 2021-10-04 20:59:18 -0400 | [diff] [blame] | 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 |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 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. |
| 16 | # |
| 17 | # SPDX-License-Identifier: Apache-2.0 |
| 18 | # ============LICENSE_END========================================================= |
| 19 | |
| 20 | updateDmiRegistration: |
| 21 | post: |
| 22 | description: Register a DMI Plugin with any new, updated or removed CM Handles. |
| 23 | tags: |
| 24 | - network-cm-proxy-inventory |
| 25 | summary: DMI notifies NCMP of new CM Handles |
| 26 | operationId: updateDmiPluginRegistration |
| 27 | requestBody: |
| 28 | required: true |
| 29 | content: |
| 30 | application/json: |
| 31 | schema: |
| 32 | $ref: 'components.yaml#/components/schemas/RestDmiPluginRegistration' |
| 33 | responses: |
Renu Kumari | b14f04b | 2022-03-28 10:22:41 -0400 | [diff] [blame] | 34 | 200: |
mpriyank | 80dee97 | 2022-02-23 15:17:23 +0530 | [diff] [blame] | 35 | $ref: 'components.yaml#/components/responses/NoContent' |
Renu Kumari | 139e822 | 2021-10-04 20:59:18 -0400 | [diff] [blame] | 36 | 400: |
| 37 | $ref: 'components.yaml#/components/responses/BadRequest' |
| 38 | 401: |
| 39 | $ref: 'components.yaml#/components/responses/Unauthorized' |
| 40 | 403: |
| 41 | $ref: 'components.yaml#/components/responses/Forbidden' |
JosephKeenan | e0873dd | 2022-01-28 11:22:22 +0000 | [diff] [blame] | 42 | 500: |
Renu Kumari | 952603c | 2022-04-18 12:39:33 -0400 | [diff] [blame] | 43 | description: Partial or Complete failure. The error details are provided in the response body and all supported error codes are documented in the example. |
Renu Kumari | b14f04b | 2022-03-28 10:22:41 -0400 | [diff] [blame] | 44 | content: |
| 45 | application/json: |
| 46 | schema: |
| 47 | $ref: 'components.yaml#/components/schemas/DmiPluginRegistrationErrorResponse' |
Renu Kumari | 952603c | 2022-04-18 12:39:33 -0400 | [diff] [blame] | 48 | example: |
| 49 | failedCreatedCmHandles: [ |
| 50 | { |
| 51 | "cmHandle": "my-cm-handle-01", |
| 52 | "errorCode": "00", |
| 53 | "errorText": "Unknown error. <error-details>" |
| 54 | }, |
| 55 | { |
| 56 | "cmHandle": "my-cm-handle-02", |
| 57 | "errorCode": "01", |
| 58 | "errorText": "cm-handle already exists" |
| 59 | }, |
| 60 | { |
| 61 | "cmHandle": "my-cm-handle-03", |
| 62 | "errorCode": "03", |
| 63 | "errorText": "cm-handle has an invalid character(s) in id" |
| 64 | } |
| 65 | ] |
| 66 | failedUpdatedCmHandles: [ |
| 67 | { |
| 68 | "cmHandle": "my-cm-handle-01", |
| 69 | "errorCode": "00", |
| 70 | "errorText": "Unknown error. <error-details>" |
| 71 | }, |
| 72 | { |
| 73 | "cmHandle": "my-cm-handle-02", |
| 74 | "errorCode": "02", |
| 75 | "errorText": "cm-handle does not exist" |
| 76 | }, |
| 77 | { |
| 78 | "cmHandle": "my-cm-handle-03", |
| 79 | "errorCode": "03", |
| 80 | "errorText": "cm-handle has an invalid character(s) in id" |
| 81 | } |
| 82 | ] |
| 83 | failedRemovedCmHandles: [ |
| 84 | { |
| 85 | "cmHandle": "my-cm-handle-01", |
| 86 | "errorCode": "00", |
| 87 | "errorText": "Unknown error. <error-details>" |
| 88 | }, |
| 89 | { |
| 90 | "cmHandle": "my-cm-handle-02", |
| 91 | "errorCode": "02", |
| 92 | "errorText": "cm-handle does not exists" |
| 93 | }, |
| 94 | { |
| 95 | "cmHandle": "my-cm-handle-03", |
| 96 | "errorCode": "03", |
| 97 | "errorText": "cm-handle has an invalid character(s) in id" |
| 98 | } |
| 99 | ] |
emaclee | d340047 | 2022-08-19 09:26:39 +0100 | [diff] [blame] | 100 | |
| 101 | getAllCmHandleIdsForRegisteredDmi: |
| 102 | get: |
| 103 | description: Get all cm handle IDs for a registered DMI plugin |
| 104 | tags: |
| 105 | - network-cm-proxy-inventory |
| 106 | summary: Get all cm handle IDs for a registered DMI plugin (DMI plugin, DMI data plugin, DMI model plugin) |
| 107 | operationId: getAllCmHandleIdsForRegisteredDmi |
| 108 | parameters: |
| 109 | - $ref: 'components.yaml#/components/parameters/dmiPluginIdentifierInQuery' |
| 110 | responses: |
| 111 | 200: |
| 112 | description: OK |
| 113 | content: |
| 114 | application/json: |
| 115 | schema: |
| 116 | type: array |
| 117 | items: |
| 118 | type: string |
| 119 | 401: |
| 120 | $ref: 'components.yaml#/components/responses/Unauthorized' |
| 121 | 403: |
| 122 | $ref: 'components.yaml#/components/responses/Forbidden' |
| 123 | 500: |
leventecsanyi | 37d7285 | 2022-10-26 10:44:08 +0200 | [diff] [blame] | 124 | $ref: 'components.yaml#/components/responses/InternalServerError' |
| 125 | |
| 126 | searchCmHandleIds: |
| 127 | post: |
| 128 | description: Query and get CMHandleIds for additional properties, public properties and registered DMI plugin (DMI plugin, DMI data plugin, DMI model plugin). |
| 129 | tags: |
| 130 | - network-cm-proxy-inventory |
| 131 | summary: Query for CM Handle IDs |
| 132 | operationId: searchCmHandleIds |
| 133 | requestBody: |
| 134 | required: true |
| 135 | content: |
| 136 | application/json: |
| 137 | schema: |
| 138 | $ref: 'components.yaml#/components/schemas/CmHandleQueryParameters' |
| 139 | responses: |
| 140 | 200: |
| 141 | description: OK |
| 142 | content: |
| 143 | application/json: |
| 144 | schema: |
| 145 | type: array |
| 146 | items: |
| 147 | type: string |
| 148 | 401: |
| 149 | $ref: 'components.yaml#/components/responses/Unauthorized' |
| 150 | 403: |
| 151 | $ref: 'components.yaml#/components/responses/Forbidden' |
| 152 | 500: |
emaclee | d340047 | 2022-08-19 09:26:39 +0100 | [diff] [blame] | 153 | $ref: 'components.yaml#/components/responses/InternalServerError' |