File: hosts.inc

package info (click to toggle)
cinder 2%3A17.0.1-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 36,796 kB
  • sloc: python: 395,277; pascal: 2,085; sh: 585; makefile: 111; xml: 26; sql: 5
file content (105 lines) | stat: -rw-r--r-- 1,934 bytes parent folder | download | duplicates (4)
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
.. -*- rst -*-

Hosts extension (os-hosts)
==========================

Administrators only, depending on policy settings.

Lists, shows hosts.


List all hosts
~~~~~~~~~~~~~~

.. rest_method::  GET /v2/{admin_project_id}/os-hosts

Lists all hosts summary info that is not disabled.

Response codes
--------------

.. rest_status_code:: success ../status.yaml

   - 200

.. rest_status_code:: error ../status.yaml

   - 400
   - 401
   - 403

Request
-------

.. rest_parameters:: parameters.yaml

   - admin_project_id: admin_project_id


Response Parameters
-------------------

.. rest_parameters:: parameters.yaml

   - service-status: host_service_status
   - service: host_service
   - zone: availability_zone_3
   - service-state: service_state
   - host_name: host_name_1
   - last-update: updated_at

Response Example
----------------

.. literalinclude:: ./samples/hosts-list-response.json
   :language: javascript

Show Host Details
~~~~~~~~~~~~~~~~~

.. rest_method:: GET /v2/{admin_project_id}/os-hosts/{host_name}

Shows volume and snapshot details for a cinder-volume host.

*Note:* This API is meant specifically for cinder-volume hosts only.
It is not valid against other Cinder service hosts or hosts where the
cinder-volume service has been disabled.

Response codes
--------------

.. rest_status_code:: success ../status.yaml

   - 200

.. rest_status_code:: error ../status.yaml

   - 400
   - 401
   - 403
   - 404

Request
-------

.. rest_parameters:: parameters.yaml

  - admin_project_id: admin_project_id
  - host_name: hostname

Response
--------

.. rest_parameters:: parameters.yaml

  - volume_count: total_count_str
  - total_volume_gb: totalGigabytesUsedStr
  - total_snapshot_gb: totalSnapshotsUsedStr
  - project: project_id_2
  - host: host_name_1
  - snapshot_count: totalSnapshotsUsed

**Example Show Host Details**

.. literalinclude:: ./samples/hosts-get-response.json
   :language: javascript