Remove support for networking-bigswitch

... because it was deprecated during the Yoga release[1].

[1] bf9fcd936c

Change-Id: I60fdf1615a3cbc785443d4be0dfa059c46b322f0
This commit is contained in:
Takashi Kajinami
2022-04-10 19:58:58 +09:00
parent 4117660c38
commit c9a93808d4
9 changed files with 5 additions and 495 deletions

View File

@@ -1,79 +0,0 @@
# == Class: neutron::agents::bigswitch
# DEPRECATED !!
# Installs and configures the Big Switch agent and lldp
#
# === Parameters
#
# [*package_ensure*]
# (optional) The state of the package
# Defaults to present
#
# [*lldp_enabled*]
# (optional) The state of the neutron-bsn-lldp service
# Defaults to true
#
# [*agent_enabled*]
# (optional) The state of the neutron-bsn-agent service
# Defaults to false
#
#
class neutron::agents::bigswitch (
$package_ensure = 'present',
$lldp_enabled = true,
$agent_enabled = false,
) {
include neutron::deps
include neutron::params
warning('Support for networking-bigswitch has been deprecated.')
if($::osfamily != 'Redhat') {
fail("Unsupported osfamily ${::osfamily}")
}
ensure_packages('python3-networking-bigswitch',
{
ensure => $package_ensure,
tag => ['openstack', 'neutron-package'],
}
)
package { 'bigswitch-lldp':
ensure => $package_ensure,
name => $::neutron::params::bigswitch_lldp_package,
tag => ['neutron-support-package', 'openstack'],
}
package { 'bigswitch-agent':
ensure => $package_ensure,
name => $::neutron::params::bigswitch_agent_package,
tag => ['neutron-support-package', 'openstack'],
}
if $lldp_enabled {
$lldp_service_ensure = 'running'
} else {
$lldp_service_ensure = 'stopped'
}
if $agent_enabled {
$agent_service_ensure = 'running'
} else {
$agent_service_ensure = 'stopped'
}
service { 'bigswitch-lldp':
ensure => $lldp_service_ensure,
name => $::neutron::params::bigswitch_lldp_service,
enable => $lldp_enabled,
tag => 'neutron-service',
}
service { 'bigswitch-agent':
ensure => $agent_service_ensure,
name => $::neutron::params::bigswitch_agent_service,
enable => $agent_enabled,
tag => 'neutron-service',
}
}

View File

@@ -24,7 +24,7 @@
# [*core_plugin*]
# (optional) Neutron plugin provider
# Defaults to ml2
# Could be bigswitch, brocade, embrane, hyperv, ml2, mlnx, nec, ryu, nuage,
# Could be brocade, embrane, hyperv, ml2, mlnx, nec, ryu, nuage,
# opencontrail, nsx
#
# Example for nuage:

View File

