Fix markup-related issues in documentation

This change fixes all markup mistakes in docstrings that lead to
warnings and errors during docs building.

Partial-bug: #1277282
Change-Id: I092a684b7587b802427d57f4292398bfd21deeb1
This commit is contained in:
Vladyslav Drok
2014-10-09 00:45:22 +03:00
parent 3d246ab432
commit 91fde155be
14 changed files with 175 additions and 125 deletions

View File

@@ -35,7 +35,7 @@ Software Requirements
^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^
- The PySNMP package must be installed, variously referred to as ``pysnmp`` - The PySNMP package must be installed, variously referred to as ``pysnmp``
or ``python-pysnmp`` or ``python-pysnmp``
Enabling the SNMP Power Driver Enabling the SNMP Power Driver
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -52,12 +52,12 @@ added to ``driver_info``:
- ``snmp_address``: the IPv4 address of the PDU controlling this node. - ``snmp_address``: the IPv4 address of the PDU controlling this node.
- ``snmp_port``: (optional) A non-standard UDP port to use for SNMP operations. - ``snmp_port``: (optional) A non-standard UDP port to use for SNMP operations.
If not specified, the default port (161) is used. If not specified, the default port (161) is used.
- ``snmp_outlet``: The power outlet on the PDU (1-based indexing). - ``snmp_outlet``: The power outlet on the PDU (1-based indexing).
- ``snmp_protocol``: (optional) SNMP protocol version - ``snmp_protocol``: (optional) SNMP protocol version
(permitted values ``1``, ``2c`` or ``3``). If not specified, SNMPv1 is chosen. (permitted values ``1``, ``2c`` or ``3``). If not specified, SNMPv1 is chosen.
- ``snmp_community``: (Required for SNMPv1 and SNMPv2c) SNMP community - ``snmp_community``: (Required for SNMPv1 and SNMPv2c) SNMP community
parameter for reads and writes to the PDU. parameter for reads and writes to the PDU.
- ``snmp_security``: (Required for SNMPv3) SNMP security string. - ``snmp_security``: (Required for SNMPv3) SNMP security string.
PDU Configuration PDU Configuration

View File

@@ -1,8 +1,8 @@
.. _api: .. _api:
=========== ===================
Ironic's API Server Ironic's API Server
=========== ===================
.. toctree:: .. toctree::
../api/ironic.api.hooks ../api/ironic.api.hooks

View File

@@ -80,12 +80,15 @@ class DHCPFactory(object):
:param task: A TaskManager instance. :param task: A TaskManager instance.
:param dhcp_opts: this will be a list of dicts, e.g. :param dhcp_opts: 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': 'bootfile-name',
{'opt_name': 'tftp-server', 'opt_value': 'pxelinux.0'},
'opt_value': '123.123.123.123'}] {'opt_name': 'server-ip-address',
'opt_value': '123.123.123.456'},
{'opt_name': 'tftp-server',
'opt_value': '123.123.123.123'}]
""" """
self.provider.update_dhcp_opts(task, dhcp_opts) self.provider.update_dhcp_opts(task, dhcp_opts)

View File

