Merge "Use new openstackclient tag"

This commit is contained in:
Zuul 2023-11-20 18:21:36 +00:00 committed by Gerrit Code Review
commit 4c87eadbd3
4 changed files with 18 additions and 12 deletions

View File

@ -40,4 +40,8 @@ Puppet::Type.newtype(:trove_datastore_version) do
autorequire(:anchor) do
['trove::service::end']
end
autorequire(:trove_datastore) do
[self[:datastore]]
end
end

View File

@ -37,10 +37,12 @@ class trove::client (
include trove::deps
# NOTE(tkajinam): trove-package tag is used because troveclient is required
# by trove
package { 'python-troveclient':
ensure => $package_ensure,
name => $client_package_name,
tag => 'openstack',
tag => ['openstack', 'openstackclient', 'trove-package'],
}
include openstacklib::openstackclient

View File

@ -46,16 +46,14 @@ class trove::deps {
# before dbsync starts
Oslo::Db<||> -> Anchor['trove::dbsync::begin']
# We need troveclient installed before marking service end so that trove
# We need openstackclient installed before marking service end so that trove
# will have clients available to create resources. This tag handles the
# troveclient but indirectly since the client is not available in
# openstackclient but indirectly since the client is not available in
# all catalogs that don't need the client class (like many spec tests).
# Once the troveclient is installed we will setup the datastores and
# Once the openstackclient is installed we will setup the datastores and
# datastore_versions. Datastore_versions must come after datastores.
Package<| tag == 'openstack'|>
~> Anchor['trove::service::end']
-> Trove_datastore<||>
-> Trove_datastore_version<||>
Package<| tag == 'openstackclient'|>
-> Anchor['trove::service::end']
# Installation or config changes will always restart services.
Anchor['trove::install::end'] ~> Anchor['trove::service::begin']

View File

@ -28,8 +28,9 @@ describe 'trove::client' do
context 'with default parameters' do
it { is_expected.to contain_package('python-troveclient').with(
'ensure' => 'present',
'name' => platform_params[:client_package_name],
:ensure => 'present',
:name => platform_params[:client_package_name],
:tag => ['openstack', 'openstackclient', 'trove-package']
)}
end
@ -38,8 +39,9 @@ describe 'trove::client' do
{ :package_ensure => false }
end
it { is_expected.to contain_package('python-troveclient').with(
'ensure' => false,
'name' => platform_params[:client_package_name],
:ensure => false,
:name => platform_params[:client_package_name],
:tag => ['openstack', 'openstackclient', 'trove-package']
)}
end