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: I08a9aa3d296042292b0127b9920dd7971eec57fe
This commit is contained in:
parent
a03acf54bf
commit
e90ea39626
@ -18,11 +18,12 @@ class glance::policy (
|
||||
$policy_path = '/etc/glance/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 'glance::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