
This code moves all deps to an external class so that Cinder can be installed with mechanisms besides packages (like venv or docker). This also cleans-up the dependency tree by removing false or confusing dependencies. Co-Author: Craig Delatte <craig.delatte@twcable.com> Change-Id: I55a62f6173fe463fb8fb65df6729c9f509a0fb04
37 lines
807 B
Puppet
37 lines
807 B
Puppet
# == Class: cinder::policy
|
|
#
|
|
# Configure the cinder policies
|
|
#
|
|
# === Parameters
|
|
#
|
|
# [*policies*]
|
|
# (optional) Set of policies to configure for cinder
|
|
# Example :
|
|
# {
|
|
# 'cinder-context_is_admin' => {'context_is_admin' => 'true'},
|
|
# 'cinder-default' => {'default' => 'rule:admin_or_owner'}
|
|
# }
|
|
# Defaults to empty hash.
|
|
#
|
|
# [*policy_path*]
|
|
# (optional) Path to the cinder policy.json file
|
|
# Defaults to /etc/cinder/policy.json
|
|
#
|
|
class cinder::policy (
|
|
$policies = {},
|
|
$policy_path = '/etc/cinder/policy.json',
|
|
) {
|
|
|
|
include ::cinder::deps
|
|
|
|
validate_hash($policies)
|
|
|
|
Openstacklib::Policy::Base {
|
|
file_path => $policy_path,
|
|
}
|
|
|
|
create_resources('openstacklib::policy::base', $policies)
|
|
oslo::policy { 'cinder_config': policy_file => $policy_path }
|
|
|
|
}
|