summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--designateclient/v2/cli/recordsets.py4
-rw-r--r--designateclient/v2/cli/zones.py3
2 files changed, 7 insertions, 0 deletions
diff --git a/designateclient/v2/cli/recordsets.py b/designateclient/v2/cli/recordsets.py
index fc0f29a..255e4b3 100644
--- a/designateclient/v2/cli/recordsets.py
+++ b/designateclient/v2/cli/recordsets.py
@@ -19,6 +19,7 @@ import logging
from cliff import command
from cliff import lister
from cliff import show
+from openstackclient.common import exceptions as osc_exc
import six
from designateclient import utils
@@ -141,6 +142,9 @@ class CreateRecordSetCommand(show.ShowOne):
description=parsed_args.description,
ttl=parsed_args.ttl)
+ if data['code'] == 413:
+ msg = "Quota limit reached for recordset creation"
+ raise osc_exc.CommandError(msg)
_format_recordset(data)
return six.moves.zip(*sorted(six.iteritems(data)))
diff --git a/designateclient/v2/cli/zones.py b/designateclient/v2/cli/zones.py
index 465c3ed..6751f1f 100644
--- a/designateclient/v2/cli/zones.py
+++ b/designateclient/v2/cli/zones.py
@@ -143,6 +143,9 @@ class CreateZoneCommand(show.ShowOne):
data = client.zones.create(
parsed_args.name, parsed_args.type, **payload)
+ if data['code'] == 413:
+ msg = "Quota limit reached for domain creation"
+ raise osc_exc.CommandError(msg)
_format_zone(data)
return six.moves.zip(*sorted(six.iteritems(data)))