From 41dae27b094581a0037cdf1b5193572e04defdd5 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Sun, 25 Jun 2023 23:45:36 +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: Ie190999dfdce7fe75bbc1889ec11feda796e226c --- manifests/deps.pp | 2 +- manifests/policy.pp | 1 + spec/classes/heat_policy_spec.rb | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/manifests/deps.pp b/manifests/deps.pp index 4f1f7ecd..a9e5cc0f 100644 --- a/manifests/deps.pp +++ b/manifests/deps.pp @@ -35,7 +35,7 @@ class heat::deps { # policy config should occur in the config block also. Anchor['heat::config::begin'] - -> Openstacklib::Policy<||> + -> Openstacklib::Policy<| tag == 'heat' |> ~> Anchor['heat::config::end'] # On any uwsgi config change, we must restart Heat API. diff --git a/manifests/policy.pp b/manifests/policy.pp index ceaea781..c4326f9f 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -67,6 +67,7 @@ class heat::policy ( file_group => $::heat::params::group, file_format => 'yaml', purge_config => $purge_config, + tag => 'heat', } create_resources('openstacklib::policy', { $policy_path => $policy_parameters }) diff --git a/spec/classes/heat_policy_spec.rb b/spec/classes/heat_policy_spec.rb index 143ee0e8..e8772f95 100644 --- a/spec/classes/heat_policy_spec.rb +++ b/spec/classes/heat_policy_spec.rb @@ -33,6 +33,7 @@ describe 'heat::policy' do :file_group => 'heat', :file_format => 'yaml', :purge_config => false, + :tag => 'heat', ) is_expected.to contain_oslo__policy('heat_config').with( :enforce_scope => false, @@ -63,6 +64,7 @@ describe 'heat::policy' do :file_group => 'heat', :file_format => 'yaml', :purge_config => true, + :tag => 'heat', ) is_expected.to contain_oslo__policy('heat_config').with( :enforce_scope => false,