Remove deprecated options dhcp_domain & dhcp_delete_namespaces
- Remove dhcp_delete_namespaces as deprecated according to [0] - Remove dhcp_domain as deprecated according to [1] - Allow customization of dns_domain (which replaces dhcp_domain) option in neutron.conf [0] https://bugs.launchpad.net/neutron/+bug/1418079 [1] http://docs.openstack.org/liberty/config-reference/content/section_neutron-dhcp_agent.ini.html Change-Id: Ic39632bd4b5a5cca2f8cc30527adf566f997bb96
This commit is contained in:
@@ -29,10 +29,6 @@
|
||||
# [*interface_driver*]
|
||||
# (optional) Defaults to 'neutron.agent.linux.interface.OVSInterfaceDriver'.
|
||||
#
|
||||
# [*dhcp_domain*]
|
||||
# (optional) domain to use for building the hostnames
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*dhcp_driver*]
|
||||
# (optional) Defaults to 'neutron.agent.linux.dhcp.Dnsmasq'.
|
||||
#
|
||||
@@ -45,10 +41,6 @@
|
||||
# (optional) Override the default dnsmasq settings with this file.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*dhcp_delete_namespaces*]
|
||||
# (optional) Delete namespace after removing a dhcp server
|
||||
# Defaults to true.
|
||||
#
|
||||
# [*enable_isolated_metadata*]
|
||||
# (optional) enable metadata support on isolated networks.
|
||||
# Defaults to false.
|
||||
@@ -70,6 +62,14 @@
|
||||
#
|
||||
# === Deprecated Parameters
|
||||
#
|
||||
# [*dhcp_delete_namespaces*]
|
||||
# (optional) Deprecated. Delete namespace after removing a dhcp server
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*dhcp_domain*]
|
||||
# (optional) Deprecated. Domain to use for building the hostnames
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*use_namespaces*]
|
||||
# (optional) Deprecated. 'True' value will be enforced in future releases.
|
||||
# Allow overlapping IP (Must have kernel build with
|
||||
@@ -84,16 +84,16 @@ class neutron::agents::dhcp (
|
||||
$state_path = '/var/lib/neutron',
|
||||
$resync_interval = 30,
|
||||
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
|
||||
$dhcp_domain = $::os_service_default,
|
||||
$dhcp_driver = 'neutron.agent.linux.dhcp.Dnsmasq',
|
||||
$root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf',
|
||||
$dnsmasq_config_file = $::os_service_default,
|
||||
$dhcp_delete_namespaces = true,
|
||||
$enable_isolated_metadata = false,
|
||||
$enable_force_metadata = $::os_service_default,
|
||||
$enable_metadata_network = false,
|
||||
$dhcp_broadcast_reply = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$dhcp_delete_namespaces = $::os_service_default,
|
||||
$dhcp_domain = $::os_service_default,
|
||||
$use_namespaces = $::os_service_default,
|
||||
) {
|
||||
|
||||
@@ -141,6 +141,14 @@ class neutron::agents::dhcp (
|
||||
'DEFAULT/dnsmasq_config_file': value => $dnsmasq_config_file;
|
||||
}
|
||||
|
||||
if ! is_service_default ($dhcp_delete_namespaces) {
|
||||
warning('The dhcp_delete_namespaces parameter is deprecated and will be removed in future releases')
|
||||
}
|
||||
|
||||
if ! is_service_default ($dhcp_domain) {
|
||||
warning('The dhcp_domain parameter is deprecated and will be removed in future releases')
|
||||
}
|
||||
|
||||
if ! is_service_default ($use_namespaces) {
|
||||
warning('The use_namespaces parameter is deprecated and will be removed in future releases')
|
||||
neutron_dhcp_agent_config {
|
||||
|
@@ -62,6 +62,10 @@
|
||||
# (optional) DHCP lease
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*dns_domain*]
|
||||
# (optional) Domain to use for building the hostnames
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*dhcp_agents_per_network*]
|
||||
# (optional) Number of DHCP agents scheduled to host a network.
|
||||
# This enables redundant DHCP agents for configured networks.
|
||||
@@ -269,6 +273,7 @@ class neutron (
|
||||
$base_mac = $::os_service_default,
|
||||
$mac_generation_retries = $::os_service_default,
|
||||
$dhcp_lease_duration = $::os_service_default,
|
||||
$dns_domain = $::os_service_default,
|
||||
$dhcp_agents_per_network = $::os_service_default,
|
||||
$network_device_mtu = $::os_service_default,
|
||||
$dhcp_agent_notification = $::os_service_default,
|
||||
@@ -384,6 +389,7 @@ class neutron (
|
||||
'DEFAULT/base_mac': value => $base_mac;
|
||||
'DEFAULT/mac_generation_retries': value => $mac_generation_retries;
|
||||
'DEFAULT/dhcp_lease_duration': value => $dhcp_lease_duration;
|
||||
'DEFAULT/dns_domain': value => $dns_domain;
|
||||
'DEFAULT/dhcp_agents_per_network': value => $dhcp_agents_per_network;
|
||||
'DEFAULT/dhcp_agent_notification': value => $dhcp_agent_notification;
|
||||
'DEFAULT/advertise_mtu': value => $advertise_mtu;
|
||||
|
@@ -19,8 +19,7 @@ describe 'neutron::agents::dhcp' do
|
||||
:dhcp_driver => 'neutron.agent.linux.dhcp.Dnsmasq',
|
||||
:root_helper => 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf',
|
||||
:enable_isolated_metadata => false,
|
||||
:enable_metadata_network => false,
|
||||
:dhcp_delete_namespaces => true }
|
||||
:enable_metadata_network => false }
|
||||
end
|
||||
|
||||
let :test_facts do
|
||||
@@ -46,7 +45,7 @@ describe 'neutron::agents::dhcp' do
|
||||
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dhcp_domain').with_value('<SERVICE DEFAULT>');
|
||||
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dhcp_driver').with_value(p[:dhcp_driver]);
|
||||
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/root_helper').with_value(p[:root_helper]);
|
||||
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dhcp_delete_namespaces').with_value(p[:dhcp_delete_namespaces]);
|
||||
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dhcp_delete_namespaces').with_value('<SERVICE DEFAULT>');
|
||||
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/enable_isolated_metadata').with_value(p[:enable_isolated_metadata]);
|
||||
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/force_metadata').with_value('<SERVICE DEFAULT>');
|
||||
is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/enable_metadata_network').with_value(p[:enable_metadata_network]);
|
||||
|
@@ -80,6 +80,7 @@ describe 'neutron' do
|
||||
it_configures 'with service_plugins'
|
||||
it_configures 'without memcache_servers'
|
||||
it_configures 'with memcache_servers'
|
||||
it_configures 'with dns_domain defined'
|
||||
end
|
||||
|
||||
shared_examples_for 'a neutron base installation' do
|
||||
@@ -113,6 +114,7 @@ describe 'neutron' do
|
||||
is_expected.to contain_neutron_config('DEFAULT/base_mac').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('DEFAULT/mac_generation_retries').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('DEFAULT/dhcp_lease_duration').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('DEFAULT/dns_domain').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('DEFAULT/dhcp_agents_per_network').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('DEFAULT/network_device_mtu').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('DEFAULT/dhcp_agent_notification').with_value('<SERVICE DEFAULT>')
|
||||
@@ -451,6 +453,18 @@ describe 'neutron' do
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'with dns_domain defined' do
|
||||
before do
|
||||
params.merge!(
|
||||
:dns_domain => 'testlocal'
|
||||
)
|
||||
end
|
||||
|
||||
it do
|
||||
is_expected.to contain_neutron_config('DEFAULT/dns_domain').with_value(params[:dns_domain])
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
@default_facts.merge(test_facts.merge({
|
||||
|
Reference in New Issue
Block a user