]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
doc/conf.py: use glob.glob() to find .yaml.in files
authorKefu Chai <kchai@redhat.com>
Wed, 21 Apr 2021 05:32:35 +0000 (13:32 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 21 Apr 2021 05:35:12 +0000 (13:35 +0800)
improve the maintainability of .yaml.in files.

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

index 9b4da176c08ca4a921a65ee388807b67979bb787..93df49cd70d25030a7b4a7112fe4d5d4c2bf4edd 100644 (file)
@@ -1,4 +1,5 @@
 import fileinput
+import glob
 import logging
 import os
 import shutil
@@ -227,18 +228,9 @@ openapi_logger = sphinx.util.logging.getLogger('sphinxcontrib.openapi.openapi30'
 openapi_logger.setLevel(logging.WARNING)
 
 # ceph_confval
-ceph_confval_imports = [os.path.join(top_level,
-                                     'src/common/options',
-                                     yaml + '.yaml.in')
-                        for yaml in ['global',
-                                     'crimson',
-                                     'immutable-object-cache',
-                                     'mds',
-                                     'mds-client',
-                                     'rbd',
-                                     'rbd-mirror',
-                                     'rgw']]
-
+ceph_confval_imports = glob.glob(os.path.join(top_level,
+                                              'src/common/options',
+                                              '*.yaml.in'))
 
 # handles edit-on-github and old version warning display
 def setup(app):