diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-06-11 05:42:01 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-06-11 05:42:01 +0000 |
commit | 344a38a661d2379cda5675566dc4e185a3d1050f (patch) | |
tree | 965a57e063f275b0aaef470af9fbbda775fe96de | |
parent | 13d8666862b271600bc50fa4466e62f68cf251d3 (diff) | |
parent | 71cace23fc32a0a820d84eda0d2260e2a1ed94c6 (diff) | |
download | python-troveclient-344a38a661d2379cda5675566dc4e185a3d1050f.tar.gz |
Merge "Added optional marker/limit to list command"
-rw-r--r-- | troveclient/v1/shell.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/troveclient/v1/shell.py b/troveclient/v1/shell.py index 6f1abde..3c25d10 100644 --- a/troveclient/v1/shell.py +++ b/troveclient/v1/shell.py @@ -102,10 +102,16 @@ def do_flavor_show(cs, args): # Instance related calls +@utils.arg('--limit', metavar='<limit>', type=int, default=None, + help='Limit the number of results displayed.') +@utils.arg('--marker', metavar='<ID>', type=str, default=None, + help='Begin displaying the results for IDs greater than the ' + 'specified marker. When used with --limit, set this to ' + 'the last ID displayed in the previous run.') @utils.service_type('database') def do_list(cs, args): """Lists all the instances.""" - instances = cs.instances.list() + instances = cs.instances.list(limit=args.limit, marker=args.marker) for instance in instances: setattr(instance, 'flavor_id', instance.flavor['id']) |