Add per module policy service refresh

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

Change-Id: Id3ca3c57026549c17bb3c8a3bedee08672168c5d
This commit is contained in:
Tobias Urdin 2023-06-22 21:04:51 +02:00
parent be36118fce
commit 8850d96e10
3 changed files with 4 additions and 1 deletions

View File

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

View File

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

View File

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