Add support for the resource_provider_hypervisors parameter
Change-Id: I3d9f0b48a72f82f7d1a86aae94c1f5248b729987
This commit is contained in:
parent
5b7bc9f4f9
commit
830c66ccca
@ -184,6 +184,10 @@
|
|||||||
# (optional) List of <bridge>:<egress_bw>:<ingress_bw>
|
# (optional) List of <bridge>:<egress_bw>:<ingress_bw>
|
||||||
# Defaults to empty list
|
# Defaults to empty list
|
||||||
#
|
#
|
||||||
|
# [*resource_provider_hypervisors*]
|
||||||
|
# (optional) List of <bridge>:<hypervisor>
|
||||||
|
# Defaults to empty list
|
||||||
|
#
|
||||||
# [*explicitly_egress_direct*]
|
# [*explicitly_egress_direct*]
|
||||||
# (optional) When set to True, the accepted egress unicast traffic will not
|
# (optional) When set to True, the accepted egress unicast traffic will not
|
||||||
# use action NORMAL. The accepted egress packets will be taken care of in the
|
# use action NORMAL. The accepted egress packets will be taken care of in the
|
||||||
@ -198,43 +202,44 @@
|
|||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
class neutron::agents::ml2::ovs (
|
class neutron::agents::ml2::ovs (
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
$extensions = $::os_service_default,
|
$extensions = $::os_service_default,
|
||||||
$bridge_uplinks = [],
|
$bridge_uplinks = [],
|
||||||
$bridge_mappings = [],
|
$bridge_mappings = [],
|
||||||
$ovsdb_timeout = $::os_service_default,
|
$ovsdb_timeout = $::os_service_default,
|
||||||
$of_connect_timeout = $::os_service_default,
|
$of_connect_timeout = $::os_service_default,
|
||||||
$of_request_timeout = $::os_service_default,
|
$of_request_timeout = $::os_service_default,
|
||||||
$of_inactivity_probe = $::os_service_default,
|
$of_inactivity_probe = $::os_service_default,
|
||||||
$integration_bridge = 'br-int',
|
$integration_bridge = 'br-int',
|
||||||
$tunnel_types = [],
|
$tunnel_types = [],
|
||||||
$local_ip = false,
|
$local_ip = false,
|
||||||
$tunnel_bridge = 'br-tun',
|
$tunnel_bridge = 'br-tun',
|
||||||
$vxlan_udp_port = 4789,
|
$vxlan_udp_port = 4789,
|
||||||
$polling_interval = $::os_service_default,
|
$polling_interval = $::os_service_default,
|
||||||
$l2_population = $::os_service_default,
|
$l2_population = $::os_service_default,
|
||||||
$arp_responder = $::os_service_default,
|
$arp_responder = $::os_service_default,
|
||||||
$firewall_driver = 'iptables_hybrid',
|
$firewall_driver = 'iptables_hybrid',
|
||||||
$enable_distributed_routing = $::os_service_default,
|
$enable_distributed_routing = $::os_service_default,
|
||||||
$drop_flows_on_start = false,
|
$drop_flows_on_start = false,
|
||||||
$manage_vswitch = true,
|
$manage_vswitch = true,
|
||||||
$int_peer_patch_port = $::os_service_default,
|
$int_peer_patch_port = $::os_service_default,
|
||||||
$tun_peer_patch_port = $::os_service_default,
|
$tun_peer_patch_port = $::os_service_default,
|
||||||
$datapath_type = $::os_service_default,
|
$datapath_type = $::os_service_default,
|
||||||
$vhostuser_socket_dir = $::os_service_default,
|
$vhostuser_socket_dir = $::os_service_default,
|
||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
$enable_dpdk = false,
|
$enable_dpdk = false,
|
||||||
$enable_security_group = $::os_service_default,
|
$enable_security_group = $::os_service_default,
|
||||||
$permitted_ethertypes = $::os_service_default,
|
$permitted_ethertypes = $::os_service_default,
|
||||||
$minimize_polling = $::os_service_default,
|
$minimize_polling = $::os_service_default,
|
||||||
$tunnel_csum = $::os_service_default,
|
$tunnel_csum = $::os_service_default,
|
||||||
$igmp_snooping_enable = $::os_service_default,
|
$igmp_snooping_enable = $::os_service_default,
|
||||||
$resource_provider_bandwidths = [],
|
$resource_provider_bandwidths = [],
|
||||||
$explicitly_egress_direct = $::os_service_default,
|
$resource_provider_hypervisors = [],
|
||||||
|
$explicitly_egress_direct = $::os_service_default,
|
||||||
# DEPRECATED
|
# DEPRECATED
|
||||||
$ovsdb_interface = undef,
|
$ovsdb_interface = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include neutron::deps
|
include neutron::deps
|
||||||
@ -323,8 +328,15 @@ class neutron::agents::ml2::ovs (
|
|||||||
$resource_provider_bandwidths_real = $::os_service_default
|
$resource_provider_bandwidths_real = $::os_service_default
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($resource_provider_hypervisors != []){
|
||||||
|
$resource_provider_hypervisors_real = join(any2array($resource_provider_hypervisors), ',')
|
||||||
|
} else {
|
||||||
|
$resource_provider_hypervisors_real = $::os_service_default
|
||||||
|
}
|
||||||
|
|
||||||
neutron_agent_ovs {
|
neutron_agent_ovs {
|
||||||
'ovs/resource_provider_bandwidths': value => $resource_provider_bandwidths_real;
|
'ovs/resource_provider_bandwidths': value => $resource_provider_bandwidths_real;
|
||||||
|
'ovs/resource_provider_hypervisors': value => $resource_provider_hypervisors_real;
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO(tobias.urdin): Remove in V release.
|
# TODO(tobias.urdin): Remove in V release.
|
||||||
|
@ -73,17 +73,22 @@
|
|||||||
# (optional) List of <network_device>:<egress_bw>:<ingress_bw>
|
# (optional) List of <network_device>:<egress_bw>:<ingress_bw>
|
||||||
# Defaults to empty list
|
# Defaults to empty list
|
||||||
#
|
#
|
||||||
|
# [*resource_provider_hypervisors*]
|
||||||
|
# (optional) List of <bridge>:<hypervisor>
|
||||||
|
# Defaults to empty list
|
||||||
|
#
|
||||||
class neutron::agents::ml2::sriov (
|
class neutron::agents::ml2::sriov (
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$manage_service = true,
|
$manage_service = true,
|
||||||
$physical_device_mappings = $::os_service_default,
|
$physical_device_mappings = $::os_service_default,
|
||||||
$polling_interval = 2,
|
$polling_interval = 2,
|
||||||
$exclude_devices = $::os_service_default,
|
$exclude_devices = $::os_service_default,
|
||||||
$extensions = $::os_service_default,
|
$extensions = $::os_service_default,
|
||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
$number_of_vfs = $::os_service_default,
|
$number_of_vfs = $::os_service_default,
|
||||||
$resource_provider_bandwidths = [],
|
$resource_provider_bandwidths = [],
|
||||||
|
$resource_provider_hypervisors = [],
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include neutron::deps
|
include neutron::deps
|
||||||
@ -133,8 +138,16 @@ class neutron::agents::ml2::sriov (
|
|||||||
} else {
|
} else {
|
||||||
$resource_provider_bandwidths_real = $::os_service_default
|
$resource_provider_bandwidths_real = $::os_service_default
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($resource_provider_hypervisors != []) {
|
||||||
|
$resource_provider_hypervisors_real = join(any2array($resource_provider_hypervisors), ',')
|
||||||
|
} else {
|
||||||
|
$resource_provider_hypervisors_real = $::os_service_default
|
||||||
|
}
|
||||||
|
|
||||||
neutron_sriov_agent_config {
|
neutron_sriov_agent_config {
|
||||||
'sriov_nic/resource_provider_bandwidths': value => $resource_provider_bandwidths_real;
|
'sriov_nic/resource_provider_bandwidths': value => $resource_provider_bandwidths_real;
|
||||||
|
'sriov_nic/resource_provider_hypervisors': value => $resource_provider_hypervisors_real;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The following two parameters have been added to define mapping of
|
||||||
|
bridge name and hyper visor name to locate the parent of the resource
|
||||||
|
provider tree.
|
||||||
|
|
||||||
|
- ``neutron::agents::ml2::ovs::resource_provider_hypervisors``
|
||||||
|
- ``neutorn::agents::ml2::sriov::resource_provider_hypervisors``
|
@ -67,6 +67,8 @@ describe 'neutron::agents::ml2::ovs' do
|
|||||||
should contain_neutron_agent_ovs('ovs/igmp_snooping_enable').with_value('<SERVICE DEFAULT>')
|
should contain_neutron_agent_ovs('ovs/igmp_snooping_enable').with_value('<SERVICE DEFAULT>')
|
||||||
should contain_neutron_agent_ovs('ovs/resource_provider_bandwidths').\
|
should contain_neutron_agent_ovs('ovs/resource_provider_bandwidths').\
|
||||||
with_value('<SERVICE DEFAULT>')
|
with_value('<SERVICE DEFAULT>')
|
||||||
|
should contain_neutron_agent_ovs('ovs/resource_provider_hypervisors').\
|
||||||
|
with_value('<SERVICE DEFAULT>')
|
||||||
should contain_neutron_agent_ovs('agent/explicitly_egress_direct').with_value(['<SERVICE DEFAULT>'])
|
should contain_neutron_agent_ovs('agent/explicitly_egress_direct').with_value(['<SERVICE DEFAULT>'])
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -322,13 +324,20 @@ describe 'neutron::agents::ml2::ovs' do
|
|||||||
it { should raise_error(Puppet::Error, /Enabling DPDK without manage vswitch does not have any effect/) }
|
it { should raise_error(Puppet::Error, /Enabling DPDK without manage vswitch does not have any effect/) }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when resource_provider_bandwidths is set' do
|
context 'when parameters for resource providers are set' do
|
||||||
before :each do
|
before :each do
|
||||||
params.merge!(:resource_provider_bandwidths => ['provider-a', 'provider-b'])
|
params.merge!(
|
||||||
|
:resource_provider_bandwidths => ['provider-a', 'provider-b'],
|
||||||
|
:resource_provider_hypervisors => ['provider-a:compute-a', 'provider-b:compute-b'],
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
it { should contain_neutron_agent_ovs('ovs/resource_provider_bandwidths').\
|
it 'configures resource providers' do
|
||||||
with_value('provider-a,provider-b') }
|
should contain_neutron_agent_ovs('ovs/resource_provider_bandwidths').\
|
||||||
|
with_value('provider-a,provider-b')
|
||||||
|
should contain_neutron_agent_ovs('ovs/resource_provider_hypervisors').\
|
||||||
|
with_value('provider-a:compute-a,provider-b:compute-b')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -135,14 +135,19 @@ describe 'neutron::agents::ml2::sriov' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when resource_provider_bandwidths is set' do
|
context 'when parameters for resource providers are set' do
|
||||||
before :each do
|
before :each do
|
||||||
params.merge!(:resource_provider_bandwidths => ['provider-a', 'provider-b'])
|
params.merge!(
|
||||||
|
:resource_provider_bandwidths => ['provider-a', 'provider-b'],
|
||||||
|
:resource_provider_hypervisors => ['provider-a:compute-a', 'provider-b:compute-b'],
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configures resource_provider_bandwidths' do
|
it 'configures resource providers' do
|
||||||
should contain_neutron_sriov_agent_config('sriov_nic/resource_provider_bandwidths').\
|
should contain_neutron_sriov_agent_config('sriov_nic/resource_provider_bandwidths').\
|
||||||
with_value('provider-a,provider-b')
|
with_value('provider-a,provider-b')
|
||||||
|
should contain_neutron_sriov_agent_config('sriov_nic/resource_provider_hypervisors').\
|
||||||
|
with_value('provider-a:compute-a,provider-b:compute-b')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user