From fd90649c82116148bd474a57544ce5a345de5ac5 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Sun, 25 Jun 2023 23:53:14 +0200 Subject: [PATCH] Add per module policy service refresh Updating the policies for this project should only refresh the services that reads it. Change-Id: I2364aed9cadceaa9b71b570357975b93634f71a2 --- manifests/deps.pp | 2 +- manifests/policy.pp | 1 + spec/classes/manila_policy_spec.rb | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/manifests/deps.pp b/manifests/deps.pp index d5f178bb..7b68ca5e 100644 --- a/manifests/deps.pp +++ b/manifests/deps.pp @@ -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. diff --git a/manifests/policy.pp b/manifests/policy.pp index 88a528c8..1def556c 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -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 }) diff --git a/spec/classes/manila_policy_spec.rb b/spec/classes/manila_policy_spec.rb index 830add7f..8fa46eff 100644 --- a/spec/classes/manila_policy_spec.rb +++ b/spec/classes/manila_policy_spec.rb @@ -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,