Merge "Fix docstring warnings"

This commit is contained in:
Jenkins 2016-07-14 21:56:34 +00:00 committed by Gerrit Code Review
commit 9882661fbf
8 changed files with 50 additions and 47 deletions

View File

@ -70,7 +70,7 @@ class FSM(machines.FiniteMachine):
:param state: the state of interest
:raises: InvalidState if the state is invalid
:returns True if it is a stable state; False otherwise
:returns: True if it is a stable state; False otherwise
"""
try:
return self._states[state]['stable']

View File

@ -2146,7 +2146,7 @@ class ConductorManager(base_manager.BaseConductorManager):
:param args: The positional arguments to the action method
:param kwargs: The keyword arguments to the action method
:returns: The result of the action method, which may (or may not)
be an instance of the implementing VersionedObject class.
be an instance of the implementing VersionedObject class.
"""
objclass = objects_base.IronicObject.obj_class_from_name(
objname, object_versions[objname])

View File

@ -92,25 +92,26 @@ class NeutronDHCPApi(base.BaseDHCP):
:param task: A TaskManager instance.
:param options: this will be a list of dicts, e.g.
::
::
[{'opt_name': 'bootfile-name',
'opt_value': 'pxelinux.0'},
{'opt_name': 'server-ip-address',
'opt_value': '123.123.123.456'},
{'opt_name': 'tftp-server',
'opt_value': '123.123.123.123'}]
[{'opt_name': 'bootfile-name',
'opt_value': 'pxelinux.0'},
{'opt_name': 'server-ip-address',
'opt_value': '123.123.123.456'},
{'opt_name': 'tftp-server',
'opt_value': '123.123.123.123'}]
:param vifs: a dict of Neutron port/portgroup dicts
to update DHCP options on. The port/portgroup dict key
should be Ironic port UUIDs, and the values should be
Neutron port UUIDs, e.g.
to update DHCP options on. The port/portgroup dict
key should be Ironic port UUIDs, and the values
should be Neutron port UUIDs, e.g.
::
::
{'ports': {'port.uuid': vif.id},
'portgroups': {'portgroup.uuid': vif.id}}
If the value is None, will get the list of ports/portgroups
from the Ironic port/portgroup objects.
{'ports': {'port.uuid': vif.id},
'portgroups': {'portgroup.uuid': vif.id}}
If the value is None, will get the list of
ports/portgroups from the Ironic port/portgroup
objects.
"""
if vifs is None:
vifs = network.get_node_vif_ids(task)
@ -202,7 +203,7 @@ class NeutronDHCPApi(base.BaseDHCP):
:param p_obj: Ironic port or portgroup object.
:param client: Neutron client instance.
:returns: List of Neutron vif ip address associated with
Node's port/portgroup.
Node's port/portgroup.
:raises: FailedToGetIPAddressOnPort
:raises: InvalidIPv4Address
"""

View File

