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
This commit is contained in:
Andrew Toth 2017-06-19 13:18:24 -04:00
parent c51e9277e2
commit 891dd37265
4 changed files with 8 additions and 72 deletions

View File

@ -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
}

View File

@ -44,30 +44,11 @@
# Defaults to $::os_service_default
# Example: barbican_acl_auth
#
# === Deprecated Parameters
#
# [*service_providers*]
# (optional) Array of allowed service types or '<SERVICE DEFAULT>'.
# 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 <service_type>:<name>:<driver>[: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,
}
}
}

View File

@ -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

View File

@ -23,7 +23,7 @@ require 'spec_helper'
describe 'neutron::services::lbaas' do
let :default_params do
{ :service_providers => '<SERVICE DEFAULT>'}
{}
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