From 0b6fdcbe4c3f3142fdd18bfd827653d894607941 Mon Sep 17 00:00:00 2001 From: Tang Chen Date: Fri, 29 Jan 2016 18:59:03 +0800 Subject: Remove marker and loop from "image list" command Since --page-size has never worked, there is no paginate logic needs to be implemented in "image list" command. So remove the unnecessary loop. And also, the marker is not necessary because --marker option has not been implemented. Will add it back when implementing --marker option. Change-Id: I71fea1502f92f447a49697edb52e8e82f336772f Partial-Bug: #1540988 --- openstackclient/image/v2/image.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'openstackclient/image') diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py index 39a53195..842c6f20 100644 --- a/openstackclient/image/v2/image.py +++ b/openstackclient/image/v2/image.py @@ -474,16 +474,7 @@ class ListImage(command.Lister): column_headers = columns # List of image data received - data = [] - # No pages received yet, so start the page marker at None. - marker = None - while True: - page = image_client.api.image_list(marker=marker, **kwargs) - if not page: - break - data.extend(page) - # Set the marker to the id of the last item we received - marker = page[-1]['id'] + data = image_client.api.image_list(**kwargs) if parsed_args.property: # NOTE(dtroyer): coerce to a list to subscript it in py3 -- cgit v1.2.1