summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--designateclient/functionaltests/client.py12
-rw-r--r--designateclient/utils.py8
-rw-r--r--designateclient/v1/domains.py4
-rw-r--r--designateclient/v1/records.py2
-rw-r--r--designateclient/v1/servers.py2
-rw-r--r--designateclient/v2/client.py9
-rw-r--r--doc/source/index.rst1
-rw-r--r--setup.cfg4
8 files changed, 25 insertions, 17 deletions
diff --git a/designateclient/functionaltests/client.py b/designateclient/functionaltests/client.py
index 001894b..c439edb 100644
--- a/designateclient/functionaltests/client.py
+++ b/designateclient/functionaltests/client.py
@@ -32,7 +32,8 @@ def build_option_string(options):
This will quote the values, in case spaces are included.
Any values that are None are excluded entirely.
- Usage:
+ Usage::
+
build_option_string({
"--email": "me@example.com",
"--name": "example.com."
@@ -40,7 +41,8 @@ def build_option_string(options):
})
- Returns:
+ Returns::
+
"--email 'me@example.com' --name 'example.com.'
"""
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
are included in the returned string.
- Usage:
+ Usage::
+
build_flags_string({
'--no-ttl': True,
'--no-name': False,
'--verbose': True,
})
- Returns:
+ Returns::
+
'--no-ttl --verbose'
"""
flags = {flag: is_set for flag, is_set in flags.items() if is_set}
diff --git a/designateclient/utils.py b/designateclient/utils.py
index b7bccf3..ff81f9b 100644
--- a/designateclient/utils.py
+++ b/designateclient/utils.py
@@ -179,11 +179,13 @@ def find_resourceid_by_name_or_id(resource_client, name_or_id):
class AdapterWithTimeout(adapter.Adapter):
"""adapter.Adapter wraps around a Session.
+
The user can pass a timeout keyword that will apply only to
the Designate Client, in order:
- - timeout keyword passed to request()
- - timeout keyword passed to AdapterWithTimeout()
- - timeout attribute on keystone session
+
+ - timeout keyword passed to ``request()``
+ - timeout keyword passed to ``AdapterWithTimeout()``
+ - timeout attribute on keystone session
"""
def __init__(self, *args, **kw):
self.timeout = kw.pop('timeout', None)
diff --git a/designateclient/v1/domains.py b/designateclient/v1/domains.py
index f1c233d..2b556a5 100644
--- a/designateclient/v1/domains.py
+++ b/designateclient/v1/domains.py
@@ -29,7 +29,7 @@ class DomainsController(client.CrudController):
"""
Retrieve a list of domains
- :returns: A list of :class:`Domain`s
+ :returns: A list of :class:`Domain`
"""
response = self.client.get('/domains')
@@ -85,7 +85,7 @@ class DomainsController(client.CrudController):
Retrieve the list of nameservers for a domain
: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)
diff --git a/designateclient/v1/records.py b/designateclient/v1/records.py
index 5b1292c..cd699a7 100644
--- a/designateclient/v1/records.py
+++ b/designateclient/v1/records.py
@@ -31,7 +31,7 @@ class RecordsController(client.CrudController):
Retrieve a list of records
: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
diff --git a/designateclient/v1/servers.py b/designateclient/v1/servers.py
index 6c98f66..9d77e8b 100644
--- a/designateclient/v1/servers.py
+++ b/designateclient/v1/servers.py
@@ -29,7 +29,7 @@ class ServersController(client.CrudController):
"""
Retrieve a list of servers
- :returns: A list of :class:`Server`s
+ :returns: A list of :class:`Server`
"""
response = self.client.get('/servers')
diff --git a/designateclient/v2/client.py b/designateclient/v2/client.py
index 5b22206..d5dda03 100644
--- a/designateclient/v2/client.py
+++ b/designateclient/v2/client.py
@@ -33,12 +33,13 @@ from designateclient import version
class DesignateAdapter(adapter.LegacyJsonAdapter):
- """
- Adapter around LegacyJsonAdapter.
+ """Adapter around LegacyJsonAdapter.
+
The user can pass a timeout keyword that will apply only to
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):
self.timeout = kwargs.pop('timeout', None)
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 4062a73..cabe976 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -33,6 +33,7 @@ Contents
shell-examples
contributing
functional-tests
+ api/autoindex
Indices and tables
==================
diff --git a/setup.cfg b/setup.cfg
index 15be89b..89058e0 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -149,7 +149,8 @@ openstack.dns.v2 =
[build_sphinx]
builders = html,man
-all_files = 1
+all-files = 1
+warning-is-error = 1
build-dir = doc/build
source-dir = doc/source
@@ -177,4 +178,3 @@ universal = 1
[pbr]
autodoc_index_modules = True
-warnerrors = True