From: Kefu Chai Date: Mon, 10 May 2021 02:12:11 +0000 (+0800) Subject: doc/_ext: use str for mgr module options by default X-Git-Tag: v17.1.0~1986^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1c9aef07fcbc3ad5c35b9e8a727733999fdb16cb;p=ceph.git doc/_ext: use str for mgr module options by default sometimes, they don't specify the option type and just default to "str". Signed-off-by: Kefu Chai --- diff --git a/doc/_ext/ceph_confval.py b/doc/_ext/ceph_confval.py index 72a10aa59930..8883f4f5d9be 100644 --- a/doc/_ext/ceph_confval.py +++ b/doc/_ext/ceph_confval.py @@ -350,6 +350,9 @@ class CephOption(ObjectDescription): opt = self._load_yaml().get(name) if opt is None: raise self.error(f'Option "{name}" not found!') + if cur_module and 'type' not in opt: + # the type of module option defaults to 'str' + opt['type'] = 'str' desc = opt.get('fmt_desc') or opt.get('long_desc') or opt.get('desc') opt_default = opt.get('default') default = self.options.get('default', opt_default)