Merge "Add server groups and server group members quota management in Horizon"

This commit is contained in:
Zuul 2018-05-07 19:37:25 +00:00 committed by Gerrit Code Review
commit 71fe288d88
6 changed files with 19 additions and 0 deletions

View File

@ -57,6 +57,8 @@ class ServicesViewTests(test.BaseAdminViewTests):
'<Quota: (instances, 10)>',
'<Quota: (cores, 10)>',
'<Quota: (key_pairs, 100)>',
'<Quota: (server_groups, 10)>',
'<Quota: (server_group_members, 10)>',
'<Quota: (injected_file_path_bytes, 255)>',
]
self._check_quotas_data(res, 'compute_quotas', expected_data)

View File

@ -35,6 +35,9 @@ class UpdateDefaultComputeQuotasAction(workflows.Action):
metadata_items = forms.IntegerField(min_value=-1,
label=_("Metadata Items"))
key_pairs = forms.IntegerField(min_value=-1, label=_("Key Pairs"))
server_groups = forms.IntegerField(min_value=-1, label=_("Server Groups"))
server_group_members = forms.IntegerField(
min_value=-1, label=_("Server Group Members"))
injected_files = forms.IntegerField(min_value=-1,
label=_("Injected Files"))
injected_file_content_bytes = forms.IntegerField(

View File

@ -102,6 +102,9 @@ class ComputeQuotaAction(CommonQuotaAction):
metadata_items = forms.IntegerField(min_value=-1,
label=_("Metadata Items"))
key_pairs = forms.IntegerField(min_value=-1, label=_("Key Pairs"))
server_groups = forms.IntegerField(min_value=-1, label=_("Server Groups"))
server_group_members = forms.IntegerField(
min_value=-1, label=_("Server Group Members"))
injected_files = forms.IntegerField(min_value=-1,
label=_("Injected Files"))
injected_file_content_bytes = forms.IntegerField(

View File

@ -300,6 +300,8 @@ def data(TEST):
'injected_files': '1',
'cores': '10',
'key_pairs': 100,
'server_groups': 10,
'server_group_members': 10,
'injected_file_path_bytes': 255,
}
quota = quotas.QuotaSet(quotas.QuotaSetManager(None), quota_data)

View File

@ -39,6 +39,8 @@ NOVA_COMPUTE_QUOTA_FIELDS = {
"injected_file_path_bytes",
"ram",
"key_pairs",
"server_groups",
"server_group_members",
}
# We no longer supports nova-network, so network related quotas from nova

View File

@ -0,0 +1,7 @@
---
features:
- |
Added server groups and server group members quota management.
Users can specify their values when creating or modifying project
information, and users can also change their quota default values
on the Admin-> System-> Defaults page.