Fix some reST field lists in docstrings
Probably the most common format for documenting arguments is reST field lists [1]. This change updates some docstrings to comply with the field lists syntax. [1] http://sphinx-doc.org/domains.html#info-field-lists Change-Id: I8fb91bcb8ae4bfbfa68ddf7c38a4f1f5cf548b36
This commit is contained in:
parent
f6546bcb1d
commit
c5f5bd0c4f
neutron
@ -257,9 +257,10 @@ class DelayedStringRenderer(object):
|
||||
|
||||
def load_class_by_alias_or_classname(namespace, name):
|
||||
"""Load class using stevedore alias or the class name
|
||||
|
||||
:param namespace: namespace where the alias is defined
|
||||
:param name: alias or class name of the class to be loaded
|
||||
:returns class if calls can be loaded
|
||||
:returns: class if calls can be loaded
|
||||
:raises ImportError if class cannot be loaded
|
||||
"""
|
||||
|
||||
|
@ -161,7 +161,7 @@ class DVRDbMixin(ext_dvr.DVRMacAddressPluginBase):
|
||||
:param context: rpc request context
|
||||
:param host: host id to match and extract ports of interest
|
||||
:param subnet: subnet id to match and extract ports of interest
|
||||
:returns list -- Ports on the given subnet in the input host
|
||||
:returns: list -- Ports on the given subnet in the input host
|
||||
"""
|
||||
filters = {'fixed_ips': {'subnet_id': [subnet]},
|
||||
portbindings.HOST_ID: [host]}
|
||||
|
@ -146,10 +146,11 @@ class NeutronManager(object):
|
||||
@staticmethod
|
||||
def load_class_for_provider(namespace, plugin_provider):
|
||||
"""Loads plugin using alias or class name
|
||||
|
||||
:param namespace: namespace where alias is defined
|
||||
:param plugin_provider: plugin alias or class name
|
||||
:returns plugin that is loaded
|
||||
:raises ImportError if fails to load plugin
|
||||
:returns: plugin that is loaded
|
||||
:raises ImportError: if fails to load plugin
|
||||
"""
|
||||
|
||||
try:
|
||||
|
@ -42,7 +42,7 @@ class _TypeDriverBase(object):
|
||||
def get_type(self):
|
||||
"""Get driver's network type.
|
||||
|
||||
:returns network_type value handled by this driver
|
||||
:returns: network_type value handled by this driver
|
||||
"""
|
||||
pass
|
||||
|
||||
|
@ -61,47 +61,47 @@ class _TunnelTypeDriverBase(helpers.SegmentTypeDriver):
|
||||
def add_endpoint(self, ip, host):
|
||||
"""Register the endpoint in the type_driver database.
|
||||
|
||||
param ip: the IP address of the endpoint
|
||||
param host: the Host name of the endpoint
|
||||
:param ip: the IP address of the endpoint
|
||||
:param host: the Host name of the endpoint
|
||||
"""
|
||||
|
||||
@abc.abstractmethod
|
||||
def get_endpoints(self):
|
||||
"""Get every endpoint managed by the type_driver
|
||||
|
||||
:returns a list of dict [{ip_address:endpoint_ip, host:endpoint_host},
|
||||
..]
|
||||
:returns: a list of dict [{ip_address:endpoint_ip, host:endpoint_host},
|
||||
..]
|
||||
"""
|
||||
|
||||
@abc.abstractmethod
|
||||
def get_endpoint_by_host(self, host):
|
||||
"""Get endpoint for a given host managed by the type_driver
|
||||
|
||||
param host: the Host name of the endpoint
|
||||
:param host: the Host name of the endpoint
|
||||
|
||||
if host found in type_driver database
|
||||
:returns db object for that particular host
|
||||
:returns: db object for that particular host
|
||||
else
|
||||
:returns None
|
||||
:returns: None
|
||||
"""
|
||||
|
||||
@abc.abstractmethod
|
||||
def get_endpoint_by_ip(self, ip):
|
||||
"""Get endpoint for a given tunnel ip managed by the type_driver
|
||||
|
||||
param ip: the IP address of the endpoint
|
||||
:param ip: the IP address of the endpoint
|
||||
|
||||
if ip found in type_driver database
|
||||
:returns db object for that particular ip
|
||||
:returns: db object for that particular ip
|
||||
else
|
||||
:returns None
|
||||
:returns: None
|
||||
"""
|
||||
|
||||
@abc.abstractmethod
|
||||
def delete_endpoint(self, ip):
|
||||
"""Delete the endpoint in the type_driver database.
|
||||
|
||||
param ip: the IP address of the endpoint
|
||||
:param ip: the IP address of the endpoint
|
||||
"""
|
||||
|
||||
@abc.abstractmethod
|
||||
@ -111,8 +111,8 @@ class _TunnelTypeDriverBase(helpers.SegmentTypeDriver):
|
||||
This function will delete any endpoint matching the specified
|
||||
ip or host.
|
||||
|
||||
param host: the host name of the endpoint
|
||||
param ip: the IP address of the endpoint
|
||||
:param host: the host name of the endpoint
|
||||
:param ip: the IP address of the endpoint
|
||||
"""
|
||||
|
||||
def _initialize(self, raw_tunnel_ranges):
|
||||
|
@ -192,7 +192,7 @@ class DNSExtensionDriver(api.ExtensionDriver):
|
||||
|
||||
:param context: plugin request context
|
||||
:param network: network dictionary
|
||||
:return True or False
|
||||
:return: True or False
|
||||
"""
|
||||
pass
|
||||
|
||||
|
@ -212,7 +212,7 @@ class ResourceRegistry(object):
|
||||
"""Find out if a resource if tracked or not.
|
||||
|
||||
:param resource_name: name of the resource.
|
||||
:returns True if resource_name is registered and tracked, otherwise
|
||||
:returns: True if resource_name is registered and tracked, otherwise
|
||||
False. Please note that here when False it returned it
|
||||
simply means that resource_name is not a TrackedResource
|
||||
instance, it does not necessarily mean that the resource
|
||||
|
@ -305,7 +305,7 @@ class BaseTestCase(DietTestCase):
|
||||
def get_new_temp_dir(self):
|
||||
"""Create a new temporary directory.
|
||||
|
||||
:returns fixtures.TempDir
|
||||
:returns: fixtures.TempDir
|
||||
"""
|
||||
return self.useFixture(fixtures.TempDir())
|
||||
|
||||
@ -314,7 +314,7 @@ class BaseTestCase(DietTestCase):
|
||||
|
||||
Returns the same directory during the whole test case.
|
||||
|
||||
:returns fixtures.TempDir
|
||||
:returns: fixtures.TempDir
|
||||
"""
|
||||
if not hasattr(self, '_temp_dir'):
|
||||
self._temp_dir = self.get_new_temp_dir()
|
||||
@ -333,7 +333,7 @@ class BaseTestCase(DietTestCase):
|
||||
:type filename: string
|
||||
:param root: temporary directory to create a new file in
|
||||
:type root: fixtures.TempDir
|
||||
:returns absolute file path string
|
||||
:returns: absolute file path string
|
||||
"""
|
||||
root = root or self.get_default_temp_dir()
|
||||
return root.join(filename)
|
||||
|
@ -410,7 +410,7 @@ class RequestDeserializer(object):
|
||||
"""Extract necessary pieces of the request.
|
||||
|
||||
:param request: Request object
|
||||
:returns tuple of expected controller action name, dictionary of
|
||||
:returns: tuple of expected controller action name, dictionary of
|
||||
keyword arguments to pass to the controller, the expected
|
||||
content type of the response
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user