Fix puppet 8 compatibility of nova_flavor
Fix the following error detected by puppet 8. Munging failed for value true in class is_public: undefined method `=~' for true:TrueClass ... Change-Id: I7d078ea72c5c1c4898247f61422986f277ee9a98
This commit is contained in:
parent
2c0c052297
commit
8593d289d1
@ -115,10 +115,14 @@ Puppet::Type.newtype(:nova_flavor) do
|
||||
newvalues(/(y|Y)es/, /(n|N)o/, /(t|T)rue/, /(f|F)alse/, true, false)
|
||||
defaultto(true)
|
||||
munge do |v|
|
||||
if v =~ /^(y|Y)es$/
|
||||
:true
|
||||
elsif v =~ /^(n|N)o$/
|
||||
:false
|
||||
if v.is_a?(String)
|
||||
if v =~ /^(y|Y)es$/
|
||||
:true
|
||||
elsif v =~ /^(n|N)o$/
|
||||
:false
|
||||
else
|
||||
v.to_s.downcase.to_sym
|
||||
end
|
||||
else
|
||||
v.to_s.downcase.to_sym
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user