def provider=(name)
    if name.is_a?(Puppet::Provider)
      @provider = name
      @provider.resource = self
    elsif klass = self.class.provider(name)
      @provider = klass.new(self)
    else
      raise ArgumentError, _("Could not find %{name} provider of %{provider}") % { name: name, provider: self.class.name }
    end
  end
def provider=(name)
    if name.is_a?(Puppet::Provider)
      @provider = name
      @provider.resource = self
    elsif klass = self.class.provider(name)
      @provider = klass.new(self)
    else
      raise ArgumentError, _("Could not find %{name} provider of %{provider}") % { name: name, provider: self.class.name }
    end
  end
Sets the provider to the given provider/name.
 @overload provider=(name)
   Sets the provider to the result of resolving the name to an instance of Provider.
   @param name [String] the name of the provider
 @overload provider=(provider)
   Sets the provider to the given instances of Provider.
   @param provider [Puppet::Provider] the provider to set
 @return [Puppet::Provider] the provider set
 @raise [ArgumentError] if the provider could not be found/resolved.