f92390204f
Newer versions of puppet are throwing catalog failures for resources that are not being included in the testing. In this case, the references should be updated to use our anchors from the neutron::deps class which resolves the failures under the latest version of puppet. Change-Id: I7ac3c90eb18118f90f0b92dabd3323a6575dac4c Closes-Bug: #1702964
46 lines
1006 B
Puppet
46 lines
1006 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',
|
|
) {
|
|
|
|
include ::neutron::deps
|
|
|
|
validate_hash($policies)
|
|
|
|
Openstacklib::Policy::Base {
|
|
file_path => $policy_path,
|
|
require => Anchor['neutron::config::begin'],
|
|
notify => Anchor['neutron::config::end'],
|
|
}
|
|
|
|
create_resources('openstacklib::policy::base', $policies)
|
|
|
|
oslo::policy { 'neutron_config': policy_file => $policy_path }
|
|
|
|
}
|