memcached (openstack) is no longer in use
[mirror/dsa-puppet.git] / 3rdparty / modules / neutron / manifests / policy.pp
1 # == Class: neutron::policy
2 #
3 # Configure the neutron policies
4 #
5 # === Parameters
6 #
7 # [*policies*]
8 #   (optional) Set of policies to configure for neutron
9 #   Example :
10 #     {
11 #       'neutron-context_is_admin' => {
12 #         'key' => 'context_is_admin',
13 #         'value' => 'true'
14 #       },
15 #       'neutron-default' => {
16 #         'key' => 'default',
17 #         'value' => 'rule:admin_or_owner'
18 #       }
19 #     }
20 #   Defaults to empty hash.
21 #
22 # [*policy_path*]
23 #   (optional) Path to the neutron policy.json file
24 #   Defaults to /etc/neutron/policy.json
25 #
26 class neutron::policy (
27   $policies    = {},
28   $policy_path = '/etc/neutron/policy.json',
29 ) {
30
31   validate_hash($policies)
32
33   Openstacklib::Policy::Base {
34     file_path => $policy_path,
35   }
36
37   create_resources('openstacklib::policy::base', $policies)
38
39 }