Method: Puppet::Type#retrieve_resource

Defined in:
lib/puppet/type.rb

#retrieve_resourcePuppet::Resource

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Retrieve the current state of the system as a Puppet::Resource. For the base Puppet::Type this does the same thing as #retrieve, but specific types are free to implement #retrieve as returning a hash, and this will call #retrieve and convert the hash to a resource. This is used when determining when syncing a resource.

Returns:

  • A resource representing the current state of the system.

API:

  • private



1095
1096
1097
1098
1099
# File 'lib/puppet/type.rb', line 1095

def retrieve_resource
  resource = retrieve
  resource = Resource.new(self.class, title, :parameters => resource) if resource.is_a? Hash
  resource
end