ensure linuxbridge dependency is installed on RHEL

Package['neutron-plugin-linuxbridge'] is defined in
plugins/linuxbridge.pp but is missing in agents/linuxbridge.pp.

If agents::linuxbridge is used directly, the package is not defined.
This changes fixes the situation on RHEL.

The problem has already been fixed for OVS in
changeset Iedf8a607915f65b7a8cf7af99749b9b65cba7bd9

Change-Id: Ic4e15825e4f2d1f2ce2c34d2fdb01c8f6b19d491
This commit is contained in:
Gonéri Le Bouder
2014-02-07 09:46:51 +01:00
parent e06fdd85fe
commit 9bb97fd444
2 changed files with 15 additions and 1 deletions

View File

@@ -44,6 +44,13 @@ class neutron::agents::linuxbridge (
# linuxbridge agent package. The configuration file for the linuxbridge
# agent is provided by the neutron linuxbridge plugin package.
Package['neutron-plugin-linuxbridge'] -> Neutron_plugin_linuxbridge<||>
if ! defined(Package['neutron-plugin-linuxbridge']) {
package { 'neutron-plugin-linuxbridge':
ensure => $package_ensure,
name => $::neutron::params::linuxbridge_server_package,
}
}
}
if $enable {

View File

@@ -64,10 +64,17 @@ describe 'neutron::agents::linuxbridge' do
end
let :platform_params do
{ :linuxbridge_agent_package => 'openstack-neutron-linuxbridge',
{ :linuxbridge_server_package => 'openstack-neutron-linuxbridge',
:linuxbridge_agent_service => 'neutron-linuxbridge-agent' }
end
it_configures 'neutron linuxbridge agent'
it 'installs neutron linuxbridge package' do
should contain_package('neutron-plugin-linuxbridge').with(
:ensure => params[:package_ensure],
:name => platform_params[:linuxbridge_server_package]
)
end
end
end