Add per module policy service refresh

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

Change-Id: I306233bb64b1070f722d7897063a700050be0058
This commit is contained in:
Tobias Urdin 2023-06-25 23:42:50 +02:00
parent 6adf5af558
commit 8d522ae1f2
3 changed files with 4 additions and 1 deletions

View File

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

View File

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

View File

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