]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/_ext: use str for mgr module options by default
authorKefu Chai <kchai@redhat.com>
Mon, 10 May 2021 02:12:11 +0000 (10:12 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 11 May 2021 07:43:59 +0000 (15:43 +0800)
sometimes, they don't specify the option type and just default to "str".

Signed-off-by: Kefu Chai <kchai@redhat.com>
doc/_ext/ceph_confval.py

index 72a10aa59930a4ceb88cac0a7df7696945cec5b8..8883f4f5d9be9c87e904998123c0a247c831285d 100644 (file)
@@ -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)