Merge "Fix some reST field lists in docstrings"
This commit is contained in:
commit
41d0862ec2
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user