module TestLab::Node::LXC

Public Instance Methods

arch() click to toggle source

Returns the machine type of the node.

@return [String] The output of 'uname -m'.

# File lib/testlab/node/lxc.rb, line 22
def arch
  @arch ||= self.exec(%(uname -m)).output.strip
end
lxc(options={}) click to toggle source

Returns the LXC object for this Node

This object is used to control containers on the node via it's provider

@return [LXC] An instance of LXC configured for this node.

# File lib/testlab/node/lxc.rb, line 11
def lxc(options={})
  if (!defined?(@lxc) || @lxc.nil?)
    @lxc_runner ||= ::LXC::Runner::SSH.new(:ui => @ui, :ssh => self.ssh)
    @lxc        ||= ::LXC.new(:ui => @ui, :runner => @lxc_runner)
  end
  @lxc
end