Method: Puppet::Type.validprovider?

Defined in:
lib/puppet/type.rb

.validprovider?(name) ⇒ Boolean

TODO:

How does the provider know if it is suitable for the type? Is it just suitable for the platform/ environment where this method is executing?

Returns true if the given name is a reference to a provider and if this is a suitable provider for this type.

Parameters:

  • name (String)

    the name of the provider for which validity is checked

Returns:

  • (Boolean)

    true if the given name references a provider that is suitable



1770
1771
1772
1773
1774
# File 'lib/puppet/type.rb', line 1770

def self.validprovider?(name)
  name = name.intern

  provider_hash.has_key?(name) && provider_hash[name].suitable?
end