This is useful for shelling back out to ceph utilities.
Signed-off-by: Sage Weil <sage@newdream.net>
return PyUnicode_FromString(pretty_version_to_str().c_str());
}
+static PyObject *
+ceph_get_ceph_conf_path(BaseMgrModule *self, PyObject *args)
+{
+ return PyUnicode_FromString(g_conf().get_conf_path().c_str());
+}
+
static PyObject *
ceph_get_release_name(BaseMgrModule *self, PyObject *args)
{
{"_ceph_get_mgr_id", (PyCFunction)ceph_get_mgr_id, METH_NOARGS,
"Get the name of the Mgr daemon where we are running"},
+ {"_ceph_get_ceph_conf_path", (PyCFunction)ceph_get_ceph_conf_path, METH_NOARGS,
+ "Get path to ceph.conf"},
+
{"_ceph_get_option", (PyCFunction)ceph_option_get, METH_VARARGS,
"Get a native configuration option value"},
inbuf: Optional[str]) -> None: ...
def _ceph_set_health_checks(self, checks: Mapping[str, HealthCheckT]) -> None: ...
def _ceph_get_mgr_id(self) -> str: ...
+ def _ceph_get_ceph_conf_path(self) -> str: ...
def _ceph_get_option(self, key: str) -> OptionValue: ...
def _ceph_get_foreign_option(self, entity: str, key: str) -> OptionValue: ...
def _ceph_get_module_option(self,
"""
return self._ceph_get_mgr_id()
+ def get_ceph_conf_path(self) -> str:
+ return self._ceph_get_ceph_conf_path()
+
def get_ceph_option(self, key: str) -> OptionValue:
return self._ceph_get_option(key)
super(M, self).__init__()
self._ceph_get_version = mock.Mock()
+ self._ceph_get_ceph_conf_path = mock.MagicMock()
self._ceph_get_option = mock.MagicMock()
self._ceph_get_context = mock.MagicMock()
self._ceph_register_client = mock.MagicMock()