From 86a96625d74015d10b179f5f5f34b2940814b62e Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Wed, 30 Aug 2017 14:59:11 -0500 Subject: [PATCH] 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 --- api-ref/source/v2/hosts.inc | 6 +++++- api-ref/source/v3/hosts.inc | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/api-ref/source/v2/hosts.inc b/api-ref/source/v2/hosts.inc index 500a6911e37..9361a5b462d 100644 --- a/api-ref/source/v2/hosts.inc +++ b/api-ref/source/v2/hosts.inc @@ -49,7 +49,11 @@ Show Host Details .. rest_method:: GET /v2/{admin_tenant_id}/os-hosts/{host_name} -Shows details for a host. +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. Normal response codes: 200 diff --git a/api-ref/source/v3/hosts.inc b/api-ref/source/v3/hosts.inc index 0193a134e1d..734426abe3b 100644 --- a/api-ref/source/v3/hosts.inc +++ b/api-ref/source/v3/hosts.inc @@ -49,7 +49,11 @@ Show Host Details for a project .. rest_method:: GET /v3/{admin_project_id}/os-hosts/{host_name} -Shows details for a host. +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. Normal response codes: 200