puppet-nova/manifests/policy.pp
Mike Dorman 96b96f3393 Correct docs on format for nova::policy data
Correct the format of the $policies parameter to nova::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: I774678f0b49ee05b6aee6a5565302377d8eae186
Closes-bug: 1409897
2015-01-12 15:22:06 -07:00

40 lines
786 B
Puppet

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