summaryrefslogtreecommitdiffstats
path: root/lib/puppet/indirector/node
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-07-04 22:14:37 -0500
committerLuke Kanies <luke@madstop.com>2008-07-04 22:14:37 -0500
commitb0febd263c0cb8e61d512898f7c79868ea77e619 (patch)
tree3f35c4b2d7186d3c69c070c9edc684ccdc51f658 /lib/puppet/indirector/node
parentdf528a66cafc8538c3208bf0b52fdbe1065f6e48 (diff)
parent81be1c5c3f85f514505e99fab5b8a2b2ae6fbec8 (diff)
downloadpuppet-b0febd263c0cb8e61d512898f7c79868ea77e619.tar.gz
puppet-b0febd263c0cb8e61d512898f7c79868ea77e619.tar.xz
puppet-b0febd263c0cb8e61d512898f7c79868ea77e619.zip
Merge branch '0.24.x'
Conflicts: lib/puppet/util/settings.rb spec/integration/defaults.rb spec/unit/node/catalog.rb spec/unit/type/interface.rb spec/unit/type/ssh_authorized_key.rb
Diffstat (limited to 'lib/puppet/indirector/node')
-rw-r--r--lib/puppet/indirector/node/ldap.rb15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/puppet/indirector/node/ldap.rb b/lib/puppet/indirector/node/ldap.rb
index 71d3e3b0e..01010a2af 100644
--- a/lib/puppet/indirector/node/ldap.rb
+++ b/lib/puppet/indirector/node/ldap.rb
@@ -14,7 +14,7 @@ class Puppet::Node::Ldap < Puppet::Indirector::Ldap
end
# Separate this out so it's relatively atomic. It's tempting to call
- # process() instead of entry2hash() here, but it ends up being
+ # process() instead of name2hash() here, but it ends up being
# difficult to test because all exceptions get caught by ldapsearch.
# LAK:NOTE Unfortunately, the ldap support is too stupid to throw anything
# but LDAP::ResultError, even on bad connections, so we are rough handed
@@ -35,21 +35,14 @@ class Puppet::Node::Ldap < Puppet::Indirector::Ldap
node = nil
names.each do |name|
- break if node = process(name)
- end
- return nil unless node
+ next unless info = name2hash(name)
- node.name = request.key
+ break if node = info2node(request.key, info)
+ end
return node
end
- def process(name)
- return nil unless info = name2hash(name)
-
- info2node(name, info)
- end
-
# 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.