Skip to content

Commit d8cb241

Browse files
committed
image: Use pagination helper
Change-Id: Ib44febe1a7db4fa40d926d21ed4f5ae6764262bc Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
1 parent caf7fae commit d8cb241

2 files changed

Lines changed: 8 additions & 16 deletions

File tree

openstackclient/image/v2/task.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from osc_lib import utils
1919

2020
from openstackclient import command
21+
from openstackclient.common import pagination
2122
from openstackclient.i18n import _
2223

2324
_formatters = {
@@ -117,22 +118,7 @@ def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
117118
'by comma)'
118119
),
119120
)
120-
parser.add_argument(
121-
'--limit',
122-
metavar='<num-tasks>',
123-
type=int,
124-
help=_('Maximum number of tasks to display.'),
125-
)
126-
parser.add_argument(
127-
'--marker',
128-
metavar='<task>',
129-
help=_(
130-
'The last task of the previous page. '
131-
'Display list of tasks after marker. '
132-
'Display all tasks if not specified. '
133-
'(name or ID)'
134-
),
135-
)
121+
pagination.add_marker_pagination_option_to_parser(parser)
136122
parser.add_argument(
137123
'--type',
138124
metavar='<type>',
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
features:
3+
- |
4+
A number of list commands now accept a ``--max-items`` parameter. When
5+
specified, this configures the amount of resources to retrieve from the
6+
server.

0 commit comments

Comments
 (0)