Add parameters for Neutron QoS support
Quality of Service advanced service is a feature introduced in Liberty. This patch adds options required for this service deployment: - ml2-ovs extensions (to use qos extension) - ml2-sriov extensions (to use qos extension) - ml2 plugin extension_drivers (to use qos extension driver) - qos notification drivers Change-Id: Iefc289a6eee13b9c66f8131c258af982f232df4b
This commit is contained in:
@@ -109,10 +109,15 @@
|
||||
# (optional) Enable or not ARP Spoofing Protection
|
||||
# Defaults to true
|
||||
#
|
||||
# [*extensions*]
|
||||
# (optional) Extensions list to use
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class neutron::agents::ml2::ovs (
|
||||
$package_ensure = 'present',
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$extensions = $::os_service_default,
|
||||
$bridge_uplinks = [],
|
||||
$bridge_mappings = [],
|
||||
$integration_bridge = 'br-int',
|
||||
@@ -182,6 +187,7 @@ class neutron::agents::ml2::ovs (
|
||||
'agent/enable_distributed_routing': value => $enable_distributed_routing;
|
||||
'agent/drop_flows_on_start': value => $drop_flows_on_start;
|
||||
'agent/prevent_arp_spoofing': value => $prevent_arp_spoofing;
|
||||
'agent/extensions': value => join(any2array($extensions), ',');
|
||||
'ovs/integration_bridge': value => $integration_bridge;
|
||||
}
|
||||
|
||||
|
@@ -52,7 +52,10 @@
|
||||
# semicolon separated list of virtual functions to exclude from network_device.
|
||||
# The network_device in the mapping should appear in the physical_device_mappings list.
|
||||
#
|
||||
|
||||
# [*extensions*]
|
||||
# (optional) Extensions list to use
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class neutron::agents::ml2::sriov (
|
||||
$package_ensure = 'present',
|
||||
$enabled = true,
|
||||
@@ -60,6 +63,7 @@ class neutron::agents::ml2::sriov (
|
||||
$physical_device_mappings = [],
|
||||
$polling_interval = 2,
|
||||
$exclude_devices = [],
|
||||
$extensions = $::os_service_default,
|
||||
) {
|
||||
|
||||
include ::neutron::params
|
||||
@@ -70,6 +74,7 @@ class neutron::agents::ml2::sriov (
|
||||
'sriov_nic/polling_interval': value => $polling_interval;
|
||||
'sriov_nic/exclude_devices': value => join($exclude_devices, ',');
|
||||
'sriov_nic/physical_device_mappings': value => join($physical_device_mappings, ',');
|
||||
'agent/extensions': value => join(any2array($extensions), ',');
|
||||
}
|
||||
|
||||
Package['neutron-sriov-nic-agent'] -> Neutron_sriov_agent_config <||>
|
||||
|
@@ -43,7 +43,7 @@
|
||||
# [*service_plugins*]
|
||||
# (optional) Advanced service modules.
|
||||
# Could be an array that can have these elements:
|
||||
# router, firewall, lbaas, vpnaas, metering
|
||||
# router, firewall, lbaas, vpnaas, metering, qos
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*auth_strategy*]
|
||||
|
@@ -29,6 +29,11 @@
|
||||
# local, flat, vlan, gre, vxlan
|
||||
# Defaults to ['local', 'flat', 'vlan', 'gre', 'vxlan'].
|
||||
#
|
||||
# [*extension_drivers*]
|
||||
# (optional) Ordered list of extension driver entrypoints to be loaded
|
||||
# from the neutron.ml2.extension_drivers namespace.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*tenant_network_types*]
|
||||
# (optional) Ordered list of network_types to allocate as tenant networks.
|
||||
# The value 'local' is only useful for single-box testing
|
||||
@@ -118,6 +123,7 @@
|
||||
|
||||
class neutron::plugins::ml2 (
|
||||
$type_drivers = ['local', 'flat', 'vlan', 'gre', 'vxlan'],
|
||||
$extension_drivers = $::os_service_default,
|
||||
$tenant_network_types = ['local', 'flat', 'vlan', 'gre', 'vxlan'],
|
||||
$mechanism_drivers = ['openvswitch', 'linuxbridge'],
|
||||
$flat_networks = '*',
|
||||
@@ -198,6 +204,7 @@ class neutron::plugins::ml2 (
|
||||
'ml2/tenant_network_types': value => join(any2array($tenant_network_types), ',');
|
||||
'ml2/mechanism_drivers': value => join(any2array($mechanism_drivers), ',');
|
||||
'ml2/path_mtu': value => $path_mtu;
|
||||
'ml2/extension_drivers': value => join(any2array($extension_drivers), ',');
|
||||
'securitygroup/enable_security_group': value => $enable_security_group;
|
||||
}
|
||||
|
||||
|
@@ -196,6 +196,10 @@
|
||||
# (optional) Deprecated, does nothing.
|
||||
# Defaults to 'undef'.
|
||||
#
|
||||
# [*qos_notification_drivers*]
|
||||
# (optional) Drivers list to use to send the update notification
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class neutron::server (
|
||||
$package_ensure = 'present',
|
||||
$enabled = true,
|
||||
@@ -226,6 +230,7 @@ class neutron::server (
|
||||
$max_l3_agents_per_router = 3,
|
||||
$min_l3_agents_per_router = 2,
|
||||
$l3_ha_net_cidr = '169.254.192.0/18',
|
||||
$qos_notification_drivers = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$auth_host = 'localhost',
|
||||
$auth_port = '35357',
|
||||
@@ -301,6 +306,8 @@ class neutron::server (
|
||||
}
|
||||
}
|
||||
|
||||
neutron_config { 'qos/notification_drivers': value => join(any2array($qos_notification_drivers), ',') }
|
||||
|
||||
if ($::neutron::params::server_package) {
|
||||
Package['neutron-server'] -> Neutron_api_config<||>
|
||||
Package['neutron-server'] -> Neutron_config<||>
|
||||
|
@@ -48,6 +48,7 @@ describe 'neutron::agents::ml2::ovs' do
|
||||
is_expected.to contain_neutron_agent_ovs('agent/arp_responder').with_value(p[:arp_responder])
|
||||
is_expected.to contain_neutron_agent_ovs('agent/prevent_arp_spoofing').with_value(p[:prevent_arp_spoofing])
|
||||
is_expected.to contain_neutron_agent_ovs('agent/drop_flows_on_start').with_value(p[:drop_flows_on_start])
|
||||
is_expected.to contain_neutron_agent_ovs('agent/extensions').with_value(['<SERVICE DEFAULT>'])
|
||||
is_expected.to contain_neutron_agent_ovs('ovs/integration_bridge').with_value(p[:integration_bridge])
|
||||
is_expected.to contain_neutron_agent_ovs('securitygroup/firewall_driver').\
|
||||
with_value(p[:firewall_driver])
|
||||
@@ -176,6 +177,16 @@ describe 'neutron::agents::ml2::ovs' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'when supplying extensions for ML2 plugin' do
|
||||
before :each do
|
||||
params.merge!(:extensions => ['qos'])
|
||||
end
|
||||
|
||||
it 'configures extensions' do
|
||||
is_expected.to contain_neutron_agent_ovs('agent/extensions').with_value(params[:extensions].join(','))
|
||||
end
|
||||
end
|
||||
|
||||
context 'when enabling tunneling' do
|
||||
context 'without local ip address' do
|
||||
before :each do
|
||||
|
@@ -38,6 +38,7 @@ describe 'neutron::agents::ml2::sriov' do
|
||||
is_expected.to contain_neutron_sriov_agent_config('sriov_nic/polling_interval').with_value(p[:polling_interval])
|
||||
is_expected.to contain_neutron_sriov_agent_config('sriov_nic/exclude_devices').with_value(p[:exclude_devices].join(','))
|
||||
is_expected.to contain_neutron_sriov_agent_config('sriov_nic/physical_device_mappings').with_value(p[:physical_device_mappings].join(','))
|
||||
is_expected.to contain_neutron_sriov_agent_config('agent/extensions').with_value(['<SERVICE DEFAULT>'])
|
||||
end
|
||||
|
||||
|
||||
@@ -82,6 +83,16 @@ describe 'neutron::agents::ml2::sriov' do
|
||||
is_expected.to contain_neutron_sriov_agent_config('sriov_nic/physical_device_mappings').with_value(['physnet1:eth1'])
|
||||
end
|
||||
end
|
||||
|
||||
context 'when supplying extensions for ML2 SR-IOV agent' do
|
||||
before :each do
|
||||
params.merge!(:extensions => ['qos'])
|
||||
end
|
||||
|
||||
it 'configures extensions' do
|
||||
is_expected.to contain_neutron_sriov_agent_config('agent/extensions').with_value(params[:extensions].join(','))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
|
@@ -449,12 +449,12 @@ describe 'neutron' do
|
||||
shared_examples_for 'with service_plugins' do
|
||||
before do
|
||||
params.merge!(
|
||||
:service_plugins => ['router','firewall','lbaas','vpnaas','metering']
|
||||
:service_plugins => ['router','firewall','lbaas','vpnaas','metering','qos']
|
||||
)
|
||||
end
|
||||
|
||||
it do
|
||||
is_expected.to contain_neutron_config('DEFAULT/service_plugins').with_value('router,firewall,lbaas,vpnaas,metering')
|
||||
is_expected.to contain_neutron_config('DEFAULT/service_plugins').with_value('router,firewall,lbaas,vpnaas,metering,qos')
|
||||
end
|
||||
|
||||
end
|
||||
|
@@ -67,6 +67,7 @@ describe 'neutron::plugins::ml2' do
|
||||
is_expected.to contain_neutron_plugin_ml2('ml2/type_drivers').with_value(p[:type_drivers].join(','))
|
||||
is_expected.to contain_neutron_plugin_ml2('ml2/tenant_network_types').with_value(p[:tenant_network_types].join(','))
|
||||
is_expected.to contain_neutron_plugin_ml2('ml2/mechanism_drivers').with_value(p[:mechanism_drivers].join(','))
|
||||
is_expected.to contain_neutron_plugin_ml2('ml2/extension_drivers').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_neutron_plugin_ml2('ml2/path_mtu').with_value(p[:path_mtu])
|
||||
is_expected.to contain_neutron_plugin_ml2('ml2/physical_network_mtus').with_ensure('absent')
|
||||
end
|
||||
@@ -88,6 +89,16 @@ describe 'neutron::plugins::ml2' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'when using extension drivers for ML2 plugin' do
|
||||
before :each do
|
||||
params.merge!(:extension_drivers => ['port_security','qos'])
|
||||
end
|
||||
|
||||
it 'configures extension drivers' do
|
||||
is_expected.to contain_neutron_plugin_ml2('ml2/extension_drivers').with_value(p[:extension_drivers].join(','))
|
||||
end
|
||||
end
|
||||
|
||||
context 'configure ml2 with bad driver value' do
|
||||
before :each do
|
||||
params.merge!(:type_drivers => ['foobar'])
|
||||
|
@@ -34,7 +34,7 @@ describe 'neutron::server' do
|
||||
:max_l3_agents_per_router => 3,
|
||||
:min_l3_agents_per_router => 2,
|
||||
:l3_ha_net_cidr => '169.254.192.0/18',
|
||||
:allow_automatic_l3agent_failover => false
|
||||
:allow_automatic_l3agent_failover => false,
|
||||
}
|
||||
end
|
||||
|
||||
@@ -96,6 +96,7 @@ describe 'neutron::server' do
|
||||
is_expected.to contain_neutron_config('DEFAULT/rpc_workers').with_value(facts[:processorcount])
|
||||
is_expected.to contain_neutron_config('DEFAULT/agent_down_time').with_value(p[:agent_down_time])
|
||||
is_expected.to contain_neutron_config('DEFAULT/router_scheduler_driver').with_value(p[:router_scheduler_driver])
|
||||
is_expected.to contain_neutron_config('qos/notification_drivers').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
context 'with manage_service as false' do
|
||||
@@ -182,6 +183,15 @@ describe 'neutron::server' do
|
||||
is_expected.to contain_neutron_config('DEFAULT/allow_automatic_l3agent_failover').with_value(p[:allow_automatic_l3agent_failover])
|
||||
end
|
||||
end
|
||||
|
||||
context 'with qos_notification_drivers parameter' do
|
||||
before :each do
|
||||
params.merge!(:qos_notification_drivers => 'message_queue')
|
||||
end
|
||||
it 'should configure qos_notification_drivers' do
|
||||
is_expected.to contain_neutron_config('qos/notification_drivers').with_value('message_queue')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'a neutron server with auth_admin_prefix set' do
|
||||
|
Reference in New Issue
Block a user