Sha256: c8bbee8272ad93947015fb8c213e8b1f63ccad5e200faf0150223c1995f753ad

Contents?: true

Size: 484 Bytes

Versions: 29

Compression:

Stored size: 484 Bytes

Contents

module Serverspec
  module Type
    class Cgroup < Base
      attr_accessor :subsystem
      def method_missing(meth)
        if @subsystem.nil?
          @subsystem = meth.to_s
          return 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

29 entries across 29 versions & 1 rubygems

Version Path
serverspec-0.14.4 lib/serverspec/type/cgroup.rb
serverspec-0.14.3 lib/serverspec/type/cgroup.rb
serverspec-0.14.2 lib/serverspec/type/cgroup.rb
serverspec-0.14.1 lib/serverspec/type/cgroup.rb
serverspec-0.14.0 lib/serverspec/type/cgroup.rb
serverspec-0.13.7 lib/serverspec/type/cgroup.rb
serverspec-0.13.6 lib/serverspec/type/cgroup.rb
serverspec-0.13.5 lib/serverspec/type/cgroup.rb
serverspec-0.13.4 lib/serverspec/type/cgroup.rb
serverspec-0.13.3 lib/serverspec/type/cgroup.rb
serverspec-0.13.2 lib/serverspec/type/cgroup.rb
serverspec-0.13.1 lib/serverspec/type/cgroup.rb
serverspec-0.13.0 lib/serverspec/type/cgroup.rb
serverspec-0.12.0 lib/serverspec/type/cgroup.rb
serverspec-0.11.5 lib/serverspec/type/cgroup.rb
serverspec-0.11.4 lib/serverspec/type/cgroup.rb
serverspec-0.11.3 lib/serverspec/type/cgroup.rb
serverspec-0.11.2 lib/serverspec/type/cgroup.rb
serverspec-0.11.1 lib/serverspec/type/cgroup.rb
serverspec-0.11.0 lib/serverspec/type/cgroup.rb