diff --git a/heat/common/config.py b/heat/common/config.py index 0f9b845550..b33516dc01 100644 --- a/heat/common/config.py +++ b/heat/common/config.py @@ -474,7 +474,7 @@ def load_paste_app(app_name=None): :param app_name: name of the application to load - :raises RuntimeError when config file cannot be located or application + :raises RuntimeError: when config file cannot be located or application cannot be loaded from config file """ if app_name is None: diff --git a/heat/common/crypt.py b/heat/common/crypt.py index aef99ae401..b3afc77614 100644 --- a/heat/common/crypt.py +++ b/heat/common/crypt.py @@ -65,7 +65,7 @@ class SymmetricCrypto(object): :param key: The Encryption key. :param msg: the ciphetext, the first block is the IV - :returns plain: the plaintext message, after padding is removed. + :returns: the plaintext message, after padding is removed. """ key = str.encode(get_valid_encryption_key(key)) if b64decode: diff --git a/heat/common/policy.py b/heat/common/policy.py index 821a1f9e41..4707c96735 100644 --- a/heat/common/policy.py +++ b/heat/common/policy.py @@ -68,7 +68,8 @@ class Enforcer(object): :param context: Heat request context :param rule: String representing the action to be checked :param target: Dictionary representing the object of the action. - :raises: self.exc (defaults to heat.common.exception.Forbidden) + :raises heat.common.exception.Forbidden: When permission is denied + (or self.exc if supplied). :returns: A non-False value if access is allowed. """ do_raise = False if not exc else True @@ -95,7 +96,8 @@ class Enforcer(object): :param context: Heat request context :param action: String representing the action to be checked :param target: Dictionary representing the object of the action. - :raises: self.exc (defaults to heat.common.exception.Forbidden) + :raises heat.common.exception.Forbidden: When permission is denied + (or self.exc if supplied). :returns: A non-False value if access is allowed. """ _action = '%s:%s' % (scope or self.scope, action) diff --git a/heat/common/wsgi.py b/heat/common/wsgi.py index 7bba27abbf..738bd93637 100644 --- a/heat/common/wsgi.py +++ b/heat/common/wsgi.py @@ -237,7 +237,7 @@ def get_socket(conf, default_port): :param conf: a cfg.ConfigOpts object :param default_port: port to bind to if none is specified in conf - :returns : a socket object as returned from socket.listen or + :returns: a socket object as returned from socket.listen or ssl.wrap_socket if conf specifies cert_file """ bind_addr = get_bind_addr(conf, default_port) diff --git a/heat/engine/clients/os/manila.py b/heat/engine/clients/os/manila.py index 90c17046bf..15f612e635 100644 --- a/heat/engine/clients/os/manila.py +++ b/heat/engine/clients/os/manila.py @@ -60,7 +60,8 @@ class ManilaClientPlugin(client_plugin.ClientPlugin): :param resource_list: list of resources :param resource_type_name: name of resource type that will be used for exceptions - :raises EntityNotFound, NoUniqueMatch + :raises EntityNotFound: if cannot find resource by name + :raises NoUniqueMatch: if find more than one resource by ambiguous name :return: resource or generate an exception otherwise """ search_result_by_id = [res for res in resource_list diff --git a/heat/engine/clients/os/nova.py b/heat/engine/clients/os/nova.py index 80efb84b20..ca56d4c4ad 100644 --- a/heat/engine/clients/os/nova.py +++ b/heat/engine/clients/os/nova.py @@ -279,7 +279,7 @@ class NovaClientPlugin(client_plugin.ClientPlugin): :param host_name: the name of host to find :returns: the list of match hosts - :raises: exception.EntityNotFound + :raises exception.EntityNotFound: """ host_list = self.client().hosts.list() @@ -294,7 +294,7 @@ class NovaClientPlugin(client_plugin.ClientPlugin): :param key_name: the name of the key to look for :returns: the keypair (name, public_key) for :key_name: - :raises: exception.EntityNotFound + :raises exception.EntityNotFound: """ try: return self.client().keypairs.get(key_name) diff --git a/heat/engine/clients/os/sahara.py b/heat/engine/clients/os/sahara.py index 390f00f7fa..0718fc877e 100644 --- a/heat/engine/clients/os/sahara.py +++ b/heat/engine/clients/os/sahara.py @@ -77,8 +77,8 @@ class SaharaClientPlugin(client_plugin.ClientPlugin): :param resource_name: API name of entity :param value: ID or name of entity :returns: the id of the requested :value: - :raises: exception.EntityNotFound, - exception.PhysicalResourceNameAmbiguity + :raises exception.EntityNotFound: + :raises exception.PhysicalResourceNameAmbiguity: """ try: entity = getattr(self.client(), resource_name) @@ -91,8 +91,8 @@ class SaharaClientPlugin(client_plugin.ClientPlugin): :param image_identifier: image name or a UUID-like identifier :returns: the id of the requested :image_identifier: - :raises: exception.EntityNotFound, - exception.PhysicalResourceNameAmbiguity + :raises exception.EntityNotFound: + :raises exception.PhysicalResourceNameAmbiguity: """ # leave this method for backward compatibility try: @@ -104,8 +104,8 @@ class SaharaClientPlugin(client_plugin.ClientPlugin): def find_resource_by_name(self, resource_name, value): """Return the ID for the specified entity name. - :raises: exception.EntityNotFound, - exception.PhysicalResourceNameAmbiguity + :raises exception.EntityNotFound: + :raises exception.PhysicalResourceNameAmbiguity: """ try: filters = {'name': value} @@ -131,7 +131,7 @@ class SaharaClientPlugin(client_plugin.ClientPlugin): :param plugin_name: the name of the plugin to find :returns: the id of :plugin: - :raises: exception.EntityNotFound + :raises exception.EntityNotFound: """ try: self.client().plugins.get(plugin_name)