Adds api_export_size attribute to admin API
Closes-Bug: #1513226 Change-Id: I23bcb9ebab6ee56fcdbe5916533a4a8249291f8f
This commit is contained in:
parent
e5e92222e2
commit
9fe1eea2a8
@ -30,6 +30,7 @@ class QuotasView(base_view.BaseView):
|
|||||||
def show_basic(self, context, request, quota):
|
def show_basic(self, context, request, quota):
|
||||||
"""Basic view of a quota"""
|
"""Basic view of a quota"""
|
||||||
return {
|
return {
|
||||||
|
"api_export_size": quota['api_export_size'],
|
||||||
"zones": quota['zones'],
|
"zones": quota['zones'],
|
||||||
"zone_records": quota['zone_records'],
|
"zone_records": quota['zone_records'],
|
||||||
"zone_recordsets": quota['zone_recordsets'],
|
"zone_recordsets": quota['zone_recordsets'],
|
||||||
@ -39,6 +40,6 @@ class QuotasView(base_view.BaseView):
|
|||||||
def load(self, context, request, body):
|
def load(self, context, request, body):
|
||||||
"""Extract a "central" compatible dict from an API call"""
|
"""Extract a "central" compatible dict from an API call"""
|
||||||
valid_keys = ('zone_records', 'zone_recordsets', 'zones',
|
valid_keys = ('zone_records', 'zone_recordsets', 'zones',
|
||||||
'recordset_records')
|
'recordset_records', 'api_export_size')
|
||||||
|
|
||||||
return self._load(context, request, body, valid_keys)
|
return self._load(context, request, body, valid_keys)
|
||||||
|
@ -40,6 +40,7 @@ class AdminApiQuotasTest(AdminApiTestCase):
|
|||||||
|
|
||||||
self.assertIn('quota', response.json)
|
self.assertIn('quota', response.json)
|
||||||
self.assertIn('zones', response.json['quota'])
|
self.assertIn('zones', response.json['quota'])
|
||||||
|
self.assertIn('api_export_size', response.json['quota'])
|
||||||
self.assertIn('zone_records', response.json['quota'])
|
self.assertIn('zone_records', response.json['quota'])
|
||||||
self.assertIn('zone_recordsets', response.json['quota'])
|
self.assertIn('zone_recordsets', response.json['quota'])
|
||||||
self.assertIn('recordset_records', response.json['quota'])
|
self.assertIn('recordset_records', response.json['quota'])
|
||||||
|
@ -59,6 +59,7 @@ Get Quotas
|
|||||||
|
|
||||||
{
|
{
|
||||||
"quota": {
|
"quota": {
|
||||||
|
"api_export_size: 1000,
|
||||||
"zones": 10,
|
"zones": 10,
|
||||||
"recordset_records": 20,
|
"recordset_records": 20,
|
||||||
"zone_records": 500,
|
"zone_records": 500,
|
||||||
@ -66,6 +67,8 @@ Get Quotas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:api_export_size: Number of records allowed in a synchronous zone export
|
||||||
|
done via API
|
||||||
:form zones: Number of zones the tenant is allowed to own
|
:form zones: Number of zones the tenant is allowed to own
|
||||||
:form recordset_records: Number of records allowed per recordset
|
:form recordset_records: Number of records allowed per recordset
|
||||||
:form zone_records: Number of records allowed per zone
|
:form zone_records: Number of records allowed per zone
|
||||||
@ -107,6 +110,7 @@ Update Quotas
|
|||||||
|
|
||||||
{
|
{
|
||||||
"quota": {
|
"quota": {
|
||||||
|
"api_export_size: 1000,
|
||||||
"zones": 1000,
|
"zones": 1000,
|
||||||
"recordset_records": 20,
|
"recordset_records": 20,
|
||||||
"zone_records": 50,
|
"zone_records": 50,
|
||||||
|
Loading…
Reference in New Issue
Block a user