Method: Puppet::FileBucket::Dipper#initialize

Defined in:
lib/puppet/file_bucket/dipper.rb

#initialize(hash = {}) ⇒ Dipper

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.

Creates a bucket client



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/puppet/file_bucket/dipper.rb', line 16

def initialize(hash = {})
  # Emulate the XMLRPC client
  server      = hash[:Server]
  port        = hash[:Port] || Puppet[:serverport]

  if hash.include?(:Path)
    @local_path = hash[:Path]
    @rest_path  = nil
  else
    @local_path = nil
    @rest_path = "filebucket://#{server}:#{port}/"
  end
  @checksum_type = Puppet[:digest_algorithm].to_sym
  @digest = method(@checksum_type)
end