# File lib/puppet/provider/nameservice/directoryservice.rb, line 214
214:   def self.single_report(resource_name, *type_properties)
215:     # JJM 2007-07-24:
216:     #     Given a the name of an object and a list of properties of that
217:     #     object, return all property values in a hash.
218:     #
219:     #     This class method returns nil if the object doesn't exist
220:     #     Otherwise, it returns a hash of the object properties.
221: 
222:     all_present_str_array = list_all_present
223: 
224:     # NBK: shortcut the process if the resource is missing
225:     return nil unless all_present_str_array.include? resource_name
226: 
227:     dscl_vector = get_exec_preamble("-read", resource_name)
228:     begin
229:       dscl_output = execute(dscl_vector)
230:     rescue Puppet::ExecutionFailure => detail
231:       fail("Could not get report.  command execution failed.")
232:     end
233: 
234:     # Two code paths is ugly, but until we can drop 10.4 support we don't
235:     # have a lot of choice. Ultimately this should all be done using Ruby
236:     # to access the DirectoryService APIs directly, but that's simply not
237:     # feasible for a while yet.
238:     case self.get_macosx_version_major
239:     when "10.4"
240:       dscl_plist = self.parse_dscl_url_data(dscl_output)
241:     when "10.5", "10.6"
242:       dscl_plist = self.parse_dscl_plist_data(dscl_output)
243:     end
244: 
245:     self.generate_attribute_hash(dscl_plist, *type_properties)
246:   end