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: I8939994be1144de3ebdc6bfa3b414f9615f621dd
This commit is contained in:
parent
90caa7c75e
commit
fddef7bbec
|
@ -102,9 +102,9 @@ class InstanceStatesController(InstanceControllerBase):
|
|||
:param instance_uuid: the UUID of a instance.
|
||||
:param target: the desired target to change power state,
|
||||
on, off or reboot.
|
||||
:raises: Conflict (HTTP 409) if a power operation is
|
||||
:raises Conflict (HTTP 409): if a power operation is
|
||||
already in progress.
|
||||
:raises: BadRequest (HTTP 400) if the requested target
|
||||
:raises BadRequest (HTTP 400): if the requested target
|
||||
state is not valid or if the instance is in CLEANING state.
|
||||
|
||||
"""
|
||||
|
|
|
@ -29,7 +29,7 @@ def check_schema(body, schema):
|
|||
include the required information.
|
||||
|
||||
:param body: create body
|
||||
:raises: InvalidParameterValue if validation of create body fails.
|
||||
:raises InvalidParameterValue: if validation of create body fails.
|
||||
"""
|
||||
validator = jsonschema.Draft4Validator(
|
||||
schema, format_checker=jsonschema.FormatChecker())
|
||||
|
|
|
@ -61,7 +61,7 @@ class FSM(machines.FiniteMachine):
|
|||
"""Is the state stable?
|
||||
|
||||
:param state: the state of interest
|
||||
:raises: InvalidState if the state is invalid
|
||||
:raises InvalidState: if the state is invalid
|
||||
:returns: True if it is a stable state; False otherwise
|
||||
"""
|
||||
try:
|
||||
|
@ -106,7 +106,7 @@ class FSM(machines.FiniteMachine):
|
|||
A target state must be a valid state that is 'stable'.
|
||||
|
||||
:param target: The target state
|
||||
:raises: exception.InvalidState if it is an invalid target state
|
||||
:raises exception.InvalidState: if it is an invalid target state
|
||||
"""
|
||||
if target is None:
|
||||
return
|
||||
|
|
|
@ -93,7 +93,7 @@ class IronicClientWrapper(object):
|
|||
:param attr: Path of final attribute to get. E.g., "a.b.c.d"
|
||||
|
||||
:returns: The value of the final named attribute.
|
||||
:raises: AttributeError will be raised if the path is invalid.
|
||||
:raises AttributeError: will be raised if the path is invalid.
|
||||
"""
|
||||
for attribute in attr.split("."):
|
||||
obj = getattr(obj, attribute)
|
||||
|
|
|
@ -69,7 +69,7 @@ def validate_and_normalize_mac(address):
|
|||
|
||||
:param address: MAC address to be validated and normalized.
|
||||
:returns: Normalized and validated MAC address.
|
||||
:raises: InvalidMAC If the MAC address is not valid.
|
||||
:raises InvalidMAC: If the MAC address is not valid.
|
||||
|
||||
"""
|
||||
if not is_valid_mac(address):
|
||||
|
|
|
@ -48,7 +48,7 @@ class BaseEngineManager(periodic_task.PeriodicTasks):
|
|||
"""Initialize the engine host.
|
||||
|
||||
:param admin_context: the admin context to pass to periodic tasks.
|
||||
:raises: RuntimeError when engine is already running.
|
||||
:raises RuntimeError: when engine is already running.
|
||||
"""
|
||||
if self._started:
|
||||
raise RuntimeError(_('Attempt to start an already running '
|
||||
|
|
Loading…
Reference in New Issue