Fix is_public munge

Commit 031609b572 changed the way
is_public was munged. However, when testing it it looks like it
was always seen as an empty string after this, so all created
images were private. Changing the way the 'if' block is done fixes
it.

Change-Id: If2eb52a6d0d9be89c9323702616f62f8ecba5e02
This commit is contained in:
Javier Pena 2014-12-19 00:51:52 +01:00
parent 8a89b31ec6
commit 06182be5f7
1 changed files with 5 additions and 2 deletions

View File

@ -46,8 +46,11 @@ Puppet::Type.newtype(:glance_image) do
newvalues(/(y|Y)es/, /(n|N)o/)
defaultto('Yes')
munge do |v|
'True' if v =~ /^(y|Y)es$/
'False' if v =~ /^(n|N)o$/
if v =~ /^(y|Y)es$/
'True'
elsif v =~ /^(n|N)o$/
'False'
end
end
end