class LVM::Wrapper::LVS

Constants

ALLOCATION_POLICY
ATTRIBUTES_FILE
BASE_COMMAND
DEVICE_OPEN
FIXED_MINOR
PERMISSIONS
STATE
VOLUME_TYPE

lv_attr attribute handling constants roughly by order referenced in lib/report/report.c:292 (_lvstatus_disp)

Attributes

attributes[R]
command[R]

Public Class Methods

new(options) click to toggle source
# File lib/lvm/wrapper/lvs.rb, line 12
def initialize(options)
  @attributes = Attributes.load(options[:version], ATTRIBUTES_FILE)
  @command = "#{options[:command]} #{Reporting.build_command(attributes, BASE_COMMAND)}"
end

Public Instance Methods

list() { |obj| ... } click to toggle source
# File lib/lvm/wrapper/lvs.rb, line 73
def list
  output = External.cmd(@command)
  data = parse(output)
  if block_given?
    return data.each { |obj| yield obj }
  else
    return data
  end
end