}
}
+static PyObject*
+ceph_get_mgr_id(PyObject *self, PyObject *args)
+{
+ return PyString_FromString(g_conf->name.get_id().c_str());
+}
+
static PyObject*
ceph_config_get(PyObject *self, PyObject *args)
{
"Get a service's metadata"},
{"send_command", ceph_send_command, METH_VARARGS,
"Send a mon command"},
+ {"get_mgr_id", ceph_get_mgr_id, METH_NOARGS,
+ "Get the mgr id"},
{"get_config", ceph_config_get, METH_VARARGS,
"Get a configuration value"},
{"set_config", ceph_config_set, METH_VARARGS,
# any ``COMMANDS``
raise NotImplementedError()
+ def get_mgr_id(self):
+ """
+ Retrieve the mgr id.
+
+ :return: str
+ """
+ return ceph_state.get_mgr_id()
+
def get_config(self, key):
"""
Retrieve the value of a persistent configuration setting