MCPcopy Create free account
hub / github.com/ceph/ceph / get_module_option_ex

Method get_module_option_ex

src/pybind/mgr/mgr_module.py:2143–2159  ·  view source on GitHub ↗

Retrieve the value of a persistent configuration setting for the specified module. :param module: The name of the module, e.g. 'dashboard' or 'telemetry'. :param key: The configuration key, e.g. 'server_addr'. :param default: The default value to

(self, module: str,
                             key: str,
                             default: OptionValue = None)

Source from the content-addressed store, hash-verified

2141 return self._get_module_option(key, default)
2142
2143 def get_module_option_ex(self, module: str,
2144 key: str,
2145 default: OptionValue = None) -> OptionValue:
2146 """
2147 Retrieve the value of a persistent configuration setting
2148 for the specified module.
2149
2150 :param module: The name of the module, e.g. 'dashboard'
2151 or 'telemetry'.
2152 :param key: The configuration key, e.g. 'server_addr'.
2153 :param default: The default value to use when the
2154 returned value is ``None``. Defaults to ``None``.
2155 """
2156 if module == self.module_name:
2157 self._validate_module_option(key)
2158 r = self._ceph_get_module_option(module, key)
2159 return default if r is None else r
2160
2161 @API.expose
2162 def get_store_prefix(self, key_prefix: str) -> Dict[str, str]:

Callers 1

create_mgr_poolMethod · 0.95

Calls 2

Tested by

no test coverage detected