Merge "Allow to configure policy_dirs"
This commit is contained in:
commit
930d112c8e
@ -32,11 +32,16 @@
|
||||
# (Optional) Path to the cinder policy.yaml file
|
||||
# Defaults to /etc/cinder/policy.yaml
|
||||
#
|
||||
# [*policy_dirs*]
|
||||
# (Optional) Path to the cinder policy folder
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class cinder::policy (
|
||||
$enforce_scope = $::os_service_default,
|
||||
$enforce_new_defaults = $::os_service_default,
|
||||
$policies = {},
|
||||
$policy_path = '/etc/cinder/policy.yaml',
|
||||
$policy_dirs = $::os_service_default,
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
@ -56,7 +61,8 @@ class cinder::policy (
|
||||
oslo::policy { 'cinder_config':
|
||||
enforce_scope => $enforce_scope,
|
||||
enforce_new_defaults => $enforce_new_defaults,
|
||||
policy_file => $policy_path
|
||||
policy_file => $policy_path,
|
||||
policy_dirs => $policy_dirs,
|
||||
}
|
||||
|
||||
}
|
||||
|
5
releasenotes/notes/policy-dirs-9addb26cee0b0a4d.yaml
Normal file
5
releasenotes/notes/policy-dirs-9addb26cee0b0a4d.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
There is now a new policy_dirs parameter in the cinder::policy class,
|
||||
so one can set a custom path.
|
@ -7,6 +7,7 @@ describe 'cinder::policy' do
|
||||
:enforce_scope => false,
|
||||
:enforce_new_defaults => false,
|
||||
:policy_path => '/etc/cinder/policy.yaml',
|
||||
:policy_dirs => '/etc/cinder/policy.d',
|
||||
:policies => {
|
||||
'context_is_admin' => {
|
||||
'key' => 'context_is_admin',
|
||||
@ -28,6 +29,7 @@ describe 'cinder::policy' do
|
||||
:enforce_scope => false,
|
||||
:enforce_new_defaults => false,
|
||||
:policy_file => '/etc/cinder/policy.yaml',
|
||||
:policy_dirs => '/etc/cinder/policy.d',
|
||||
)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user