Sha256: 7db948b4b0e1c86773001c8a7bbeb7c6a0eeceb0eb5bd766e619e53fb22cd2fc

Contents?: true

Size: 475 Bytes

Versions: 26

Compression:

Stored size: 475 Bytes

Contents

module Serverspec
  module Type
    class Cgroup < Base
      attr_accessor :subsystem
      def method_missing(meth)
        if @subsystem.nil?
          @subsystem = meth.to_s
          self
        else
          param = "#{@subsystem}.#{meth.to_s}"
          ret = backend.run_command("cgget -n -r #{param} #{@name} | awk '{print $2}'")
          val = ret.stdout.strip
          val = val.to_i if val.match(/^\d+$/)
          val
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
serverspec-1.16.0 lib/serverspec/type/cgroup.rb
serverspec-1.15.0 lib/serverspec/type/cgroup.rb
serverspec-1.14.0 lib/serverspec/type/cgroup.rb
serverspec-1.13.0 lib/serverspec/type/cgroup.rb
serverspec-1.12.0 lib/serverspec/type/cgroup.rb
serverspec-1.11.0 lib/serverspec/type/cgroup.rb
serverspec-1.10.0 lib/serverspec/type/cgroup.rb
serverspec-1.9.1 lib/serverspec/type/cgroup.rb
serverspec-1.9.0 lib/serverspec/type/cgroup.rb
serverspec-1.8.0 lib/serverspec/type/cgroup.rb
serverspec-1.7.1 lib/serverspec/type/cgroup.rb
serverspec-1.7.0 lib/serverspec/type/cgroup.rb
serverspec-1.6.0 lib/serverspec/type/cgroup.rb
serverspec-1.5.0 lib/serverspec/type/cgroup.rb
serverspec-2.0.0.beta2 lib/serverspec/type/cgroup.rb
serverspec-1.4.2 lib/serverspec/type/cgroup.rb
serverspec-2.0.0.beta1 lib/serverspec/type/cgroup.rb
serverspec-1.4.1 lib/serverspec/type/cgroup.rb
serverspec-1.4.0 lib/serverspec/type/cgroup.rb
serverspec-1.3.0 lib/serverspec/type/cgroup.rb