From daba7cba303f5ae9e6becbc3950dd2b21f621ad6 Mon Sep 17 00:00:00 2001 From: Steve Leon Date: Wed, 10 Apr 2013 18:13:31 -0700 Subject: [PATCH] Adding backup resource to quota command Adding handle for error 422 Change-Id: I4c60984ec7196f346da99769f21f7372a35b3f86 --- reddwarfclient/client.py | 2 +- reddwarfclient/mcli.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/reddwarfclient/client.py b/reddwarfclient/client.py index 0c8a3870..61374d08 100644 --- a/reddwarfclient/client.py +++ b/reddwarfclient/client.py @@ -184,7 +184,7 @@ class ReddwarfHTTPClient(httplib2.Http): else: body = None - if resp.status in (400, 401, 403, 404, 408, 409, 413, 500, 501): + if resp.status in (400, 401, 403, 404, 408, 409, 413, 422, 500, 501): raise exceptions.from_response(resp, body) return resp, body diff --git a/reddwarfclient/mcli.py b/reddwarfclient/mcli.py index a9df52bb..2e3a161c 100644 --- a/reddwarfclient/mcli.py +++ b/reddwarfclient/mcli.py @@ -71,7 +71,8 @@ class QuotaCommands(common.AuthedCommandsBase): params = ['id', 'instances', - 'volumes'] + 'volumes', + 'backups'] def list(self): """List all quotas for a tenant"""