blob: ea020f9e8154adb399d309fc32ea6d00c68149c2 [file] [log] [blame]
Renu Kumari139e8222021-10-04 20:59:18 -04001# ============LICENSE_START=======================================================
2# Copyright (C) 2021 Bell Canada
JosephKeenane0873dd2022-01-28 11:22:22 +00003# Modifications Copyright (C) 2021-2022 Nordix Foundation
Renu Kumari139e8222021-10-04 20:59:18 -04004# ================================================================================
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
20updateDmiRegistration:
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 Kumarib14f04b2022-03-28 10:22:41 -040034 200:
mpriyank80dee972022-02-23 15:17:23 +053035 $ref: 'components.yaml#/components/responses/NoContent'
Renu Kumari139e8222021-10-04 20:59:18 -040036 400:
37 $ref: 'components.yaml#/components/responses/BadRequest'
Renu Kumari139e8222021-10-04 20:59:18 -040038 403:
39 $ref: 'components.yaml#/components/responses/Forbidden'
JosephKeenane0873dd2022-01-28 11:22:22 +000040 500:
Renu Kumari952603c2022-04-18 12:39:33 -040041 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 Kumarib14f04b2022-03-28 10:22:41 -040042 content:
43 application/json:
44 schema:
45 $ref: 'components.yaml#/components/schemas/DmiPluginRegistrationErrorResponse'
Renu Kumari952603c2022-04-18 12:39:33 -040046 example:
47 failedCreatedCmHandles: [
48 {
49 "cmHandle": "my-cm-handle-01",
50 "errorCode": "00",
51 "errorText": "Unknown error. <error-details>"
52 },
53 {
54 "cmHandle": "my-cm-handle-02",
55 "errorCode": "01",
56 "errorText": "cm-handle already exists"
57 },
58 {
59 "cmHandle": "my-cm-handle-03",
60 "errorCode": "03",
61 "errorText": "cm-handle has an invalid character(s) in id"
62 }
63 ]
64 failedUpdatedCmHandles: [
65 {
66 "cmHandle": "my-cm-handle-01",
67 "errorCode": "00",
68 "errorText": "Unknown error. <error-details>"
69 },
70 {
71 "cmHandle": "my-cm-handle-02",
72 "errorCode": "02",
73 "errorText": "cm-handle does not exist"
74 },
75 {
76 "cmHandle": "my-cm-handle-03",
77 "errorCode": "03",
78 "errorText": "cm-handle has an invalid character(s) in id"
79 }
80 ]
81 failedRemovedCmHandles: [
82 {
83 "cmHandle": "my-cm-handle-01",
84 "errorCode": "00",
85 "errorText": "Unknown error. <error-details>"
86 },
87 {
88 "cmHandle": "my-cm-handle-02",
89 "errorCode": "02",
90 "errorText": "cm-handle does not exists"
91 },
92 {
93 "cmHandle": "my-cm-handle-03",
94 "errorCode": "03",
95 "errorText": "cm-handle has an invalid character(s) in id"
96 }
97 ]
emacleed3400472022-08-19 09:26:39 +010098
99getAllCmHandleIdsForRegisteredDmi:
100 get:
101 description: Get all cm handle IDs for a registered DMI plugin
102 tags:
103 - network-cm-proxy-inventory
104 summary: Get all cm handle IDs for a registered DMI plugin (DMI plugin, DMI data plugin, DMI model plugin)
105 operationId: getAllCmHandleIdsForRegisteredDmi
106 parameters:
107 - $ref: 'components.yaml#/components/parameters/dmiPluginIdentifierInQuery'
108 responses:
109 200:
110 description: OK
111 content:
112 application/json:
113 schema:
114 type: array
115 items:
116 type: string
emacleed3400472022-08-19 09:26:39 +0100117 403:
118 $ref: 'components.yaml#/components/responses/Forbidden'
119 500:
leventecsanyi37d72852022-10-26 10:44:08 +0200120 $ref: 'components.yaml#/components/responses/InternalServerError'
121
122searchCmHandleIds:
123 post:
124 description: Query and get CMHandleIds for additional properties, public properties and registered DMI plugin (DMI plugin, DMI data plugin, DMI model plugin).
125 tags:
126 - network-cm-proxy-inventory
127 summary: Query for CM Handle IDs
128 operationId: searchCmHandleIds
129 requestBody:
130 required: true
131 content:
132 application/json:
133 schema:
134 $ref: 'components.yaml#/components/schemas/CmHandleQueryParameters'
135 responses:
136 200:
137 description: OK
138 content:
139 application/json:
140 schema:
141 type: array
142 items:
143 type: string
leventecsanyi37d72852022-10-26 10:44:08 +0200144 403:
145 $ref: 'components.yaml#/components/responses/Forbidden'
146 500:
emacleed3400472022-08-19 09:26:39 +0100147 $ref: 'components.yaml#/components/responses/InternalServerError'