Fix tempest realted exceptions during docs build
We don't have tempest in our {test-}requirements.txt, which causes docs build to complain about missing tempest.* modules, as we have autodoc enabled, which imports all the modules it can find to get their docstrings. This change adds ironic_tempest_plugin modules to autodoc_exclude_modules, and also adds it to exclude_patterns, so that sphinx ignores ironic_tempest_plugin/* files too. Also fixes a couple of warnings because of the incorrect formatting of the LocalLinkConnectionType.validate docstring. Closes-bug: #1609850 Change-Id: Id24e587b690b423e65dad55e70224426873e8d5d
This commit is contained in:
parent
bba1309647
commit
24e02f99b2
@ -64,6 +64,11 @@ MOCK_MODULES = ['nova', 'nova.compute', 'nova.context']
|
||||
for module in MOCK_MODULES:
|
||||
sys.modules[module] = mock.Mock()
|
||||
|
||||
# A list of glob-style patterns that should be excluded when looking for
|
||||
# source files. They are matched against the source file names relative to the
|
||||
# source directory, using slashes as directory separators on all platforms.
|
||||
exclude_patterns = ['api/ironic_tempest_plugin.*']
|
||||
|
||||
# -- Options for HTML output --------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. Major themes that come with
|
||||
|
@ -272,20 +272,20 @@ class LocalLinkConnectionType(wtypes.UserType):
|
||||
"""Validate and convert the input to a LocalLinkConnectionType.
|
||||
|
||||
:param value: A dictionary of values to validate, switch_id is a MAC
|
||||
address or an OpenFlow based datapath_id, switch_info is an optional
|
||||
field.
|
||||
address or an OpenFlow based datapath_id, switch_info is an
|
||||
optional field.
|
||||
|
||||
For example::
|
||||
{
|
||||
|
||||
{
|
||||
'switch_id': mac_or_datapath_id(),
|
||||
'port_id': 'Ethernet3/1',
|
||||
'switch_info': 'switch1'
|
||||
}
|
||||
}
|
||||
|
||||
:returns: A dictionary.
|
||||
:raises: Invalid if some of the keys in the dictionary being validated
|
||||
are unknown, invalid, or some required ones are missing.
|
||||
|
||||
"""
|
||||
wtypes.DictType(wtypes.text, wtypes.text).validate(value)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user