Sha256: 6e9110b500959875811aef1a93eeeceb622b2dd8bd0a474b3ae1833f73660c0b

Contents?: true

Size: 735 Bytes

Versions: 19

Compression:

Stored size: 735 Bytes

Contents

class TestLab
  class Node

    module LXC
      require 'lxc'

      # 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.
      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

      # Returns the machine type of the node.
      #
      # @return [String] The output of 'uname -m'.
      def arch
        @arch ||= self.ssh.exec(%(uname -m)).output.strip
      end

    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
testlab-1.0.0 lib/testlab/node/lxc.rb
testlab-0.9.1 lib/testlab/node/lxc.rb
testlab-0.9.0 lib/testlab/node/lxc.rb
testlab-0.8.6 lib/testlab/node/lxc.rb
testlab-0.8.5 lib/testlab/node/lxc.rb
testlab-0.8.4 lib/testlab/node/lxc.rb
testlab-0.8.3 lib/testlab/node/lxc.rb
testlab-0.8.2 lib/testlab/node/lxc.rb
testlab-0.8.1 lib/testlab/node/lxc.rb
testlab-0.8.0 lib/testlab/node/lxc.rb
testlab-0.7.6 lib/testlab/node/lxc.rb
testlab-0.7.5 lib/testlab/node/lxc.rb
testlab-0.7.4 lib/testlab/node/lxc.rb
testlab-0.7.3 lib/testlab/node/lxc.rb
testlab-0.7.2 lib/testlab/node/lxc.rb
testlab-0.7.1 lib/testlab/node/lxc.rb
testlab-0.7.0 lib/testlab/node/lxc.rb
testlab-0.6.17 lib/testlab/node/lxc.rb
testlab-0.6.16 lib/testlab/node/lxc.rb