[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

test branch puppet-dev at googlegroups.com
Wed Jul 14 10:34:09 UTC 2010


The following commit has been merged in the upstream branch:
commit 9d0a38ee1baa295fb8d2b69f13cbfc91b5de5800
Author: Rein Henrichs <rein at puppetlabs.com>
Date:   Mon Jun 7 15:45:45 2010 -0700

    [#3921] Add facts_terminus setting to Puppet settings
    
    * defaults to "facter"

diff --git a/lib/puppet/application/agent.rb b/lib/puppet/application/agent.rb
index 609a458..8353dd8 100644
--- a/lib/puppet/application/agent.rb
+++ b/lib/puppet/application/agent.rb
@@ -246,9 +246,11 @@ class Puppet::Application::Agent < Puppet::Application
         # You can still override this on the command-line with, e.g., :compiler.
         Puppet[:catalog_terminus] = :rest
 
+        # Override the default.
+        Puppet[:fact_terminus] = :facter
+
         Puppet::Resource::Catalog.cache_class = :yaml
 
-        Puppet::Node::Facts.terminus_class = :facter
 
         # We need tomake the client either way, we just don't start it
         # if --no-client is set.
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 3f9ac4d..f774275 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -116,6 +116,7 @@ module Puppet
         :node_terminus => ["plain", "Where to find information about nodes."],
         :catalog_terminus => ["compiler", "Where to get node catalogs.  This is useful to change if, for instance,
             you'd like to pre-compile catalogs and store them in memcached or some other easily-accessed store."],
+        :fact_terminus => ["facter", "Where to get node facts."],
         :httplog => { :default => "$logdir/http.log",
             :owner => "root",
             :mode => 0640,
diff --git a/lib/puppet/node/facts.rb b/lib/puppet/node/facts.rb
index 490174b..7c1a188 100755
--- a/lib/puppet/node/facts.rb
+++ b/lib/puppet/node/facts.rb
@@ -16,8 +16,7 @@ class Puppet::Node::Facts
         end
     end
 
-    # Use the node source as the indirection terminus.
-    indirects :facts, :terminus_class => :facter, :extend => NodeExpirer
+    indirects :facts, :terminus_setting => :fact_terminus, :extend => NodeExpirer
 
     attr_accessor :name, :values
 
diff --git a/spec/unit/application/agent.rb b/spec/unit/application/agent.rb
index 598492b..f934242 100755
--- a/spec/unit/application/agent.rb
+++ b/spec/unit/application/agent.rb
@@ -183,6 +183,7 @@ describe Puppet::Application::Agent do
             Puppet.stubs(:info)
             FileTest.stubs(:exists?).returns(true)
             Puppet.stubs(:[])
+            Puppet.stubs(:[]=)
             Puppet.stubs(:[]).with(:libdir).returns("/dev/null/lib")
             Puppet.settings.stubs(:print_config?)
             Puppet.settings.stubs(:print_config)
@@ -333,8 +334,8 @@ describe Puppet::Application::Agent do
             @puppetd.setup
         end
 
-        it "should tell the facts to use facter" do
-            Puppet::Node::Facts.expects(:terminus_class=).with(:facter)
+        it "should change the fact_terminus setting to 'facter'" do
+            Puppet.expects(:[]=).with(:fact_terminus, :facter)
 
             @puppetd.setup
         end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list