lib/puppet/resource/type_collection.rb
# Resolve namespaces and find the given object.  Autoload it if
# necessary.
Resolve namespaces and find the given object.  Autoload it if
necessary.
Resolve namespaces and find the given object . Autoload it if necessary .
def find_or_load(namespaces, name, type, options = {})
    searchspace = options[:assume_fqname] ? [name].flatten : resolve_namespaces(namespaces, name)
    searchspace.each do |fqname|
      result = send(type, fqname)
      unless result
        if @notfound[fqname] and Puppet[:ignoremissingtypes]
          Puppet.warning "Not attempting to load #{type} #{fqname} as this object was missing during a prior compilation"
        else
          result = loader.try_load_fqname(type, fqname)
          @notfound[fqname] = result.nil?
        end
      end
      return result if result
    end
    return nil
  end
def find_or_load ( namespaces , name , type , options = { } ) searchspace = options [ :assume_fqname ] ? [ name ] . flatten : resolve_namespaces ( namespaces , name ) searchspace . each do | fqname | result = send ( type , fqname ) unless result if @notfound [ fqname ] and Puppet [ :ignoremissingtypes ] Puppet . warning "Not attempting to load #{type} #{fqname} as this object was missing during a prior compilation" else result = loader . try_load_fqname ( type , fqname ) @notfound [ fqname ] = result . nil? end end return result if result end return nil end
Resolve namespaces and find the given object.
Resolve namespaces and find the given object .
# do not try to autoload if we already tried and it wasn't conclusive # as this is a time consuming operation. Warn the user.
namespaces
<not_specific>
name
<not_specific>
type
<not_specific>
options
<not_specific>