Class: Puppet::FileServing::Mount::Tasks

Inherits:
Puppet::FileServing::Mount show all
Defined in:
lib/puppet/file_serving/mount/tasks.rb

Constant Summary

Constants included from Util::Logging

Util::Logging::FILE_AND_LINE, Util::Logging::FILE_NO_LINE, Util::Logging::MM, Util::Logging::NO_FILE_LINE, Util::Logging::SUPPRESS_FILE_LINE

Instance Attribute Summary

Attributes inherited from Puppet::FileServing::Mount

#name

Instance Method Summary collapse

Methods inherited from Puppet::FileServing::Mount

#initialize, #to_s, #validate

Methods included from Util::Logging

#clear_deprecation_warnings, #debug, #deprecation_warning, #format_exception, #get_deprecation_offender, #log_and_raise, #log_deprecations_to_file, #log_exception, #puppet_deprecation_warning, #send_log, setup_facter_logging!, #warn_once

Methods inherited from Network::AuthStore

#allow, #allow_ip, #allowed?, #deny, #deny_ip, #empty?, #globalallow?, #initialize, #interpolate, #reset_interpolation, #to_s

Constructor Details

This class inherits a constructor from Puppet::FileServing::Mount

Instance Method Details

#find(path, request) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/puppet/file_serving/mount/tasks.rb', line 4

def find(path, request)
  raise _("No task specified") if path.to_s.empty?
  module_name, task_path = path.split("/", 2)
  return nil unless mod = request.environment.module(module_name)

  mod.task_file(task_path)
end

#search(path, request) ⇒ Object



12
13
14
15
16
# File 'lib/puppet/file_serving/mount/tasks.rb', line 12

def search(path, request)
  if result = find(path, request)
    [result]
  end
end

#valid?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/puppet/file_serving/mount/tasks.rb', line 18

def valid?
  true
end