Module: CephStorage::PoolWrapper

Included in:
Pool
Defined in:
lib/ceph_storage/pool_wrapper.rb

Overview

This code is here to wrap around CephRuby::Pool Methods. It assigns one of the pool_factory cartridges to the method being calledt

Instance Method Summary collapse

Instance Method Details

#wrap_me(*method_names) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/ceph_storage/pool_wrapper.rb', line 6

def wrap_me(*method_names)
  method_names.each do |m|
    define_method(m) do |*args|
      log("wrapping #{m}")
      rados_pool do |p|
        p.send(m, *args)
      end
    end
  end
end