diff options
Diffstat (limited to 'openstackclient/object/v1/lib/container.py')
| -rw-r--r-- | openstackclient/object/v1/lib/container.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/openstackclient/object/v1/lib/container.py b/openstackclient/object/v1/lib/container.py index 5103d9d4..0bae2349 100644 --- a/openstackclient/object/v1/lib/container.py +++ b/openstackclient/object/v1/lib/container.py @@ -67,19 +67,18 @@ def list_containers( data.extend(listing) return data - object_url = url - query = "format=json" + params = { + 'format': 'json', + } if marker: - query += '&marker=%s' % marker + params['marker'] = marker if limit: - query += '&limit=%d' % limit + params['limit'] = limit if end_marker: - query += '&end_marker=%s' % end_marker + params['end_marker'] = end_marker if prefix: - query += '&prefix=%s' % prefix - url = "%s?%s" % (object_url, query) - response = api.request('GET', url) - return response.json() + params['prefix'] = prefix + return api.list(url, params=params) def show_container( @@ -95,9 +94,8 @@ def show_container( :returns: dict of returned headers """ - object_url = "%s/%s" % (url, container) + response = api.head("%s/%s" % (url, container)) url_parts = urlparse(url) - response = api.request('HEAD', object_url) data = { 'account': url_parts.path.split('/')[-1], 'container': container, |
