Revert "Remove deprecated nova::network::neutron params"

TripleO jobs are failing with the removal of these params,
dhcp_domain parameter is still used by nova metadata to provide
hostname details.
This reverts commit 561e16a6e1.

Depends-On: https://review.opendev.org/#/c/660554/
Change-Id: I14957917156ce7b834c9ac899970a6ec9ccfd9c5
This commit is contained in:
yatin 2019-05-22 02:38:00 +00:00
parent 276f795e7c
commit 10abd32757
3 changed files with 56 additions and 12 deletions

View File

@ -117,15 +117,49 @@ class nova::network::neutron (
$vif_plugging_is_fatal = true,
$vif_plugging_timeout = '300',
$default_floating_pool = 'nova',
# DEPRECATED PARAMS
$neutron_url = undef,
$neutron_url_timeout = undef,
$firewall_driver = undef,
$dhcp_domain = undef,
) {
include ::nova::deps
if $neutron_url {
warning('nova::network::neutron::neutron_url is deprecated, nova behaviour will be default to looking up \
the neutron endpoint in the keystone catalog, please use nova::network::neutron::neutron_endpoint_override to override')
}
if $neutron_url_timeout {
warning('nova::network::neutron::neutron_url_timeout is deprecated, please use neutron_timeout instead.')
}
if $firewall_driver {
warning('nova::network::neutron::firewall_driver is deprecated and will be removed in a future release')
}
if $dhcp_domain {
warning('nova::network::neutron::dhcp_domain is deprecated and will be removed in a future release')
}
# TODO(tobias-urdin): Remove these in the T release.
nova_config {
'DEFAULT/dhcp_domain': value => $dhcp_domain;
'DEFAULT/firewall_driver': value => $firewall_driver;
}
nova_config {
'neutron/url': value => $neutron_url;
}
$neutron_timeout_real = pick($neutron_url_timeout, $neutron_timeout)
nova_config {
'DEFAULT/vif_plugging_is_fatal': value => $vif_plugging_is_fatal;
'DEFAULT/vif_plugging_timeout': value => $vif_plugging_timeout;
'neutron/default_floating_pool': value => $default_floating_pool;
'neutron/timeout': value => $neutron_timeout;
'neutron/timeout': value => $neutron_timeout_real;
'neutron/project_name': value => $neutron_project_name;
'neutron/project_domain_name': value => $neutron_project_domain_name;
'neutron/region_name': value => $neutron_region_name;

View File

@ -1,11 +0,0 @@
---
upgrade:
- |
The deprecated parameter nova::network::neutron::neutron_url is removed and will default to looking up the
neutron endpoint in the keystone catalog, use nova::network::neutron::neutron_endpoint_override to override.
- |
The deprecated parameter nova::network::neutron::neutron_url_timeout is removed, please use neutron_timeout instead.
- |
The deprecated parameter nova::network::neutron::firewall_driver is removed.
- |
The deprecated parameter nova::network::neutron::dhcp_domain is removed.

View File

@ -93,6 +93,27 @@ describe 'nova::network::neutron' do
should contain_nova_config('DEFAULT/vif_plugging_timeout').with_value(params[:vif_plugging_timeout])
end
end
context 'with deprecated class parameters' do
before do
params.merge!(
:neutron_url => 'http://10.0.0.1:9696',
:neutron_url_timeout => '30',
:firewall_driver => 'nova.virt.firewall.IptablesFirewallDriver',
:dhcp_domain => 'foo',
)
end
it 'configures neutron endpoint in nova.conf' do
should contain_nova_config('DEFAULT/dhcp_domain').with_value(params[:dhcp_domain])
should contain_nova_config('neutron/url').with_value(params[:neutron_url])
should contain_nova_config('neutron/timeout').with_value(params[:neutron_url_timeout])
end
it 'configures Nova to use Neutron Security Groups and Firewall' do
should contain_nova_config('DEFAULT/firewall_driver').with_value(params[:firewall_driver])
end
end
end
on_supported_os({