Make vlan_transparent in neutron.conf configurable
Allow plugins that support it to create VLAN transparent networks
The vlan_transparent determines if plugins that support it to
create VLAN transparent networks or not
Change-Id: I149237c12658201e44efdb1cd4851c7f154c6728
Closes-Bug: 1786407
(cherry picked from commit 2fe6254484
)
This commit is contained in:
parent
7d209c70bf
commit
39344a65cb
@ -333,6 +333,10 @@
|
||||
# (optional) Maximum number of allowed address pairs per port
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*vlan_transparent*]
|
||||
# (optional) Allow plugins that support it to create VLAN transparent networks
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class neutron (
|
||||
$enabled = true,
|
||||
$package_ensure = 'present',
|
||||
@ -404,6 +408,7 @@ class neutron (
|
||||
$notification_topics = $::os_service_default,
|
||||
$notification_transport_url = $::os_service_default,
|
||||
$max_allowed_address_pair = $::os_service_default,
|
||||
$vlan_transparent = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
@ -447,25 +452,26 @@ class neutron (
|
||||
}
|
||||
|
||||
neutron_config {
|
||||
'DEFAULT/bind_host': value => $bind_host;
|
||||
'DEFAULT/bind_port': value => $bind_port;
|
||||
'DEFAULT/auth_strategy': value => $auth_strategy;
|
||||
'DEFAULT/core_plugin': value => $core_plugin;
|
||||
'DEFAULT/base_mac': value => $base_mac;
|
||||
'DEFAULT/dhcp_lease_duration': value => $dhcp_lease_duration;
|
||||
'DEFAULT/host': value => $host;
|
||||
'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/allow_bulk': value => $allow_bulk;
|
||||
'DEFAULT/allow_overlapping_ips': value => $allow_overlapping_ips;
|
||||
'DEFAULT/api_extensions_path': value => $api_extensions_path;
|
||||
'DEFAULT/state_path': value => $state_path;
|
||||
'DEFAULT/global_physnet_mtu': value => $global_physnet_mtu;
|
||||
'DEFAULT/max_allowed_address_pair':value => $max_allowed_address_pair;
|
||||
'agent/root_helper': value => $root_helper;
|
||||
'agent/root_helper_daemon': value => $root_helper_daemon;
|
||||
'agent/report_interval': value => $report_interval;
|
||||
'DEFAULT/bind_host': value => $bind_host;
|
||||
'DEFAULT/bind_port': value => $bind_port;
|
||||
'DEFAULT/auth_strategy': value => $auth_strategy;
|
||||
'DEFAULT/core_plugin': value => $core_plugin;
|
||||
'DEFAULT/base_mac': value => $base_mac;
|
||||
'DEFAULT/dhcp_lease_duration': value => $dhcp_lease_duration;
|
||||
'DEFAULT/host': value => $host;
|
||||
'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/allow_bulk': value => $allow_bulk;
|
||||
'DEFAULT/allow_overlapping_ips': value => $allow_overlapping_ips;
|
||||
'DEFAULT/api_extensions_path': value => $api_extensions_path;
|
||||
'DEFAULT/state_path': value => $state_path;
|
||||
'DEFAULT/global_physnet_mtu': value => $global_physnet_mtu;
|
||||
'DEFAULT/max_allowed_address_pair': value => $max_allowed_address_pair;
|
||||
'DEFAULT/vlan_transparent': value => $vlan_transparent;
|
||||
'agent/root_helper': value => $root_helper;
|
||||
'agent/root_helper_daemon': value => $root_helper_daemon;
|
||||
'agent/report_interval': value => $report_interval;
|
||||
}
|
||||
|
||||
oslo::messaging::default { 'neutron_config':
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- Added vlan_transparent boolean parameter that if set to true
|
||||
allows plugins that support transparent VLANs to use it.
|
@ -53,6 +53,8 @@ describe 'neutron' do
|
||||
it_configures 'with transport_url defined'
|
||||
it_configures 'with rootwrap daemon'
|
||||
it_configures 'with max_allowed_address_pair defined'
|
||||
it_configures 'when disabling vlan_transparent'
|
||||
it_configures 'when enabling vlan_transparent'
|
||||
|
||||
context 'with amqp messaging' do
|
||||
it_configures 'amqp support'
|
||||
@ -111,7 +113,8 @@ describe 'neutron' do
|
||||
is_expected.to contain_neutron_config('DEFAULT/state_path').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('oslo_concurrency/lock_path').with_value('$state_path/lock')
|
||||
is_expected.to contain_neutron_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('DEFAULT/rpc_response_timeout').with_value( '<SERVICE DEFAULT>' )
|
||||
is_expected.to contain_neutron_config('DEFAULT/rpc_response_timeout').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('DEFAULT/vlan_transparent').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('agent/root_helper').with_value('sudo neutron-rootwrap /etc/neutron/rootwrap.conf')
|
||||
is_expected.to contain_neutron_config('agent/root_helper_daemon').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_config('agent/report_interval').with_value('<SERVICE DEFAULT>')
|
||||
@ -334,6 +337,28 @@ describe 'neutron' do
|
||||
}
|
||||
end
|
||||
|
||||
shared_examples_for 'when disabling vlan_transparent' do
|
||||
before do
|
||||
params.merge!(
|
||||
:vlan_transparent => false
|
||||
)
|
||||
end
|
||||
it do
|
||||
is_expected.to contain_neutron_config('DEFAULT/vlan_transparent').with_value(false)
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'when enabling vlan_transparent' do
|
||||
before do
|
||||
params.merge!(
|
||||
:vlan_transparent => true
|
||||
)
|
||||
end
|
||||
it do
|
||||
is_expected.to contain_neutron_config('DEFAULT/vlan_transparent').with_value(true)
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'without service_plugins' do
|
||||
it { is_expected.not_to contain_neutron_config('DEFAULT/service_plugins') }
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user