Merge "Move method to v2 volumes_client"

This commit is contained in:
Jenkins 2016-09-13 02:01:58 +00:00 committed by Gerrit Code Review
commit 78b4d29fb5
2 changed files with 13 additions and 13 deletions

View File

@ -52,19 +52,6 @@ class BaseVolumesClient(rest_client.RestClient):
self.expected_success(200, resp.status)
return rest_client.ResponseBody(resp, body)
def show_backend_capabilities(self, host):
"""Shows capabilities for a storage back end.
Output params: see http://developer.openstack.org/
api-ref-blockstorage-v2.html
#showBackendCapabilities
"""
url = 'capabilities/%s' % host
resp, body = self.get(url)
body = json.loads(body)
self.expected_success(200, resp.status)
return rest_client.ResponseBody(resp, body)
def show_volume(self, volume_id):
"""Returns the details of a single volume."""
url = "volumes/%s" % volume_id

View File

@ -56,3 +56,16 @@ class VolumesClient(base_volumes_client.BaseVolumesClient):
body = json.loads(body)
self.expected_success(200, resp.status)
return rest_client.ResponseBody(resp, body)
def show_backend_capabilities(self, host):
"""Shows capabilities for a storage back end.
Output params: see http://developer.openstack.org/
api-ref-blockstorage-v2.html
#showBackendCapabilities
"""
url = 'capabilities/%s' % host
resp, body = self.get(url)
body = json.loads(body)
self.expected_success(200, resp.status)
return rest_client.ResponseBody(resp, body)