summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-10 21:46:59 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-10 21:46:59 +0000
commiteca5510b293ec83169aae10518c11660886286d1 (patch)
treea788e0ccfbcfc78bdde3aa31d1b60f7b10c7c90f /lib/puppet
parent55666a515ace73680eaacc7f496fd89305c47f89 (diff)
downloadpuppet-eca5510b293ec83169aae10518c11660886286d1.tar.gz
puppet-eca5510b293ec83169aae10518c11660886286d1.tar.xz
puppet-eca5510b293ec83169aae10518c11660886286d1.zip
Fixing the to_trans method and ralsh a bit so ralsh now works with the new lack of "is" method
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2503 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parameter.rb2
-rw-r--r--lib/puppet/type.rb8
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/puppet/parameter.rb b/lib/puppet/parameter.rb
index bf50030f3..b427c1058 100644
--- a/lib/puppet/parameter.rb
+++ b/lib/puppet/parameter.rb
@@ -419,7 +419,7 @@ class Puppet::Parameter < Puppet::Element
if self.should
return self.should
else
- return self.is
+ return self.retrieve
end
else
if defined? @value
diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb
index 2b49492b2..d8e03ceca 100644
--- a/lib/puppet/type.rb
+++ b/lib/puppet/type.rb
@@ -353,13 +353,17 @@ class Type < Puppet::Element
trans = TransObject.new(self.title, self.class.name)
- properties().each do |property|
- trans[property.name] = property.is
+ values = retrieve()
+ values.each do |name, value|
+ trans[name.name] = value
end
@parameters.each do |name, param|
# Avoid adding each instance name as both the name and the namevar
next if param.class.isnamevar? and param.value == self.title
+
+ # We've already got property values
+ next if param.is_a?(Puppet::Property)
trans[name] = param.value
end