mirror of
https://github.com/ceph/ceph
synced 2025-01-01 08:32:24 +00:00
Merge pull request #19948 from tchaikov/wip-standby-module-get-config
pybind/mgr/mgr_module: add default param for MgrStandbyModule.get_con… Reviewed-by: John Spray <john.spray@redhat.com>
This commit is contained in:
commit
67abd1248b
@ -177,8 +177,20 @@ class MgrStandbyModule(ceph_module.BaseMgrStandbyModule):
|
||||
def get_mgr_id(self):
|
||||
return self._ceph_get_mgr_id()
|
||||
|
||||
def get_config(self, key):
|
||||
return self._ceph_get_config(key)
|
||||
def get_config(self, key, default=None):
|
||||
"""
|
||||
Retrieve the value of a persistent configuration setting
|
||||
|
||||
:param str key:
|
||||
:param default: the default value of the config if it is not found
|
||||
:return: str
|
||||
"""
|
||||
r = self._ceph_get_config(key)
|
||||
if r is None:
|
||||
return default
|
||||
else:
|
||||
return r
|
||||
|
||||
|
||||
def get_active_uri(self):
|
||||
return self._ceph_get_active_uri()
|
||||
@ -624,4 +636,3 @@ class MgrModule(ceph_module.BaseMgrModule):
|
||||
self._rados.connect()
|
||||
|
||||
return self._rados
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user