Add per module policy service refresh

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

Change-Id: I6cf1abb1645a47eb3afdcdf4d659cea8eb780f68
This commit is contained in:
Tobias Urdin
2023-06-25 23:56:40 +02:00
parent 0ca00adff7
commit 6e17904d67
3 changed files with 4 additions and 1 deletions

View File

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

View File

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

View File

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