@@ -49,10 +49,6 @@ class neutron::params {
$linuxbridge_server_package = 'openstack-neutron-linuxbridge'
$sriov_nic_agent_service = 'neutron-sriov-nic-agent'
$sriov_nic_agent_package = 'openstack-neutron-sriov-nic-agent'
$bigswitch_lldp_package = 'openstack-neutron-bigswitch-lldp'
$bigswitch_agent_package = 'openstack-neutron-bigswitch-agent'
$bigswitch_lldp_service = 'neutron-bsn-lldp'
$bigswitch_agent_service = 'neutron-bsn-agent'
$dhcp_agent_package = false
$metering_agent_package = 'openstack-neutron-metering-agent'
$vpnaas_agent_package = 'openstack-neutron-vpnaas'

View File

@@ -1,34 +0,0 @@
# DEPRECATED !!
# Install the Big Switch ML2 plugin.
#
# === Parameters
#
# [*package_ensure*]
# (optional) The intended state of the Big Switch ML2 plugin package
# (python-bsnstacklib) package, i.e. any of the possible values of the
# 'ensure' property for a package resource type. Defaults to
# 'present'
#
class neutron::plugins::ml2::bigswitch (
$package_ensure = 'present',
) {
warning('Support for networking-bigswitch has been deprecated.')
include neutron::deps
include neutron::params
require neutron::plugins::ml2
if($::osfamily != 'Redhat') {
# Drivers are only packaged for RedHat at this time
fail("Unsupported osfamily ${::osfamily}")
}
ensure_packages('python-networking-bigswitch',
{
ensure => $package_ensure,
tag => ['openstack', 'neutron-plugin-ml2-package']
}
)
warning('python-networking-bigswitch package management is deprecated, it will be dropped in a future release.')
}

View File

@@ -1,125 +0,0 @@
# DEPRECATED !!
# Set config file parameters for connecting Neutron server to Big
# Switch controllers.
#
# === Parameters
#
# [*servers*]
# Comma-separated list of Big Switch controllers.
# The format is "IP:port,IP:port".
# Defaults to $::os_service_default
#
# [*server_auth*]
# Credentials for the Big Switch controllers.
# The format is "username:password".
# Defaults to $::os_service_default
#
# [*auth_tenant*]
# (optional) The tenant of the auth user
# Defaults to service
#
# [*auth_password*]
# (optional) The password to use for authentication (keystone)
# Defaults to false.
#
# [*auth_user*]
# (optional) The name of the auth user
# Defaults to neutron
#
# [*auth_url*]
# (optional) Complete public Identity API endpoint.
# Defaults to: false
#
# [*auto_sync_on_failure*]
# (optional) When a failover happens in active/passive Big Switch
# controllers, resynchronize with the new master server. Defaults to
# true.
# Defaults to $::os_service_default
#
# [*cache_connections*]
# (optional) Re-use HTTP/HTTPS connections to the controller.
# Defaults to $::os_service_default
#
# [*consistency_interval*]
# (optional) Interval of a keepalive message sent from Neutron server
# to a Big Switch controller..
# Defaults to $::os_service_default
#
# [*keystone_sync_interval*]
# (optional) Time between openstack tenant sync queries
# Defaults to $::os_service_default
#
# [*neutron_id*]
# (optional) Unique identifier of the Neutron instance for the Big
# Switch controller. Defaults to 'neutron'.
#
# [*no_ssl_validation*]
# (optional) Disables SSL certificate validaiton for controllers
# Defaults to $::os_service_default
#
# [*server_ssl*]
# (optional) Whether Neutron should use SSL to talk to the Big Switch
# controllers.
# Defaults to $::os_service_default
#
# [*server_timeout*]
# (optional) Maximum number of seconds to wait for proxy request to connect
# and complete.
# Defaults to $::os_service_default
#
# [*ssl_cert_directory*]
# (optional) Directory where Big Switch controller certificate will be
# stored. Defaults to '/var/lib/neutron'.
#
# [*sync_data*]
# (optional) Sync data on connect
# Defaults to $::os_service_default
#
# [*thread_pool_size*]
# (optional) Maximum number of threads to spawn to handle large volumes of
# port creations.
# Defaults to $::os_service_default
#
class neutron::plugins::ml2::bigswitch::restproxy (
$servers = $::os_service_default,
$server_auth = $::os_service_default,
$auth_tenant = 'services',
$auth_password = false,
$auth_user = 'neutron',
$auth_url = false,
$auto_sync_on_failure = $::os_service_default,
$cache_connections = $::os_service_default,
$consistency_interval = $::os_service_default,
$keystone_sync_interval = $::os_service_default,
$neutron_id = 'neutron',
$no_ssl_validation = $::os_service_default,
$server_ssl = $::os_service_default,
$server_timeout = $::os_service_default,
$ssl_cert_directory = '/var/lib/neutron',
$sync_data = $::os_service_default,
$thread_pool_size = $::os_service_default,
) {
include neutron::deps
require neutron::plugins::ml2::bigswitch
neutron_plugin_ml2 {
'restproxy/servers' : value => $servers;
'restproxy/server_auth' : value => $server_auth;
'restproxy/auth_tenant' : value => $auth_tenant;
'restproxy/auth_password' : value => $auth_password, secret => true;
'restproxy/auth_user' : value => $auth_user;
'restproxy/auth_url' : value => $auth_url;
'restproxy/auto_sync_on_failure' : value => $auto_sync_on_failure;
'restproxy/cache_connections' : value => $cache_connections;
'restproxy/consistency_interval' : value => $consistency_interval;
'restproxy/keystone_sync_interval': value => $keystone_sync_interval;
'restproxy/neutron_id' : value => $neutron_id;
'restproxy/no_ssl_validation' : value => $no_ssl_validation;
'restproxy/server_ssl' : value => $server_ssl;
'restproxy/server_timeout' : value => $server_timeout;
'restproxy/ssl_cert_directory' : value => $ssl_cert_directory;
'restproxy/sync_data' : value => $sync_data;
'restproxy/thread_pool_size' : value => $thread_pool_size;
}
}

View File

@@ -0,0 +1,4 @@
---
upgrade:
- |
Support for networking-bigswitch has been removed.

View File

@@ -1,89 +0,0 @@
require 'spec_helper'
describe 'neutron::agents::bigswitch' do
let :pre_condition do
"class { 'neutron': }"
end
shared_examples 'neutron::agents::bigswitch' do
context 'neutron bigswitch base' do
it 'should have' do
should contain_package('python3-networking-bigswitch').with(
:ensure => 'installed',
:tag => ['openstack', 'neutron-package'],
)
end
end
context 'neutron-bsn-agent only' do
let :params do
{
:lldp_enabled => false,
:agent_enabled => true
}
end
it 'enable neutron-bsn-agent service' do
should contain_service('bigswitch-agent').with(
:enable => params[:agent_enabled],
:ensure =>'running',
:tag =>'neutron-service',
)
end
it 'disable neutron-bsn-lldp service' do
should contain_service('bigswitch-lldp').with(
:enable => params[:lldp_enabled],
:ensure =>'stopped',
:tag =>'neutron-service',
)
end
end
context 'neutron-bsn-lldp only' do
let :params do
{
:lldp_enabled => true,
:agent_enabled => false
}
end
it 'disable neutron-bsn-agent service' do
should contain_service('bigswitch-agent').with(
:enable => params[:agent_enabled],
:ensure =>'stopped',
:tag =>'neutron-service',
)
end
it 'enable neutron-bsn-lldp service' do
should contain_service('bigswitch-lldp').with(
:enable => params[:lldp_enabled],
:ensure =>'running',
:tag =>'neutron-service',
)
end
end
end
shared_examples 'neutron::agents::bigswitch on Debian' do
it { should raise_error(Puppet::Error, /Unsupported osfamily Debian/) }
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
if facts[:osfamily] == 'Debian'
it_behaves_like 'neutron::agents::bigswitch on Debian'
else
it_behaves_like 'neutron::agents::bigswitch'
end
end
end
end

View File

@@ -1,105 +0,0 @@
require 'spec_helper'
describe 'neutron::plugins::ml2::bigswitch::restproxy' do
let :pre_condition do
"class { 'neutron::keystone::authtoken':
password => 'passw0rd',
}
class { 'neutron::server': }
class { 'neutron':
core_plugin => 'ml2'
}"
end
let :required_params do
{
:servers => '192.168.0.10:8000,192.168.0.11:8000',
:server_auth => 'admin:password',
}
end
let :params do
required_params
end
shared_examples 'neutron bigswitch ml2 restproxy' do
it { should contain_class('neutron::params') }
it { should contain_class('neutron::plugins::ml2::bigswitch') }
it do
should contain_neutron_plugin_ml2('restproxy/servers').with_value(params[:servers])
should contain_neutron_plugin_ml2('restproxy/server_auth').with_value(params[:server_auth])
should contain_neutron_plugin_ml2('restproxy/auth_tenant').with_value('services')
should contain_neutron_plugin_ml2('restproxy/auth_password').with_value(false)
should contain_neutron_plugin_ml2('restproxy/auth_user').with_value('neutron')
should contain_neutron_plugin_ml2('restproxy/auth_url').with_value(false)
should contain_neutron_plugin_ml2('restproxy/auto_sync_on_failure').with_value('<SERVICE DEFAULT>')
should contain_neutron_plugin_ml2('restproxy/cache_connections').with_value('<SERVICE DEFAULT>')
should contain_neutron_plugin_ml2('restproxy/consistency_interval').with_value('<SERVICE DEFAULT>')
should contain_neutron_plugin_ml2('restproxy/keystone_sync_interval').with_value('<SERVICE DEFAULT>')
should contain_neutron_plugin_ml2('restproxy/neutron_id').with_value('neutron')
should contain_neutron_plugin_ml2('restproxy/no_ssl_validation').with_value('<SERVICE DEFAULT>')
should contain_neutron_plugin_ml2('restproxy/server_ssl').with_value('<SERVICE DEFAULT>')
should contain_neutron_plugin_ml2('restproxy/server_timeout').with_value('<SERVICE DEFAULT>')
should contain_neutron_plugin_ml2('restproxy/ssl_cert_directory').with_value('/var/lib/neutron')
should contain_neutron_plugin_ml2('restproxy/sync_data').with_value('<SERVICE DEFAULT>')
should contain_neutron_plugin_ml2('restproxy/thread_pool_size').with_value('<SERVICE DEFAULT>')
end
context 'with custom params' do
let :params do
required_params.merge({
:auto_sync_on_failure => false,
:cache_connections => true,
:consistency_interval => 10,
:keystone_sync_interval => 10,
:neutron_id => 'openstack',
:no_ssl_validation => true,
:server_ssl => false,
:server_timeout => 30,
:ssl_cert_directory => '/var/lib/bigswitch',
:sync_data => true,
:thread_pool_size => 8,
})
end
it do
should contain_neutron_plugin_ml2('restproxy/servers').with_value(params[:servers])
should contain_neutron_plugin_ml2('restproxy/server_auth').with_value(params[:server_auth])
should contain_neutron_plugin_ml2('restproxy/auth_tenant').with_value('services')
should contain_neutron_plugin_ml2('restproxy/auth_password').with_value(false)
should contain_neutron_plugin_ml2('restproxy/auth_user').with_value('neutron')
should contain_neutron_plugin_ml2('restproxy/auth_url').with_value(false)
should contain_neutron_plugin_ml2('restproxy/auto_sync_on_failure').with_value(false)
should contain_neutron_plugin_ml2('restproxy/cache_connections').with_value(true)
should contain_neutron_plugin_ml2('restproxy/consistency_interval').with_value(10)
should contain_neutron_plugin_ml2('restproxy/keystone_sync_interval').with_value(10)
should contain_neutron_plugin_ml2('restproxy/neutron_id').with_value('openstack')
should contain_neutron_plugin_ml2('restproxy/no_ssl_validation').with_value(true)
should contain_neutron_plugin_ml2('restproxy/server_ssl').with_value(false)
should contain_neutron_plugin_ml2('restproxy/server_timeout').with_value(30)
should contain_neutron_plugin_ml2('restproxy/ssl_cert_directory').with_value('/var/lib/bigswitch')
should contain_neutron_plugin_ml2('restproxy/sync_data').with_value(true)
should contain_neutron_plugin_ml2('restproxy/thread_pool_size').with_value(8)
end
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
if facts[:osfamily] == 'RedHat'
it_behaves_like 'neutron bigswitch ml2 restproxy'
end
end
end
end

View File

@@ -1,58 +0,0 @@
require 'spec_helper'
describe 'neutron::plugins::ml2::bigswitch' do
let :pre_condition do
"class { 'neutron::keystone::authtoken':
password => 'passw0rd',
}
class { 'neutron::server': }
class { 'neutron':
core_plugin => 'ml2'
}"
end
let :default_params do
{
:package_ensure => 'installed'
}
end
let :params do
{}
end
shared_examples 'neutron plugin bigswitch ml2' do
before do
params.merge!(default_params)
end
it { should contain_class('neutron::params') }
it 'should have' do
should contain_package('python-networking-bigswitch').with(
:ensure => params[:package_ensure],
:tag => ['openstack', 'neutron-plugin-ml2-package']
)
end
end
shared_examples 'neutron plugin bigswitch ml2 on Debian' do
it { should raise_error(Puppet::Error, /Unsupported osfamily Debian/) }
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
if facts[:osfamily] == 'Debian'
it_behaves_like 'neutron plugin bigswitch ml2 on Debian'
else
it_behaves_like 'neutron plugin bigswitch ml2'
end
end
end
end