Install lbaas driver with lbaas service class.

Typically if someone installed the agent as part of neutron::server
it would satisfy the dependency of installing python-neutron-lbaas
but if someone chooses to not install the agent as part of the
neutron::server class but still wants to use lbaas then they
will need to have the python-neutron-lbaas package installed.

Change-Id: I936e2177d00b57036f63b283af52f3009078d6bc
This commit is contained in:
Matthew J Black 2016-05-20 14:09:00 -04:00
parent 28e29a971e
commit 7896b56493
3 changed files with 23 additions and 2 deletions

View File

@ -22,6 +22,10 @@
#
# === Parameters:
#
# [*ensure_lbaas_driver_package*]
# (optional) Whether to install the lbaas driver package
# Defaults to 'present'
#
# [*service_providers*]
# (optional) Array of allowed service types or '<SERVICE DEFAULT>'.
# Note: The default upstream value is empty.
@ -39,12 +43,20 @@
# Defaults to false
#
class neutron::services::lbaas (
$package_ensure = false,
$service_providers = $::os_service_default,
$ensure_lbaas_driver_package = 'present',
$service_providers = $::os_service_default,
# DEPRECATED
$package_ensure = false,
) {
include ::neutron::params
if $ensure_lbaas_driver_package {
ensure_packages(['python-neutron-lbaas'], {
ensure => $ensure_lbaas_driver_package,
tag => ['openstack', 'neutron-package']
})
}
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

View File

@ -0,0 +1,5 @@
---
fixes:
- Added python-neutron-lbaas package to be installed with neutron::services::lbaas.
this removes a dependency of installing agent on neutron api server to enable
the lbaas service.

View File

@ -32,6 +32,10 @@ describe 'neutron::services::lbaas' do
let :params do
default_params
end
it 'should contain python-neutron-lbaas package' do
is_expected.to contain_package('python-neutron-lbaas').with({ :ensure => 'present' })
end
end
context 'with multiple service providers' do