diff options
Diffstat (limited to 'novaclient/v1_1/shell.py')
-rw-r--r-- | novaclient/v1_1/shell.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/novaclient/v1_1/shell.py b/novaclient/v1_1/shell.py index 79799db3..ef426dea 100644 --- a/novaclient/v1_1/shell.py +++ b/novaclient/v1_1/shell.py @@ -2694,10 +2694,7 @@ def _quota_show(quotas): def _quota_update(manager, identifier, args): updates = {} - if not utils.is_uuid_like(identifier): - raise exceptions.CommandError( - "error: Invalid tenant-id %s supplied for update" - % identifier) + utils.check_uuid_like(identifier) for resource in _quota_resources: val = getattr(args, resource, None) if val is not None: @@ -2710,26 +2707,28 @@ def _quota_update(manager, identifier, args): @utils.arg('--tenant', metavar='<tenant-id>', default=None, - help='UUID or name of tenant to list the quotas for.') + help='UUID of tenant to list the quotas for.') def do_quota_show(cs, args): """List the quotas for a tenant.""" if not args.tenant: _quota_show(cs.quotas.get(cs.client.tenant_id)) else: + utils.check_uuid_like(args.tenant) _quota_show(cs.quotas.get(args.tenant)) @utils.arg('--tenant', metavar='<tenant-id>', default=None, - help='UUID or name of tenant to list the default quotas for.') + help='UUID of tenant to list the default quotas for.') def do_quota_defaults(cs, args): """List the default quotas for a tenant.""" if not args.tenant: _quota_show(cs.quotas.defaults(cs.client.tenant_id)) else: + utils.check_uuid_like(args.tenant) _quota_show(cs.quotas.defaults(args.tenant)) |