a96fad9f3b
Using the wrong character resulted in the wrong title level being used for the response codes, which in turn caused the "detail" show/hide toggle to not be able to hide all of the per-endpoint details. This corrects these to be at the correct level. Also ran into issues after changing them where sphinx was not happy with the random title levels. This appears to be due to the order processed and whether not earlier included files had all subsequent levels. Adding an additional title in our first included file resolved that problem. Change-Id: I19405778980310f2d6d06eb7b23102f74a3d6e03 Closes-bug: #1755566
109 lines
2.0 KiB
ReStructuredText
109 lines
2.0 KiB
ReStructuredText
.. -*- rst -*-
|
|
|
|
Hosts extension (os-hosts)
|
|
==========================
|
|
|
|
Administrators only, depending on policy settings.
|
|
|
|
Lists, shows hosts.
|
|
|
|
|
|
List all hosts for a project
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: GET /v3/{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
|
|
|
|
- hosts: hosts
|
|
- service-status: 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 for a project
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.. rest_method:: GET /v3/{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
|
|
|
|
- host: host
|
|
- volume_count: total_count
|
|
- total_volume_gb: totalGigabytesUsed
|
|
- total_snapshot_gb: totalSnapshotsUsed
|
|
- project: project_id_2
|
|
- host: host_name_1
|
|
- snapshot_count: totalSnapshotsUsed
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ./samples/hosts-get-response.json
|
|
:language: javascript
|