From 55d36ea5d83a3d2c9f37db9a3aeca43ae8fc5d98 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Sun, 25 Jun 2023 23:55:47 +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: I541a7dbb11580155cf2bb3af0ffbf6ebc5b1220b (cherry picked from commit f7f43194782035c58c6fd799fe08136068a4dedc) (cherry picked from commit d76f4b4dfd6ee9d4f641c726c0da86b2a7373d61) --- manifests/deps.pp | 2 +- manifests/policy.pp | 1 + spec/classes/neutron_policy_spec.rb | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/manifests/deps.pp b/manifests/deps.pp index d814279ce..d4078bfdc 100644 --- a/manifests/deps.pp +++ b/manifests/deps.pp @@ -64,7 +64,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 diff --git a/manifests/policy.pp b/manifests/policy.pp index 607ffd165..772033441 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -62,6 +62,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 }) diff --git a/spec/classes/neutron_policy_spec.rb b/spec/classes/neutron_policy_spec.rb index b97110abb..d6addf11a 100644 --- a/spec/classes/neutron_policy_spec.rb +++ b/spec/classes/neutron_policy_spec.rb @@ -32,6 +32,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, @@ -61,6 +62,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,