Skip to content

Commit 79d279a

Browse files
committed
Revert "Download DMI API from the newly moved OpenAPI files CPS"
This reverts commit bec8271. Reason for revert: Reason for revert: K6 performance on nordix is failing as dmi-plugin-stub is responding http 500 status for write data job. Issue-ID: CPS-2815 Change-Id: I6d8cbacb10bf69ffafcd69e64166a240a8bff205 Signed-off-by: sourabh_sourabh <[email protected]>
1 parent bec8271 commit 79d279a

File tree

9 files changed

+2000
-10
lines changed

9 files changed

+2000
-10
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ tmp/
3030
/__pycache__/*
3131

3232
/docs/docs/
33-
/docs/.vscode/
33+
/docs/.vscode/

dmi-service/openapi/components.yml

Lines changed: 318 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,318 @@
1+
# ============LICENSE_START=======================================================
2+
# Copyright (C) 2021-2023 Nordix Foundation
3+
# Modifications Copyright (C) 2022 Bell Canada
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+
components:
21+
securitySchemes:
22+
basicAuth:
23+
type: http
24+
scheme: basic
25+
schemas:
26+
ErrorMessage:
27+
type: object
28+
title: Error
29+
properties:
30+
status:
31+
type: string
32+
message:
33+
type: string
34+
details:
35+
type: string
36+
37+
CmHandles:
38+
type: object
39+
properties:
40+
cmHandles:
41+
type: array
42+
example: ["cmHandleId1","cmHandleId2","cmHandleId3"]
43+
items:
44+
type: string
45+
46+
ModuleReferencesRequest:
47+
type: object
48+
properties:
49+
moduleSetTag:
50+
type: string
51+
cmHandleProperties:
52+
$ref: '#/components/schemas/cmHandleProperties'
53+
54+
ResourceDataOperationRequests:
55+
type: array
56+
items:
57+
type: object
58+
title: 'DataOperationRequest'
59+
properties:
60+
operation:
61+
type: string
62+
example: 'read'
63+
operationId:
64+
description: 'it is recommended that the operationId is unique within the scope of the request'
65+
type: string
66+
example: '12'
67+
datastore:
68+
type: string
69+
example: 'ncmp-datastore:passthrough-operational'
70+
options:
71+
type: string
72+
example: '(fields=NRCellDU/attributes/cellLocalId)'
73+
resourceIdentifier:
74+
type: string
75+
example: '/ManagedElement=NRNode1/GNBDUFunction=1'
76+
cmHandles:
77+
type: array
78+
items:
79+
$ref: '#/components/schemas/dmiOperationCmHandle'
80+
required:
81+
- operation
82+
- operationId
83+
- datastore
84+
- cmHandles
85+
86+
dmiOperationCmHandle:
87+
type: object
88+
title: 'CmHandle with properties for DMI'
89+
properties:
90+
id:
91+
type: string
92+
cmHandleProperties:
93+
additionalProperties:
94+
type: string
95+
moduleSetTag:
96+
type: string
97+
example: module-set-tag1
98+
example:
99+
id: cmHandle123
100+
cmHandleProperties:
101+
myProp: some value
102+
otherProp: other value
103+
moduleSetTag: module-set-tag1
104+
105+
ModuleResourcesReadRequest:
106+
type: object
107+
properties:
108+
moduleSetTag:
109+
type: string
110+
description: Module set tag of the given cm handle
111+
example: Module-set-tag-1
112+
required: false
113+
data:
114+
type: object
115+
properties:
116+
modules:
117+
type: array
118+
items:
119+
type: object
120+
properties:
121+
name:
122+
type: string
123+
example: my-name
124+
revision:
125+
type: string
126+
example: my-revision
127+
cmHandleProperties:
128+
$ref: '#/components/schemas/cmHandleProperties'
129+
130+
ModuleSet:
131+
type: object
132+
properties:
133+
schemas:
134+
type: array
135+
items:
136+
type: object
137+
properties:
138+
moduleName:
139+
type: string
140+
example: my-module-name
141+
revision:
142+
type: string
143+
example: my-revision
144+
namespace:
145+
type: string
146+
example: my-namespace
147+
148+
YangResources:
149+
type: array
150+
items:
151+
$ref: '#/components/schemas/YangResource'
152+
153+
YangResource:
154+
properties:
155+
yangSource:
156+
type: string
157+
example: my-yang-source
158+
moduleName:
159+
type: string
160+
example: my-module-name
161+
revision:
162+
type: string
163+
example: my-revision
164+
165+
DataAccessRequest:
166+
type: object
167+
properties:
168+
operation:
169+
type: string
170+
enum: [ read, create, update, patch, delete ]
171+
example: read
172+
dataType:
173+
type: string
174+
example: my-data-type
175+
data:
176+
type: string
177+
example: my-data
178+
cmHandleProperties:
179+
$ref: '#/components/schemas/cmHandleProperties'
180+
requestId:
181+
type: string
182+
example: 3a9ce55c-e365-4dc9-8da3-a06f07cbc6d7
183+
moduleSetTag:
184+
type: string
185+
example: module-set-tag1
186+
187+
cmHandleProperties:
188+
type: object
189+
nullable: true
190+
additionalProperties:
191+
type: string
192+
example: {"prop1":"value1","prop2":"value2"}
193+
194+
responses:
195+
NoContent:
196+
description: No Content
197+
content: {}
198+
199+
BadRequest:
200+
description: Bad Request
201+
content:
202+
application/json:
203+
schema:
204+
$ref: '#/components/schemas/ErrorMessage'
205+
example:
206+
status: 400
207+
message: Bad Request
208+
details: The provided request is not valid
209+
210+
NotFound:
211+
description: The specified resource was not found
212+
content:
213+
application/json:
214+
schema:
215+
$ref: '#/components/schemas/ErrorMessage'
216+
example:
217+
status: 404
218+
message: Resource Not Found
219+
details: The requested resource is not found
220+
221+
ServerError:
222+
description: Internal Server Error
223+
content:
224+
application/json:
225+
schema:
226+
$ref: '#/components/schemas/ErrorMessage'
227+
example:
228+
status: 500
229+
message: Internal Server Error
230+
details: Internal Server Error occured
231+
232+
NotImplemented:
233+
description: Not Implemented
234+
content:
235+
application/json:
236+
schema:
237+
$ref: '#/components/schemas/ErrorMessage'
238+
example:
239+
status: 501
240+
message: Not Implemented
241+
details: Method Not Implemented
242+
243+
parameters:
244+
cmHandleInPath:
245+
name: cmHandle
246+
in: path
247+
description: The CM handle or alternate identifier for a network function, network element, subnetwork, or any other CM object managed by Network CM Proxy
248+
required: true
249+
schema:
250+
type: string
251+
example: my-cm-handle
252+
253+
resourceIdentifierInQuery:
254+
name: resourceIdentifier
255+
in: query
256+
description: Resource identifier to get/set the resource data
257+
required: true
258+
schema:
259+
type: string
260+
example: '/ManagedElement=NRNode1/GNBDUFunction=1'
261+
262+
optionsParamInQuery:
263+
name: options
264+
in: query
265+
description: options parameter in query, it is mandatory to wrap key(s)=value(s) in parenthesis'()'.
266+
required: false
267+
schema:
268+
type: string
269+
examples:
270+
sample1:
271+
value:
272+
options: (fields=NRCellDU/attributes/cellLocalId)
273+
274+
topicParamInQuery:
275+
name: topic
276+
in: query
277+
description: topic name passed from client(NCMP).
278+
required: false
279+
schema:
280+
type: string
281+
examples:
282+
sample1:
283+
value: my-topic-name
284+
285+
requiredTopicParamInQuery:
286+
name: topic
287+
in: query
288+
description: mandatory topic name passed from client(NCMP).
289+
required: true
290+
schema:
291+
type: string
292+
examples:
293+
sample1:
294+
value:
295+
topic: my-topic-name
296+
297+
requiredRequestIdParamInQuery:
298+
name: requestId
299+
in: query
300+
description: request ID generated by NCMP and is sent here and sent as an acknowledgement for the client request.
301+
required: true
302+
schema:
303+
type: string
304+
examples:
305+
sample1:
306+
value: 4753fc1f-7de2-449a-b306-a6204b5370b3
307+
308+
datastoreName:
309+
name: datastore-name
310+
in: path
311+
description: The type of the requested data
312+
required: true
313+
schema:
314+
type: string
315+
example: ncmp-datastore:passthrough-operational or ncmp-datastore:passthrough-running
316+
317+
security:
318+
- basicAuth: []

0 commit comments

Comments
 (0)