Add support for the resource_provider_default_hypervisor parameter
Conflicts: manifests/agents/ml2/ovs.pp Related-Bug: #1926693 Depends-on: https://review.opendev.org/796836 Change-Id: I35c0a76cade37ccbaf7920b30ac162fe0f49e173 (cherry picked from commit38d85c0e78
) (cherry picked from commit768c15c4ec
) (cherry picked from commit15a3ccaefc
) (cherry picked from commit863a7d2253
)
This commit is contained in:
parent
eb509c49e3
commit
db82fc60d8
|
@ -193,6 +193,11 @@
|
||||||
# (optional) List of <bridge>:<hypervisor>
|
# (optional) List of <bridge>:<hypervisor>
|
||||||
# Defaults to empty list
|
# Defaults to empty list
|
||||||
#
|
#
|
||||||
|
# [*resource_provider_default_hypervisor*]
|
||||||
|
# (optional) The default hypervisor name used to locate the parent of
|
||||||
|
# the resource provider.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
# [*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
|
||||||
|
@ -258,6 +263,7 @@ class neutron::agents::ml2::ovs (
|
||||||
$igmp_snooping_enable = $::os_service_default,
|
$igmp_snooping_enable = $::os_service_default,
|
||||||
$resource_provider_bandwidths = [],
|
$resource_provider_bandwidths = [],
|
||||||
$resource_provider_hypervisors = [],
|
$resource_provider_hypervisors = [],
|
||||||
|
$resource_provider_default_hypervisor = $::os_service_default,
|
||||||
$explicitly_egress_direct = $::os_service_default,
|
$explicitly_egress_direct = $::os_service_default,
|
||||||
$network_log_rate_limit = $::os_service_default,
|
$network_log_rate_limit = $::os_service_default,
|
||||||
$network_log_burst_limit = $::os_service_default,
|
$network_log_burst_limit = $::os_service_default,
|
||||||
|
@ -367,8 +373,9 @@ class neutron::agents::ml2::ovs (
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
'ovs/resource_provider_hypervisors': value => $resource_provider_hypervisors_real;
|
||||||
|
'ovs/resource_provider_default_hypervisor': value => $resource_provider_default_hypervisor;
|
||||||
}
|
}
|
||||||
|
|
||||||
neutron_agent_ovs {
|
neutron_agent_ovs {
|
||||||
|
|
|
@ -77,18 +77,24 @@
|
||||||
# (optional) List of <bridge>:<hypervisor>
|
# (optional) List of <bridge>:<hypervisor>
|
||||||
# Defaults to empty list
|
# Defaults to empty list
|
||||||
#
|
#
|
||||||
|
# [*resource_provider_default_hypervisor*]
|
||||||
|
# (optional) The default hypervisor name used to locate the parent of
|
||||||
|
# the resource provider.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
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 = [],
|
$resource_provider_hypervisors = [],
|
||||||
|
$resource_provider_default_hypervisor = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::neutron::deps
|
include ::neutron::deps
|
||||||
|
@ -146,8 +152,9 @@ class neutron::agents::ml2::sriov (
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
'sriov_nic/resource_provider_hypervisors': value => $resource_provider_hypervisors_real;
|
||||||
|
'sriov_nic/resource_provider_default_hypervisor': value => $resource_provider_default_hypervisor;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Now the ``neutron::agents::ml2::ovs`` class and
|
||||||
|
the ``neutron::agents::ml2::sriov`` class supports
|
||||||
|
the resource_provider_default_hypervisor parameter to set the corresponding
|
||||||
|
parameter in ovs-agent and sriov-agent.
|
|
@ -70,6 +70,8 @@ describe 'neutron::agents::ml2::ovs' do
|
||||||
with_value('<SERVICE DEFAULT>')
|
with_value('<SERVICE DEFAULT>')
|
||||||
should contain_neutron_agent_ovs('ovs/resource_provider_hypervisors').\
|
should contain_neutron_agent_ovs('ovs/resource_provider_hypervisors').\
|
||||||
with_value('<SERVICE DEFAULT>')
|
with_value('<SERVICE DEFAULT>')
|
||||||
|
should contain_neutron_agent_ovs('ovs/resource_provider_default_hypervisor').\
|
||||||
|
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>'])
|
||||||
should contain_neutron_agent_ovs('network_log/rate_limit').with_value('<SERVICE DEFAULT>')
|
should contain_neutron_agent_ovs('network_log/rate_limit').with_value('<SERVICE DEFAULT>')
|
||||||
should contain_neutron_agent_ovs('network_log/burst_limit').with_value('<SERVICE DEFAULT>')
|
should contain_neutron_agent_ovs('network_log/burst_limit').with_value('<SERVICE DEFAULT>')
|
||||||
|
@ -350,8 +352,9 @@ describe 'neutron::agents::ml2::ovs' do
|
||||||
context 'when parameters for resource providers are set' do
|
context 'when parameters for resource providers are set' do
|
||||||
before :each do
|
before :each do
|
||||||
params.merge!(
|
params.merge!(
|
||||||
:resource_provider_bandwidths => ['provider-a', 'provider-b'],
|
:resource_provider_bandwidths => ['provider-a', 'provider-b'],
|
||||||
:resource_provider_hypervisors => ['provider-a:compute-a', 'provider-b:compute-b'],
|
:resource_provider_hypervisors => ['provider-a:compute-a', 'provider-b:compute-b'],
|
||||||
|
:resource_provider_default_hypervisor => 'compute-c',
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -360,6 +363,8 @@ describe 'neutron::agents::ml2::ovs' do
|
||||||
with_value('provider-a,provider-b')
|
with_value('provider-a,provider-b')
|
||||||
should contain_neutron_agent_ovs('ovs/resource_provider_hypervisors').\
|
should contain_neutron_agent_ovs('ovs/resource_provider_hypervisors').\
|
||||||
with_value('provider-a:compute-a,provider-b:compute-b')
|
with_value('provider-a:compute-a,provider-b:compute-b')
|
||||||
|
should contain_neutron_agent_ovs('ovs/resource_provider_default_hypervisor').\
|
||||||
|
with_value('compute-c')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -66,9 +66,13 @@ describe 'neutron::agents::ml2::sriov' do
|
||||||
should contain_service('neutron-sriov-nic-agent-service').that_notifies('Anchor[neutron::service::end]')
|
should contain_service('neutron-sriov-nic-agent-service').that_notifies('Anchor[neutron::service::end]')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does not configure resource_provider_bandwidths by default' do
|
it 'does not configure resource provider parameters by default' 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('<SERVICE DEFAULT>')
|
with_value('<SERVICE DEFAULT>')
|
||||||
|
should contain_neutron_sriov_agent_config('sriov_nic/resource_provider_hypervisors').\
|
||||||
|
with_value('<SERVICE DEFAULT>')
|
||||||
|
should contain_neutron_sriov_agent_config('sriov_nic/resource_provider_default_hypervisor').\
|
||||||
|
with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when number_of_vfs is empty' do
|
context 'when number_of_vfs is empty' do
|
||||||
|
@ -138,8 +142,9 @@ describe 'neutron::agents::ml2::sriov' do
|
||||||
context 'when parameters for resource providers are set' do
|
context 'when parameters for resource providers are set' do
|
||||||
before :each do
|
before :each do
|
||||||
params.merge!(
|
params.merge!(
|
||||||
:resource_provider_bandwidths => ['provider-a', 'provider-b'],
|
:resource_provider_bandwidths => ['provider-a', 'provider-b'],
|
||||||
:resource_provider_hypervisors => ['provider-a:compute-a', 'provider-b:compute-b'],
|
:resource_provider_hypervisors => ['provider-a:compute-a', 'provider-b:compute-b'],
|
||||||
|
:resource_provider_default_hypervisor => 'compute-c'
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -148,6 +153,8 @@ describe 'neutron::agents::ml2::sriov' do
|
||||||
with_value('provider-a,provider-b')
|
with_value('provider-a,provider-b')
|
||||||
should contain_neutron_sriov_agent_config('sriov_nic/resource_provider_hypervisors').\
|
should contain_neutron_sriov_agent_config('sriov_nic/resource_provider_hypervisors').\
|
||||||
with_value('provider-a:compute-a,provider-b:compute-b')
|
with_value('provider-a:compute-a,provider-b:compute-b')
|
||||||
|
should contain_neutron_sriov_agent_config('sriov_nic/resource_provider_default_hypervisor').\
|
||||||
|
with_value('compute-c')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue