diff --git a/manifests/server.pp b/manifests/server.pp index d259115b7..8633728b9 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -114,6 +114,10 @@ # Also can be the type of the router on the create request (admin-only attribute). # Defaults to $::os_service_default # +# [*enable_dvr*] +# (optional) Setting the "enable_dvr" flag to "False" will disable "dvr" API extension exposure. +# Defaults to $::os_service_default +# # [*dhcp_load_type*] # (optional) The resource type whos load is being reported by the agent. # The expected values are either 'networks', 'subnets', 'ports'. @@ -236,6 +240,7 @@ class neutron::server ( $enable_new_agents = $::os_service_default, $router_scheduler_driver = 'neutron.scheduler.l3_agent_scheduler.ChanceScheduler', $router_distributed = $::os_service_default, + $enable_dvr = $::os_service_default, $network_scheduler_driver = $::os_service_default, $dhcp_load_type = $::os_service_default, $default_availability_zones = $::os_service_default, @@ -338,6 +343,7 @@ class neutron::server ( 'DEFAULT/enable_new_agents': value => $enable_new_agents; 'DEFAULT/router_scheduler_driver': value => $router_scheduler_driver; 'DEFAULT/router_distributed': value => $router_distributed; + 'DEFAULT/enable_dvr': value => $enable_dvr; 'DEFAULT/allow_automatic_l3agent_failover': value => $allow_automatic_l3agent_failover; 'DEFAULT/allow_automatic_dhcp_failover': value => $allow_automatic_dhcp_failover; 'DEFAULT/network_scheduler_driver': value => $network_scheduler_driver; diff --git a/releasenotes/notes/expose-enable-dvr-c6f94cf187944b79.yaml b/releasenotes/notes/expose-enable-dvr-c6f94cf187944b79.yaml new file mode 100644 index 000000000..c6485cc8c --- /dev/null +++ b/releasenotes/notes/expose-enable-dvr-c6f94cf187944b79.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + New option ``enable_dvr`` is now exposed. The option is added in Pike, and + it allows to disable ``dvr`` API extension exposure when it's known the + deployment is not configured to support DVR routers. diff --git a/spec/classes/neutron_server_spec.rb b/spec/classes/neutron_server_spec.rb index 0d3ab095d..a04b3aab0 100644 --- a/spec/classes/neutron_server_spec.rb +++ b/spec/classes/neutron_server_spec.rb @@ -90,15 +90,24 @@ describe 'neutron::server' do end end - context 'with DVR enabled' do + context 'with DVR enabled for new routers' do before :each do params.merge!(:router_distributed => true) end - it 'should enable DVR' do + it 'should enable DVR for new routers' do is_expected.to contain_neutron_config('DEFAULT/router_distributed').with_value(true) end end + context 'with DVR disabled' do + before :each do + params.merge!(:enable_dvr => false) + end + it 'should disable DVR' do + is_expected.to contain_neutron_config('DEFAULT/enable_dvr').with_value(false) + end + end + context 'with HA routers enabled' do before :each do params.merge!(:l3_ha => true)