@@ -110,17 +110,17 @@ class GlanceImageService(base_image_service.BaseImageService,
an auth_token. an auth_token.
:param image_info: The return from a GET request to Glance for a :param image_info: The return from a GET request to Glance for a
certain image_id. Should be a dictionary, with keys like 'name' and certain image_id. Should be a dictionary, with keys like 'name' and
'checksum'. See 'checksum'. See
http://docs.openstack.org/developer/glance/glanceapi.html for http://docs.openstack.org/developer/glance/glanceapi.html for
examples. examples.
:returns: A signed Swift URL from which an image can be downloaded, :returns: A signed Swift URL from which an image can be downloaded,
without authentication. without authentication.
:raises: InvalidParameterValue if Swift config options are not set :raises: InvalidParameterValue if Swift config options are not set
correctly. correctly.
:raises: ImageUnacceptable if the image info from Glance does not :raises: ImageUnacceptable if the image info from Glance does not
have a image ID. have a image ID.
""" """
self._validate_temp_url_config() self._validate_temp_url_config()

View File

@@ -56,7 +56,8 @@ CONF.register_opts(hash_opts)
class HashRing(object): class HashRing(object):
"""A stable hash ring. """A stable hash ring.
We map item N to a host Y based on the closest lower hash We map item N to a host Y based on the closest lower hash:
- hash(item) -> partition - hash(item) -> partition
- hash(host) -> divider - hash(host) -> divider
- closest lower divider is the host to use - closest lower divider is the host to use

View File

@@ -35,29 +35,29 @@ class ConductorAPI(object):
API version history: API version history:
1.0 - Initial version. | 1.0 - Initial version.
Included get_node_power_status | Included get_node_power_status
1.1 - Added update_node and start_power_state_change. | 1.1 - Added update_node and start_power_state_change.
1.2 - Added vendor_passhthru. | 1.2 - Added vendor_passhthru.
1.3 - Rename start_power_state_change to change_node_power_state. | 1.3 - Rename start_power_state_change to change_node_power_state.
1.4 - Added do_node_deploy and do_node_tear_down. | 1.4 - Added do_node_deploy and do_node_tear_down.
1.5 - Added validate_driver_interfaces. | 1.5 - Added validate_driver_interfaces.
1.6 - change_node_power_state, do_node_deploy and do_node_tear_down | 1.6 - change_node_power_state, do_node_deploy and do_node_tear_down
accept node id instead of node object. | accept node id instead of node object.
1.7 - Added topic parameter to RPC methods. | 1.7 - Added topic parameter to RPC methods.
1.8 - Added change_node_maintenance_mode. | 1.8 - Added change_node_maintenance_mode.
1.9 - Added destroy_node. | 1.9 - Added destroy_node.
1.10 - Remove get_node_power_state | 1.10 - Remove get_node_power_state
1.11 - Added get_console_information, set_console_mode. | 1.11 - Added get_console_information, set_console_mode.
1.12 - validate_vendor_action, do_vendor_action replaced by single | 1.12 - validate_vendor_action, do_vendor_action replaced by single
vendor_passthru method. | vendor_passthru method.
1.13 - Added update_port. | 1.13 - Added update_port.
1.14 - Added driver_vendor_passthru. | 1.14 - Added driver_vendor_passthru.
1.15 - Added rebuild parameter to do_node_deploy. | 1.15 - Added rebuild parameter to do_node_deploy.
1.16 - Added get_driver_properties. | 1.16 - Added get_driver_properties.
1.17 - Added set_boot_device, get_boot_device and | 1.17 - Added set_boot_device, get_boot_device and
get_supported_boot_devices. | get_supported_boot_devices.
1.18 - Remove change_node_maintenance_mode. | 1.18 - Remove change_node_maintenance_mode.
""" """

View File

@@ -41,16 +41,23 @@ determine whether their invocation requires an exclusive lock.
The TaskManager instance exposes certain node resources and properties as The TaskManager instance exposes certain node resources and properties as
attributes that you may access: attributes that you may access:
task.context -- The context passed to TaskManager() task.context
task.shared -- False if Node is locked, True if it is not locked. (The The context passed to TaskManager()
'shared' kwarg arg of TaskManager()) task.shared
task.node -- The Node object False if Node is locked, True if it is not locked. (The
task.ports -- Ports belonging to the Node 'shared' kwarg arg of TaskManager())
task.driver -- The Driver for the Node, or the Driver based on the task.node
'driver_name' kwarg of TaskManager(). The Node object
task.ports
Ports belonging to the Node
task.driver
The Driver for the Node, or the Driver based on the
'driver_name' kwarg of TaskManager().
Example usage: Example usage:
::
with task_manager.acquire(context, node_id) as task: with task_manager.acquire(context, node_id) as task:
task.driver.power.power_on(task.node) task.driver.power.power_on(task.node)
@@ -59,6 +66,8 @@ TaskManager instance provides an interface to handle this for you, making
sure to release resources when exceptions occur or when the thread finishes. sure to release resources when exceptions occur or when the thread finishes.
Common use of this is within the Manager like so: Common use of this is within the Manager like so:
::
with task_manager.acquire(context, node_id) as task: with task_manager.acquire(context, node_id) as task:
<do some work> <do some work>
task.spawn_after(self._spawn_worker, task.spawn_after(self._spawn_worker,
@@ -72,6 +81,8 @@ with a try..exception block (like the API cases where we return after
the spawn_after()) the task allows you to set a hook to execute custom the spawn_after()) the task allows you to set a hook to execute custom
code when the spawned task generates an exception: code when the spawned task generates an exception:
::
def on_error(e): def on_error(e):
if isinstance(e, Exception): if isinstance(e, Exception):
... ...

View File

@@ -51,14 +51,16 @@ class Connection(object):
:param columns: List of column names to return. :param columns: List of column names to return.
Defaults to 'id' column when columns == None. Defaults to 'id' column when columns == None.
:param filters: Filters to apply. Defaults to None. :param filters: Filters to apply. Defaults to None.
'associated': True | False
'reserved': True | False :associated: True | False
'maintenance': True | False :reserved: True | False
'chassis_uuid': uuid of chassis :maintenance: True | False
'driver': driver's name :chassis_uuid: uuid of chassis
'provision_state': provision state of node :driver: driver's name
'provisioned_before': nodes with provision_updated_at :provision_state: provision state of node
field before this interval in seconds :provisioned_before:
nodes with provision_updated_at field before this
interval in seconds
:param limit: Maximum number of nodes to return. :param limit: Maximum number of nodes to return.
:param marker: the last item of the previous page; we return the next :param marker: the last item of the previous page; we return the next
result set. result set.
@@ -74,14 +76,16 @@ class Connection(object):
"""Return a list of nodes. """Return a list of nodes.
:param filters: Filters to apply. Defaults to None. :param filters: Filters to apply. Defaults to None.
'associated': True | False
'reserved': True | False :associated: True | False
'maintenance': True | False :reserved: True | False
'chassis_uuid': uuid of chassis :maintenance: True | False
'driver': driver's name :chassis_uuid: uuid of chassis
'provision_state': provision state of node :driver: driver's name
'provisioned_before': nodes with provision_updated_at :provision_state: provision state of node
field before this interval in seconds :provisioned_before:
nodes with provision_updated_at field before this
interval in seconds
:param limit: Maximum number of nodes to return. :param limit: Maximum number of nodes to return.
:param marker: the last item of the previous page; we return the next :param marker: the last item of the previous page; we return the next
result set. result set.
@@ -124,6 +128,8 @@ class Connection(object):
and track the node, and several dicts which are passed and track the node, and several dicts which are passed
into the Drivers when managing this node. For example: into the Drivers when managing this node. For example:
::
{ {
'uuid': utils.generate_uuid(), 'uuid': utils.generate_uuid(),
'instance_uuid': None, 'instance_uuid': None,
@@ -177,13 +183,15 @@ class Connection(object):
May be a partial list, eg. when setting the May be a partial list, eg. when setting the
properties for a driver. For example: properties for a driver. For example:
{ ::
'driver_info':
{ {
'my-field-1': val1, 'driver_info':
'my-field-2': val2, {
} 'my-field-1': val1,
} 'my-field-2': val2,
}
}
:returns: A node. :returns: A node.
:raises: NodeAssociated :raises: NodeAssociated
:raises: NodeNotFound :raises: NodeNotFound
@@ -321,11 +329,14 @@ class Connection(object):
"""Register an active conductor with the cluster. """Register an active conductor with the cluster.
:param values: A dict of values which must contain the following: :param values: A dict of values which must contain the following:
{
'hostname': the unique hostname which identifies ::
this Conductor service.
'drivers': a list of supported drivers. {
} 'hostname': the unique hostname which identifies
this Conductor service.
'drivers': a list of supported drivers.
}
:param update_existing: When false, registration will raise an :param update_existing: When false, registration will raise an
exception when a conflicting online record exception when a conflicting online record
is found. When true, will overwrite the is found. When true, will overwrite the
@@ -366,6 +377,9 @@ class Connection(object):
:param interval: Seconds since last check-in of a conductor. :param interval: Seconds since last check-in of a conductor.
:returns: A dict which maps driver names to the set of hosts :returns: A dict which maps driver names to the set of hosts
which support them. For example: which support them. For example:
::
{driverA: set([host1, host2]), {driverA: set([host1, host2]),
driverB: set([host2, host3])} driverB: set([host2, host3])}
""" """

View File

@@ -33,12 +33,15 @@ class BaseDHCP(object):
:param port_id: designate which port these attributes :param port_id: designate which port these attributes
will be applied to. will be applied to.
:param dhcp_options: this will be a list of dicts, e.g. :param dhcp_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': 'bootfile-name',
{'opt_name': 'tftp-server', 'opt_value': 'pxelinux.0'},
'opt_value': '123.123.123.123'}] {'opt_name': 'server-ip-address',
'opt_value': '123.123.123.456'},
{'opt_name': 'tftp-server',
'opt_value': '123.123.123.123'}]
:raises: FailedToUpdateDHCPOptOnPort :raises: FailedToUpdateDHCPOptOnPort
""" """
@@ -58,12 +61,15 @@ class BaseDHCP(object):
: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_value': 'pxelinux.0'}, ::
{'opt_name': 'server-ip-address',
'opt_value': '123.123.123.456'}, [{'opt_name': 'bootfile-name',
{'opt_name': 'tftp-server', 'opt_value': 'pxelinux.0'},
'opt_value': '123.123.123.123'}] {'opt_name': 'server-ip-address',
'opt_value': '123.123.123.456'},
{'opt_name': 'tftp-server',
'opt_value': '123.123.123.123'}]
:raises: FailedToUpdateDHCPOptOnPort :raises: FailedToUpdateDHCPOptOnPort
""" """

