Sha256: b4d6f95661bed599dc25556fbc920df8810e54b594dd90ef34d5a75994400ba5

Contents?: true

Size: 711 Bytes

Versions: 18

Compression:

Stored size: 711 Bytes

Contents

class TestLab
  class Node

    module 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

18 entries across 18 versions & 1 rubygems

Version Path
testlab-1.22.4 lib/testlab/node/lxc.rb
testlab-1.22.3 lib/testlab/node/lxc.rb
testlab-1.22.2 lib/testlab/node/lxc.rb
testlab-1.22.1 lib/testlab/node/lxc.rb
testlab-1.22.0 lib/testlab/node/lxc.rb
testlab-1.21.1 lib/testlab/node/lxc.rb
testlab-1.21.0 lib/testlab/node/lxc.rb
testlab-1.20.6 lib/testlab/node/lxc.rb
testlab-1.20.5 lib/testlab/node/lxc.rb
testlab-1.20.4 lib/testlab/node/lxc.rb
testlab-1.20.3 lib/testlab/node/lxc.rb
testlab-1.20.2 lib/testlab/node/lxc.rb
testlab-1.20.1 lib/testlab/node/lxc.rb
testlab-1.20.0 lib/testlab/node/lxc.rb
testlab-1.19.0 lib/testlab/node/lxc.rb
testlab-1.18.1 lib/testlab/node/lxc.rb
testlab-1.18.0 lib/testlab/node/lxc.rb
testlab-1.17.0 lib/testlab/node/lxc.rb