summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-01-05 18:05:52 +0000
committerGerrit Code Review <review@openstack.org>2017-01-05 18:05:52 +0000
commit5e5835de67aa3262b2ba51b7baec564be223166c (patch)
treec6b350f26ba083b32412a452f2a891dcfd0d1c07
parent22eade1b11c35c48f133ad221a8aa11fafbaab59 (diff)
parente8e39ed343622350e114c84ecd5fcc0c94bfec6b (diff)
downloadpython-novaclient-5e5835de67aa3262b2ba51b7baec564be223166c.tar.gz
Merge "Blacklist rather than whitelist autodoc modules"
-rw-r--r--doc/source/conf.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 935a45f9..237a363a 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -70,18 +70,17 @@ def gen_ref(ver, title, names):
"signs": "=" * len(name),
"pkg": pkg, "name": name})
+
+def get_module_names():
+ names = os.listdir(os.path.join(ROOT, 'novaclient', 'v2'))
+ exclude = ['shell.py', '__init__.py']
+ for name in names:
+ if name.endswith('.py') and name not in exclude:
+ yield name.strip('.py')
+
+
gen_ref(None, "Exceptions", ["exceptions"])
-gen_ref("v2", "Version 1.1, Version 2 API",
- ["agents", "aggregates", "assisted_volume_snapshots",
- "availability_zones", "cells", "certs", "client", "cloudpipe",
- "fixed_ips", "flavor_access", "flavors", "floating_ip_dns",
- "floating_ip_pools", "floating_ips", "floating_ips_bulk", "fping",
- "hosts", "hypervisors", "images", "instance_action", "keypairs",
- "limits", "list_extensions", "migrations", "networks",
- "quota_classes", "quotas", "security_group_default_rules",
- "security_group_rules", "security_groups", "server_external_events",
- "server_groups", "server_migrations", "servers", "services", "usage",
- "versions", "virtual_interfaces", "volumes"])
+gen_ref("v2", "Version 2 API", sorted(get_module_names()))
# -- General configuration ----------------------------------------------------