Merge "bgpvpn: Ensure the "default" service providers"

This commit is contained in:
Zuul 2022-05-18 10:02:06 +00:00 committed by Gerrit Code Review
commit 9ac28acf2a
2 changed files with 17 additions and 5 deletions

View File

@ -54,11 +54,15 @@ class neutron::services::bgpvpn (
tag => ['openstack', 'neutron-package'],
})
if !is_service_default($service_providers) {
# default value is uncommented setting, so we should not touch it at all
neutron_bgpvpn_service_config { 'service_providers/service_provider':
value => $service_providers,
}
if is_service_default($service_providers) {
# NOTE(tkajinam): bgpvpn requires the additional 'default' value.
$service_providers_real = 'BGPVPN:Dummy:networking_bgpvpn.neutron.services.service_drivers.driver_api.BGPVPNDriver:default'
} else {
$service_providers_real = $service_providers
}
neutron_bgpvpn_service_config { 'service_providers/service_provider':
value => $service_providers_real,
}
resources { 'neutron_bgpvpn_service_config':

View File

@ -50,6 +50,14 @@ describe 'neutron::services::bgpvpn' do
:refreshonly => 'true',
)
end
it 'configures networking_bgpvpn.conf' do
should contain_neutron_bgpvpn_service_config(
'service_providers/service_provider'
).with_value(
'BGPVPN:Dummy:networking_bgpvpn.neutron.services.service_drivers.driver_api.BGPVPNDriver:default'
)
end
end
context 'with multiple service providers' do