182: def self.generate_attribute_hash(input_hash, *type_properties)
183: attribute_hash = {}
184: input_hash.keys.each do |key|
185: ds_attribute = key.sub("dsAttrTypeStandard:", "")
186: next unless (@@ds_to_ns_attribute_map.keys.include?(ds_attribute) and type_properties.include? @@ds_to_ns_attribute_map[ds_attribute])
187: ds_value = input_hash[key]
188: case @@ds_to_ns_attribute_map[ds_attribute]
189: when :members
190: ds_value = ds_value
191: when :gid, :uid
192:
193:
194:
195:
196: begin
197: ds_value = Integer(ds_value[0])
198: rescue ArgumentError
199: ds_value = ds_value[0]
200: end
201: else ds_value = ds_value[0]
202: end
203: attribute_hash[@@ds_to_ns_attribute_map[ds_attribute]] = ds_value
204: end
205:
206:
207:
208:
209:
210: attribute_hash[:password] = self.get_password(attribute_hash[:guid]) if @resource_type.validproperties.include?(:password) and Puppet.features.root?
211: attribute_hash
212: end