diff options
| author | Radoslaw Smigielski <radoslaw.smigielski@nokia.com> | 2018-12-10 19:18:05 +0100 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2019-02-04 18:52:13 +0000 |
| commit | aaf73cbf6d51a4a3b25cc0a5f1b7c5fb0d462c57 (patch) | |
| tree | f4d2ad092923062834410a98d7a4fc2718ae2593 /openstackclient/image/v2 | |
| parent | b90c780d2b99a91dd479bcc5f20caddcfb652f76 (diff) | |
| download | python-openstackclient-aaf73cbf6d51a4a3b25cc0a5f1b7c5fb0d462c57.tar.gz | |
Fix --limit option in image list sub-command
Client site fix of --limit option.
This bugfix makes client "image list" command working again with
"--limit" option. This option was ignored and even if user specified it,
still list of all available images was returned.
Story: 2004314
Change-Id: I30a78d65a644c9b7d23706a6637ce77bca2c2386
Depends-On: https://review.openstack.org/#/c/634776/
Diffstat (limited to 'openstackclient/image/v2')
| -rw-r--r-- | openstackclient/image/v2/image.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py index 06eebe98..1464c7b8 100644 --- a/openstackclient/image/v2/image.py +++ b/openstackclient/image/v2/image.py @@ -630,6 +630,9 @@ class ListImage(command.Lister): # List of image data received data = [] + limit = None + if 'limit' in kwargs: + limit = kwargs['limit'] if 'marker' in kwargs: data = image_client.api.image_list(**kwargs) else: @@ -642,6 +645,8 @@ class ListImage(command.Lister): data.extend(page) # Set the marker to the id of the last item we received marker = page[-1]['id'] + if limit: + break if parsed_args.property: for attr, value in parsed_args.property.items(): |
