summaryrefslogtreecommitdiff
path: root/doc/source/conf.py
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2017-06-15 16:54:52 -0400
committerDoug Hellmann <doug@doughellmann.com>2017-06-28 12:24:48 -0400
commite8acf5e7367821625ee8e94866b117990d207c9f (patch)
treedd93ed509133564ed05738380efab9914ee338c7 /doc/source/conf.py
parentd6e936cd14f0954751dfc1b754f08deb166a53bf (diff)
downloadpython-glanceclient-e8acf5e7367821625ee8e94866b117990d207c9f.tar.gz
move existing content into the new standard structure
This patch rearranges and reformats existing content. It replaces the home-grown autodoc feature with the one built into pbr, for consistency with other OpenStack projects. It depends on the doc-migration spec and a pbr feature to allow us to specify where the autodoc content should go in the source tree during the build. Change-Id: I8d2bb11b5ef3e46fcd22c8bed8f84060d8ab6f03 Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454 Depends-On: I2bd5652bb59cbd9c939931ba2e7db1b37d2b30bb Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Diffstat (limited to 'doc/source/conf.py')
-rw-r--r--doc/source/conf.py43
1 files changed, 0 insertions, 43 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 4c22042..0056074 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -19,49 +19,6 @@ import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
'..', '..')))
-BASE_DIR = os.path.dirname(os.path.abspath(__file__))
-ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", ".."))
-
-
-def gen_ref(ver, title, names):
- refdir = os.path.join(BASE_DIR, "ref")
- pkg = "glanceclient"
- if ver:
- pkg = "%s.%s" % (pkg, ver)
- refdir = os.path.join(refdir, ver)
- if not os.path.exists(refdir):
- os.makedirs(refdir)
- idxpath = os.path.join(refdir, "index.rst")
- with open(idxpath, "w") as idx:
- idx.write(("%(title)s\n"
- "%(signs)s\n"
- "\n"
- ".. toctree::\n"
- " :maxdepth: 1\n"
- "\n") % {"title": title, "signs": "=" * len(title)})
- for name in names:
- idx.write(" %s\n" % name)
- rstpath = os.path.join(refdir, "%s.rst" % name)
- with open(rstpath, "w") as rst:
- rst.write(("%(title)s\n"
- "%(signs)s\n"
- "\n"
- ".. automodule:: %(pkg)s.%(name)s\n"
- " :members:\n"
- " :undoc-members:\n"
- " :show-inheritance:\n"
- " :noindex:\n")
- % {"title": name.capitalize(),
- "signs": "=" * len(name),
- "pkg": pkg, "name": name})
-
-gen_ref(None, "API", ["client", "exc"])
-gen_ref("v1", "OpenStack Images Version 1 Client Reference",
- ["client", "images", "image_members"])
-gen_ref("v2", "OpenStack Images Version 2 Client Reference",
- ["client", "images", "image_tags",
- "image_members", "tasks", "metadefs"])
-
# -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be