From c1e010fb7dfe4666b3db3d958627f70f7325cf85 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Tue, 1 Jul 2008 22:20:26 -0500 Subject: Fixing the Node::Ldap.search method to use an indirection request. I foolishly was just using the old-style api. Added an integration test to catch this in the future. --- lib/puppet/indirector/node/ldap.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/puppet/indirector/node/ldap.rb b/lib/puppet/indirector/node/ldap.rb index 2f953bbcb..71d3e3b0e 100644 --- a/lib/puppet/indirector/node/ldap.rb +++ b/lib/puppet/indirector/node/ldap.rb @@ -53,8 +53,8 @@ class Puppet::Node::Ldap < Puppet::Indirector::Ldap # Find more than one node. LAK:NOTE This is a bit of a clumsy API, because the 'search' # method currently *requires* a key. It seems appropriate in some cases but not others, # and I don't really know how to get rid of it as a requirement but allow it when desired. - def search(key, options = {}) - if classes = options[:class] + def search(request) + if classes = request.options[:class] classes = [classes] unless classes.is_a?(Array) filter = "(&(objectclass=puppetClient)(puppetclass=" + classes.join(")(puppetclass=") + "))" else -- cgit