From aae84d93b0601c96a745f7c827f24a4e29360472 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 20 Nov 2023 01:15:56 +0900 Subject: [PATCH] Use new openstackclient tag The new openstackclient tag was added so that we can get all resources about openstack CLI more easily. This adds this tag to heatclient because the package provides some sub-commands. Also, the heatclient package is required by heat so updating it should restart the services. Change-Id: I4e24408d9c377d0b67d87efa07f07913ef997402 --- manifests/client.pp | 4 +++- spec/classes/heat_client_spec.rb | 15 ++------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/manifests/client.pp b/manifests/client.pp index 57e98579..fbf9c08a 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -14,10 +14,12 @@ class heat::client ( include heat::deps include heat::params + # NOTE(tkajinam): heat-package tag is used because heatclient is required + # by heat package { 'python-heatclient': ensure => $ensure, name => $::heat::params::client_package_name, - tag => 'openstack', + tag => ['openstack', 'openstackclient', 'heat-package'], } include openstacklib::openstackclient diff --git a/spec/classes/heat_client_spec.rb b/spec/classes/heat_client_spec.rb index 7c0252a3..5df0587b 100644 --- a/spec/classes/heat_client_spec.rb +++ b/spec/classes/heat_client_spec.rb @@ -2,18 +2,7 @@ require 'spec_helper' describe 'heat::client' do - let :params do - {} - end - - let :default_params do - { :package_ensure => 'present' } - end - shared_examples_for 'heat client' do - let :p do - default_params.merge(params) - end it { is_expected.to contain_class('heat::deps') } it { is_expected.to contain_class('heat::params') } @@ -21,8 +10,8 @@ describe 'heat::client' do it 'installs heat client package' do is_expected.to contain_package('python-heatclient').with( :name => platform_params[:client_package_name], - :ensure => p[:package_ensure], - :tag => 'openstack' + :ensure => 'present', + :tag => ['openstack', 'openstackclient', 'heat-package'] ) end