Add per module policy service refresh

Updating the policies for this project should only
refresh the services that reads it.

Change-Id: I5a30077b83dacc901bbad38ecf58095780a7233d
This commit is contained in:
Tobias Urdin 2023-06-25 23:54:06 +02:00
parent e9d004c0d1
commit d6f55e497f
3 changed files with 4 additions and 1 deletions

View File

@ -34,7 +34,7 @@ class mistral::deps {
# policy config should occur in the config block # policy config should occur in the config block
Anchor['mistral::config::begin'] Anchor['mistral::config::begin']
-> Openstacklib::Policy<||> -> Openstacklib::Policy<| tag == 'mistral' |>
~> Anchor['mistral::config::end'] ~> Anchor['mistral::config::end']
# Installation or config changes will always restart services. # Installation or config changes will always restart services.

View File

@ -65,6 +65,7 @@ class mistral::policy (
file_group => $::mistral::params::group, file_group => $::mistral::params::group,
file_format => 'yaml', file_format => 'yaml',
purge_config => $purge_config, purge_config => $purge_config,
tag => 'mistral',
} }
create_resources('openstacklib::policy', { $policy_path => $policy_parameters }) create_resources('openstacklib::policy', { $policy_path => $policy_parameters })

View File

@ -33,6 +33,7 @@ describe 'mistral::policy' do
:file_group => 'mistral', :file_group => 'mistral',
:file_format => 'yaml', :file_format => 'yaml',
:purge_config => false, :purge_config => false,
:tag => 'mistral',
) )
is_expected.to contain_oslo__policy('mistral_config').with( is_expected.to contain_oslo__policy('mistral_config').with(
:enforce_scope => false, :enforce_scope => false,
@ -63,6 +64,7 @@ describe 'mistral::policy' do
:file_group => 'mistral', :file_group => 'mistral',
:file_format => 'yaml', :file_format => 'yaml',
:purge_config => true, :purge_config => true,
:tag => 'mistral',
) )
is_expected.to contain_oslo__policy('mistral_config').with( is_expected.to contain_oslo__policy('mistral_config').with(
:enforce_scope => false, :enforce_scope => false,