Debian Codegraph @

api-ref/source/v1/hosts.inc

raw
1 .. -*- rst -*-
2
3 =====
4 Hosts
5 =====
6
7 List Hosts
8 ==========
9
10 .. rest_method:: GET v1/os-hosts
11
12 List hosts.
13
14 **Response codes**
15
16 Normal response code: 200
17
18 Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403),
19 Internal Server Error(500)
20
21 Request
22 -------
23
24 No body content, path, nor query option.
25
26 Response
27 --------
28
29 .. rest_parameters:: parameters.yaml
30
31 - hosts: hosts
32 - id: host_id
33 - hypervisor_hostname: host_hypervisor_hostname
34 - hypervisor_type: host_hypervisor_type
35 - hypervisor_version: host_hypervisor_version
36 - vcpus: host_vcpus
37 - cpu_info: host_cpu_info
38 - memory_mb: host_memory_mb
39 - local_gb: host_local_gb
40 - service_name: host_service_name
41 - reservable: host_reservable
42 - status: host_status
43 - trust_id: host_trust_id
44 - created_at: created_at
45 - updated_at: updated_at
46 - extra_capability: host_extra_capability
47
48 **Example of List Hosts Response**
49
50 .. literalinclude:: ../../../doc/api_samples/hosts/host-list-resp.json
51 :language: javascript
52
53 Create Host
54 ===========
55
56 .. rest_method:: POST v1/os-hosts
57
58 Create a host.
59
60 **Response codes**
61
62 Normal response code: 201
63
64 Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403),
65 Conflict(409), Internal Server Error(500)
66
67 Request
68 -------
69
70 .. rest_parameters:: parameters.yaml
71
72 - name: host_name
73 - extra_capability: host_extra_capability
74
75 **Example of Create Host Request**
76
77 .. literalinclude:: ../../../doc/api_samples/hosts/host-create-req.json
78 :language: javascript
79
80 Response
81 --------
82
83 .. rest_parameters:: parameters.yaml
84
85 - host: host
86 - id: host_id
87 - hypervisor_hostname: host_hypervisor_hostname
88 - hypervisor_type: host_hypervisor_type
89 - hypervisor_version: host_hypervisor_version
90 - vcpus: host_vcpus
91 - cpu_info: host_cpu_info
92 - memory_mb: host_memory_mb
93 - local_gb: host_local_gb
94 - service_name: host_service_name
95 - reservable: host_reservable
96 - status: host_status
97 - trust_id: host_trust_id
98 - created_at: created_at
99 - updated_at: updated_at
100 - extra_capability: host_extra_capability
101
102 **Example of Create Host Response**
103
104 .. literalinclude:: ../../../doc/api_samples/hosts/host-create-resp.json
105 :language: javascript
106
107 Show Host Details
108 =================
109
110 .. rest_method:: GET v1/os-hosts/{host_id}
111
112 Show details of a host.
113
114 **Preconditions**
115
116 The host must exist.
117
118 **Response codes**
119
120 Normal response code: 200
121
122 Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403),
123 Not Found(404), Internal Server Error(500)
124
125 Request
126 -------
127
128 .. rest_parameters:: parameters.yaml
129
130 - host_id: host_id_path
131 - private: property_private
132
133 Response
134 --------
135
136 .. rest_parameters:: parameters.yaml
137
138 - host: host
139 - id: host_id
140 - hypervisor_hostname: host_hypervisor_hostname
141 - hypervisor_type: host_hypervisor_type
142 - hypervisor_version: host_hypervisor_version
143 - vcpus: host_vcpus
144 - cpu_info: host_cpu_info
145 - memory_mb: host_memory_mb
146 - local_gb: host_local_gb
147 - service_name: host_service_name
148 - reservable: host_reservable
149 - status: host_status
150 - trust_id: host_trust_id
151 - created_at: created_at
152 - updated_at: updated_at
153 - extra_capability: host_extra_capability
154
155 **Example of Show Host Details Response**
156
157 .. literalinclude:: ../../../doc/api_samples/hosts/host-details-resp.json
158 :language: javascript
159
160 Update Host
161 ===========
162
163 .. rest_method:: PUT v1/os-hosts/{host_id}
164
165 Update a host.
166
167 **Preconditions**
168
169 The host must exist.
170
171 **Response codes**
172
173 Normal response code: 200
174
175 Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403),
176 Not Found(404), Conflict(409), Internal Server Error(500)
177
178 Request
179 -------
180
181 .. rest_parameters:: parameters.yaml
182
183 - host_id: host_id_path
184 - extra_capability: host_extra_capability
185
186 **Example of Update Host Request**
187
188 .. literalinclude:: ../../../doc/api_samples/hosts/host-update-req.json
189 :language: javascript
190
191 Response
192 --------
193
194 .. rest_parameters:: parameters.yaml
195
196 - host: host
197 - id: host_id
198 - hypervisor_hostname: host_hypervisor_hostname
199 - hypervisor_type: host_hypervisor_type
200 - hypervisor_version: host_hypervisor_version
201 - vcpus: host_vcpus
202 - cpu_info: host_cpu_info
203 - memory_mb: host_memory_mb
204 - local_gb: host_local_gb
205 - service_name: host_service_name
206 - reservable: host_reservable
207 - status: host_status
208 - trust_id: host_trust_id
209 - created_at: created_at
210 - updated_at: updated_at
211 - extra_capability: host_extra_capability
212
213 **Example of Host Update Response**
214
215 .. literalinclude:: ../../../doc/api_samples/hosts/host-update-resp.json
216 :language: javascript
217
218 Delete Host
219 ===========
220
221 .. rest_method:: DELETE v1/os-hosts/{host_id}
222
223 Delete a host.
224
225 **Preconditions**
226
227 The host must exist.
228
229 **Response codes**
230
231 Normal response code: 204
232
233 Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403),
234 Not Found(404), Conflict(409), Internal Server Error(500)
235
236 Request
237 -------
238
239 .. rest_parameters:: parameters.yaml
240
241 - host_id: host_id_path
242
243 Response
244 --------
245
246 No body content is returned on a successful DELETE.
247
248 ====================
249 Resource Allocations
250 ====================
251
252 List Allocations
253 ================
254
255 .. rest_method:: GET v1/os-hosts/allocations
256
257 List allocations of all hosts.
258
259 **Response codes**
260
261 Normal response code: 200
262
263 Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403),
264 Internal Server Error(500)
265
266 Request
267 -------
268
269 .. rest_parameters:: parameters.yaml
270
271 - lease_id: allocation_lease_id_query
272 - reservation_id: allocation_reservation_id_query
273
274 Response
275 --------
276
277 .. rest_parameters:: parameters.yaml
278
279 - allocations: allocations
280 - resource_id: host_id
281 - reservations: reservation_allocation
282 - reservation.id: reservation_id
283 - reservation.lease_id: lease_id
284 - reservation.start_date: allocation_start_date
285 - reservation.end_date: allocation_end_date
286
287 **Example of List Allocations Response**
288
289 .. literalinclude:: ../../../doc/api_samples/hosts/allocation-list-resp.json
290 :language: javascript
291
292 Get Allocation
293 ==============
294
295 .. rest_method:: GET v1/os-hosts/{host_id}/allocation
296
297 Get allocation of a host.
298
299 **Response codes**
300
301 Normal response code: 200
302
303 Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403),
304 Internal Server Error(500)
305
306 Request
307 -------
308
309 .. rest_parameters:: parameters.yaml
310
311 - host_id: host_id_path
312 - lease_id: allocation_lease_id_query
313 - reservation_id: allocation_reservation_id_query
314
315 Response
316 --------
317
318 .. rest_parameters:: parameters.yaml
319
320 - allocation: allocation
321 - resource_id: host_id
322 - reservations: reservation_allocation
323 - reservation.id: reservation_id
324 - reservation.lease_id: lease_id
325 - reservation.start_date: allocation_start_date
326 - reservation.end_date: allocation_end_date
327
328 **Example of Get Allocation Response**
329
330 .. literalinclude:: ../../../doc/api_samples/hosts/allocation-get-resp.json
331 :language: javascript
332
333 List Resource Properties
334 ========================
335
336 .. rest_method:: GET v1/os-hosts/properties
337
338 Get all resource properties from host
339
340 **Response codes**
341
342 Normal response code: 200
343
344 Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403),
345 Internal Server Error(500)
346
347 Request
348 -------
349
350 .. rest_parameters:: parameters.yaml
351
352 - detail: resource_property_detail
353 - all: resource_property_all
354
355 Response
356 --------
357
358 .. rest_parameters:: parameters.yaml
359
360 - resource_properties: resource_properties
361 - property: resource_properties_property
362 - private: resource_properties_private
363 - values: resource_properties_values
364
365 **Example of List Resource Properties Response**
366
367 .. literalinclude:: ../../../doc/api_samples/hosts/host-property-list.json
368 :language: javascript
369
370 **Example of List Resource Properties With Detail Response**
371
372 .. literalinclude:: ../../../doc/api_samples/hosts/host-property-list-detail.json
373 :language: javascript
374
375 Update Resource Properties
376 ==========================
377
378 .. rest_method:: PATCH v1/os-hosts/properties/{property_name}
379
380 Update a host resource properties
381
382 **Response codes**
383
384 Normal response code: 200
385
386 Error response codes: Bad Request(400), Unauthorized(401), Forbidden(403),
387 Internal Server Error(500)
388
389 Request
390 -------
391
392 .. rest_parameters:: parameters.yaml
393
394 - property_name: property_name
395 - private: property_private
396
397 **Example of Update Resource Properties**
398
399 .. literalinclude:: ../../../doc/api_samples/hosts/host-property-update.json
400 :language: javascript
401
402 Response
403 --------
404
405 .. rest_parameters:: parameters.yaml
406
407 - created_at: created_at
408 - updated_at: updated_at
409 - id: resource_property_id
410 - resource_type: resource_property_resource_type
411 - property_name: resource_properties_property
412 - private: resource_property_private
413
414 **Example of List Resource Properties Response**
415
416 .. literalinclude:: ../../../doc/api_samples/hosts/host-property-update-res.json
417 :language: javascript
418