Allow admin to edit project quotas for fixed IPs
Fixes bug #1157950 Change-Id: If8bf548f66ff13b2b5218ca6c1e8c69c054e0a59
This commit is contained in:
parent
1277651041
commit
d5f2dc38e6
@ -57,17 +57,7 @@ class ServicessViewTests(test.BaseAdminViewTests):
|
|||||||
'<Quota: (gigabytes, 1000)>',
|
'<Quota: (gigabytes, 1000)>',
|
||||||
'<Quota: (ram, 10000)>',
|
'<Quota: (ram, 10000)>',
|
||||||
'<Quota: (floating_ips, 1)>',
|
'<Quota: (floating_ips, 1)>',
|
||||||
'<Quota: (instances, 10)>',
|
'<Quota: (fixed_ips, 10)>',
|
||||||
'<Quota: (volumes, 1)>',
|
|
||||||
'<Quota: (cores, 10)>',
|
|
||||||
'<Quota: (security_groups, 10)>',
|
|
||||||
'<Quota: (security_group_rules, 20)>',
|
|
||||||
'<Quota: (injected_file_content_bytes, 1)>',
|
|
||||||
'<Quota: (metadata_items, 1)>',
|
|
||||||
'<Quota: (injected_files, 1)>',
|
|
||||||
'<Quota: (gigabytes, 1000)>',
|
|
||||||
'<Quota: (ram, 10000)>',
|
|
||||||
'<Quota: (floating_ips, 1)>',
|
|
||||||
'<Quota: (instances, 10)>',
|
'<Quota: (instances, 10)>',
|
||||||
'<Quota: (volumes, 1)>',
|
'<Quota: (volumes, 1)>',
|
||||||
'<Quota: (cores, 10)>',
|
'<Quota: (cores, 10)>',
|
||||||
|
@ -54,6 +54,7 @@ class UpdateProjectQuotaAction(workflows.Action):
|
|||||||
gigabytes = forms.IntegerField(min_value=-1, label=_("Gigabytes"))
|
gigabytes = forms.IntegerField(min_value=-1, label=_("Gigabytes"))
|
||||||
ram = forms.IntegerField(min_value=-1, label=_("RAM (MB)"))
|
ram = forms.IntegerField(min_value=-1, label=_("RAM (MB)"))
|
||||||
floating_ips = forms.IntegerField(min_value=-1, label=_("Floating IPs"))
|
floating_ips = forms.IntegerField(min_value=-1, label=_("Floating IPs"))
|
||||||
|
fixed_ips = forms.IntegerField(min_value=-1, label=_("Fixed IPs"))
|
||||||
security_groups = forms.IntegerField(min_value=-1,
|
security_groups = forms.IntegerField(min_value=-1,
|
||||||
label=_("Security Groups"))
|
label=_("Security Groups"))
|
||||||
security_group_rules = forms.IntegerField(min_value=-1,
|
security_group_rules = forms.IntegerField(min_value=-1,
|
||||||
|
@ -312,6 +312,7 @@ def data(TEST):
|
|||||||
gigabytes='1000',
|
gigabytes='1000',
|
||||||
ram=10000,
|
ram=10000,
|
||||||
floating_ips='1',
|
floating_ips='1',
|
||||||
|
fixed_ips='10',
|
||||||
instances='10',
|
instances='10',
|
||||||
injected_files='1',
|
injected_files='1',
|
||||||
cores='10',
|
cores='10',
|
||||||
|
@ -62,6 +62,7 @@ class QuotaTests(test.APITestCase):
|
|||||||
'injected_files': {'quota': 1},
|
'injected_files': {'quota': 1},
|
||||||
'security_groups': {'quota': 10},
|
'security_groups': {'quota': 10},
|
||||||
'security_group_rules': {'quota': 20},
|
'security_group_rules': {'quota': 20},
|
||||||
|
'fixed_ips': {'quota': 10},
|
||||||
'gigabytes': {'available': 920, 'used': 80, 'quota': 1000},
|
'gigabytes': {'available': 920, 'used': 80, 'quota': 1000},
|
||||||
'ram': {'available': 8976, 'used': 1024, 'quota': 10000},
|
'ram': {'available': 8976, 'used': 1024, 'quota': 10000},
|
||||||
'floating_ips': {'available': 0, 'used': 2, 'quota': 1},
|
'floating_ips': {'available': 0, 'used': 2, 'quota': 1},
|
||||||
@ -99,6 +100,7 @@ class QuotaTests(test.APITestCase):
|
|||||||
'injected_files': {'quota': 1},
|
'injected_files': {'quota': 1},
|
||||||
'security_groups': {'quota': 10},
|
'security_groups': {'quota': 10},
|
||||||
'security_group_rules': {'quota': 20},
|
'security_group_rules': {'quota': 20},
|
||||||
|
'fixed_ips': {'quota': 10},
|
||||||
'ram': {'available': 8976, 'used': 1024, 'quota': 10000},
|
'ram': {'available': 8976, 'used': 1024, 'quota': 10000},
|
||||||
'floating_ips': {'available': 0, 'used': 2, 'quota': 1},
|
'floating_ips': {'available': 0, 'used': 2, 'quota': 1},
|
||||||
'instances': {'available': 8, 'used': 2, 'quota': 10},
|
'instances': {'available': 8, 'used': 2, 'quota': 10},
|
||||||
@ -133,6 +135,7 @@ class QuotaTests(test.APITestCase):
|
|||||||
'injected_files': {'quota': 1},
|
'injected_files': {'quota': 1},
|
||||||
'security_groups': {'quota': 10},
|
'security_groups': {'quota': 10},
|
||||||
'security_group_rules': {'quota': 20},
|
'security_group_rules': {'quota': 20},
|
||||||
|
'fixed_ips': {'quota': 10},
|
||||||
'ram': {'available': 10000, 'used': 0, 'quota': 10000},
|
'ram': {'available': 10000, 'used': 0, 'quota': 10000},
|
||||||
'floating_ips': {'available': 1, 'used': 0, 'quota': 1},
|
'floating_ips': {'available': 1, 'used': 0, 'quota': 1},
|
||||||
'instances': {'available': 10, 'used': 0, 'quota': 10},
|
'instances': {'available': 10, 'used': 0, 'quota': 10},
|
||||||
@ -176,6 +179,7 @@ class QuotaTests(test.APITestCase):
|
|||||||
'injected_files': {'quota': 1},
|
'injected_files': {'quota': 1},
|
||||||
'security_groups': {'quota': 10},
|
'security_groups': {'quota': 10},
|
||||||
'security_group_rules': {'quota': 20},
|
'security_group_rules': {'quota': 20},
|
||||||
|
'fixed_ips': {'quota': 10},
|
||||||
'gigabytes': {'available': 920, 'used': 80, 'quota': 1000},
|
'gigabytes': {'available': 920, 'used': 80, 'quota': 1000},
|
||||||
'ram': {'available': float("inf"), 'used': 1024,
|
'ram': {'available': float("inf"), 'used': 1024,
|
||||||
'quota': float("inf")},
|
'quota': float("inf")},
|
||||||
|
@ -14,6 +14,7 @@ NOVA_QUOTA_FIELDS = ("metadata_items",
|
|||||||
"injected_file_content_bytes",
|
"injected_file_content_bytes",
|
||||||
"ram",
|
"ram",
|
||||||
"floating_ips",
|
"floating_ips",
|
||||||
|
"fixed_ips",
|
||||||
"security_groups",
|
"security_groups",
|
||||||
"security_group_rules",)
|
"security_group_rules",)
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ netaddr
|
|||||||
python-cinderclient>=1.0.2,<2.0.0
|
python-cinderclient>=1.0.2,<2.0.0
|
||||||
python-glanceclient<2
|
python-glanceclient<2
|
||||||
python-keystoneclient
|
python-keystoneclient
|
||||||
python-novaclient>=2.11.1,<3
|
python-novaclient>=2.12.0,<3
|
||||||
python-quantumclient>=2.2.0,<3.0.0
|
python-quantumclient>=2.2.0,<3.0.0
|
||||||
python-swiftclient>1.1,<2
|
python-swiftclient>1.1,<2
|
||||||
pytz
|
pytz
|
||||||
|
Loading…
Reference in New Issue
Block a user