Add per module policy service refresh
Updating the policies for this project should only refresh the services that reads it. Change-Id: I18418bb01da896f0e12aead11c28b24c0e103c62
This commit is contained in:
parent
3a05a4aa6b
commit
dea64e7fd3
|
@ -33,7 +33,7 @@ class {{cookiecutter.project_name}}::deps {
|
||||||
|
|
||||||
# policy config should occur in the config block also.
|
# policy config should occur in the config block also.
|
||||||
Anchor['{{cookiecutter.project_name}}::config::begin']
|
Anchor['{{cookiecutter.project_name}}::config::begin']
|
||||||
-> Openstacklib::Policy<||>
|
-> Openstacklib::Policy<| tag == '{{cookiecutter.project_name}}' |>
|
||||||
~> Anchor['{{cookiecutter.project_name}}::config::end']
|
~> Anchor['{{cookiecutter.project_name}}::config::end']
|
||||||
|
|
||||||
# Installation or config changes will always restart services.
|
# Installation or config changes will always restart services.
|
||||||
|
|
|
@ -67,6 +67,7 @@ class {{cookiecutter.project_name}}::policy (
|
||||||
file_group => $::{{cookiecutter.project_name}}::params::group,
|
file_group => $::{{cookiecutter.project_name}}::params::group,
|
||||||
file_format => 'yaml',
|
file_format => 'yaml',
|
||||||
purge_config => $purge_config,
|
purge_config => $purge_config,
|
||||||
|
tag => '{{cookiecutter.project_name}}',
|
||||||
}
|
}
|
||||||
|
|
||||||
create_resources('openstacklib::policy', { $policy_path => $policy_parameters })
|
create_resources('openstacklib::policy', { $policy_path => $policy_parameters })
|
||||||
|
|
|
@ -33,6 +33,7 @@ describe '{{cookiecutter.project_name}}::policy' do
|
||||||
:file_group => '{{cookiecutter.project_name}}',
|
:file_group => '{{cookiecutter.project_name}}',
|
||||||
:file_format => 'yaml',
|
:file_format => 'yaml',
|
||||||
:purge_config => false,
|
:purge_config => false,
|
||||||
|
:tag => '{{cookiecutter.project_name}}',
|
||||||
)
|
)
|
||||||
is_expected.to contain_oslo__policy('{{cookiecutter.project_name}}_config').with(
|
is_expected.to contain_oslo__policy('{{cookiecutter.project_name}}_config').with(
|
||||||
:enforce_scope => false,
|
:enforce_scope => false,
|
||||||
|
@ -63,6 +64,7 @@ describe '{{cookiecutter.project_name}}::policy' do
|
||||||
:file_group => '{{cookiecutter.project_name}}',
|
:file_group => '{{cookiecutter.project_name}}',
|
||||||
:file_format => 'yaml',
|
:file_format => 'yaml',
|
||||||
:purge_config => true,
|
:purge_config => true,
|
||||||
|
:tag => '{{cookiecutter.project_name}}',
|
||||||
)
|
)
|
||||||
is_expected.to contain_oslo__policy('{{cookiecutter.project_name}}_config').with(
|
is_expected.to contain_oslo__policy('{{cookiecutter.project_name}}_config').with(
|
||||||
:enforce_scope => false,
|
:enforce_scope => false,
|
||||||
|
|
Loading…
Reference in New Issue