10 Commits

Author SHA1 Message Date
zhufl
d4f1e57257 [api-ref]Fix values of service-status in list-hosts
In "List all hosts for a project", service-status should take
the values of ['available', 'unavailable'], (service-state takes
the value of ['enabled', 'disabled']), and because os-services API
uses service_status which requires returning `enabled` and `disabled`,
we need add a new parameter host_service_status for os-hosts API.

https://docs.openstack.org/api-ref/block-storage/v3/index.html#list-all-hosts-for-a-project
partially-implements: blueprint volume-response-schema-validation

Change-Id: Idde4a63f00862599a13bcfcdadc1d4459f27d3a4
2019-08-23 09:41:37 +08:00
Felipe Monteiro
cf80d437a8 api-ref: Correct response body type for show host details
Currently [0] claims that "total_volume_gb" in the response body
is of type int -- but it is actually a string, going off the example
response body as well as the API code, which clearly casts the
value to a str() [1].

[0] https://developer.openstack.org/api-ref/block-storage/v3/index.html?expanded=show-host-details-for-a-project-detail#show-host-details-for-a-project
[1] 95d6d49b01/cinder/api/contrib/hosts.py (L169)

Change-Id: I36486724cc30389d371ec0b18b9b7f96883d193c
2018-11-02 09:53:21 -04:00
Sean McGinnis
a96fad9f3b Fix api-ref response code title levels
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
2018-03-13 15:57:54 -05:00
Sean McGinnis
2e5a91da72 Use rest_status_code for api-ref response codes
Rather than our freeform way of listing response codes in our
api-ref, we should be using the os-api-ref extension option to
get nicely formatted response code listings.

https://docs.openstack.org/os-api-ref/latest/usage.html#rest-status-code

Change-Id: Iee21f54fe7cf0ea28258966e2d0f8fa2849c83f2
2018-03-08 21:59:37 -06:00
lihaijing
4403ed17ca Api-ref: change 'tenant' to 'project' in v2 doc
Since 'tenant' is the old term, all things should now refer to 'project'.

Change-Id: I3a255df758583a3c4301041c8ebffb90b8263fef
2017-09-27 18:14:25 +08:00
lihaijing
baf811f20d Api-ref: fix v2/v3 hosts extension api doc
Supplement error response codes and fix parameters problem.

Change-Id: Ia24c6980f437ab6838d64c345bc9c10a100762e1
Closes-Bug: #1715286
2017-09-26 10:33:07 +08:00
Jenkins
f32483c6e4 Merge "api-ref: Clarify os-host GET behavior" 2017-09-19 08:16:55 +00:00
Sean McGinnis
117f614428 api-ref: Normalize response codes
We had a mix of formatting for our API response codes. This
makes it so all have a leading space, no trailing comma, and
no empty Error response labels.

This also addresses a formatting issue with due to the spacing
between the Normal and Error lines that was causing the two to
run together in the formatted HTML, making it harder to read.

Change-Id: Ic411ee9f671c48ce60bda21984dafe55135685ba
2017-09-03 18:17:13 -05:00
Sean McGinnis
86a96625d7 api-ref: Clarify os-host GET behavior
Getting all hosts returns every Cinder service host, regardless
of which service is running on the host. But getting a specific
host will fail if you try it for a host not running cinder-volume.

This looks to be the behavior from the beginning, but there was
nothing denoting this, causing errors and confusion for code that
thought it could get a host from the list, then get detailed info
about that host. The details return volume and snapshot counts,
so it really only makes sense for cinder-volume, so the code ends
up returning a 404 for anything else.

This API design seems a little disjointed, but since this is how
it appears to have always been, just make sure the api docs have
the right details for potential API consumers to know what to
expect.

Change-Id: If53279cfcbbde1297bb2e55e17d17b473e7d0d6e
Closes-bug: #1691144
2017-08-31 20:56:46 -05:00
luqitao
7a3d344717 Adds API documentation for list and show hosts.
Adds v2 and v3 API documentation for list all hosts and show host details.

Change-Id: I43791fded823cd931c2d77a11fa502b2cb5f0105
Closes-Bug: #1558257
2017-03-14 05:36:24 -04:00