diff options
-rw-r--r-- | CHANGELOG | 4 | ||||
-rw-r--r-- | lib/puppet/indirector/node/ldap.rb | 4 | ||||
-rwxr-xr-x | spec/unit/indirector/node/ldap.rb | 7 |
3 files changed, 15 insertions, 0 deletions
@@ -1,3 +1,7 @@ + Modified the ldap node terminus to also use the facts version + as the version for a node, which should similarly encourage the + use of the yaml cache. (Related to #1130) + Caching node information in yaml (I figured caching in memory will cause ever-larger memory growth), and changing the external node terminus to use the version of the facts as their version. This diff --git a/lib/puppet/indirector/node/ldap.rb b/lib/puppet/indirector/node/ldap.rb index 9320f3ba1..8537e1cf3 100644 --- a/lib/puppet/indirector/node/ldap.rb +++ b/lib/puppet/indirector/node/ldap.rb @@ -122,4 +122,8 @@ class Puppet::Node::Ldap < Puppet::Indirector::Ldap end filter end + + def version(name) + Puppet::Node::Facts.version(name) + end end diff --git a/spec/unit/indirector/node/ldap.rb b/spec/unit/indirector/node/ldap.rb index 2a4f240ed..34456703d 100755 --- a/spec/unit/indirector/node/ldap.rb +++ b/spec/unit/indirector/node/ldap.rb @@ -5,6 +5,13 @@ require File.dirname(__FILE__) + '/../../../spec_helper' require 'puppet/indirector/node/ldap' describe Puppet::Node::Ldap do + it "should use the version of the facts as its version" do + @searcher = Puppet::Node::Ldap.new + version = mock 'version' + Puppet::Node::Facts.expects(:version).with("me").returns version + @searcher.version("me").should equal(version) + end + describe "when searching for nodes" do before :each do @searcher = Puppet::Node::Ldap.new |