Remove vfc-gvnfm-vnfmgr openo labels
[vfc/gvnfm/vnfmgr.git] / mgr / mgr / swagger / swagger.json
1 {
2   "swagger": "2.0",
3   "info": {
4     "version": "1.0.0",
5     "title": "VNF Mgr Service rest API"
6   },
7   "basePath": "/api/vnfmgr/v1",
8   "tags": [
9     {
10       "name": "vnfmgr"
11     }
12   ],
13   "paths": {
14     "/vnfs": {
15       "post": {
16         "tags": [
17           "vnfReg Resource"
18         ],
19         "summary": "save the specified vnfReg info",
20         "description": "",
21         "operationId": "save_vnfReg",
22         "consumes": [
23           "application/json"
24         ],
25         "produces": [
26           "application/json"
27         ],
28         "parameters": [
29           {
30             "name": "body",
31             "in": "body",
32             "description": "request parameters",
33             "required": true,
34             "schema": {
35               "$ref": "#/definitions/VnfRegRequestParams"
36             }
37           }
38         ],
39         "responses": {
40           "201": {
41             "description": "successful operation",
42             "schema": {
43               "$ref": "#/definitions/saveVnfRegInfo"
44             }
45           },
46           "404": {
47             "description": "the vnf instance id is wrong"
48           },
49           "500": {
50             "description": "the url is invalid"
51           }
52         }
53       }
54     },
55     "/vnfs/{vnfInstId}": {
56       "get": {
57         "tags": [
58           "vnfReg Resource"
59         ],
60         "summary": "query the specified vnfReg info",
61         "description": "",
62         "operationId": "query_vnfReg",
63         "consumes": [
64           "application/json"
65         ],
66         "produces": [
67           "application/json"
68         ],
69         "parameters": [
70           {
71             "name": "vnfInstId",
72             "in": "path",
73             "description": "vnf instance id",
74             "required": true,
75             "type": "string"
76           }
77         ],
78         "responses": {
79           "200": {
80             "description": "successful operation",
81             "schema": {
82               "$ref": "#/definitions/VnfRegInfo"
83             }
84           },
85           "404": {
86             "description": "the vnf instance id is wrong"
87           },
88           "500": {
89             "description": "the url is invalid"
90           }
91         }
92       },
93       "put": {
94         "tags": [
95           "vnf Resource"
96         ],
97         "summary": "save the specified vnf info",
98         "description": "",
99         "operationId": "save_vnf",
100         "consumes": [
101           "application/json"
102         ],
103         "produces": [
104           "application/json"
105         ],
106         "parameters": [
107           {
108             "name": "body",
109             "in": "body",
110             "description": "request parameters",
111             "required": true,
112             "schema": {
113               "$ref": "#/definitions/VnfRegRequestParams"
114             }
115           }
116         ],
117         "responses": {
118           "202": {
119             "description": "successful operation",
120             "schema": {
121               "$ref": "#/definitions/saveVnfInfo"
122             }
123           },
124           "404": {
125             "description": "the vnf instance id is wrong"
126           },
127           "500": {
128             "description": "the url is invalid"
129           }
130         }
131       },
132       "delete": {
133         "tags": [
134           "vnf Resource"
135         ],
136         "summary": "delete the specified vnf info",
137         "description": "",
138         "operationId": "delete_vnf",
139         "consumes": [
140           "application/json"
141         ],
142         "produces": [
143           "application/json"
144         ],
145         "parameters": [
146           {
147             "name": "vnfInstId",
148             "in": "path",
149             "description": "vnf instance id",
150             "required": true,
151             "type": "string"
152           }
153         ],
154         "responses": {
155           "204": {
156             "description": "successful operation",
157             "schema": {
158               "$ref": "#/definitions/deleteVnfInfo"
159             }
160           },
161           "404": {
162             "description": "the vnf instance id is wrong"
163           },
164           "500": {
165             "description": "the url is invalid"
166           }
167         }
168       }
169     },
170     "/configuration": {
171       "post": {
172         "tags": [
173           "vnf Resource"
174         ],
175         "summary": "config the specified vnf info",
176         "description": "",
177         "operationId": "config_vnf",
178         "consumes": [
179           "application/json"
180         ],
181         "produces": [
182           "application/json"
183         ],
184         "parameters": [
185           {
186             "name": "body",
187             "in": "body",
188             "description": "request data",
189             "required": true,
190             "schema": {
191               "$ref": "#/definitions/VnfRequestParams"
192             }
193           }
194         ],
195         "responses": {
196           "202": {
197             "description": "successful operation",
198             "schema": {
199               "$ref": "#/definitions/configVnfInfo"
200             }
201           },
202           "404": {
203             "description": "the vnf instance id is wrong"
204           },
205           "500": {
206             "description": "the url is invalid"
207           }
208         }
209       }
210     }
211   },
212   "definitions": {
213     "VnfRegRequestParams": {
214       "type": "object",
215       "properties": {
216         "vnfInstId": {
217           "type": "string"
218         },
219         "ip": {
220           "type": "string"
221         },
222         "port": {
223           "type": "string"
224         },
225         "username": {
226           "type": "string"
227         },
228         "password": {
229           "type": "string"
230         }
231       }
232     },
233     "saveVnfRegInfo": {
234       "type": "object",
235       "properties": {}
236     },
237     "VnfRegInfo": {
238       "type": "object",
239       "properties": {
240         "vnfInstId": {
241           "type": "string"
242         },
243         "ip": {
244           "type": "string"
245         },
246         "port": {
247           "type": "string"
248         },
249         "username": {
250           "type": "string"
251         },
252         "password": {
253           "type": "string"
254         }
255       }
256     },
257     "saveVnfInfo": {
258       "type": "object"
259     },
260     "deleteVnfInfo": {
261       "type": "object"
262     },
263     "VnfRequestParams": {
264       "type": "object",
265       "properties": {
266         "vnfInstanceId": {
267           "type": "string"
268         },
269         "vnfConfigurationData": {
270           "type": "object",
271           "properties": {
272             "cp": {
273               "type": "array",
274               "items": {
275                 "type": "object"
276               }
277             },
278             "vnfSpecificData": {
279               "type": "object",
280               "properties": {
281                 "autoScalable": {
282                   "type": "string"
283                 },
284                 "autoHealable": {
285                   "type": "string"
286                 }
287               }
288             }
289           }
290         },
291         "vnfcConfigurationData": {
292           "type": "object",
293           "properties": {
294             "vnfcId": {
295               "type": "string"
296             },
297             "cp": {
298               "type": "array",
299               "items": {
300                 "cpId": {
301                   "type": "string"
302                 },
303                 "cpdId": {
304                   "type": "string"
305                 },
306                 "cpAddress": {
307                   "type": "array",
308                   "items": {
309                     "type": "object"
310                   }
311                 }
312               }
313             },
314             "vnfcSpecificData": {}
315           }
316         }
317       }
318     },
319     "configVnfInfo": {
320       "type": "object",
321       "properties": {
322         "vnfConfigurationData": {
323           "cp": {
324             "type": "array",
325             "items": {
326               "type": "object"
327             }
328           },
329           "vnfSpecificData": {
330             "type": "object",
331             "properties": {
332               "autoScalable": {
333                 "type": "string"
334               },
335               "autoHealable": {
336                 "type": "string"
337               }
338             }
339           }
340         },
341         "vnfcConfigurationData": {
342           "type": "object",
343           "properties": {
344             "vnfcId": {
345               "type": "string"
346             },
347             "cp": {
348               "type": "array",
349               "items": {
350                 "type": "object"
351               }
352             },
353             "vnfcSpecificData": {
354               "type": "object"
355             }
356           }
357         }
358       }
359     }
360   }
361 }