
This commit allow a deployer to manage the policies via this module It relies on augeas to change only the policy needed. The init takes a hash of policies and apply them. Change-Id: I398fca298330b8cc5d5d7dfbf6ebed067b34f9d7
41 lines
779 B
Ruby
41 lines
779 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'cinder::policy' do
|
|
|
|
shared_examples_for 'cinder policies' do
|
|
let :params do
|
|
{
|
|
:policy_path => '/etc/cinder/policy.json',
|
|
:policies => {
|
|
'context_is_admin' => {
|
|
'key' => 'context_is_admin',
|
|
'value' => 'foo:bar'
|
|
}
|
|
}
|
|
}
|
|
end
|
|
|
|
it 'set up the policies' do
|
|
should contain_class('openstacklib::policy').with({
|
|
:policies => params[:policies]
|
|
})
|
|
end
|
|
end
|
|
|
|
context 'on Debian platforms' do
|
|
let :facts do
|
|
{ :osfamily => 'Debian' }
|
|
end
|
|
|
|
it_configures 'cinder policies'
|
|
end
|
|
|
|
context 'on RedHat platforms' do
|
|
let :facts do
|
|
{ :osfamily => 'RedHat' }
|
|
end
|
|
|
|
it_configures 'cinder policies'
|
|
end
|
|
end
|