From c4afd1f7e79858a37d4a4a1ae6d24a6dc6f325c7 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 24 Sep 2021 01:50:34 +0900 Subject: [PATCH] Deprecate the unused quota_network_gateway parameter The quota_network_gateway parameter was initially implemented as part of the NVP plugin[1], which was later rebranded to vmware plugin[2] and separated from neutron as NSX plugin. However this parameter was later removed from NSX plugin[3] and is no longer used. [1] https://opendev.org/openstack/neutron/commit/4ec58b3da48 [2] https://opendev.org/openstack/neutron/commit/1ba129e6a38 [3] https://opendev.org/x/vmware-nsx/commit/79275a99820 Change-Id: Ib421452ced7bc297af9c904849df0977d4a9c386 --- manifests/quota.pp | 18 ++++++++++++------ ...quota_network_gateway-84a87fcd89b9c54f.yaml | 5 +++++ spec/classes/neutron_quota_spec.rb | 10 ++++++++-- 3 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 releasenotes/notes/deprecate-quota_network_gateway-84a87fcd89b9c54f.yaml diff --git a/manifests/quota.pp b/manifests/quota.pp index 0d7aa2375..b93d36fc6 100644 --- a/manifests/quota.pp +++ b/manifests/quota.pp @@ -42,10 +42,6 @@ # (optional) Default driver to use for quota checks. # Defaults to $::os_service_default. # -# [*quota_network_gateway*] -# (optional) Number of network gateways allowed per tenant, -1 for unlimited. -# Defaults to '5'. -# # [*quota_rbac_policy*] # (optional) Number of rbac policies allowed per tenant. # A negative value means unlimited. @@ -62,6 +58,10 @@ # A negative value means unlimited. # Defaults to undef. # +# [*quota_network_gateway*] +# (optional) Number of network gateways allowed per tenant, -1 for unlimited. +# Defaults to undef. +# class neutron::quota ( $default_quota = $::os_service_default, $quota_network = $::os_service_default, @@ -74,12 +74,12 @@ class neutron::quota ( $quota_security_group = $::os_service_default, $quota_security_group_rule = $::os_service_default, $quota_driver = $::os_service_default, - $quota_network_gateway = 5, # rbac extension $quota_rbac_policy = $::os_service_default, # DEPRECATED PARAMETERS $quota_packet_filter = undef, $quota_vip = undef, + $quota_network_gateway = undef, ) { include neutron::deps @@ -92,6 +92,13 @@ class neutron::quota ( warning('The neutron::quota::quota_vip parameter is deprecated and has no effect') } + if $quota_network_gateway != undef { + warning('The neutron::quota::quota_network_gateway parameter is deprecated and has no effect') + } + neutron_config { + 'quotas/quota_network_gateway': ensure => absent; + } + neutron_config { 'quotas/default_quota': value => $default_quota; 'quotas/quota_network': value => $quota_network; @@ -102,7 +109,6 @@ class neutron::quota ( 'quotas/quota_security_group': value => $quota_security_group; 'quotas/quota_security_group_rule': value => $quota_security_group_rule; 'quotas/quota_driver': value => $quota_driver; - 'quotas/quota_network_gateway': value => $quota_network_gateway; 'quotas/quota_rbac_policy': value => $quota_rbac_policy; } } diff --git a/releasenotes/notes/deprecate-quota_network_gateway-84a87fcd89b9c54f.yaml b/releasenotes/notes/deprecate-quota_network_gateway-84a87fcd89b9c54f.yaml new file mode 100644 index 000000000..8f8a02855 --- /dev/null +++ b/releasenotes/notes/deprecate-quota_network_gateway-84a87fcd89b9c54f.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The ``neutron::quota::quota_network_gateway`` parameter has been deprecated + and has no effect now. diff --git a/spec/classes/neutron_quota_spec.rb b/spec/classes/neutron_quota_spec.rb index 71ec1889e..2686b013d 100644 --- a/spec/classes/neutron_quota_spec.rb +++ b/spec/classes/neutron_quota_spec.rb @@ -7,7 +7,14 @@ describe 'neutron::quota' do let :default_params do { - :quota_network_gateway => 5, + :quota_network => '', + :quota_subnet => '', + :quota_port => '', + :quota_router => '', + :quota_floatingip => '', + :quota_security_group => '', + :quota_security_group_rule => '', + :quota_rbac_policy => '', } end @@ -38,7 +45,6 @@ describe 'neutron::quota' do :quota_floatingip => 100, :quota_security_group => 20, :quota_security_group_rule => 200, - :quota_network_gateway => 5, :quota_rbac_policy => 10 }) end