dhcp: don't explicitly install dnsmasq

In both supported platforms (Debian and Redhat), the package is pulled
through dependencies, so no need to explicitly install it.

Change-Id: Ia26bc1202e8f274846f78417d0e8a24168f4ce76
This commit is contained in:
Ihar Hrachyshka 2016-12-03 02:48:23 +00:00
parent cbe9fd1207
commit 6efb7fc488
3 changed files with 2 additions and 38 deletions

View File

@ -105,16 +105,6 @@ class neutron::agents::dhcp (
include ::neutron::deps
include ::neutron::params
case $dhcp_driver {
/\.Dnsmasq/: {
Package[$::neutron::params::dnsmasq_packages] -> Package<| title == 'neutron-dhcp-agent' |>
ensure_packages($::neutron::params::dnsmasq_packages)
}
default: {
fail("Unsupported dhcp_driver ${dhcp_driver}")
}
}
if (! ($enable_isolated_metadata or $enable_force_metadata)) and $enable_metadata_network {
fail('enable_metadata_network to true requires enable_isolated_metadata or enable_force_metadata also enabled.')
} else {

View File

@ -48,7 +48,6 @@ class neutron::params {
$cisco_server_package = 'openstack-neutron-cisco'
$nvp_server_package = 'openstack-neutron-nicira'
$dhcp_agent_package = false
$dnsmasq_packages = ['dnsmasq', 'dnsmasq-utils']
$lbaasv2_agent_package = 'openstack-neutron-lbaas'
$metering_agent_package = 'openstack-neutron-metering-agent'
$vpnaas_agent_package = 'openstack-neutron-vpnaas'
@ -87,7 +86,6 @@ class neutron::params {
$openswan_package = 'openswan'
$libreswan_package = false
$metadata_agent_package = 'neutron-metadata-agent'
$dnsmasq_packages = ['dnsmasq-base', 'dnsmasq-utils']
$l3_agent_package = 'neutron-l3-agent'
$fwaas_package = 'python-neutron-fwaas'
} else {

View File

@ -36,8 +36,6 @@ describe 'neutron::agents::dhcp' do
it { is_expected.to contain_class('neutron::params') }
it_configures 'dnsmasq dhcp_driver'
it 'configures dhcp_agent.ini' do
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/debug').with_value('<SERVICE DEFAULT>');
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/state_path').with_value(p[:state_path]);
@ -176,24 +174,6 @@ describe 'neutron::agents::dhcp' do
end
end
shared_examples_for 'dnsmasq dhcp_driver' do
it 'installs dnsmasq packages' do
if platform_params.has_key?(:dhcp_agent_package)
is_expected.to contain_package(platform_params[:dnsmasq_base_package]).with_before(['Package[neutron-dhcp-agent]'])
is_expected.to contain_package(platform_params[:dnsmasq_utils_package]).with_before(['Package[neutron-dhcp-agent]'])
end
is_expected.to contain_package(platform_params[:dnsmasq_base_package]).with(
:ensure => 'present',
:name => platform_params[:dnsmasq_base_package]
)
is_expected.to contain_package(platform_params[:dnsmasq_utils_package]).with(
:ensure => 'present',
:name => platform_params[:dnsmasq_utils_package]
)
end
end
context 'on Debian platforms' do
let :facts do
@default_facts.merge(test_facts.merge({
@ -202,9 +182,7 @@ describe 'neutron::agents::dhcp' do
end
let :platform_params do
{ :dnsmasq_base_package => 'dnsmasq-base',
:dnsmasq_utils_package => 'dnsmasq-utils',
:dhcp_agent_package => 'neutron-dhcp-agent',
{ :dhcp_agent_package => 'neutron-dhcp-agent',
:dhcp_agent_service => 'neutron-dhcp-agent' }
end
@ -225,9 +203,7 @@ describe 'neutron::agents::dhcp' do
end
let :platform_params do
{ :dnsmasq_base_package => 'dnsmasq',
:dnsmasq_utils_package => 'dnsmasq-utils',
:dhcp_agent_service => 'neutron-dhcp-agent' }
{ :dhcp_agent_service => 'neutron-dhcp-agent' }
end
it_configures 'neutron dhcp agent'