Make container list --all work
The caller in openstackclient/object/v1/object.py passed a keyword argument full_listing, but the eventual callee container_list() expected all_data. So, --all did not work at all. The issue passed undetected because --all did not have a test, so we added a unit test. In addition, exisiting tests were using a test set that did not look like the real container listing, so we changed LIST_CONTAINER_RESP to be realistic. Change-Id: Id0604bcab25892e43c26cd6656b2b2eef5daa69b
This commit is contained in:
@@ -87,7 +87,7 @@ class APIv1(api.BaseAPI):
|
||||
|
||||
def container_list(
|
||||
self,
|
||||
all_data=False,
|
||||
full_listing=False,
|
||||
limit=None,
|
||||
marker=None,
|
||||
end_marker=None,
|
||||
@@ -96,7 +96,7 @@ class APIv1(api.BaseAPI):
|
||||
):
|
||||
"""Get containers in an account
|
||||
|
||||
:param boolean all_data:
|
||||
:param boolean full_listing:
|
||||
if True, return a full listing, else returns a max of
|
||||
10000 listings
|
||||
:param integer limit:
|
||||
@@ -113,7 +113,7 @@ class APIv1(api.BaseAPI):
|
||||
|
||||
params['format'] = 'json'
|
||||
|
||||
if all_data:
|
||||
if full_listing:
|
||||
data = listing = self.container_list(
|
||||
limit=limit,
|
||||
marker=marker,
|
||||
@@ -299,7 +299,7 @@ class APIv1(api.BaseAPI):
|
||||
def object_list(
|
||||
self,
|
||||
container=None,
|
||||
all_data=False,
|
||||
full_listing=False,
|
||||
limit=None,
|
||||
marker=None,
|
||||
end_marker=None,
|
||||
@@ -311,7 +311,7 @@ class APIv1(api.BaseAPI):
|
||||
|
||||
:param string container:
|
||||
container name to get a listing for
|
||||
:param boolean all_data:
|
||||
:param boolean full_listing:
|
||||
if True, return a full listing, else returns a max of
|
||||
10000 listings
|
||||
:param integer limit:
|
||||
@@ -332,7 +332,7 @@ class APIv1(api.BaseAPI):
|
||||
return None
|
||||
|
||||
params['format'] = 'json'
|
||||
if all_data:
|
||||
if full_listing:
|
||||
data = listing = self.object_list(
|
||||
container=container,
|
||||
limit=limit,
|
||||
|
||||
Reference in New Issue
Block a user