On 12/01/2011 09:33 PM, Eric_YH_Chen@xxxxxxxxxxx wrote:
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'))
Added in c883100448bb7e86b4f0d52a425e0d0a278c79a0 with a couple small changes to check that we're connected and keep the type of size c_size_t.
Next time if you could send a patch or github pull request it'd be easier to apply.
Thanks! Josh -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html