puppet-neutron/manifests/agents/bigswitch.pp
Takashi Kajinami bf9fcd936c Deprecate support for networking-bigswitch
The networking-bigswitch plugin is unmaintained. The repo[1] has not
been updated for 2 years and no release has been created since Train.
Because we don't expect any user is using that unmainitained plugin
with recent versions of OpenStack, let's deprecate support for
the plugin so that we can remove it completely in the next cycle.

Closes-Bug: #1962579
Change-Id: Id4b07727af42b6a1d1145b71fc79f4bac7617eb3
2022-03-01 22:28:53 +09:00

80 lines
1.8 KiB
Puppet

# == 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',
}
}