aboutsummaryrefslogtreecommitdiffstats
path: root/servicegateway/deployment/src/main/release/Swagger.json
blob: 211a954b783596fab7e296663409b7e30866fbd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
{
    "swagger": "2.0",
    "info": {
        "version": "1.0",
        "contact": {
            "name": "Xiangli Jia",
            "email": "jiaxiangli@huawei.com"
        },
        "title": "ServiceGateway Northbound Interface",
        "description": "Northbound Interface of ServiceGateway to be used by LifecycleMgr GUI. only service instantiation and termination.\nAll operations are synchronous.",
        "license": {
            "name": "Apache 2.0",
            "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
        }
    },
    "schemes": [
        "http"
    ],
    "basePath": "/openoapi/servicegateway/v1",
    "consumes": [
        "application/json"
    ],
    "produces": [
        "application/json"
    ],
    "paths": {
        "/services": {
            "post": {
                "summary": "Send the create request to the corresponding module.",
                "description": "it will send create request to the corresponding module.",
                "operationId": "guiCreationPost",
                "consumes": [
                    "application/json;charset=UTF-8"
                ],
                "produces": [
                    "application/json;charset=UTF-8"
                ],
                "parameters": [
                    {
                        "in": "body",
                        "name": "guiRequest",
                        "description": "the request used to create a service instance with the specified uri.",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/CreationRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "create service instance success.",
                        "schema": {
                            "$ref": "#/definitions/CreationResponse"
                        }
                    },
                    "400": {
                        "description": "create service instance failure as parameters invalid.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "unauthorized.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "create service instance failure as can't reach server.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "create service instance failure as internal error.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                }
            }
        },
        "/services/{serviceId}/terminate": {
            "post": {
                "summary": "Send the delete request to the corresponding module",
                "description": "it will send a terminate request to the corresponding module.",
                "operationId": "guiTerminationPost",
                "consumes": [
                    "application/json;charset=UTF-8"
                ],
                "produces": [
                    "application/json;charset=UTF-8"
                ],
                "parameters": [
                    {
                        "name": "serviceId",
                        "in": "path",
                        "description": "ID of the service instance to be terminated",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "body",
                        "name": "guiTerminationRequest",
                        "description": "the request used to terminate a service instance",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/TerminationRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "service instance is under-terminating. Job id is returned.",
                        "schema": {
                            "$ref": "#/definitions/LongOperationResponse"
                        }
                    },
                    "400": {
                        "description": "terminate service instance failure as parameters invalid.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "401": {
                        "description": "unauthorized.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "404": {
                        "description": "terminate service instance failure as can't reach server.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    },
                    "500": {
                        "description": "terminate service instance failure as internal error.",
                        "schema": {
                            "$ref": "#/definitions/Error"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "CreationRequest": {
            "description": "Service Instance Creation Request",
            "type": "object",
            "required": [
                "gatewayUri"
            ],
            "properties": {
                "nsdId": {
                    "type": "string",
                    "description": "ID of the template in catalog used to create the SDN-O/NFV-O service instance"
                },
                "gatewayUri": {
                    "type": "string",
                    "description": "uri of the corresponding service restful API to be created for GSO/SDN-O/NFV-O"
                },
                "description": {
                    "type": "string",
                    "description": "description of the GSO/SDN-O/NFV-O service instance to be created"
                },
                "parentid": {
                    "type": "string",
                    "description": "ID of the GSO service instance to be created"
                },
                "name": {
                    "type": "string",
                    "description": "name of the GSO service instance to be created"
                },
                "serviceDefId": {
                    "type": "string",
                    "description": "ID of the GSO service instance to be created"
                },
                "templateId": {
                    "type": "string",
                    "description": "ID of the GSO service instance to be created"
                },
                "templateName": {
                    "type": "string",
                    "description": "ID of the GSO service instance to be created"
                },
                "nsName": {
                    "type": "string",
                    "description": "ID of the GSO service instance to be created"
                },
                "nsInstanceId": {
                    "type": "string",
                    "description": "ID of the GSO service instance to be created"
                },
                "additionalParamForNs": {
                    "description": "parameters used to instantiate this SDN-O/NFV-O service instance",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/TemplateParameter"
                    }
                },
                "parameters": {
                    "description": "parameters used to instantiate this GSO service instance",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/TemplateParameter"
                    }
                }
            }
        },
        "CreationResponse": {
            "description": "Service Instance Creation Response",
            "type": "object",
            "required": [
                "serviceId"
            ],
            "properties": {
                "serviceId": {
                    "type": "string",
                    "description": "ID of the service instance that is created."
                }
            }
        },
        "TemplateParameter": {
            "description": "parameter used to instantiate its service instance. it's fundamentally a name-value pair.",
            "type": "object",
            "required": [
                "name",
                "value"
            ],
            "properties": {
                "name": {
                    "type": "string",
                    "description": "name of the parameter"
                },
                "value": {
                    "type": "string",
                    "description": "value of the parameter"
                }
            }
        },
        "LongOperationResponse": {
            "description": "Response for operation that takes a long time, i.e., a job id.",
            "type": "object",
            "required": [
                "jobId"
            ],
            "properties": {
                "jobId": {
                    "type": "string",
                    "description": "ID of the job that is executing some long operation"
                }
            }
        },
        "TerminationRequest": {
            "description": "Service Instance Termination Request.",
            "type": "object",
            "required": [
                "operation",
                "gatewayUri"
            ],
            "properties": {
                "operation": {
                    "type": "string",
                    "description": "type of the GSO/SDN-O/NFV-O service instance to be terminated"
                },
                "gatewayUri": {
                    "type": "string",
                    "description": "uri of the GSO/SDN-O/NFV-O service instance to be terminated"
                },
                "nsInstanceId": {
                    "type": "string",
                    "description": "id of the SDN-O/NFV-O service instance to be terminated"
                },
                "terminationType": {
                    "type": "string",
                    "description": "type of SDN-O/NFV-O termination. graceful or not, etc."
                },
                "gracefulTerminationTimeout": {
                    "type": "string",
                    "description": "timeout value for a graceful timeout,just only SDN-O."
                }
            }
        },
        "Error": {
            "type": "object",
            "required": [
                "errorCode"
            ],
            "properties": {
                "errorCode": {
                    "type": "integer",
                    "format": "int32"
                },
                "status": {
                    "type": "string"
                },
                "statusDescription": {
                    "type": "string"
                }
            }
        }
    }
}