--- Add tmap_to_omap method to rados python bindings, without the bool argument: it is forced to false. Signed-off-by: Alexandre Oliva --- src/pybind/rados.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/pybind/rados.py b/src/pybind/rados.py index 93e5040..a2394aa 100644 --- a/src/pybind/rados.py +++ b/src/pybind/rados.py @@ -1438,6 +1438,24 @@ returned %d, but should return zero on success." % (self.name, ret)) raise make_ex(ret, "Failed to stat %r" % key) return psize.value, time.localtime(pmtime.value) + def tmap_to_omap(self, key): + """ + Convert a dir from tmap to omap. + + :param key: the name of the object to convert + :type key: str + + :raises: :class:`TypeError` + :raises: :class:`Error` + :returns: int - 0 on success, otherwise raises an error + """ + self.require_ioctx_open() + ret = run_in_thread(self.librados.rados_tmap_to_omap, + (self.io, c_char_p(key), c_int(0))) + if ret < 0: + raise make_ex(ret, "Failed to convert %s from tmap to omap" % key) + return 0 + def get_xattr(self, key, xattr_name): """ Get the value of an extended attribute on an object. -- Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/ You must be the change you wish to see in the world. -- Gandhi Be Free! -- http://FSFLA.org/ FSF Latin America board member Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer