Add per module policy service refresh
Updating the policies for this project should only refresh the services that reads it. Change-Id: I7eda28c684af2def0d4acacfa5ba453ef02b42a3 (cherry picked from commit2abda4f574) (cherry picked from commit9ff18740fb)
This commit is contained in:
@@ -41,7 +41,7 @@ class cloudkitty::deps {
|
|||||||
|
|
||||||
# policy config should occur in the config block also.
|
# policy config should occur in the config block also.
|
||||||
Anchor['cloudkitty::config::begin']
|
Anchor['cloudkitty::config::begin']
|
||||||
-> Openstacklib::Policy<||>
|
-> Openstacklib::Policy<| tag == 'cloudkitty' |>
|
||||||
~> Anchor['cloudkitty::config::end']
|
~> Anchor['cloudkitty::config::end']
|
||||||
|
|
||||||
# On any uwsgi config change, we must restart Cloudkitty API.
|
# On any uwsgi config change, we must restart Cloudkitty API.
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ class cloudkitty::policy (
|
|||||||
file_group => $::cloudkitty::params::group,
|
file_group => $::cloudkitty::params::group,
|
||||||
file_format => 'yaml',
|
file_format => 'yaml',
|
||||||
purge_config => $purge_config,
|
purge_config => $purge_config,
|
||||||
|
tag => 'cloudkitty',
|
||||||
}
|
}
|
||||||
|
|
||||||
create_resources('openstacklib::policy', { $policy_path => $policy_parameters })
|
create_resources('openstacklib::policy', { $policy_path => $policy_parameters })
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ describe 'cloudkitty::policy' do
|
|||||||
:file_group => 'cloudkitty',
|
:file_group => 'cloudkitty',
|
||||||
:file_format => 'yaml',
|
:file_format => 'yaml',
|
||||||
:purge_config => false,
|
:purge_config => false,
|
||||||
|
:tag => 'cloudkitty',
|
||||||
)
|
)
|
||||||
is_expected.to contain_oslo__policy('cloudkitty_config').with(
|
is_expected.to contain_oslo__policy('cloudkitty_config').with(
|
||||||
:enforce_scope => false,
|
:enforce_scope => false,
|
||||||
@@ -61,6 +62,7 @@ describe 'cloudkitty::policy' do
|
|||||||
:file_group => 'cloudkitty',
|
:file_group => 'cloudkitty',
|
||||||
:file_format => 'yaml',
|
:file_format => 'yaml',
|
||||||
:purge_config => true,
|
:purge_config => true,
|
||||||
|
:tag => 'cloudkitty',
|
||||||
)
|
)
|
||||||
is_expected.to contain_oslo__policy('cloudkitty_config').with(
|
is_expected.to contain_oslo__policy('cloudkitty_config').with(
|
||||||
:enforce_scope => false,
|
:enforce_scope => false,
|
||||||
|
|||||||
Reference in New Issue
Block a user