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 autorequire(:anchor) do
['trove::service::end'] ['trove::service::end']
end end
autorequire(:trove_datastore) do
[self[:datastore]]
end
end end

View File

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

View File

@ -46,16 +46,14 @@ class trove::deps {
# before dbsync starts # before dbsync starts
Oslo::Db<||> -> Anchor['trove::dbsync::begin'] 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 # 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). # 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. # datastore_versions. Datastore_versions must come after datastores.
Package<| tag == 'openstack'|> Package<| tag == 'openstackclient'|>
~> Anchor['trove::service::end'] -> Anchor['trove::service::end']
-> Trove_datastore<||>
-> Trove_datastore_version<||>
# Installation or config changes will always restart services. # Installation or config changes will always restart services.
Anchor['trove::install::end'] ~> Anchor['trove::service::begin'] Anchor['trove::install::end'] ~> Anchor['trove::service::begin']

View File

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