Skip to content

Commit 32cd99b

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "image: Use pagination helper"
2 parents 760bb6f + d8cb241 commit 32cd99b

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
@@ -19,6 +19,7 @@
1919
from osc_lib import utils
2020

2121
from openstackclient import command
22+
from openstackclient.common import pagination
2223
from openstackclient.i18n import _
2324

2425

@@ -114,22 +115,7 @@ def get_parser(self, prog_name: str) -> argparse.ArgumentParser:
114115
'by comma)'
115116
),
116117
)
117-
parser.add_argument(
118-
'--limit',
119-
metavar='<num-tasks>',
120-
type=int,
121-
help=_('Maximum number of tasks to display.'),
122-
)
123-
parser.add_argument(
124-
'--marker',
125-
metavar='<task>',
126-
help=_(
127-
'The last task of the previous page. '
128-
'Display list of tasks after marker. '
129-
'Display all tasks if not specified. '
130-
'(name or ID)'
131-
),
132-
)
118+
pagination.add_marker_pagination_option_to_parser(parser)
133119
parser.add_argument(
134120
'--type',
135121
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)