Class: Puppet::FileServing::Mount

Inherits:
Network::AuthStore 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, Modules, Plugins

Defined Under Namespace

Classes: File, Modules, Plugins

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util::Logging

#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.



24
25
26
27
28
29
30
31
# File 'lib/puppet/file_serving/mount.rb', line 24

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.



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

def name
  @name
end

Instance Method Details

#find(path, options) ⇒ Object

Raises:

  • (NotImplementedError)


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

def find(path, options)
  raise NotImplementedError
end

#search(path, options) ⇒ Object

Raises:

  • (NotImplementedError)


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

def search(path, options)
  raise NotImplementedError
end

#to_sObject



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

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

#validateObject

A noop.



42
43
# File 'lib/puppet/file_serving/mount.rb', line 42

def validate
end