190: def self.generate_attribute_hash(input_hash, *type_properties)
191: attribute_hash = {}
192: input_hash.keys().each do |key|
193: ds_attribute = key.sub("dsAttrTypeStandard:", "")
194: next unless (@@ds_to_ns_attribute_map.keys.include?(ds_attribute) and type_properties.include? @@ds_to_ns_attribute_map[ds_attribute])
195: ds_value = input_hash[key]
196: case @@ds_to_ns_attribute_map[ds_attribute]
197: when :members
198: ds_value = ds_value
199: when :gid, :uid
200:
201:
202:
203:
204: begin
205: ds_value = Integer(ds_value[0])
206: rescue ArgumentError
207: ds_value = ds_value[0]
208: end
209: else ds_value = ds_value[0]
210: end
211: attribute_hash[@@ds_to_ns_attribute_map[ds_attribute]] = ds_value
212: end
213:
214:
215:
216:
217:
218: if @resource_type.validproperties.include?(:password)
219: attribute_hash[:password] = self.get_password(attribute_hash[:guid])
220: end
221: return attribute_hash
222: end