puppet-neutron/manifests/policy.pp
Mike Dorman 6d2aa10d8f Correct docs on format for neutron::policy data
Correct the format of the $policies parameter to neutron::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: Ib69e2e421b216d6087ad47c198067667db89cc33
Closes-bug: 1409897
2015-01-12 15:27:50 -07:00

40 lines
813 B
Puppet

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