policy.pp : Fix duplicate ressource issue openstacklib::policy
Currently, in the policy.pp file the class openstacklib::policy is called. The same apply for all components resulting in a Duplicate Ressource issue. Using directly the underlying ressource openstacklib::policy::base we prevent this issue. Change-Id: Ia384a42365056317ca14031081f8c6e134f266aa
This commit is contained in:
parent
c0bf61c0d7
commit
1d78470e50
@ -18,11 +18,12 @@ class ceilometer::policy (
|
||||
$policy_path = '/etc/ceilometer/policy.json',
|
||||
) {
|
||||
|
||||
validate_hash($policies)
|
||||
|
||||
Openstacklib::Policy::Base {
|
||||
file_path => $policy_path,
|
||||
}
|
||||
class { 'openstacklib::policy' :
|
||||
policies => $policies,
|
||||
}
|
||||
|
||||
create_resources('openstacklib::policy::base', $policies)
|
||||
|
||||
}
|
||||
|
@ -16,8 +16,9 @@ describe 'ceilometer::policy' do
|
||||
end
|
||||
|
||||
it 'set up the policies' do
|
||||
should contain_class('openstacklib::policy').with({
|
||||
:policies => params[:policies]
|
||||
should contain_openstacklib__policy__base('context_is_admin').with({
|
||||
:key => 'context_is_admin',
|
||||
:value => 'foo:bar'
|
||||
})
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user