puppet-cinder/manifests/policy.pp
Tobias Urdin 1e1be4fb56 Convert all class usage to relative names
Change-Id: Ib509c510e3e5ed19fbb1b5f68a060cde02d82eab
2019-12-08 23:02:56 +01:00

47 lines
1014 B
Puppet

# == Class: cinder::policy
#
# Configure the cinder policies
#
# === Parameters
#
# [*policies*]
# (Optional) Set of policies to configure for cinder
# Example :
# {
# 'cinder-context_is_admin' => {
# 'key' => 'context_is_admin',
# 'value' => 'true'
# },
# 'cinder-default' => {
# 'key' => 'default',
# 'value' => 'rule:admin_or_owner'
# }
# }
# Defaults to empty hash.
#
# [*policy_path*]
# (Optional) Path to the cinder policy.json file
# Defaults to /etc/cinder/policy.json
#
class cinder::policy (
$policies = {},
$policy_path = '/etc/cinder/policy.json',
) {
include cinder::deps
include cinder::params
validate_legacy(Hash, 'validate_hash', $policies)
Openstacklib::Policy::Base {
file_path => $policy_path,
file_user => 'root',
file_group => $::cinder::params::group,
}
create_resources('openstacklib::policy::base', $policies)
oslo::policy { 'cinder_config': policy_file => $policy_path }
}