From 6ad427bcdf139e70b2d637315b18921f5c03fbb7 Mon Sep 17 00:00:00 2001 From: Xingchao Yu Date: Fri, 22 Jan 2016 19:25:30 +0800 Subject: [PATCH] Add define oslo::policy This patch aims to add a new define to manage parameters in [oslo_policy] which belongs to oslo.messaging. --- manifests/policy.pp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 manifests/policy.pp diff --git a/manifests/policy.pp b/manifests/policy.pp new file mode 100644 index 0000000..88957a5 --- /dev/null +++ b/manifests/policy.pp @@ -0,0 +1,35 @@ +# == Define: oslo::policy +# +# Configure oslo_policy options +# +# This resource configures Oslo policy resources for an OpenStack service. +# It will manage the [oslo_policy] section in the given config resource. +# +# === Parameters: +# +# [*policy_file*] +# (Optional) The JSON file that defines policies. +# Defaults to $::os_service_default. +# +# [*policy_default_rule*] +# (Optional) Default rule. Enforced when a requested rule is not found. +# Defaults to $::os_service_default. +# +# [*policy_dirs*] +# (Optional) Directories where policy configuration files are stored. +# They can be relative to any directory in the search path defined by +# the config_dir option, or absolute paths. +# The file defined by policy_file must exist for these directories to be searched. +# Missing or empty directories are ignored. +# Defaults to $::os_service_default. +# +define oslo::policy( + $policy_file = $::os_service_default, + $policy_default_rule = $::os_service_default, + $policy_file = $::os_service_default, +) { + create_resources($name, {'oslo_policy/policy_file' => { value => $policy_file }}) + create_resources($name, {'oslo_policy/policy_default_rule' => { value => $policy_default_rule }}) + create_resources($name, {'oslo_policy/policy_file' => { value => $policy_file }}) +} +