diff --git a/neutron/common/utils.py b/neutron/common/utils.py index e84ae3b63a1..a05a81d98bf 100644 --- a/neutron/common/utils.py +++ b/neutron/common/utils.py @@ -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 """ diff --git a/neutron/db/dvr_mac_db.py b/neutron/db/dvr_mac_db.py index d93d518a2ee..f03e17189d5 100644 --- a/neutron/db/dvr_mac_db.py +++ b/neutron/db/dvr_mac_db.py @@ -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]} diff --git a/neutron/manager.py b/neutron/manager.py index cd0f0f8502e..34ebeb42700 100644 --- a/neutron/manager.py +++ b/neutron/manager.py @@ -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: diff --git a/neutron/plugins/ml2/driver_api.py b/neutron/plugins/ml2/driver_api.py index 427cf655a44..cbc1444442e 100644 --- a/neutron/plugins/ml2/driver_api.py +++ b/neutron/plugins/ml2/driver_api.py @@ -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 diff --git a/neutron/plugins/ml2/drivers/type_tunnel.py b/neutron/plugins/ml2/drivers/type_tunnel.py index eaee5f37032..3e8974f7ac6 100644 --- a/neutron/plugins/ml2/drivers/type_tunnel.py +++ b/neutron/plugins/ml2/drivers/type_tunnel.py @@ -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): diff --git a/neutron/plugins/ml2/extensions/dns_integration.py b/neutron/plugins/ml2/extensions/dns_integration.py index 4fba50a5011..67de1d347b9 100644 --- a/neutron/plugins/ml2/extensions/dns_integration.py +++ b/neutron/plugins/ml2/extensions/dns_integration.py @@ -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 diff --git a/neutron/quota/resource_registry.py b/neutron/quota/resource_registry.py index 3a072ca3dfd..f8adb6a9477 100644 --- a/neutron/quota/resource_registry.py +++ b/neutron/quota/resource_registry.py @@ -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 diff --git a/neutron/tests/base.py b/neutron/tests/base.py index fab83b84be0..5a70b9896e1 100644 --- a/neutron/tests/base.py +++ b/neutron/tests/base.py @@ -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) diff --git a/neutron/wsgi.py b/neutron/wsgi.py index 08e43a145d7..8c30064fe00 100644 --- a/neutron/wsgi.py +++ b/neutron/wsgi.py @@ -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