View File

@@ -98,12 +98,15 @@ class NeutronDHCPApi(base.BaseDHCP):
:param port_id: designate which port these attributes :param port_id: designate which port these attributes
will be applied to. will be applied to.
:param dhcp_options: this will be a list of dicts, e.g. :param dhcp_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': 'bootfile-name',
{'opt_name': 'tftp-server', 'opt_value': 'pxelinux.0'},
'opt_value': '123.123.123.123'}] {'opt_name': 'server-ip-address',
'opt_value': '123.123.123.456'},
{'opt_name': 'tftp-server',
'opt_value': '123.123.123.123'}]
:param token: optional auth token. :param token: optional auth token.
:raises: FailedToUpdateDHCPOptOnPort :raises: FailedToUpdateDHCPOptOnPort
@@ -136,12 +139,15 @@ class NeutronDHCPApi(base.BaseDHCP):
:param task: A TaskManager instance. :param task: A TaskManager instance.
:param dhcp_opts: this will be a list of dicts, e.g. :param dhcp_opts: 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': 'bootfile-name',
{'opt_name': 'tftp-server', 'opt_value': 'pxelinux.0'},
'opt_value': '123.123.123.123'}] {'opt_name': 'server-ip-address',
'opt_value': '123.123.123.456'},
{'opt_name': 'tftp-server',
'opt_value': '123.123.123.123'}]
""" """
vifs = network.get_node_vif_ids(task) vifs = network.get_node_vif_ids(task)
if not vifs: if not vifs:

