Sha256: 5e07ca8eb90980c711dc6a9773b35edbc913f658ba4b7f86712be8a3e914002d

Contents?: true

Size: 731 Bytes

Versions: 49

Compression:

Stored size: 731 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.exec(%(uname -m)).output.strip
      end

    end

  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
testlab-1.16.1 lib/testlab/node/lxc.rb
testlab-1.16.0 lib/testlab/node/lxc.rb
testlab-1.15.1 lib/testlab/node/lxc.rb
testlab-1.15.0 lib/testlab/node/lxc.rb
testlab-1.14.0 lib/testlab/node/lxc.rb
testlab-1.13.0 lib/testlab/node/lxc.rb
testlab-1.12.0 lib/testlab/node/lxc.rb
testlab-1.11.7 lib/testlab/node/lxc.rb
testlab-1.11.6 lib/testlab/node/lxc.rb
testlab-1.11.5 lib/testlab/node/lxc.rb
testlab-1.11.4 lib/testlab/node/lxc.rb
testlab-1.11.3 lib/testlab/node/lxc.rb
testlab-1.11.2 lib/testlab/node/lxc.rb
testlab-1.11.1 lib/testlab/node/lxc.rb
testlab-1.11.0 lib/testlab/node/lxc.rb
testlab-1.10.0 lib/testlab/node/lxc.rb
testlab-1.9.2 lib/testlab/node/lxc.rb
testlab-1.9.1 lib/testlab/node/lxc.rb
testlab-1.9.0 lib/testlab/node/lxc.rb
testlab-1.8.5 lib/testlab/node/lxc.rb