Merge "Add --marker option to "server list" command."
This commit is contained in:
commit
e63de0db2d
@ -187,6 +187,7 @@ List servers
|
|||||||
[--all-projects]
|
[--all-projects]
|
||||||
[--project <project> [--project-domain <project-domain>]]
|
[--project <project> [--project-domain <project-domain>]]
|
||||||
[--long]
|
[--long]
|
||||||
|
[--marker <server>]
|
||||||
|
|
||||||
.. option:: --reservation-id <reservation-id>
|
.. option:: --reservation-id <reservation-id>
|
||||||
|
|
||||||
@ -250,6 +251,11 @@ List servers
|
|||||||
|
|
||||||
List additional fields in output
|
List additional fields in output
|
||||||
|
|
||||||
|
.. option:: --marker <server>
|
||||||
|
|
||||||
|
The last server (name or ID) of the previous page. Display list of servers
|
||||||
|
after marker. Display all servers if not specified.
|
||||||
|
|
||||||
server lock
|
server lock
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
@ -747,6 +747,14 @@ class ListServer(lister.Lister):
|
|||||||
default=False,
|
default=False,
|
||||||
help=_('List additional fields in output'),
|
help=_('List additional fields in output'),
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--marker',
|
||||||
|
metavar='<marker>',
|
||||||
|
default=None,
|
||||||
|
help=('The last server (name or ID) of the previous page. Display'
|
||||||
|
' list of servers after marker. Display all servers if not'
|
||||||
|
' specified.')
|
||||||
|
)
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
@utils.log_method(log)
|
@utils.log_method(log)
|
||||||
@ -830,7 +838,14 @@ class ListServer(lister.Lister):
|
|||||||
'Networks',
|
'Networks',
|
||||||
)
|
)
|
||||||
mixed_case_fields = []
|
mixed_case_fields = []
|
||||||
data = compute_client.servers.list(search_opts=search_opts)
|
|
||||||
|
marker_id = None
|
||||||
|
if parsed_args.marker:
|
||||||
|
marker_id = utils.find_resource(compute_client.servers,
|
||||||
|
parsed_args.marker).id
|
||||||
|
|
||||||
|
data = compute_client.servers.list(search_opts=search_opts,
|
||||||
|
marker=marker_id)
|
||||||
return (column_headers,
|
return (column_headers,
|
||||||
(utils.get_item_properties(
|
(utils.get_item_properties(
|
||||||
s, columns,
|
s, columns,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user