Class: Lxc::Storage::CloneDirectory

Inherits:
OverlayDirectory show all
Defined in:
lib/elecksee/storage/overlay_directory.rb

Overview

Clone directory does the same as the overlay, just in a persistent location

Instance Attribute Summary

Attributes inherited from OverlayDirectory

#name, #tmp_dir

Instance Method Summary collapse

Methods inherited from OverlayDirectory

#create, #destroy

Methods included from Helpers

#child_process_command, #detect_home, #log, #mixlib_shellout_command, #run_command, #sudo

Constructor Details

#initialize(name, args = {}) ⇒ CloneDirectory

Create new instance

Parameters:

  • name (String)

    name of storage (usually container name)

  • args (Hash) (defaults to: {})

Options Hash (args):

  • :dir (String)

    persistent storage path



67
68
69
70
71
# File 'lib/elecksee/storage/overlay_directory.rb', line 67

def initialize(name, args={})
  args[:tmp_dir] = args[:dir] if args[:dir]
  args[:tmp_dir] || '/var/lib/lxc'
  super
end

Instance Method Details

#overlay_pathString Also known as: target_path

Returns:

  • (String)


74
75
76
# File 'lib/elecksee/storage/overlay_directory.rb', line 74

def overlay_path
  File.join(tmp_dir, name)
end