class PackerFiles::Core::LogicalVolume

Abstraction for Logical Volume

Attributes

file_system[RW]
mount_point[RW]
name[RW]
size[RW]

Specify attributes

vg_name[RW]

Public Class Methods

new() { |self| ... } click to toggle source

Constructor to just specify accessor varibales

# File lib/PackerFiles/Core/LogicalVolume.rb, line 24
def initialize
  @size         = 0
  yield self if block_given?
end

Public Instance Methods

normalize() click to toggle source

Normalize the values

# File lib/PackerFiles/Core/LogicalVolume.rb, line 30
def normalize
  raise NilException.new(self, 'name')    if @name.nil?
  raise NilException.new(self, 'vg_name') if @vg_name.nil?
  raise 'size cannot be zero'             if @size == 0
  @size = MiB(@size) 
end