5e3f167eb4
The db, policy and logging options are configured using puppet oslo module. Additional changes: * add dependencies and version of oslo package in metadata.json file * update related unit test * remove useless parameters Change-Id: Id252d6043daefb38e934df964755ac6b2efb44ff
41 lines
875 B
Puppet
41 lines
875 B
Puppet
# == Class: octavia::policy
|
|
#
|
|
# Configure the octavia policies
|
|
#
|
|
# === Parameters
|
|
#
|
|
# [*policies*]
|
|
# (optional) Set of policies to configure for octavia
|
|
# Example :
|
|
# {
|
|
# 'octavia-context_is_admin' => {
|
|
# 'key' => 'context_is_admin',
|
|
# 'value' => 'true'
|
|
# },
|
|
# 'octavia-default' => {
|
|
# 'key' => 'default',
|
|
# 'value' => 'rule:admin_or_owner'
|
|
# }
|
|
# }
|
|
# Defaults to empty hash.
|
|
#
|
|
# [*policy_path*]
|
|
# (optional) Path to the nova policy.json file
|
|
# Defaults to /etc/octavia/policy.json
|
|
#
|
|
class octavia::policy (
|
|
$policies = {},
|
|
$policy_path = '/etc/octavia/policy.json',
|
|
) {
|
|
|
|
validate_hash($policies)
|
|
|
|
Openstacklib::Policy::Base {
|
|
file_path => $policy_path,
|
|
}
|
|
|
|
create_resources('openstacklib::policy::base', $policies)
|
|
|
|
oslo::policy { 'octavia_config': policy_file => $policy_path }
|
|
}
|