diff --git a/manifests/agents/vpnaas.pp b/manifests/agents/vpnaas.pp index 52eb40266..e7034c3e7 100644 --- a/manifests/agents/vpnaas.pp +++ b/manifests/agents/vpnaas.pp @@ -24,13 +24,6 @@ # [*package_ensure*] # (optional) Ensure state for package. Defaults to 'present'. # -# [*enabled*] -# (optional) Enable state for service. Defaults to 'true'. -# -# [*manage_service*] -# (optional) Whether to start/stop the service -# Defaults to true -# # [*vpn_device_driver*] # (optional) Defaults to 'neutron.services.vpn.device_drivers.ipsec.OpenSwanDriver'. # @@ -45,19 +38,35 @@ # in the vpnaas config. # Defaults to false. # +# DEPRECATED PARAMETERS +# [*enabled*] +# (optional) Enable state for service. Defaults to undef. +# +# [*manage_service*] +# (optional) Whether to start/stop the service +# Defaults to undef class neutron::agents::vpnaas ( $package_ensure = present, - $enabled = true, - $manage_service = true, $vpn_device_driver = 'neutron.services.vpn.device_drivers.ipsec.OpenSwanDriver', $interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver', $ipsec_status_check_interval = $::os_service_default, $purge_config = false, + # DEPRECATED PARAMETERS + $enabled = undef, + $manage_service = undef, ) { include ::neutron::deps include ::neutron::params + if $enabled{ + warning ('enabled is deprecated, has no effect and will be removed in a future release.') + } + + if $manage_service{ + warning ('manage_service is deprecated, has no effect and will be removed in a future release.') + } + case $vpn_device_driver { /\.OpenSwan/: { Package['openswan'] -> Package<| title == 'neutron-vpnaas-agent' |> @@ -104,19 +113,4 @@ class neutron::agents::vpnaas ( 'tag' => ['openstack', 'neutron-package'], }) } - - if $manage_service { - if $enabled { - $service_ensure = 'running' - } else { - $service_ensure = 'stopped' - } - } - - service { 'neutron-vpnaas-service': - ensure => $service_ensure, - name => $::neutron::params::vpnaas_agent_service, - enable => $enabled, - tag => 'neutron-service', - } } diff --git a/manifests/params.pp b/manifests/params.pp index f880cfdfd..23176d88b 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -26,7 +26,6 @@ class neutron::params { $lbaasv2_agent_service = 'neutron-lbaasv2-agent' $haproxy_package = 'haproxy' $metering_agent_service = 'neutron-metering-agent' - $vpnaas_agent_service = 'neutron-vpn-agent' $l3_agent_service = 'neutron-l3-agent' $metadata_agent_service = 'neutron-metadata-agent' $bagpipe_bgp_package = 'openstack-bagpipe-bgp' diff --git a/releasenotes/notes/Removal-of-neutron-vpnaas-service-eb981d400e4d7c3e.yaml b/releasenotes/notes/Removal-of-neutron-vpnaas-service-eb981d400e4d7c3e.yaml new file mode 100644 index 000000000..1cf52ef23 --- /dev/null +++ b/releasenotes/notes/Removal-of-neutron-vpnaas-service-eb981d400e4d7c3e.yaml @@ -0,0 +1,7 @@ +--- +deprecations: + - | + The neutron-vpnaas project has removed the agent service in + https://review.openstack.org/517263 . Thus, the "enabled" and + "manage_service" parameters of class neutron::agents:vpnaas have been + deprecated in Queens. diff --git a/spec/classes/neutron_agents_vpnaas_spec.rb b/spec/classes/neutron_agents_vpnaas_spec.rb index a8631cff4..2a1b4f854 100644 --- a/spec/classes/neutron_agents_vpnaas_spec.rb +++ b/spec/classes/neutron_agents_vpnaas_spec.rb @@ -32,7 +32,6 @@ describe 'neutron::agents::vpnaas' do let :default_params do { :package_ensure => 'present', - :enabled => true, :vpn_device_driver => 'neutron.services.vpn.device_drivers.ipsec.OpenSwanDriver', :interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver', :purge_config => false, @@ -77,26 +76,6 @@ describe 'neutron::agents::vpnaas' do is_expected.to contain_package('neutron').that_notifies('Anchor[neutron::install::end]') end end - - it 'configures neutron vpnaas agent service' do - is_expected.to contain_service('neutron-vpnaas-service').with( - :name => platform_params[:vpnaas_agent_service], - :enable => true, - :ensure => 'running', - :tag => 'neutron-service', - ) - is_expected.to contain_service('neutron-vpnaas-service').that_subscribes_to('Anchor[neutron::service::begin]') - is_expected.to contain_service('neutron-vpnaas-service').that_notifies('Anchor[neutron::service::end]') - end - - context 'with manage_service as false' do - before :each do - params.merge!(:manage_service => false) - end - it 'should not start/stop service' do - is_expected.to contain_service('neutron-vpnaas-service').without_ensure - end - end end shared_examples_for 'openswan vpnaas_driver' do @@ -120,15 +99,10 @@ describe 'neutron::agents::vpnaas' do let :platform_params do { :openswan_package => 'openswan', - :vpnaas_agent_package => 'neutron-vpn-agent', - :vpnaas_agent_service => 'neutron-vpn-agent' } + :vpnaas_agent_package => 'neutron-vpn-agent'} end it_configures 'neutron vpnaas agent' - it 'configures subscription to neutron-vpnaas-agent package' do - is_expected.to contain_service('neutron-vpnaas-service').that_subscribes_to('Anchor[neutron::service::begin]') - is_expected.to contain_service('neutron-vpnaas-service').that_notifies('Anchor[neutron::service::end]') - end context 'when configuring the LibreSwan driver' do before do @@ -153,8 +127,7 @@ describe 'neutron::agents::vpnaas' do let :platform_params do { :openswan_package => 'openswan', - :vpnaas_agent_package => 'openstack-neutron-vpnaas', - :vpnaas_agent_service => 'neutron-vpn-agent'} + :vpnaas_agent_package => 'openstack-neutron-vpnaas'} end it_configures 'neutron vpnaas agent' @@ -171,8 +144,7 @@ describe 'neutron::agents::vpnaas' do let :platform_params do { :openswan_package => 'libreswan', :libreswan_package => 'libreswan', - :vpnaas_agent_package => 'openstack-neutron-vpnaas', - :vpnaas_agent_service => 'neutron-vpn-agent'} + :vpnaas_agent_package => 'openstack-neutron-vpnaas'} end it_configures 'neutron vpnaas agent'