summaryrefslogtreecommitdiffstats
path: root/lib/puppet/indirector/node/ldap.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/indirector/node/ldap.rb')
-rw-r--r--lib/puppet/indirector/node/ldap.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/puppet/indirector/node/ldap.rb b/lib/puppet/indirector/node/ldap.rb
index 759db3a5c..ab5d47b1c 100644
--- a/lib/puppet/indirector/node/ldap.rb
+++ b/lib/puppet/indirector/node/ldap.rb
@@ -103,6 +103,8 @@ class Puppet::Node::Ldap < Puppet::Indirector::Ldap
end
end
+ result[:parameters] = convert_parameters(result[:parameters])
+
result
end
@@ -143,6 +145,29 @@ class Puppet::Node::Ldap < Puppet::Indirector::Ldap
node.environment = information[:environment] if information[:environment]
end
+ def convert_parameters(parameters)
+ result = {}
+ parameters.each do |param, value|
+ if value.is_a?(Array)
+ result[param] = value.collect { |v| convert(v) }
+ else
+ result[param] = convert(value)
+ end
+ end
+ result
+ end
+
+ # Convert any values if necessary.
+ def convert(value)
+ case value
+ when Integer, Fixnum, Bignum; value
+ when "true"; true
+ when "false"; false
+ else
+ value
+ end
+ end
+
# Find information for our parent and merge it into the current info.
def find_and_merge_parent(parent, information)
unless parent_info = name2hash(parent)