Sha256: eb6ab2ff2747d1cbfa0b0e45faeb923da6fb3c62ebd794e1969c5f6c8f454176

Contents?: true

Size: 478 Bytes

Versions: 11

Compression:

Stored size: 478 Bytes

Contents

:q
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 = @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
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
serverspec-2.0.0.beta19 lib/serverspec/type/cgroup.rb
serverspec-2.0.0.beta18 lib/serverspec/type/cgroup.rb
serverspec-2.0.0.beta17 lib/serverspec/type/cgroup.rb
serverspec-2.0.0.beta16 lib/serverspec/type/cgroup.rb
serverspec-2.0.0.beta15 lib/serverspec/type/cgroup.rb
serverspec-2.0.0.beta14 lib/serverspec/type/cgroup.rb
serverspec-2.0.0.beta13 lib/serverspec/type/cgroup.rb
serverspec-2.0.0.beta12 lib/serverspec/type/cgroup.rb
serverspec-2.0.0.beta11 lib/serverspec/type/cgroup.rb
serverspec-2.0.0.beta10 lib/serverspec/type/cgroup.rb
serverspec-2.0.0.beta9 lib/serverspec/type/cgroup.rb