puppet-neutron/spec/classes/neutron_plugins_ml2_bagpipe_spec.rb
Takashi Kajinami 2ed0f9a26d Debian/Ubuntu: Prohibit BaGPipe agent
Currently networking-bagpipe is shipped in Debian and Ubuntu but their
packages do not provide the service unit for the agent (bagpipe-bgp).

Also the configuration path is different from the current expectation.

This makes the agent class hard-fail in case it's used in Debian or
Ubuntu, instead of making wrong configurations (or failures during
applying manifests). We'll revisit this if the package problem is
resolved and we hear a real request to support the service in Debian
and Ubuntu.

Closes-Bug: #2043283
Change-Id: If53fe4c586670e25b3dad6e712f5d7fb5778c341
2023-11-12 22:12:19 +09:00

45 lines
1.2 KiB
Ruby

require 'spec_helper'
describe 'neutron::plugins::ml2::bagpipe' do
let :params do
{}
end
shared_examples 'neutron plugin bagpipe ml2' do
it 'should have' do
should contain_package('python-networking-bagpipe').with(
:ensure => 'present',
:name => platform_params[:bagpipe_package_name],
:tag => ['openstack', 'neutron-plugin-ml2-package']
)
end
it 'configures bagpipe settings' do
should contain_neutron_plugin_ml2('bagpipe/bagpipe_bgp_port').with_value('<SERVICE DEFAULT>')
should contain_neutron_plugin_ml2('bagpipe/mpls_bridge').with_value('<SERVICE DEFAULT>')
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge(OSDefaults.get_facts())
end
let (:platform_params) do
case facts[:os]['family']
when 'Debian'
{ :bagpipe_package_name => 'python3-networking-bagpipe' }
when 'RedHat'
{ :bagpipe_package_name => 'python3-networking-bagpipe' }
end
end
it_behaves_like 'neutron plugin bagpipe ml2'
end
end
end