Merge "Replace unnecessary ensure_resource"

This commit is contained in:
Zuul 2023-11-15 17:58:43 +00:00 committed by Gerrit Code Review
commit b6e7e4f412
5 changed files with 11 additions and 14 deletions

View File

@ -47,12 +47,11 @@ class neutron::services::bgpvpn (
include neutron::deps
include neutron::params
#This package just include the service API
ensure_resource( 'package', $::neutron::params::bgpvpn_plugin_package, {
package { 'python-networking-bgpvpn':
ensure => $package_ensure,
name => $::neutron::params::bgpvpn_plugin_package,
tag => ['openstack', 'neutron-package'],
})
}
if is_service_default($service_providers) {
# NOTE(tkajinam): bgpvpn requires the additional 'default' value.
@ -70,7 +69,6 @@ class neutron::services::bgpvpn (
}
if $sync_db {
Package<| title == $::neutron::params::bgpvpn_plugin_package |> ~> Exec['bgpvpn-db-sync']
exec { 'bgpvpn-db-sync':
command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --subproject networking-bgpvpn upgrade head',
path => '/usr/bin',

View File

@ -56,11 +56,11 @@ class neutron::services::l2gw (
include neutron::deps
include neutron::params
ensure_resource( 'package', 'python-networking-l2gw', {
'ensure' => $package_ensure,
'name' => $::neutron::params::l2gw_package,
'tag' => ['openstack', 'neutron-package'],
})
package { 'python-networking-l2gw':
ensure => $package_ensure,
name => $::neutron::params::l2gw_package,
tag => ['openstack', 'neutron-package'],
}
resources { 'neutron_l2gw_service_config':
purge => $purge_config,

View File

@ -53,11 +53,11 @@ class neutron::services::sfc (
include neutron::deps
include neutron::params
ensure_resource( 'package', $::neutron::params::sfc_package, {
package { 'python-networking-sfc':
ensure => $package_ensure,
name => $::neutron::params::sfc_package,
tag => ['openstack', 'neutron-package'],
})
}
neutron_sfc_service_config {
'sfc/drivers': value => $sfc_driver;
@ -69,7 +69,6 @@ class neutron::services::sfc (
}
if $sync_db {
Package<| title == $::neutron::params::sfc_package |> ~> Exec['sfc-db-sync']
exec { 'sfc-db-sync':
command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --subproject networking-sfc upgrade head',
path => '/usr/bin',

View File

@ -21,7 +21,7 @@ describe 'neutron::services::bgpvpn' do
shared_examples 'neutron bgpvpn service plugin' do
context 'with default params' do
it 'installs bgpvpn package' do
should contain_package(platform_params[:bgpvpn_package_name]).with(
should contain_package('python-networking-bgpvpn').with(
:ensure => 'present',
:name => platform_params[:bgpvpn_package_name],
)

View File

@ -20,7 +20,7 @@ describe 'neutron::services::sfc' do
shared_examples 'neutron sfc service plugin' do
context 'with default params' do
it 'installs sfc package' do
should contain_package(platform_params[:sfc_package_name]).with(
should contain_package('python-networking-sfc').with(
:ensure => 'present',
:name => platform_params[:sfc_package_name],
)