Add per module policy service refresh

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

Change-Id: Id3ca3c57026549c17bb3c8a3bedee08672168c5d
(cherry picked from commit 8850d96e10)
(cherry picked from commit 4a04ba262d)
(cherry picked from commit c7a476e486)
This commit is contained in:
Tobias Urdin 2023-06-22 21:04:51 +02:00
parent ebbbb8d011
commit d3eccabf20
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

@ -62,6 +62,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

@ -32,6 +32,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,
@ -61,6 +62,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,