Use Sphinx 1.5 warning-is-error

With pbr 2.0 and Sphinx 1.5, the setting for treat sphinx warnings as
errors is setting warning-is-error in build_sphinx section. Migrate the
setting from the old warnerrors one.

This involves a couple of changes to the docs to fix the now broken
build.

Change-Id: I9bee7f6f9c69a9ed7bb22325ad1a0a1316dde526
This commit is contained in:
Stephen Finucane 2017-04-19 10:19:46 +01:00
parent eaa5db38d3
commit 6b7b018cb6
8 changed files with 25 additions and 17 deletions

View File

@ -32,7 +32,8 @@ def build_option_string(options):
This will quote the values, in case spaces are included. This will quote the values, in case spaces are included.
Any values that are None are excluded entirely. Any values that are None are excluded entirely.
Usage: Usage::
build_option_string({ build_option_string({
"--email": "me@example.com", "--email": "me@example.com",
"--name": "example.com." "--name": "example.com."
@ -40,7 +41,8 @@ def build_option_string(options):
}) })
Returns: Returns::
"--email 'me@example.com' --name 'example.com.' "--email 'me@example.com' --name 'example.com.'
""" """
return " ".join("{0} '{1}'".format(flag, value) return " ".join("{0} '{1}'".format(flag, value)
@ -54,14 +56,16 @@ def build_flags_string(flags):
Pass in a dictionary mapping flags to booleans. Those flags set to true Pass in a dictionary mapping flags to booleans. Those flags set to true
are included in the returned string. are included in the returned string.
Usage: Usage::
build_flags_string({ build_flags_string({
'--no-ttl': True, '--no-ttl': True,
'--no-name': False, '--no-name': False,
'--verbose': True, '--verbose': True,
}) })
Returns: Returns::
'--no-ttl --verbose' '--no-ttl --verbose'
""" """
flags = {flag: is_set for flag, is_set in flags.items() if is_set} flags = {flag: is_set for flag, is_set in flags.items() if is_set}

View File

@ -179,11 +179,13 @@ def find_resourceid_by_name_or_id(resource_client, name_or_id):
class AdapterWithTimeout(adapter.Adapter): class AdapterWithTimeout(adapter.Adapter):
"""adapter.Adapter wraps around a Session. """adapter.Adapter wraps around a Session.
The user can pass a timeout keyword that will apply only to The user can pass a timeout keyword that will apply only to
the Designate Client, in order: the Designate Client, in order:
- timeout keyword passed to request()
- timeout keyword passed to AdapterWithTimeout() - timeout keyword passed to ``request()``
- timeout attribute on keystone session - timeout keyword passed to ``AdapterWithTimeout()``
- timeout attribute on keystone session
""" """
def __init__(self, *args, **kw): def __init__(self, *args, **kw):
self.timeout = kw.pop('timeout', None) self.timeout = kw.pop('timeout', None)

View File

@ -29,7 +29,7 @@ class DomainsController(client.CrudController):
""" """
Retrieve a list of domains Retrieve a list of domains
:returns: A list of :class:`Domain`s :returns: A list of :class:`Domain`
""" """
response = self.client.get('/domains') response = self.client.get('/domains')
@ -85,7 +85,7 @@ class DomainsController(client.CrudController):
Retrieve the list of nameservers for a domain Retrieve the list of nameservers for a domain
:param domain_id: Domain Identifier :param domain_id: Domain Identifier
:returns: A list of :class:`Server`s :returns: A list of :class:`Server`
""" """
response = self.client.get('/domains/%s/servers' % domain_id) response = self.client.get('/domains/%s/servers' % domain_id)

View File

@ -31,7 +31,7 @@ class RecordsController(client.CrudController):
Retrieve a list of records Retrieve a list of records
:param domain: :class:`Domain` or Domain Identifier :param domain: :class:`Domain` or Domain Identifier
:returns: A list of :class:`Record`s :returns: A list of :class:`Record`
""" """
domain_id = domain.id if isinstance(domain, Domain) else domain domain_id = domain.id if isinstance(domain, Domain) else domain

View File

@ -29,7 +29,7 @@ class ServersController(client.CrudController):
""" """
Retrieve a list of servers Retrieve a list of servers
:returns: A list of :class:`Server`s :returns: A list of :class:`Server`
""" """
response = self.client.get('/servers') response = self.client.get('/servers')

View File

@ -33,12 +33,13 @@ from designateclient import version
class DesignateAdapter(adapter.LegacyJsonAdapter): class DesignateAdapter(adapter.LegacyJsonAdapter):
""" """Adapter around LegacyJsonAdapter.
Adapter around LegacyJsonAdapter.
The user can pass a timeout keyword that will apply only to The user can pass a timeout keyword that will apply only to
the Designate Client, in order: the Designate Client, in order:
- timeout keyword passed to request()
- timeout attribute on keystone session - timeout keyword passed to ``request()``
- timeout attribute on keystone session
""" """
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
self.timeout = kwargs.pop('timeout', None) self.timeout = kwargs.pop('timeout', None)

View File

@ -33,6 +33,7 @@ Contents
shell-examples shell-examples
contributing contributing
functional-tests functional-tests
api/autoindex
Indices and tables Indices and tables
================== ==================

View File

@ -149,7 +149,8 @@ openstack.dns.v2 =
[build_sphinx] [build_sphinx]
builders = html,man builders = html,man
all_files = 1 all-files = 1
warning-is-error = 1
build-dir = doc/build build-dir = doc/build
source-dir = doc/source source-dir = doc/source
@ -177,4 +178,3 @@ universal = 1
[pbr] [pbr]
autodoc_index_modules = True autodoc_index_modules = True
warnerrors = True