Correctly munge glance_image is_public property
glance expects True/False values whereas this type uses Yes/No.
Without this patch, puppet would return the following message with an
existing glance image with is_public attribute already set to 'True'.
puppet-agent[18190]: (/Stage[main]/Site::Controller/Glance_image[raring-server-cloudimg-amd64]/is_public) is_public changed 'True' to 'Yes'
Change-Id: I532e08e6815a8b03f5eb6a9495d886b9855762c8
(cherry picked from commit 031609b572
)
This commit is contained in:
parent
57685754d3
commit
9b5fbdc307
|
@ -46,7 +46,8 @@ Puppet::Type.newtype(:glance_image) do
|
||||||
newvalues(/(y|Y)es/, /(n|N)o/)
|
newvalues(/(y|Y)es/, /(n|N)o/)
|
||||||
defaultto('Yes')
|
defaultto('Yes')
|
||||||
munge do |v|
|
munge do |v|
|
||||||
v.to_s.capitalize
|
'True' if v =~ /^(y|Y)es$/
|
||||||
|
'False' if v =~ /^(n|N)o$/
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue