puppet-glance/manifests/policy.pp
Mike Dorman ad5bb3d76b Correct docs on format for glance::policy data
Correct the format of the $policies parameter to glance::policy.
That parameter is passed directly to create_resources, so it needs
to be in a format acceptable to that.

Just updating docs here as anyone already using the policy classes
are likely not using the (incorrectly) documented format, anyway.

Change-Id: I80f1f832db124eef3bfd75907e4a2dcb5a5effca
Closes-bug: 1409897
2015-01-12 15:27:20 -07:00

40 lines
804 B
Puppet

# == Class: glance::policy
#
# Configure the glance policies
#
# === Parameters
#
# [*policies*]
# (optional) Set of policies to configure for glance
# Example :
# {
# 'glance-context_is_admin' => {
# 'key' => 'context_is_admin',
# 'value' => 'true'
# },
# 'glance-default' => {
# 'key' => 'default',
# 'value' => 'rule:admin_or_owner'
# }
# }
# Defaults to empty hash.
#
# [*policy_path*]
# (optional) Path to the glance policy.json file
# Defaults to /etc/glance/policy.json
#
class glance::policy (
$policies = {},
$policy_path = '/etc/glance/policy.json',
) {
validate_hash($policies)
Openstacklib::Policy::Base {
file_path => $policy_path,
}
create_resources('openstacklib::policy::base', $policies)
}