@ -139,8 +139,8 @@ class AgentClient(object):
:param iqn: iSCSI target IQN
:param portal_port: iSCSI portal port
:param wipe_disk_metadata: True if the agent should wipe first the
disk magic strings like the partition table, RAID or filesystem
signature.
disk magic strings like the partition
table, RAID or filesystem signature.
"""
params = {'iqn': iqn}
# This is to workaround passing default values to an old ramdisk

View File

@ -156,11 +156,11 @@ class DracManagement(base.ManagementInterface):
:param task: a TaskManager instance containing the node to act on.
:raises: DracOperationError on an error from python-dracclient.
:returns: a dictionary containing:
:boot_device: the boot device, one of
:mod:`ironic.common.boot_devices` or None if it is unknown.
:persistent: whether the boot device will persist to all
future boots or not, None if it is unknown.
:persistent: whether the boot device will persist to all future
boots or not, None if it is unknown.
"""
node = task.node
@ -214,6 +214,5 @@ class DracManagement(base.ManagementInterface):
:raises: FailedToParseSensorData when parsing sensor data fails.
:returns: returns a consistent format dict of sensor data grouped by
sensor type, which can be processed by Ceilometer.
"""
raise NotImplementedError()

View File

@ -38,27 +38,28 @@ SC2.mib: sc2UnitNodeClass returns NIC type.
sc2UnitNodeClass OBJECT-TYPE
SYNTAX INTEGER
{
unknown(1),
primary(2),
secondary(3),
management-blade(4),
secondary-remote(5),
secondary-remote-backup(6),
baseboard-controller(7)
unknown(1),
primary(2),
secondary(3),
management-blade(4),
secondary-remote(5),
secondary-remote-backup(6),
baseboard-controller(7)
}
ACCESS read-only
STATUS mandatory
DESCRIPTION "Management node class:
primary: local operating system interface
secondary: local management controller LAN interface
management-blade: management blade interface (in a blade server
chassis)
secondary-remote: remote management controller (in an RSB
concentrator environment)
secondary-remote-backup: backup remote management controller
baseboard-controller: local baseboard management controller (BMC)"
primary: local operating system interface
secondary: local management controller LAN interface
management-blade: management blade interface (in a blade server
chassis)
secondary-remote: remote management controller (in an RSB
concentrator environment)
secondary-remote-backup: backup remote management controller
baseboard-controller: local baseboard management controller (BMC)"
::= { sc2ManagementNodes 8 }
"""
NODE_CLASS_OID_VALUE = {
'unknown': 1,
'primary': 2,
@ -81,6 +82,7 @@ sc2UnitNodeMacAddress OBJECT-TYPE
DESCRIPTION "Management node hardware (MAC) address"
::= { sc2ManagementNodes 9 }
"""
MAC_ADDRESS_OID = '1.3.6.1.4.1.231.2.10.2.2.10.3.1.1.9.1'
@ -111,10 +113,10 @@ def _inspect_hardware(node):
:param node: node object.
:raises: HardwareInspectionFailure, if unable to get essential
hardware properties.
hardware properties.
:returns: a pair of dictionary and list, the dictionary contains
keys as in IRMCInspect.ESSENTIAL_PROPERTIES and its inspected
values, the list contains mac addresses.
keys as in IRMCInspect.ESSENTIAL_PROPERTIES and its inspected
values, the list contains mac addresses.
"""
try:
report = irmc_common.get_irmc_report(node)

View File

@ -50,7 +50,7 @@ class OneViewPower(base.PowerInterface):
:param task: a task from TaskManager.
:raises: MissingParameterValue if a required parameter is missing.
:raises: InvalidParameterValue if parameters set are inconsistent with
resources in OneView
resources in OneView
"""
common.verify_node_info(task.node)
@ -65,9 +65,9 @@ class OneViewPower(base.PowerInterface):
:param task: a TaskManager instance.
:param node: The Node.
:returns: one of :mod:`ironic.common.states` POWER_OFF,
POWER_ON or ERROR.
POWER_ON or ERROR.
:raises: OneViewError if fails to retrieve power state of OneView
resource
resource
"""
oneview_info = common.get_oneview_info(task.node)
@ -90,7 +90,7 @@ class OneViewPower(base.PowerInterface):
:param task: a TaskManager instance.
:param node: The Node.
:param power_state: The desired power state POWER_ON, POWER_OFF or
REBOOT from :mod:`ironic.common.states`.
REBOOT from :mod:`ironic.common.states`.
:raises: InvalidParameterValue if an invalid power state was specified.
:raises: PowerStateFailure if the power couldn't be set to power_state.
:raises: OneViewError if OneView fails setting the power state.
@ -127,7 +127,7 @@ class OneViewPower(base.PowerInterface):
:param task: a TaskManager instance.
:param node: The Node.
:raises: PowerStateFailure if the final state of the node is not
POWER_ON.
POWER_ON.
"""
self.set_power_state(task, states.REBOOT)

View File

@ -103,6 +103,7 @@ autodoc_index_modules = True
autodoc_exclude_modules =
ironic.db.sqlalchemy.alembic.env
ironic.db.sqlalchemy.alembic.versions.*
warnerrors = True
[build_sphinx]
all_files = 1