Add per module policy service refresh

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

Change-Id: I2364aed9cadceaa9b71b570357975b93634f71a2
This commit is contained in:
Tobias Urdin 2023-06-25 23:53:14 +02:00
parent ddc24d4981
commit fd90649c82
3 changed files with 4 additions and 1 deletions

View File

@ -44,7 +44,7 @@ class manila::deps {
# policy config should occur in the config block also.
Anchor['manila::config::begin']
-> Openstacklib::Policy<||>
-> Openstacklib::Policy<| tag == 'manila' |>
~> Anchor['manila::config::end']
# On any uwsgi config change, we must restart Manila API.

View File

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

View File

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