Fix default_floating_pool option
nova::api::default_floating_pool has been deprecated, Please use nova::network::neutron::default_floating_pool instead. Change-Id: Ife09171b84e0536b22784875ca4d0d69d16fb7fb Closes-Bug: #1696888
This commit is contained in:
parent
389d0fbd06
commit
b90f72d1fc
@ -95,10 +95,6 @@
|
||||
# middleware should parse the proxy headers or not.(boolean value)
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*default_floating_pool*]
|
||||
# (optional) Default pool for floating IPs
|
||||
# Defaults to 'nova'
|
||||
#
|
||||
# [*validate*]
|
||||
# (optional) Whether to validate the service is working after any service refreshes
|
||||
# Defaults to false
|
||||
@ -274,6 +270,10 @@
|
||||
# information should not be returned from the API.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*default_floating_pool*]
|
||||
# (optional) Default pool for floating IPs
|
||||
# Defaults to undef
|
||||
#
|
||||
class nova::api(
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
@ -291,7 +291,6 @@ class nova::api(
|
||||
$sync_db_api = true,
|
||||
$db_online_data_migrations = false,
|
||||
$neutron_metadata_proxy_shared_secret = undef,
|
||||
$default_floating_pool = 'nova',
|
||||
$pci_alias = undef,
|
||||
$ratelimits = undef,
|
||||
$ratelimits_factory =
|
||||
@ -333,6 +332,7 @@ class nova::api(
|
||||
$osapi_compute_link_prefix = undef,
|
||||
$osapi_glance_link_prefix = undef,
|
||||
$osapi_hide_server_address_states = undef,
|
||||
$default_floating_pool = undef,
|
||||
) inherits nova::params {
|
||||
|
||||
include ::nova::deps
|
||||
@ -359,6 +359,10 @@ class nova::api(
|
||||
}
|
||||
}
|
||||
|
||||
if $default_floating_pool {
|
||||
warning('The default_floating_pool parameter is deprecated. Please use nova::network::neutron::default_floating_pool instead.')
|
||||
}
|
||||
|
||||
if $osapi_max_limit {
|
||||
warning('The osapi_max_limit parameter is deprecated. Please use max_limit instead')
|
||||
$max_limit_real = $osapi_max_limit
|
||||
@ -456,7 +460,6 @@ as a standalone service, or httpd for being run by a httpd server")
|
||||
'DEFAULT/osapi_volume_listen': value => $api_bind_address;
|
||||
'DEFAULT/osapi_compute_workers': value => $osapi_compute_workers;
|
||||
'DEFAULT/metadata_workers': value => $metadata_workers;
|
||||
'DEFAULT/default_floating_pool': value => $default_floating_pool;
|
||||
'DEFAULT/enable_network_quota': value => $enable_network_quota;
|
||||
'DEFAULT/password_length': value => $password_length;
|
||||
'api/metadata_cache_expiration': value => $metadata_cache_expiration;
|
||||
|
@ -82,6 +82,10 @@
|
||||
# (optional) domain to use for building the hostnames
|
||||
# Defaults to 'novalocal'
|
||||
#
|
||||
# [*default_floating_pool*]
|
||||
# (optional) Default pool for floating IPs
|
||||
# Defaults to 'nova'
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
# [*neutron_auth_strategy*]
|
||||
# (optional) DEPRECATED.
|
||||
@ -135,6 +139,7 @@ class nova::network::neutron (
|
||||
$vif_plugging_is_fatal = true,
|
||||
$vif_plugging_timeout = '300',
|
||||
$dhcp_domain = 'novalocal',
|
||||
$default_floating_pool = 'nova',
|
||||
# DEPRECATED PARAMETERS
|
||||
$neutron_admin_password = false,
|
||||
$neutron_auth_strategy = undef,
|
||||
@ -210,11 +215,14 @@ class nova::network::neutron (
|
||||
}
|
||||
}
|
||||
|
||||
$default_floating_pool_real = pick($::nova::api::default_floating_pool, $default_floating_pool)
|
||||
|
||||
nova_config {
|
||||
'DEFAULT/dhcp_domain': value => $dhcp_domain;
|
||||
'DEFAULT/firewall_driver': value => $firewall_driver;
|
||||
'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_real;
|
||||
'neutron/url': value => $neutron_url;
|
||||
'neutron/timeout': value => $neutron_url_timeout;
|
||||
'neutron/project_name': value => $neutron_project_name_real;
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
nova::api::default_floating_pool has been deprecated. Please use
|
||||
nova::network::neutron::default_floating_pool instead.
|
@ -53,7 +53,6 @@ describe 'nova::api' do
|
||||
is_expected.to contain_nova_config('DEFAULT/osapi_volume_listen').with('value' => '0.0.0.0')
|
||||
is_expected.to contain_nova_config('DEFAULT/osapi_compute_workers').with('value' => '5')
|
||||
is_expected.to contain_nova_config('DEFAULT/metadata_workers').with('value' => '5')
|
||||
is_expected.to contain_nova_config('DEFAULT/default_floating_pool').with('value' => 'nova')
|
||||
is_expected.to contain_nova_config('api/fping_path').with('value' => '/usr/sbin/fping')
|
||||
is_expected.to contain_nova_config('oslo_middleware/enable_proxy_headers_parsing').with('value' => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('api/metadata_cache_expiration').with('value' => '<SERVICE DEFAULT>')
|
||||
@ -102,7 +101,6 @@ describe 'nova::api' do
|
||||
:neutron_metadata_proxy_shared_secret => 'secrete',
|
||||
:osapi_compute_workers => 1,
|
||||
:metadata_workers => 2,
|
||||
:default_floating_pool => 'public',
|
||||
:enable_proxy_headers_parsing => true,
|
||||
:metadata_cache_expiration => 15,
|
||||
:vendordata_jsonfile_path => '/tmp',
|
||||
@ -156,7 +154,6 @@ describe 'nova::api' do
|
||||
is_expected.to contain_nova_config('api/use_forwarded_for').with('value' => false)
|
||||
is_expected.to contain_nova_config('DEFAULT/osapi_compute_workers').with('value' => '1')
|
||||
is_expected.to contain_nova_config('DEFAULT/metadata_workers').with('value' => '2')
|
||||
is_expected.to contain_nova_config('DEFAULT/default_floating_pool').with('value' => 'public')
|
||||
is_expected.to contain_nova_config('api/metadata_cache_expiration').with('value' => '15')
|
||||
is_expected.to contain_nova_config('api/vendordata_jsonfile_path').with('value' => '/tmp')
|
||||
is_expected.to contain_nova_config('api/vendordata_providers').with('value' => 'StaticJSON,DynamicJSON')
|
||||
|
@ -17,7 +17,8 @@ describe 'nova::network::neutron' do
|
||||
:firewall_driver => 'nova.virt.firewall.NoopFirewallDriver',
|
||||
:vif_plugging_is_fatal => true,
|
||||
:vif_plugging_timeout => '300',
|
||||
:dhcp_domain => 'novalocal'
|
||||
:dhcp_domain => 'novalocal',
|
||||
:default_floating_pool => 'nova'
|
||||
}
|
||||
end
|
||||
|
||||
@ -29,6 +30,7 @@ describe 'nova::network::neutron' do
|
||||
it 'configures neutron endpoint in nova.conf' do
|
||||
is_expected.to contain_nova_config('neutron/password').with_value(params[:neutron_password]).with_secret(true)
|
||||
is_expected.to contain_nova_config('DEFAULT/dhcp_domain').with_value(default_params[:dhcp_domain])
|
||||
is_expected.to contain_nova_config('neutron/default_floating_pool').with_value(default_params[:default_floating_pool])
|
||||
is_expected.to contain_nova_config('neutron/auth_type').with_value(default_params[:neutron_auth_type])
|
||||
is_expected.to contain_nova_config('neutron/url').with_value(default_params[:neutron_url])
|
||||
is_expected.to contain_nova_config('neutron/timeout').with_value(default_params[:neutron_url_timeout])
|
||||
@ -67,7 +69,8 @@ describe 'nova::network::neutron' do
|
||||
:neutron_extension_sync_interval => '600',
|
||||
:vif_plugging_is_fatal => false,
|
||||
:vif_plugging_timeout => '0',
|
||||
:dhcp_domain => 'foo'
|
||||
:dhcp_domain => 'foo',
|
||||
:default_floating_pool => 'public'
|
||||
)
|
||||
end
|
||||
|
||||
@ -75,6 +78,7 @@ describe 'nova::network::neutron' do
|
||||
is_expected.to contain_nova_config('neutron/auth_strategy').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('neutron/password').with_value(params[:neutron_password]).with_secret(true)
|
||||
is_expected.to contain_nova_config('DEFAULT/dhcp_domain').with_value(params[:dhcp_domain])
|
||||
is_expected.to contain_nova_config('neutron/default_floating_pool').with_value(params[:default_floating_pool])
|
||||
is_expected.to contain_nova_config('neutron/url').with_value(params[:neutron_url])
|
||||
is_expected.to contain_nova_config('neutron/timeout').with_value(params[:neutron_url_timeout])
|
||||
is_expected.to contain_nova_config('neutron/project_name').with_value(params[:neutron_project_name])
|
||||
|
Loading…
Reference in New Issue
Block a user