From 891dd372653d7cec48a38309179962e8ae450bcd Mon Sep 17 00:00:00 2001 From: Andrew Toth Date: Mon, 19 Jun 2017 13:18:24 -0400 Subject: [PATCH] Remove Deprecated LBaaS parameters Remove deprecated LBaaS parameters to enable clean integration of LBaaS service Updated related tests Change-Id: Iaadc164741192643d313d54534c9c85407d50d9b Implements: blueprint lbaasv2-service-integration --- manifests/server.pp | 18 +-------- manifests/services/lbaas.pp | 40 ------------------- ...recated_lbaas_params-5a2605748739c8da.yaml | 6 +++ spec/classes/neutron_services_lbaas_spec.rb | 16 +------- 4 files changed, 8 insertions(+), 72 deletions(-) create mode 100644 releasenotes/notes/remove_deprecated_lbaas_params-5a2605748739c8da.yaml diff --git a/manifests/server.pp b/manifests/server.pp index fa25ff854..785c59c97 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -219,13 +219,7 @@ # HTTPProxyToWSGI middleware. # Defaults to $::os_service_default. # -# === Deprecated Parameters -# -# [*ensure_lbaas_package*] -# Deprecated. Ensures installation of LBaaS package. -# LBaaS agent should be installed from neutron::agents::lbaas. -# Defaults to false. -# + class neutron::server ( $package_ensure = 'present', $enabled = true, @@ -268,7 +262,6 @@ class neutron::server ( $report_interval = undef, $state_path = undef, $lock_path = undef, - $ensure_lbaas_package = false, ) inherits ::neutron::params { include ::neutron::deps @@ -325,15 +318,6 @@ class neutron::server ( }) } - if $ensure_lbaas_package { - warning('$ensure_lbaas_package is deprecated. To install lbaas agent the neutron::agents::lbaas class should be used.') - ensure_resource( 'package', 'neutron-lbaasv2-agent', { - 'ensure' => $package_ensure, - 'name' => $::neutron::params::lbaasv2_agent_package, - 'tag' => ['openstack', 'neutron-package'], - }) - } - if $sync_db { include ::neutron::db::sync } diff --git a/manifests/services/lbaas.pp b/manifests/services/lbaas.pp index 767f61e9d..6f741d9a6 100644 --- a/manifests/services/lbaas.pp +++ b/manifests/services/lbaas.pp @@ -44,30 +44,11 @@ # Defaults to $::os_service_default # Example: barbican_acl_auth # -# === Deprecated Parameters -# -# [*service_providers*] -# (optional) Array of allowed service types or ''. -# Note: The default upstream value is empty. -# If you plan to activate LBaaS service, you'll need to set this -# parameter otherwise neutron-server won't start correctly. -# See https://bugs.launchpad.net/puppet-neutron/+bug/1535382/comments/1 -# Must be in form ::[:default]. -# Defaults to $::os_service_default -# -# [*package_ensure*] -# (optional) Deprecated. Used to install the lbaas v2 agent. This was moved into -# neutron::agents::lbaas as the lbaas services handles scheduling of new load balancers -# Defaults to false -# class neutron::services::lbaas ( $cert_manager_type = $::os_service_default, $cert_storage_path = $::os_service_default, $barbican_auth = $::os_service_default, $ensure_lbaas_driver_package = 'present', - $service_providers = $::os_service_default, - # DEPRECATED - $package_ensure = false, ) { include ::neutron::deps @@ -85,25 +66,4 @@ class neutron::services::lbaas ( 'certificates/storage_path': value => $cert_storage_path; 'certificates/barbican_auth': value => $barbican_auth; } - - if !is_service_default($service_providers) { - warning("service_providers in neutron::services::lbaas is deprecated in newton \ -release, please use service provider in neutron::server class") - } - - if $package_ensure { - warning('Package ensure is deprecated. The neutron::agents::lbaas class should be used to install the agent') - # agent package contains both agent and service resources - ensure_resource( 'package', 'neutron-lbaasv2-agent', { - ensure => $package_ensure, - name => $::neutron::params::lbaasv2_agent_package, - tag => ['openstack', 'neutron-package'], - }) - } - if !is_service_default($service_providers) { - # default value is uncommented setting, so we should not touch it at all - neutron_lbaas_service_config { 'service_providers/service_provider': - value => $service_providers, - } - } } diff --git a/releasenotes/notes/remove_deprecated_lbaas_params-5a2605748739c8da.yaml b/releasenotes/notes/remove_deprecated_lbaas_params-5a2605748739c8da.yaml new file mode 100644 index 000000000..1a5de21e8 --- /dev/null +++ b/releasenotes/notes/remove_deprecated_lbaas_params-5a2605748739c8da.yaml @@ -0,0 +1,6 @@ +--- +other: + - Removed deprecated neutron::services::lbaas::service_providers + - Removed deprecated neutron::services::lbaas::package_ensure + - Removed deprecated neutron::server::ensure_lbaas_package + diff --git a/spec/classes/neutron_services_lbaas_spec.rb b/spec/classes/neutron_services_lbaas_spec.rb index 09fcd63cb..097f47ee3 100644 --- a/spec/classes/neutron_services_lbaas_spec.rb +++ b/spec/classes/neutron_services_lbaas_spec.rb @@ -23,7 +23,7 @@ require 'spec_helper' describe 'neutron::services::lbaas' do let :default_params do - { :service_providers => ''} + {} end shared_examples_for 'neutron lbaas service plugin' do @@ -60,20 +60,6 @@ describe 'neutron::services::lbaas' do end end end - - context 'with multiple service providers' do - let :params do - default_params.merge( - { :service_providers => ['provider1', 'provider2'] } - ) - end - - it 'configures neutron.conf' do - is_expected.to contain_neutron_lbaas_service_config( - 'service_providers/service_provider' - ).with_value(['provider1', 'provider2']) - end - end end context 'on Debian platforms' do