In 0.25 we convert Puppet::Parser::Resource in Puppet::Resource.
Those are stored in the db with the rails code.
When we convert a Puppet::Parser::Resource to a Puppet::Resource
we didn't copy over the exported attribute, so we were writing or
updating the database with exported=NULL for this resource,
so no host were able to collect it.

Signed-off-by: Brice Figureau <brice-pup...@daysofwonder.com>
---
 lib/puppet/parser/resource.rb |    1 +
 spec/unit/parser/resource.rb  |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb
index 8d5e5a3..585a6a1 100644
--- a/lib/puppet/parser/resource.rb
+++ b/lib/puppet/parser/resource.rb
@@ -261,6 +261,7 @@ class Puppet::Parser::Resource
                           end
         end
 
+        result.exported = self.exported?
         result.file = self.file
         result.line = self.line
         result.tag(*self.tags)
diff --git a/spec/unit/parser/resource.rb b/spec/unit/parser/resource.rb
index 926f613..7a2c4af 100755
--- a/spec/unit/parser/resource.rb
+++ b/spec/unit/parser/resource.rb
@@ -387,6 +387,11 @@ describe Puppet::Parser::Resource do
             @parser_resource.to_resource.tags.should == @parser_resource.tags
         end
 
+        it "should copy over the exported status" do
+            @parser_resource.exported = true
+            @parser_resource.to_resource.exported.should be_true
+        end
+
         it "should copy over the line" do
             @parser_resource.line = 40
             @parser_resource.to_resource.line.should == 40
-- 
1.6.0.2


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com
To unsubscribe from this group, send email to 
puppet-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to