Module: TestLab::Node::LXC
- Included in:
- TestLab::Node
- Defined in:
- lib/testlab/node/lxc.rb
Instance Method Summary collapse
-
#arch ⇒ String
Returns the machine type of the node.
-
#lxc(options = {}) ⇒ LXC
Returns the LXC object for this Node.
Instance Method Details
#arch ⇒ String
Returns the machine type of the node.
22 23 24 |
# File 'lib/testlab/node/lxc.rb', line 22 def arch @arch ||= self.exec(%(uname -m)).output.strip end |
#lxc(options = {}) ⇒ LXC
Returns the LXC object for this Node
This object is used to control containers on the node via it’s provider
11 12 13 14 15 16 17 |
# File 'lib/testlab/node/lxc.rb', line 11 def lxc(={}) 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 |