# File lib/puppet/type.rb, line 859
859:   def self.instances
860:     raise Puppet::DevError, "#{self.name} has no providers and has not overridden 'instances'" if provider_hash.empty?
861: 
862:     # Put the default provider first, then the rest of the suitable providers.
863:     provider_instances = {}
864:     providers_by_source.collect do |provider|
865:       provider.instances.collect do |instance|
866:         # We always want to use the "first" provider instance we find, unless the resource
867:         # is already managed and has a different provider set
868:         if other = provider_instances[instance.name]
869:           Puppet.warning "%s %s found in both %s and %s; skipping the %s version" %
870:             [self.name.to_s.capitalize, instance.name, other.class.name, instance.class.name, instance.class.name]
871:           next
872:         end
873:         provider_instances[instance.name] = instance
874: 
875:         new(:name => instance.name, :provider => instance, :audit => :all)
876:       end
877:     end.flatten.compact
878:   end