diff --git a/openstack_dashboard/dashboards/admin/defaults/tests.py b/openstack_dashboard/dashboards/admin/defaults/tests.py index f330a284a7..83ebbc3b31 100644 --- a/openstack_dashboard/dashboards/admin/defaults/tests.py +++ b/openstack_dashboard/dashboards/admin/defaults/tests.py @@ -57,6 +57,8 @@ class ServicesViewTests(test.BaseAdminViewTests): '', '', '', + '', + '', '', ] self._check_quotas_data(res, 'compute_quotas', expected_data) diff --git a/openstack_dashboard/dashboards/admin/defaults/workflows.py b/openstack_dashboard/dashboards/admin/defaults/workflows.py index c30dd67440..3ea8970d8c 100644 --- a/openstack_dashboard/dashboards/admin/defaults/workflows.py +++ b/openstack_dashboard/dashboards/admin/defaults/workflows.py @@ -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( diff --git a/openstack_dashboard/dashboards/identity/projects/workflows.py b/openstack_dashboard/dashboards/identity/projects/workflows.py index 83e16641da..d3766e439b 100644 --- a/openstack_dashboard/dashboards/identity/projects/workflows.py +++ b/openstack_dashboard/dashboards/identity/projects/workflows.py @@ -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( diff --git a/openstack_dashboard/test/test_data/nova_data.py b/openstack_dashboard/test/test_data/nova_data.py index dbd0e78cbe..24096a766e 100644 --- a/openstack_dashboard/test/test_data/nova_data.py +++ b/openstack_dashboard/test/test_data/nova_data.py @@ -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) diff --git a/openstack_dashboard/usage/quotas.py b/openstack_dashboard/usage/quotas.py index 39aab80a71..5777d1324f 100644 --- a/openstack_dashboard/usage/quotas.py +++ b/openstack_dashboard/usage/quotas.py @@ -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 diff --git a/releasenotes/notes/add-server-groups-quota-management-0c1dc5763a3b893c.yaml b/releasenotes/notes/add-server-groups-quota-management-0c1dc5763a3b893c.yaml new file mode 100644 index 0000000000..d8bb552992 --- /dev/null +++ b/releasenotes/notes/add-server-groups-quota-management-0c1dc5763a3b893c.yaml @@ -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.