Merge "mlnx: Fix circular dependencies"
This commit is contained in:
commit
112e32e108
@ -77,10 +77,11 @@ class neutron::agents::ml2::mlnx (
|
||||
include neutron::deps
|
||||
include neutron::params
|
||||
|
||||
$mlnx_agent_package = $::neutron::params::mlnx_agent_package
|
||||
$mlnx_agent_service = $::neutron::params::mlnx_agent_service
|
||||
$eswitchd_package = $::neutron::params::eswitchd_package
|
||||
$eswitchd_service = $::neutron::params::eswitchd_service
|
||||
$mlnx_agent_package = $::neutron::params::mlnx_agent_package
|
||||
$mlnx_agent_service = $::neutron::params::mlnx_agent_service
|
||||
$eswitchd_package = $::neutron::params::eswitchd_package
|
||||
$eswitchd_service = $::neutron::params::eswitchd_service
|
||||
$mlnx_plugin_package = $::neutron::params::mlnx_plugin_package
|
||||
|
||||
neutron_mlnx_agent_config {
|
||||
'eswitch/physical_interface_mappings': value => pick(join(any2array($physical_interface_mappings), ','), $::os_service_default);
|
||||
@ -117,16 +118,17 @@ class neutron::agents::ml2::mlnx (
|
||||
})
|
||||
|
||||
if $manage_package {
|
||||
if $mlnx_agent_package != $mlnx_plugin_package {
|
||||
$mlnx_agent_package_tag = ['openstack', 'neutron-package']
|
||||
} else {
|
||||
$mlnx_agent_package_tag = ['openstack', 'neutron-plugin-ml2-package']
|
||||
Package[$mlnx_agent_package] -> Neutron_mlnx_agent_config<||>
|
||||
}
|
||||
ensure_packages($mlnx_agent_package, {
|
||||
ensure => $package_ensure,
|
||||
tag => ['openstack'],
|
||||
tag => $mlnx_agent_package_tag,
|
||||
})
|
||||
|
||||
# NOTE(tkajinam): CentOS/RHEL uses the same package for both agent and
|
||||
# plugin. This is required to avoid conflict with
|
||||
# neutron::plugins::ml2::mellanox
|
||||
Package<| title == $mlnx_agent_package |> { tag +> 'neutron-package' }
|
||||
|
||||
# NOTE(tkajinam): Ubuntu/Debian requires a separate package for eswitchd
|
||||
# service.
|
||||
if $eswitchd_package {
|
||||
|
@ -23,11 +23,6 @@ class neutron::plugins::ml2::mellanox (
|
||||
|
||||
ensure_packages($mlnx_plugin_package, {
|
||||
ensure => $package_ensure,
|
||||
tag => ['openstack'],
|
||||
tag => ['openstack', 'neutron-plugin-ml2-package'],
|
||||
})
|
||||
|
||||
# NOTE(tkajinam): CentOS/RHEL uses the same package for both agent and
|
||||
# plugin. This is required to avoid conflict with
|
||||
# neutron::agens::ml2::mlnx
|
||||
Package<| title == $mlnx_plugin_package |> { tag +> 'neutron-plugin-ml2-package' }
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ describe 'neutron::agents::ml2::mlnx' do
|
||||
should contain_package(platform_params[:mlnx_agent_package]).with(
|
||||
:name => platform_params[:mlnx_agent_package],
|
||||
:ensure => 'installed',
|
||||
:tag => ['openstack', 'neutron-package'],
|
||||
:tag => platform_params[:mlnx_agent_package_tag]
|
||||
)
|
||||
|
||||
if platform_params[:eswitchd_package]
|
||||
@ -109,17 +109,19 @@ describe 'neutron::agents::ml2::mlnx' do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{
|
||||
:mlnx_agent_package => 'neutron-mlnx-agent',
|
||||
:mlnx_agent_service => 'neutron-mlnx-agent',
|
||||
:eswitchd_package => 'networking-mlnx-eswitchd',
|
||||
:eswitchd_service => 'networking-mlnx-eswitchd',
|
||||
:mlnx_agent_package => 'neutron-mlnx-agent',
|
||||
:mlnx_agent_service => 'neutron-mlnx-agent',
|
||||
:eswitchd_package => 'networking-mlnx-eswitchd',
|
||||
:eswitchd_service => 'networking-mlnx-eswitchd',
|
||||
:mlnx_agent_package_tag => ['openstack', 'neutron-package'],
|
||||
}
|
||||
when 'RedHat'
|
||||
{
|
||||
:mlnx_agent_package => 'python3-networking-mlnx',
|
||||
:mlnx_agent_service => 'neutron-mlnx-agent',
|
||||
:eswitchd_package => false,
|
||||
:eswitchd_service => 'eswitchd',
|
||||
:mlnx_agent_package => 'python3-networking-mlnx',
|
||||
:mlnx_agent_service => 'neutron-mlnx-agent',
|
||||
:eswitchd_package => false,
|
||||
:eswitchd_service => 'eswitchd',
|
||||
:mlnx_agent_package_tag => ['openstack', 'neutron-plugin-ml2-package'],
|
||||
}
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user