iberezovskiy 01668bfd32 Configure oslo related parameters using puppet-oslo
Additonal changes:

  * switch oslo related parameters to $::os_service_default
    as they are used in oslo defines
  * update unit tests
  * update docs for oslo parameters

Change-Id: I4f813444fbf141abe7f10b3aef7d1aa314ac0ac4
2016-04-11 18:11:08 +03:00

32 lines
786 B
Puppet

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