Add per module policy service refresh

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

Change-Id: I541a7dbb11580155cf2bb3af0ffbf6ebc5b1220b
This commit is contained in:
Tobias Urdin 2023-06-25 23:55:47 +02:00
parent b44f40170f
commit f7f4319478
3 changed files with 4 additions and 1 deletions

View File

@ -62,7 +62,7 @@ class neutron::deps {
# policy config should occur in the config block also.
Anchor['neutron::config::begin']
-> Openstacklib::Policy<||>
-> Openstacklib::Policy<| tag == 'neutron' |>
~> Anchor['neutron::config::end']
# Support packages need to be installed in the install phase, but we don't

View File

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

View File

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