Rename default_neutron_networks
... because the parameter was deprecated in favor of renaming to the management_networks[1]. Also, allow usage of an Array value because the parameter is ListOpt. [1] 44fbcfaaa608aba9184bd8757ba60c6a8155bae1 Change-Id: I4f8215995d098654d9303b54b5687552e94b23b7
This commit is contained in:
parent
7d5e85200a
commit
74881548a4
@ -231,7 +231,7 @@
|
||||
# (optional) Service endpoint type to use when searching catalog.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*default_neutron_networks*]
|
||||
# [*management_networks*]
|
||||
# (optional) The network that trove will attach by default.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
@ -239,6 +239,12 @@
|
||||
# (optional) The state of the package.
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*default_neutron_networks*]
|
||||
# (optional) The network that trove will attach by default.
|
||||
# Defaults to undef
|
||||
#
|
||||
class trove(
|
||||
$default_transport_url = $::os_service_default,
|
||||
$notification_transport_url = $::os_service_default,
|
||||
@ -288,14 +294,21 @@ class trove(
|
||||
$glance_endpoint_type = $::os_service_default,
|
||||
$trove_endpoint_type = $::os_service_default,
|
||||
$neutron_endpoint_type = $::os_service_default,
|
||||
$default_neutron_networks = $::os_service_default,
|
||||
$management_networks = $::os_service_default,
|
||||
$package_ensure = 'present',
|
||||
# DEPRECATED PARAMETERS
|
||||
$default_neutron_networks = undef,
|
||||
) {
|
||||
|
||||
include trove::deps
|
||||
include trove::policy
|
||||
include trove::params
|
||||
|
||||
if $default_neutron_networks != undef {
|
||||
warning('The default_neutron_networks parameter is deprecated. \
|
||||
Use the management_networks parameter.')
|
||||
}
|
||||
|
||||
if $nova_compute_url {
|
||||
trove_config { 'DEFAULT/nova_compute_url': value => $nova_compute_url }
|
||||
}
|
||||
@ -364,10 +377,15 @@ class trove(
|
||||
}
|
||||
}
|
||||
|
||||
$management_networks_real = pick($default_neutron_networks, $management_networks)
|
||||
trove_config {
|
||||
'DEFAULT/network_label_regex': value => '.*';
|
||||
'DEFAULT/network_driver': value => 'trove.network.neutron.NeutronDriver';
|
||||
'DEFAULT/default_neutron_networks': value => $default_neutron_networks;
|
||||
'DEFAULT/default_neutron_networks': ensure => absent;
|
||||
}
|
||||
|
||||
trove_config {
|
||||
'DEFAULT/network_label_regex': value => '.*';
|
||||
'DEFAULT/network_driver': value => 'trove.network.neutron.NeutronDriver';
|
||||
'DEFAULT/management_networks': value => join(any2array($management_networks_real), ',');
|
||||
}
|
||||
|
||||
oslo::messaging::default { 'trove_config':
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``trove::default_neutron_networks`` parameter has been deprecated. Use
|
||||
the new ``trove::management_networks`` parameter instead.
|
@ -51,7 +51,7 @@ describe 'trove' do
|
||||
is_expected.to contain_trove_config('DEFAULT/trove_endpoint_type').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('DEFAULT/neutron_endpoint_type').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('DEFAULT/glance_endpoint_type').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('DEFAULT/default_neutron_networks').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('DEFAULT/management_networks').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_trove_config('DEFAULT/remote_nova_client').with_ensure('absent')
|
||||
is_expected.to contain_trove_config('DEFAULT/remote_cinder_client').with_ensure('absent')
|
||||
is_expected.to contain_trove_config('DEFAULT/remote_neutron_client').with_ensure('absent')
|
||||
@ -120,13 +120,13 @@ describe 'trove' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with default networks' do
|
||||
context 'with management networks' do
|
||||
let :params do
|
||||
{ :default_neutron_networks => 'trove_service' }
|
||||
{ :management_networks => 'trove_service' }
|
||||
end
|
||||
|
||||
it 'configures default networks' do
|
||||
is_expected.to contain_trove_config('DEFAULT/default_neutron_networks').with_value('trove_service')
|
||||
it 'configures management networks' do
|
||||
is_expected.to contain_trove_config('DEFAULT/management_networks').with_value('trove_service')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user