View File

@@ -470,10 +470,13 @@ class ManagementInterface(object):
: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
:returns: a dictionary containing: :returns: a dictionary containing:
:boot_device: the boot device, one of
:mod:`ironic.common.boot_devices` or None if it is unknown. :boot_device:
:persistent: Whether the boot device will persist to all the boot device, one of :mod:`ironic.common.boot_devices` or
future boots or not, None if it is unknown. None if it is unknown.
:persistent:
Whether the boot device will persist to all future boots or
not, None if it is unknown.
""" """
@@ -486,7 +489,11 @@ class ManagementInterface(object):
: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.
eg, { eg,
::
{
'Sensor Type 1': { 'Sensor Type 1': {
'Sensor ID 1': { 'Sensor ID 1': {
'Sensor Reading': 'current value', 'Sensor Reading': 'current value',

View File

@@ -97,9 +97,9 @@ class PXEAndSeaMicroDriver(base.BaseDriver):
"""PXE + SeaMicro driver. """PXE + SeaMicro driver.
This driver implements the `core` functionality, combining This driver implements the `core` functionality, combining
:class:ironic.drivers.modules.seamicro.Power for power :class:`ironic.drivers.modules.seamicro.Power` for power
on/off and reboot with on/off and reboot with
:class:ironic.driver.modules.pxe.PXE for image deployment. :class:`ironic.driver.modules.pxe.PXE` for image deployment.
Implementations are in those respective classes; Implementations are in those respective classes;
this class is merely the glue between them. this class is merely the glue between them.
""" """
@@ -124,9 +124,9 @@ class PXEAndIBootDriver(base.BaseDriver):
"""PXE + IBoot PDU driver. """PXE + IBoot PDU driver.
This driver implements the `core` functionality, combining This driver implements the `core` functionality, combining
:class:ironic.drivers.modules.iboot.IBootPower for power :class:`ironic.drivers.modules.iboot.IBootPower` for power
on/off and reboot with on/off and reboot with
:class:ironic.driver.modules.pxe.PXE for image deployment. :class:`ironic.driver.modules.pxe.PXE` for image deployment.
Implementations are in those respective classes; Implementations are in those respective classes;
this class is merely the glue between them. this class is merely the glue between them.
""" """
@@ -145,11 +145,10 @@ class PXEAndIloDriver(base.BaseDriver):
"""PXE + Ilo Driver using IloClient interface. """PXE + Ilo Driver using IloClient interface.
This driver implements the `core` functionality using This driver implements the `core` functionality using
:class:ironic.drivers.modules.ilo.power.IloPower for power management :class:`ironic.drivers.modules.ilo.power.IloPower` for power management
:class:ironic.drivers.modules.ilo.deploy.IloPXEDeploy(pxe.PXEDeploy) :class:`ironic.drivers.modules.ilo.deploy.IloPXEDeploy`
:class:ironic.drivers.modules.ilo.deply.IloManagement( :class:`ironic.drivers.modules.ilo.deploy.IloManagement` for image
ipmitool.IPMIManagement) deployment.
for image deployment.
""" """
@@ -169,8 +168,8 @@ class PXEAndSNMPDriver(base.BaseDriver):
"""PXE + SNMP driver. """PXE + SNMP driver.
This driver implements the 'core' functionality, combining This driver implements the 'core' functionality, combining
:class:ironic.drivers.snmp.SNMP for power on/off and reboot with :class:`ironic.drivers.snmp.SNMP` for power on/off and reboot with
:class:ironic.drivers.pxe.PXE for image deployment. Implentations are in :class:`ironic.drivers.pxe.PXE` for image deployment. Implentations are in
those respective classes; this class is merely the glue between them. those respective classes; this class is merely the glue between them.
""" """

View File

@@ -31,10 +31,12 @@ The test will then use that db and u/p combo to run the tests.
For postgres on Ubuntu this can be done with the following commands: For postgres on Ubuntu this can be done with the following commands:
sudo -u postgres psql ::
postgres=# create user openstack_citest with createdb login password
sudo -u postgres psql
postgres=# create user openstack_citest with createdb login password
'openstack_citest'; 'openstack_citest';
postgres=# create database openstack_citest with owner openstack_citest; postgres=# create database openstack_citest with owner openstack_citest;
""" """

View File

@@ -21,10 +21,11 @@ respective external libraries' actually being present.
Any external library required by a third-party driver should be mocked here. Any external library required by a third-party driver should be mocked here.
Current list of mocked libraries: Current list of mocked libraries:
seamicroclient
ipminative - seamicroclient
proliantutils - ipminative
pysnmp - proliantutils
- pysnmp
""" """
import sys import sys