Support configuring [taas] vlan_range_start/end in service config

These options should be configured in neutron-server, not in l2 agent.

Closes-Bug: #2081074
Change-Id: I09c9c95aac51e595f83aef5f40578fa743972731
This commit is contained in:
Takashi Kajinami 2024-09-18 23:39:27 +09:00
parent bba2d19c98
commit 134e26d17b
3 changed files with 26 additions and 0 deletions

View File

@ -19,6 +19,14 @@
# (optional) Number of Tap flows allowed per tenant.
# Defaults to $facts['os_service_default']
#
# [*vlan_range_start*]
# (optional) Starting rantge of TAAS VLAN IDs.
# Defaults to $facts['os_service_default'].
#
# [*vlan_range_end*]
# (optional) End rantge of TAAS VLAN IDs.
# Defaults to $facts['os_service_default'].
#
# [*sync_db*]
# Whether 'neutron-db-manage' should run to create and/or synchronize the
# database with neutron-taas specific tables.
@ -34,6 +42,8 @@ class neutron::services::taas (
$service_providers = $facts['os_service_default'],
$quota_tap_service = $facts['os_service_default'],
$quota_tap_flow = $facts['os_service_default'],
$vlan_range_start = $facts['os_service_default'],
$vlan_range_end = $facts['os_service_default'],
Boolean $sync_db = false,
Boolean $purge_config = false,
) {
@ -61,6 +71,8 @@ class neutron::services::taas (
'service_providers/service_provider': value => $service_providers_real;
'quotas/quota_tap_service': value => $quota_tap_service;
'quotas/quota_tap_flow': value => $quota_tap_flow;
'taas/vlan_range_start': value => $vlan_range_start;
'taas/vlan_range_end': value => $vlan_range_end;
}
if $sync_db {

View File

@ -0,0 +1,8 @@
---
features:
- |
The following parameters have been added to the ``neutron::services::taas``
class.
- ``vlan_range_start``
- ``vlan_range_end``

View File

@ -19,6 +19,8 @@ describe 'neutron::services::taas' do
)
should contain_neutron_taas_service_config('quotas/quota_tap_service').with_value('<SERVICE DEFAULT>')
should contain_neutron_taas_service_config('quotas/quota_tap_flow').with_value('<SERVICE DEFAULT>')
should contain_neutron_taas_service_config('taas/vlan_range_start').with_value('<SERVICE DEFAULT>')
should contain_neutron_taas_service_config('taas/vlan_range_end').with_value('<SERVICE DEFAULT>')
end
it 'does not run neutron-db-manage' do
@ -31,11 +33,15 @@ describe 'neutron::services::taas' do
{
:quota_tap_service => 1,
:quota_tap_flow => 10,
:vlan_range_start => 3000,
:vlan_range_end => 3500,
}
end
it 'configures taas_plugin.ini' do
should contain_neutron_taas_service_config('quotas/quota_tap_service').with_value(1)
should contain_neutron_taas_service_config('quotas/quota_tap_flow').with_value(10)
should contain_neutron_taas_service_config('taas/vlan_range_start').with_value(3000)
should contain_neutron_taas_service_config('taas/vlan_range_end').with_value(3500)
end
end