Class: Puppet::FileServing::Mount

Inherits:
Object
  • Object
show all
Includes:
Util::Logging
Defined in:
lib/puppet/file_serving/mount.rb

Overview

Broker access to the filesystem, converting local URIs into metadata or content objects.

Direct Known Subclasses

File, Locales, Modules, PluginFacts, Plugins, Scripts, Tasks

Defined Under Namespace

Classes: File, Locales, Modules, PluginFacts, Plugins, Scripts, Tasks

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util::Logging

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

Constructor Details

#initialize(name) ⇒ Mount

Create our object. It must have a name.



20
21
22
23
24
25
26
27
28
# File 'lib/puppet/file_serving/mount.rb', line 20

def initialize(name)
  unless name =~ /^[-\w]+$/
    raise ArgumentError, _("Invalid mount name format '%{name}'") % { name: name }
  end

  @name = name

  super()
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#find(path, options) ⇒ Object

Raises:

  • (NotImplementedError)


15
16
17
# File 'lib/puppet/file_serving/mount.rb', line 15

def find(path, options)
  raise NotImplementedError
end

#search(path, options) ⇒ Object

Raises:

  • (NotImplementedError)


30
31
32
# File 'lib/puppet/file_serving/mount.rb', line 30

def search(path, options)
  raise NotImplementedError
end

#to_sObject



34
35
36
# File 'lib/puppet/file_serving/mount.rb', line 34

def to_s
  "mount[#{@name}]"
end

#validateObject

A noop.



39
40
# File 'lib/puppet/file_serving/mount.rb', line 39

def validate
end