Update tag to be more generic
[multicloud/framework.git] / multivimbroker / multivimbroker / swagger / multivim.host.swagger.json
1 {
2     "swagger": "2.0",
3     "info": {
4         "version": "1.0.0",
5         "title": "MultiVIM Service rest API"
6     },
7     "basePath": "/openoapi/multivim/v1/",
8     "tags": [
9         {
10             "name": "MultiVIM services"
11         }
12     ],
13     "paths": {
14         "/{vimid}/{tenantid}/hosts": {
15             "get": {
16                 "tags": [
17                     "vim hosts"
18                 ],
19                 "summary": "query vim hosts list",
20                 "description": "query vim hosts list",
21                 "operationId": "query_vim_hosts",
22                 "consumes": [
23                     "application/json"
24                 ],
25                 "produces": [
26                     "application/json"
27                 ],
28                 "parameters": [
29                     {
30                         "name": "vimid",
31                         "in": "path",
32                         "description": "vim instance id",
33                         "required": true,
34                         "type": "string"
35                     },
36                     {
37                         "name": "tenantid",
38                         "in": "path",
39                         "description": "tenant UUID",
40                         "required": true,
41                         "type": "string"
42                     },
43                     {
44                         "in": "body",
45                         "name": "body",
46                         "description": "get a list of vim hosts request param",
47                         "required": false,
48                         "schema": {
49                             "$ref": "#/definitions/ListVimHosts"
50                         }
51                     }
52                 ],
53                 "responses": {
54                     "200": {
55                         "description": "successful operation",
56                         "schema": {
57                             "$ref": "#/definitions/VimHostsInfo"
58                         }
59                     },
60                     "404": {
61                         "description": "the vim id or tenant UUID is wrong"
62                     },
63                     "500": {
64                         "description": "the vim host is not accessable"
65                     }
66                 }
67             }
68         },
69         "/{vimid}/{tenantid}/hosts/{hostname}": {
70             "get": {
71                 "tags": [
72                     "vim hosts"
73                 ],
74                 "summary": "query specific vim host",
75                 "description": "query specific vim host",
76                 "operationId": "query_vim_host",
77                 "consumes": [
78                     "application/json"
79                 ],
80                 "produces": [
81                     "application/json"
82                 ],
83                 "parameters": [
84                     {
85                         "name": "vimid",
86                         "in": "path",
87                         "description": "vim instance id",
88                         "required": true,
89                         "type": "string"
90                     },
91                     {
92                         "name": "tenantid",
93                         "in": "path",
94                         "description": "tenant UUID",
95                         "required": true,
96                         "type": "string"
97                     },
98                     {
99                         "name": "hostname",
100                         "in": "path",
101                         "description": "vim host name",
102                         "required": true,
103                         "type": "string"
104                     }
105                 ],
106                 "responses": {
107                     "200": {
108                         "description": "successful operation",
109                         "schema": {
110                             "$ref": "#/definitions/VimHostInfo"
111                         }
112                     },
113                     "404": {
114                         "description": "the vim id or tenant UUID is wrong"
115                     },
116                     "500": {
117                         "description": "the vim host is not accessable"
118                     }
119                 }
120             }
121         }
122     },
123     "definitions": {
124         "VimHostsInfo": {
125             "type": "object",
126             "required": [
127                 "vimId",
128                 "tenantId",
129                 "hosts"
130             ],
131             "properties": {
132                 "vimId": {
133                     "type": "string"
134                 },
135                 "vimName": {
136                     "type": "string"
137                 },
138                 "tenantId": {
139                     "type": "string",
140                     "description": "tenant UUID"
141                 },
142                 "hosts": {
143                     "type": "array",
144                     "description": "list of host information",
145                     "items": {
146                        "$ref": "#/definitions/VimHostInfo"
147                     }
148                 }
149             }
150         },
151         "VimHostInfo": {
152             "type": "object",
153             "required": [
154                 "name",
155                 "service"
156             ],
157             "properties": {
158                 "name": {
159                     "type": "string",
160                     "description": "host name"
161                 },
162                 "service": {
163                     "type": "string",
164                     "description": "service name running on the host"
165                 },
166                 "zone": {
167                     "type": "string",
168                     "description": "available zone name of the host"
169                 },
170                 "vimId": {
171                     "type": "string"
172                 },
173                 "vimName": {
174                     "type": "string"
175                 },
176                 "tenantId": {
177                     "type": "string",
178                     "description": "tenant UUID"
179                 }
180             }
181         }
182     }
183 }