summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-04-02 16:57:17 +0000
committerGerrit Code Review <review@openstack.org>2015-04-02 16:57:17 +0000
commit12a0eeef386645a62668f7e788719148a38832d8 (patch)
tree53fe7eba983ab34847553a4080233f9952b06a7e
parent3d74ec0dfa36b393b790d4f140715c2d3348b7e4 (diff)
parent8130c4cb6225ea9294eb62a28046582f0fced084 (diff)
downloaddesignate-12a0eeef386645a62668f7e788719148a38832d8.tar.gz
Merge "Add global limits to V2 limits endpoint"
-rw-r--r--designate/api/v2/controllers/limits.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/designate/api/v2/controllers/limits.py b/designate/api/v2/controllers/limits.py
index 949a7df8..062502e3 100644
--- a/designate/api/v2/controllers/limits.py
+++ b/designate/api/v2/controllers/limits.py
@@ -16,11 +16,13 @@
import pecan
from oslo_log import log as logging
+from oslo_config import cfg
from designate.api.v2.controllers import rest
LOG = logging.getLogger(__name__)
+CONF = cfg.CONF
class LimitsController(rest.RestController):
@@ -32,8 +34,19 @@ class LimitsController(rest.RestController):
absolute_limits = self.central_api.get_absolute_limits(context)
return {
+ # Resource Creation Limits
"max_zones": absolute_limits['domains'],
"max_zone_recordsets": absolute_limits['domain_recordsets'],
"max_zone_records": absolute_limits['domain_records'],
- "max_recordset_records": absolute_limits['recordset_records']
+ "max_recordset_records": absolute_limits['recordset_records'],
+
+ # Resource Field Value Limits
+ "min_ttl": CONF['service:central'].min_ttl,
+ "max_recordset_name_length":
+ CONF['service:central'].max_domain_name_len,
+ "max_recordset_name_length":
+ CONF['service:central'].max_recordset_name_len,
+
+ # Resource Fetching Limits
+ "max_page_limit": CONF['service:api'].max_limit_v2,
}