no module docs generated
It looks like in the docs config.py there needs to be some modifications so the module docs can be generated through sphinx Change-Id: I41a2d62a2300100d9fb412698360bb1238cf7406 Closes-Bug: #1552830
This commit is contained in:
parent
f830b11642
commit
b2b0599d51
@ -49,6 +49,8 @@ extensions = ['sphinx.ext.coverage',
|
||||
'oslosphinx',
|
||||
'stevedore.sphinxext',
|
||||
'oslo_config.sphinxext',
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.viewcode',
|
||||
]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
@ -93,7 +95,7 @@ version = glance_version.canonical_version_string()
|
||||
|
||||
# List of directories, relative to source directory, that shouldn't be searched
|
||||
# for source files.
|
||||
exclude_trees = ['api']
|
||||
#exclude_trees = ['api']
|
||||
exclude_patterns = [
|
||||
# The man directory includes some snippet files that are included
|
||||
# in other documents during the build but that should not be
|
||||
@ -112,7 +114,7 @@ exclude_patterns = [
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
@ -209,10 +211,10 @@ html_last_updated_fmt = subprocess.Popen(git_cmd,
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
html_use_modindex = False
|
||||
html_use_modindex = True
|
||||
|
||||
# If false, no index is generated.
|
||||
html_use_index = False
|
||||
html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
@ -106,6 +106,7 @@ Glance Manual Pages
|
||||
:maxdepth: 1
|
||||
|
||||
man/*
|
||||
api/modules
|
||||
|
||||
Contributing to Glance
|
||||
======================
|
||||
@ -114,3 +115,10 @@ Contributing to Glance
|
||||
:maxdepth: 1
|
||||
|
||||
contributing/index
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
@ -16,7 +16,13 @@ from glance.common import exception
|
||||
from glance.common.glare import definitions
|
||||
import glance.contrib.plugins.image_artifact.v1_1.image as v1_1
|
||||
|
||||
import glanceclient
|
||||
# Since this is not in the test-requirements.txt and the class below,
|
||||
# ImageAsAnArtifact, is pending removal a try except is added to prevent
|
||||
# an ImportError when module docs are generated
|
||||
try:
|
||||
import glanceclient
|
||||
except ImportError:
|
||||
glanceclient = None
|
||||
|
||||
|
||||
from glance.i18n import _
|
||||
@ -47,6 +53,11 @@ class ImageAsAnArtifact(v1_1.ImageAsAnArtifact):
|
||||
glance_endpoint = next(service['endpoints'][0]['publicURL']
|
||||
for service in context.service_catalog
|
||||
if service['name'] == 'glance')
|
||||
# Ensure glanceclient is imported correctly since we are catching
|
||||
# the ImportError on initialization
|
||||
if glanceclient == None:
|
||||
raise ImportError(_("Glance client not installed"))
|
||||
|
||||
try:
|
||||
client = glanceclient.Client(version=2,
|
||||
endpoint=glance_endpoint,
|
||||
|
Loading…
x
Reference in New Issue
Block a user