Add dnsmasq_local_resolv option

Add 'dnsmasq_local_resolv' option support to Enables the dnsmasq
service to provide name resolution for instances via DNS resolvers
on the host running the DHCP agent.

Change-Id: I451777a573fd31dd5d6732303956f17bb67c22e0
Closes-Bug: #1728795
This commit is contained in:
ZhongShengping
2017-11-01 15:13:45 +08:00
parent 0a2b0141a8
commit c8f2190761
3 changed files with 26 additions and 2 deletions

View File

@@ -48,6 +48,7 @@ describe 'neutron::agents::dhcp' do
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/enable_metadata_network').with_value(p[:enable_metadata_network]);
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dhcp_broadcast_reply').with_value('<SERVICE DEFAULT>');
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/ovs_integration_bridge').with_value('<SERVICE DEFAULT>');
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dnsmasq_local_resolv').with_value('<SERVICE DEFAULT>');
is_expected.to contain_neutron_dhcp_agent_config('AGENT/availability_zone').with_value('<SERVICE DEFAULT>');
end
@@ -163,6 +164,17 @@ describe 'neutron::agents::dhcp' do
end
end
shared_examples_for 'enable advertisement of the DNS resolver on the host.' do
before do
params.merge!(
:dnsmasq_local_resolv => true
)
end
it 'configures dnsmasq_local_resolv' do
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dnsmasq_local_resolv').with_value(params[:dnsmasq_config_file])
end
end
shared_examples_for 'neutron dhcp agent with dnsmasq_dns_servers set' do
before do
params.merge!(