Sha256: 001c391eee21edb7a396745b1441871f36ca77ac5320207ea199d7661194f900

Contents?: true

Size: 431 Bytes

Versions: 85

Compression:

Stored size: 431 Bytes

Contents

module Serverspec::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 = @runner.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

Version data entries

85 entries across 85 versions & 4 rubygems

Version Path
serverspec-2.42.3 lib/serverspec/type/cgroup.rb
serverspec-2.42.2 lib/serverspec/type/cgroup.rb
serverspec-2.42.1 lib/serverspec/type/cgroup.rb
serverspec-cem-acpt-2.42.0 lib/serverspec/type/cgroup.rb
serverspec-2.42.0 lib/serverspec/type/cgroup.rb
serverspec-2.41.8 lib/serverspec/type/cgroup.rb
serverspec-2.41.7 lib/serverspec/type/cgroup.rb
serverspec-2.41.6 lib/serverspec/type/cgroup.rb
serverspec-2.41.5 lib/serverspec/type/cgroup.rb
serverspec-2.41.4 lib/serverspec/type/cgroup.rb
serverspec-ruby19-2.24.3 lib/serverspec/type/cgroup.rb
serverspec-2.41.3 lib/serverspec/type/cgroup.rb
serverspec-2.41.2 lib/serverspec/type/cgroup.rb
serverspec-2.41.1 lib/serverspec/type/cgroup.rb
serverspec-2.41.0 lib/serverspec/type/cgroup.rb
serverspec-2.40.0 lib/serverspec/type/cgroup.rb
serverspec-2.39.2 lib/serverspec/type/cgroup.rb
serverspec-2.39.1 lib/serverspec/type/cgroup.rb
serverspec-2.39.0 lib/serverspec/type/cgroup.rb
serverspec-2.38.1 lib/serverspec/type/cgroup.rb