Sha256: 5c8b96730c722b6687abd2eba43dae51a7cf2085505b2c58b05dce0f406c5fa4

Contents?: true

Size: 678 Bytes

Versions: 43

Compression:

Stored size: 678 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 ||= ::LXC.new
          @lxc.use_sudo = true
          @lxc.use_ssh = self.ssh
        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

43 entries across 43 versions & 1 rubygems

Version Path
testlab-0.6.15 lib/testlab/node/lxc.rb
testlab-0.6.14 lib/testlab/node/lxc.rb
testlab-0.6.12 lib/testlab/node/lxc.rb
testlab-0.6.11 lib/testlab/node/lxc.rb
testlab-0.6.10 lib/testlab/node/lxc.rb
testlab-0.6.9 lib/testlab/node/lxc.rb
testlab-0.6.8 lib/testlab/node/lxc.rb
testlab-0.6.7 lib/testlab/node/lxc.rb
testlab-0.6.6 lib/testlab/node/lxc.rb
testlab-0.6.5 lib/testlab/node/lxc.rb
testlab-0.6.4 lib/testlab/node/lxc.rb
testlab-0.6.3 lib/testlab/node/lxc.rb
testlab-0.6.2 lib/testlab/node/lxc.rb
testlab-0.6.1 lib/testlab/node/lxc.rb
testlab-0.6.0 lib/testlab/node/lxc.rb
testlab-0.5.4 lib/testlab/node/lxc.rb
testlab-0.5.3 lib/testlab/node/lxc.rb
testlab-0.5.2 lib/testlab/node/lxc.rb
testlab-0.5.1 lib/testlab/node/lxc.rb
testlab-0.5.0 lib/testlab/node/lxc.rb