Class: Puppet::FileServing::Mount

Inherits:
Network::AuthStore show all
Includes:
Util::Logging
Defined in:
lib/vendor/puppet/file_serving/mount.rb

Overview

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

Direct Known Subclasses

File, Modules, Plugins

Defined Under Namespace

Classes: File, Modules, Plugins

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util::Logging

#clear_deprecation_warnings, #deprecation_warning, #send_log

Methods inherited from Network::AuthStore

#allow, #allowed?, #deny, #empty?, #globalallow?, #interpolate, #reset_interpolation

Constructor Details

#initialize(name) ⇒ Mount

Create our object. It must have a name.



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

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

  super()
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#find(path, options) ⇒ Object

Raises:

  • (NotImplementedError)


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

def find(path, options)
  raise NotImplementedError
end

#search(path, options) ⇒ Object

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/vendor/puppet/file_serving/mount.rb', line 28

def search(path, options)
  raise NotImplementedError
end

#to_sObject



32
33
34
# File 'lib/vendor/puppet/file_serving/mount.rb', line 32

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

#validateObject

A noop.



37
38
# File 'lib/vendor/puppet/file_serving/mount.rb', line 37

def validate
end