From: Kefu Chai Date: Wed, 2 Dec 2020 12:07:50 +0000 (+0800) Subject: pybind/rados: use rados_set_pool_full_try instead of the deprecated one X-Git-Tag: v16.1.0~372^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F38400%2Fhead;p=ceph.git pybind/rados: use rados_set_pool_full_try instead of the deprecated one this change silences the warning when compiling the cythonized python binding: build/src/pybind/rados/pyrex/rados.c:64435:9: warning: 'rados_set_osdmap_full_try' is deprecated [-Wdeprecated-declarations] rados_set_osdmap_full_try(__pyx_v_self->io); ^~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Kefu Chai --- diff --git a/src/pybind/rados/rados.pyx b/src/pybind/rados/rados.pyx index ea66bd37a512..925a32312d1a 100644 --- a/src/pybind/rados/rados.pyx +++ b/src/pybind/rados/rados.pyx @@ -161,8 +161,8 @@ cdef extern from "rados/librados.h" nogil: int rados_getaddrs(rados_t cluster, char** addrs) int rados_application_enable(rados_ioctx_t io, const char *app_name, int force) - void rados_set_osdmap_full_try(rados_ioctx_t io) - void rados_unset_osdmap_full_try(rados_ioctx_t io) + void rados_set_pool_full_try(rados_ioctx_t io) + void rados_unset_pool_full_try(rados_ioctx_t io) int rados_application_list(rados_ioctx_t io, char *values, size_t *values_len) int rados_application_metadata_get(rados_ioctx_t io, const char *app_name, @@ -4172,14 +4172,14 @@ returned %d, but should return zero on success." % (self.name, ret)) Set global osdmap_full_try label to true """ with nogil: - rados_set_osdmap_full_try(self.io) + rados_set_pool_full_try(self.io) def unset_osdmap_full_try(self): """ Unset """ with nogil: - rados_unset_osdmap_full_try(self.io) + rados_unset_pool_full_try(self.io) def application_enable(self, app_name: str, force: bool = False): """