Merge "Fix docstring warnings"
This commit is contained in:
commit
9882661fbf
@ -70,7 +70,7 @@ class FSM(machines.FiniteMachine):
|
|||||||
|
|
||||||
:param state: the state of interest
|
: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
|
:returns: True if it is a stable state; False otherwise
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
return self._states[state]['stable']
|
return self._states[state]['stable']
|
||||||
|
@ -2146,7 +2146,7 @@ class ConductorManager(base_manager.BaseConductorManager):
|
|||||||
:param args: The positional arguments to the action method
|
:param args: The positional arguments to the action method
|
||||||
:param kwargs: The keyword 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)
|
: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(
|
objclass = objects_base.IronicObject.obj_class_from_name(
|
||||||
objname, object_versions[objname])
|
objname, object_versions[objname])
|
||||||
|
@ -92,25 +92,26 @@ class NeutronDHCPApi(base.BaseDHCP):
|
|||||||
:param task: A TaskManager instance.
|
:param task: A TaskManager instance.
|
||||||
:param options: this will be a list of dicts, e.g.
|
:param options: this will be a list of dicts, e.g.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
[{'opt_name': 'bootfile-name',
|
[{'opt_name': 'bootfile-name',
|
||||||
'opt_value': 'pxelinux.0'},
|
'opt_value': 'pxelinux.0'},
|
||||||
{'opt_name': 'server-ip-address',
|
{'opt_name': 'server-ip-address',
|
||||||
'opt_value': '123.123.123.456'},
|
'opt_value': '123.123.123.456'},
|
||||||
{'opt_name': 'tftp-server',
|
{'opt_name': 'tftp-server',
|
||||||
'opt_value': '123.123.123.123'}]
|
'opt_value': '123.123.123.123'}]
|
||||||
:param vifs: a dict of Neutron port/portgroup dicts
|
:param vifs: a dict of Neutron port/portgroup dicts
|
||||||
to update DHCP options on. The port/portgroup dict key
|
to update DHCP options on. The port/portgroup dict
|
||||||
should be Ironic port UUIDs, and the values should be
|
key should be Ironic port UUIDs, and the values
|
||||||
Neutron port UUIDs, e.g.
|
should be Neutron port UUIDs, e.g.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
{'ports': {'port.uuid': vif.id},
|
{'ports': {'port.uuid': vif.id},
|
||||||
'portgroups': {'portgroup.uuid': vif.id}}
|
'portgroups': {'portgroup.uuid': vif.id}}
|
||||||
If the value is None, will get the list of ports/portgroups
|
If the value is None, will get the list of
|
||||||
from the Ironic port/portgroup objects.
|
ports/portgroups from the Ironic port/portgroup
|
||||||
|
objects.
|
||||||
"""
|
"""
|
||||||
if vifs is None:
|
if vifs is None:
|
||||||
vifs = network.get_node_vif_ids(task)
|
vifs = network.get_node_vif_ids(task)
|
||||||
@ -202,7 +203,7 @@ class NeutronDHCPApi(base.BaseDHCP):
|
|||||||
:param p_obj: Ironic port or portgroup object.
|
:param p_obj: Ironic port or portgroup object.
|
||||||
:param client: Neutron client instance.
|
:param client: Neutron client instance.
|
||||||
:returns: List of Neutron vif ip address associated with
|
:returns: List of Neutron vif ip address associated with
|
||||||
Node's port/portgroup.
|
Node's port/portgroup.
|
||||||
:raises: FailedToGetIPAddressOnPort
|
:raises: FailedToGetIPAddressOnPort
|
||||||
:raises: InvalidIPv4Address
|
:raises: InvalidIPv4Address
|
||||||
"""
|
"""
|
||||||
|
@ -139,8 +139,8 @@ class AgentClient(object):
|
|||||||
:param iqn: iSCSI target IQN
|
:param iqn: iSCSI target IQN
|
||||||
:param portal_port: iSCSI portal port
|
:param portal_port: iSCSI portal port
|
||||||
:param wipe_disk_metadata: True if the agent should wipe first the
|
:param wipe_disk_metadata: True if the agent should wipe first the
|
||||||
disk magic strings like the partition table, RAID or filesystem
|
disk magic strings like the partition
|
||||||
signature.
|
table, RAID or filesystem signature.
|
||||||
"""
|
"""
|
||||||
params = {'iqn': iqn}
|
params = {'iqn': iqn}
|
||||||
# This is to workaround passing default values to an old ramdisk
|
# This is to workaround passing default values to an old ramdisk
|
||||||
|
@ -156,11 +156,11 @@ class DracManagement(base.ManagementInterface):
|
|||||||
:param task: a TaskManager instance containing the node to act on.
|
:param task: a TaskManager instance containing the node to act on.
|
||||||
:raises: DracOperationError on an error from python-dracclient.
|
:raises: DracOperationError on an error from python-dracclient.
|
||||||
:returns: a dictionary containing:
|
:returns: a dictionary containing:
|
||||||
|
|
||||||
:boot_device: the boot device, one of
|
:boot_device: the boot device, one of
|
||||||
:mod:`ironic.common.boot_devices` or None if it is unknown.
|
:mod:`ironic.common.boot_devices` or None if it is unknown.
|
||||||
:persistent: whether the boot device will persist to all
|
:persistent: whether the boot device will persist to all future
|
||||||
future boots or not, None if it is unknown.
|
boots or not, None if it is unknown.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
node = task.node
|
node = task.node
|
||||||
|
|
||||||
@ -214,6 +214,5 @@ class DracManagement(base.ManagementInterface):
|
|||||||
:raises: FailedToParseSensorData when parsing sensor data fails.
|
:raises: FailedToParseSensorData when parsing sensor data fails.
|
||||||
:returns: returns a consistent format dict of sensor data grouped by
|
:returns: returns a consistent format dict of sensor data grouped by
|
||||||
sensor type, which can be processed by Ceilometer.
|
sensor type, which can be processed by Ceilometer.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
@ -38,27 +38,28 @@ SC2.mib: sc2UnitNodeClass returns NIC type.
|
|||||||
sc2UnitNodeClass OBJECT-TYPE
|
sc2UnitNodeClass OBJECT-TYPE
|
||||||
SYNTAX INTEGER
|
SYNTAX INTEGER
|
||||||
{
|
{
|
||||||
unknown(1),
|
unknown(1),
|
||||||
primary(2),
|
primary(2),
|
||||||
secondary(3),
|
secondary(3),
|
||||||
management-blade(4),
|
management-blade(4),
|
||||||
secondary-remote(5),
|
secondary-remote(5),
|
||||||
secondary-remote-backup(6),
|
secondary-remote-backup(6),
|
||||||
baseboard-controller(7)
|
baseboard-controller(7)
|
||||||
}
|
}
|
||||||
ACCESS read-only
|
ACCESS read-only
|
||||||
STATUS mandatory
|
STATUS mandatory
|
||||||
DESCRIPTION "Management node class:
|
DESCRIPTION "Management node class:
|
||||||
primary: local operating system interface
|
primary: local operating system interface
|
||||||
secondary: local management controller LAN interface
|
secondary: local management controller LAN interface
|
||||||
management-blade: management blade interface (in a blade server
|
management-blade: management blade interface (in a blade server
|
||||||
chassis)
|
chassis)
|
||||||
secondary-remote: remote management controller (in an RSB
|
secondary-remote: remote management controller (in an RSB
|
||||||
concentrator environment)
|
concentrator environment)
|
||||||
secondary-remote-backup: backup remote management controller
|
secondary-remote-backup: backup remote management controller
|
||||||
baseboard-controller: local baseboard management controller (BMC)"
|
baseboard-controller: local baseboard management controller (BMC)"
|
||||||
::= { sc2ManagementNodes 8 }
|
::= { sc2ManagementNodes 8 }
|
||||||
"""
|
"""
|
||||||
|
|
||||||
NODE_CLASS_OID_VALUE = {
|
NODE_CLASS_OID_VALUE = {
|
||||||
'unknown': 1,
|
'unknown': 1,
|
||||||
'primary': 2,
|
'primary': 2,
|
||||||
@ -81,6 +82,7 @@ sc2UnitNodeMacAddress OBJECT-TYPE
|
|||||||
DESCRIPTION "Management node hardware (MAC) address"
|
DESCRIPTION "Management node hardware (MAC) address"
|
||||||
::= { sc2ManagementNodes 9 }
|
::= { sc2ManagementNodes 9 }
|
||||||
"""
|
"""
|
||||||
|
|
||||||
MAC_ADDRESS_OID = '1.3.6.1.4.1.231.2.10.2.2.10.3.1.1.9.1'
|
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.
|
:param node: node object.
|
||||||
:raises: HardwareInspectionFailure, if unable to get essential
|
:raises: HardwareInspectionFailure, if unable to get essential
|
||||||
hardware properties.
|
hardware properties.
|
||||||
:returns: a pair of dictionary and list, the dictionary contains
|
:returns: a pair of dictionary and list, the dictionary contains
|
||||||
keys as in IRMCInspect.ESSENTIAL_PROPERTIES and its inspected
|
keys as in IRMCInspect.ESSENTIAL_PROPERTIES and its inspected
|
||||||
values, the list contains mac addresses.
|
values, the list contains mac addresses.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
report = irmc_common.get_irmc_report(node)
|
report = irmc_common.get_irmc_report(node)
|
||||||
|
@ -50,7 +50,7 @@ class OneViewPower(base.PowerInterface):
|
|||||||
:param task: a task from TaskManager.
|
:param task: a task from TaskManager.
|
||||||
:raises: MissingParameterValue if a required parameter is missing.
|
:raises: MissingParameterValue if a required parameter is missing.
|
||||||
:raises: InvalidParameterValue if parameters set are inconsistent with
|
:raises: InvalidParameterValue if parameters set are inconsistent with
|
||||||
resources in OneView
|
resources in OneView
|
||||||
"""
|
"""
|
||||||
common.verify_node_info(task.node)
|
common.verify_node_info(task.node)
|
||||||
|
|
||||||
@ -65,9 +65,9 @@ class OneViewPower(base.PowerInterface):
|
|||||||
:param task: a TaskManager instance.
|
:param task: a TaskManager instance.
|
||||||
:param node: The Node.
|
:param node: The Node.
|
||||||
:returns: one of :mod:`ironic.common.states` POWER_OFF,
|
: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
|
:raises: OneViewError if fails to retrieve power state of OneView
|
||||||
resource
|
resource
|
||||||
"""
|
"""
|
||||||
|
|
||||||
oneview_info = common.get_oneview_info(task.node)
|
oneview_info = common.get_oneview_info(task.node)
|
||||||
@ -90,7 +90,7 @@ class OneViewPower(base.PowerInterface):
|
|||||||
:param task: a TaskManager instance.
|
:param task: a TaskManager instance.
|
||||||
:param node: The Node.
|
:param node: The Node.
|
||||||
:param power_state: The desired power state POWER_ON, POWER_OFF or
|
: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: InvalidParameterValue if an invalid power state was specified.
|
||||||
:raises: PowerStateFailure if the power couldn't be set to power_state.
|
:raises: PowerStateFailure if the power couldn't be set to power_state.
|
||||||
:raises: OneViewError if OneView fails setting the 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 task: a TaskManager instance.
|
||||||
:param node: The Node.
|
:param node: The Node.
|
||||||
:raises: PowerStateFailure if the final state of the node is not
|
:raises: PowerStateFailure if the final state of the node is not
|
||||||
POWER_ON.
|
POWER_ON.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.set_power_state(task, states.REBOOT)
|
self.set_power_state(task, states.REBOOT)
|
||||||
|
@ -103,6 +103,7 @@ autodoc_index_modules = True
|
|||||||
autodoc_exclude_modules =
|
autodoc_exclude_modules =
|
||||||
ironic.db.sqlalchemy.alembic.env
|
ironic.db.sqlalchemy.alembic.env
|
||||||
ironic.db.sqlalchemy.alembic.versions.*
|
ironic.db.sqlalchemy.alembic.versions.*
|
||||||
|
warnerrors = True
|
||||||
|
|
||||||
[build_sphinx]
|
[build_sphinx]
|
||||||
all_files = 1
|
all_files = 1
|
||||||
|
Loading…
Reference in New Issue
Block a user