From 9b5fbdc307b7ee1c7a997e56abc3fade06a5e80f Mon Sep 17 00:00:00 2001 From: Francois Deppierraz Date: Thu, 27 Nov 2014 21:49:28 +0100 Subject: [PATCH] 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 031609b57284cf13877ce727c2e4672831a3dbe2) --- lib/puppet/type/glance_image.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/puppet/type/glance_image.rb b/lib/puppet/type/glance_image.rb index d63590d9..c4a85212 100644 --- a/lib/puppet/type/glance_image.rb +++ b/lib/puppet/type/glance_image.rb @@ -46,7 +46,8 @@ Puppet::Type.newtype(:glance_image) do newvalues(/(y|Y)es/, /(n|N)o/) defaultto('Yes') munge do |v| - v.to_s.capitalize + 'True' if v =~ /^(y|Y)es$/ + 'False' if v =~ /^(n|N)o$/ end end