All of lore.kernel.org
 help / color / mirror / Atom feed
* No function to list the pool in rados.py
@ 2011-12-02  5:33 Eric_YH_Chen
  2011-12-02 22:11 ` Josh Durgin
  0 siblings, 1 reply; 2+ messages in thread
From: Eric_YH_Chen @ 2011-12-02  5:33 UTC (permalink / raw)
  To: ceph-devel; +Cc: Chris_YT_Huang

Hi, ceph developments:

  Could we add one more function in rados.py to list the pool?

  I had already implemented the function. Thanks a lot!

class Rados(object):
    def list(self):
        size = c_size_t(512)
        while True:
            c_names = create_string_buffer(size.value)
            ret = self.librados.rados_pool_list(self.cluster,
byref(c_names), size)
            if ret > size.value:
                size = ret
            else:
                break
        return filter(lambda name: name != '', c_names.raw.split('\0'))



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-02 22:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-02  5:33 No function to list the pool in rados.py Eric_YH_Chen
2011-12-02 22:11 ` Josh Durgin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.