diff --git a/doc/source/conf.py b/doc/source/conf.py index 89cf81ad89..8835609c0f 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -30,7 +30,6 @@ extensions = ['sphinx.ext.viewcode', 'sphinxcontrib.pecanwsme.rest', 'sphinxcontrib.seqdiag', 'sphinxcontrib.apidoc', - 'wsmeext.sphinxext', 'oslo_config.sphinxext', 'oslo_config.sphinxconfiggen', 'oslo_policy.sphinxext', diff --git a/ironic/api/controllers/v1/notification_utils.py b/ironic/api/controllers/v1/notification_utils.py index 5506238e0e..57268104de 100644 --- a/ironic/api/controllers/v1/notification_utils.py +++ b/ironic/api/controllers/v1/notification_utils.py @@ -62,7 +62,7 @@ def _emit_api_notification(context, obj, action, level, status, **kwargs): `ironic.objects.fields.NotificationLevel.ALL` :param status: Status to go in the EventType. One of `ironic.objects.fields.NotificationStatus.ALL` - :param **kwargs: kwargs to use when creating the notification payload. + :param kwargs: kwargs to use when creating the notification payload. """ resource = obj.__class__.__name__.lower() # value wsme.Unset can be passed from API representation of resource @@ -125,7 +125,7 @@ def emit_start_notification(context, obj, action, **kwargs): :param context: request context. :param obj: resource rpc object. :param action: Action string to go in the EventType. - :param **kwargs: kwargs to use when creating the notification payload. + :param kwargs: kwargs to use when creating the notification payload. """ _emit_api_notification(context, obj, action, fields.NotificationLevel.INFO, @@ -140,7 +140,7 @@ def handle_error_notification(context, obj, action, **kwargs): :param context: request context. :param obj: resource rpc object. :param action: Action string to go in the EventType. - :param **kwargs: kwargs to use when creating the notification payload. + :param kwargs: kwargs to use when creating the notification payload. """ try: yield @@ -158,7 +158,7 @@ def emit_end_notification(context, obj, action, **kwargs): :param context: request context. :param obj: resource rpc object. :param action: Action string to go in the EventType. - :param **kwargs: kwargs to use when creating the notification payload. + :param kwargs: kwargs to use when creating the notification payload. """ _emit_api_notification(context, obj, action, fields.NotificationLevel.INFO, diff --git a/ironic/api/controllers/v1/utils.py b/ironic/api/controllers/v1/utils.py index ff9980f8bc..36d89869c1 100644 --- a/ironic/api/controllers/v1/utils.py +++ b/ironic/api/controllers/v1/utils.py @@ -121,10 +121,13 @@ def apply_jsonpatch(doc, patch): def get_patch_values(patch, path): """Get the patch values corresponding to the specified path. - If there are multiple values specified for the same path - (for example the patch is [{'op': 'add', 'path': '/name', 'value': 'abc'}, - {'op': 'add', 'path': '/name', 'value': 'bca'}]) - return all of them in a list (preserving order). + If there are multiple values specified for the same path, for example + :: + + [{'op': 'add', 'path': '/name', 'value': 'abc'}, + {'op': 'add', 'path': '/name', 'value': 'bca'}] + + return all of them in a list (preserving order) :param patch: HTTP PATCH request body. :param path: the path to get the patch values for. diff --git a/ironic/common/cinder.py b/ironic/common/cinder.py index e5c1066b3d..2a91b2385b 100644 --- a/ironic/common/cinder.py +++ b/ironic/common/cinder.py @@ -185,7 +185,7 @@ def attach_volumes(task, volume_list, connector): Some drivers support a 'multipath' boolean key, although it is generally False. The 'host' key is generally used for logging by drivers. - Example: + Example:: { 'wwpns': ['list','of','port','wwns'], @@ -214,36 +214,35 @@ def attach_volumes(task, volume_list, connector): connection info for the node is already in the database, 'data' structure contains only basic info of volume ID in cinder and ironic, so any logic based on that should - retrieve it from the database. - Example: + retrieve it from the database. Example:: - [{ - 'driver_volume_type': 'fibre_channel' - 'data': { - 'encrypted': False, - 'target_lun': 1, - 'target_wwn': ['1234567890123', '1234567890124'], - 'volume_id': '00000000-0000-0000-0000-000000000001', - 'ironic_volume_id': - '11111111-0000-0000-0000-000000000001'} - }, - { - 'driver_volume_type': 'iscsi' - 'data': { - 'target_iqn': 'iqn.2010-10.org.openstack:volume-00000002', - 'target_portal': '127.0.0.0.1:3260', - 'volume_id': '00000000-0000-0000-0000-000000000002', - 'ironic_volume_id': - '11111111-0000-0000-0000-000000000002', - 'target_lun': 2} - }, - { - 'already_attached': True - 'data': { - 'volume_id': '00000000-0000-0000-0000-000000000002', - 'ironic_volume_id': - '11111111-0000-0000-0000-000000000002'} - }] + [{ + 'driver_volume_type': 'fibre_channel' + 'data': { + 'encrypted': False, + 'target_lun': 1, + 'target_wwn': ['1234567890123', '1234567890124'], + 'volume_id': '00000000-0000-0000-0000-000000000001', + 'ironic_volume_id': + '11111111-0000-0000-0000-000000000001'} + }, + { + 'driver_volume_type': 'iscsi' + 'data': { + 'target_iqn': 'iqn.2010-10.org.openstack:volume-000002', + 'target_portal': '127.0.0.0.1:3260', + 'volume_id': '00000000-0000-0000-0000-000000000002', + 'ironic_volume_id': + '11111111-0000-0000-0000-000000000002', + 'target_lun': 2} + }, + { + 'already_attached': True + 'data': { + 'volume_id': '00000000-0000-0000-0000-000000000002', + 'ironic_volume_id': + '11111111-0000-0000-0000-000000000002'} + }] """ node = task.node client = _init_client(task) @@ -353,7 +352,7 @@ def detach_volumes(task, volume_list, connector, allow_errors=False): Some drivers support a 'multipath' boolean key, although it is generally False. The 'host' key is generally used for logging by drivers. - Example: + Example:: { 'wwpns': ['list','of','port','wwns'] diff --git a/ironic/common/images.py b/ironic/common/images.py index 7ee63b32ed..aa6e376f39 100644 --- a/ironic/common/images.py +++ b/ironic/common/images.py @@ -47,11 +47,11 @@ def _create_root_fs(root_directory, files_info): :param root_directory: the filesystem root directory. :param files_info: A dict containing absolute path of file to be copied - -> relative path within the vfat image. For example, - { - '/absolute/path/to/file' -> 'relative/path/within/root' - ... - } + -> relative path within the vfat image. For example:: + { + '/absolute/path/to/file' -> 'relative/path/within/root' + ... + } :raises: OSError, if creation of any directory failed. :raises: IOError, if copying any of the files failed. """ @@ -82,19 +82,20 @@ def create_vfat_image(output_file, files_info=None, parameters=None, directory. :param output_file: The path to the file where the fat fs image needs - to be created. + to be created. :param files_info: A dict containing absolute path of file to be copied - -> relative path within the vfat image. For example, - { - '/absolute/path/to/file' -> 'relative/path/within/root' - ... - } + -> relative path within the vfat image. For example:: + + { + '/absolute/path/to/file' -> 'relative/path/within/root' + ... + } :param parameters: A dict containing key-value pairs of parameters. :param parameters_file: The filename for the parameters file. :param fs_size_kib: size of the vfat filesystem in KiB. :raises: ImageCreationFailed, if image creation failed while doing any - of filesystem manipulation activities like creating dirs, mounting, - creating filesystem, copying files, etc. + of filesystem manipulation activities like creating dirs, + mounting, creating filesystem, copying files, etc. """ try: ironic_utils.dd('/dev/zero', output_file, 'count=1', diff --git a/ironic/common/neutron.py b/ironic/common/neutron.py index 986bd9452a..2cd31f5f95 100644 --- a/ironic/common/neutron.py +++ b/ironic/common/neutron.py @@ -355,8 +355,8 @@ def remove_neutron_ports(task, params): def get_node_portmap(task): """Extract the switch port information for the node. - :param task: a task containing the Node object. - :returns: a dictionary in the form + The information is returned in the form of:: + { port.uuid: { 'switch_id': 'abc', @@ -364,6 +364,9 @@ def get_node_portmap(task): 'other_llc_key': 'val' } } + + :param task: a task containing the Node object. + :returns: port information as a dict """ portmap = {} @@ -377,18 +380,21 @@ def get_node_portmap(task): def get_local_group_information(task, portgroup): """Extract the portgroup information. + The information is returned in the form of:: + + { + 'id': portgroup.uuid, + 'name': portgroup.name, + 'bond_mode': portgroup.mode, + 'bond_properties': { + 'bond_propertyA': 'valueA', + 'bond_propertyB': 'valueB', + } + } + :param task: a task containing the Node object. :param portgroup: Ironic portgroup object to extract data for. - :returns: a dictionary in the form: - { - 'id': portgroup.uuid, - 'name': portgroup.name, - 'bond_mode': portgroup.mode, - 'bond_properties': { - 'bond_propertyA': 'valueA', - 'bond_propertyB': 'valueB', - } - } + :returns: port group information as a dict """ portgroup_properties = {} diff --git a/ironic/drivers/modules/deploy_utils.py b/ironic/drivers/modules/deploy_utils.py index b37309e2a8..77ae3d4397 100644 --- a/ironic/drivers/modules/deploy_utils.py +++ b/ironic/drivers/modules/deploy_utils.py @@ -362,29 +362,31 @@ def deploy_partition_image( :param root_mb: Size of the root partition in megabytes. :param swap_mb: Size of the swap partition in megabytes. :param ephemeral_mb: Size of the ephemeral partition in megabytes. If 0, - no ephemeral partition will be created. + no ephemeral partition will be created. :param ephemeral_format: The type of file system to format the ephemeral - partition. + partition. :param node_uuid: node's uuid. Used for logging. :param preserve_ephemeral: If True, no filesystem is written to the - ephemeral block device, preserving whatever content it had (if the - partition table has not changed). + ephemeral block device, preserving whatever + content it had (if the partition table has + not changed). :param configdrive: Optional. Base64 encoded Gzipped configdrive content or configdrive HTTP URL. :param boot_option: Can be "local" or "netboot". "netboot" by default. :param boot_mode: Can be "bios" or "uefi". "bios" by default. :param disk_label: The disk label to be used when creating the - partition table. Valid values are: "msdos", "gpt" or None; If None - Ironic will figure it out according to the boot_mode parameter. + partition table. Valid values are: "msdos", + "gpt" or None; If None ironic will figure it + out according to the boot_mode parameter. :param cpu_arch: Architecture of the node being deployed to. :raises: InstanceDeployFailure if image virtual size is bigger than root - partition size. + partition size. :returns: a dictionary containing the following keys: - 'root uuid': UUID of root partition - 'efi system partition uuid': UUID of the uefi system partition - (if boot mode is uefi). - NOTE: If key exists but value is None, it means partition doesn't + 'root uuid': UUID of root partition + 'efi system partition uuid': UUID of the uefi system partition + (if boot mode is uefi). + NOTE: If key exists but value is None, it means partition doesn't exist. """ boot_option = boot_option or get_default_boot_option() @@ -866,23 +868,23 @@ def prepare_inband_cleaning(task, manage_boot=True): This method does the following: 1. Prepares the cleaning ports for the bare metal - node and updates the clean parameters in node's driver_internal_info. + node and updates the clean parameters in node's driver_internal_info. 2. If 'manage_boot' parameter is set to true, it also calls the - 'prepare_ramdisk' method of boot interface to boot the agent ramdisk. + 'prepare_ramdisk' method of boot interface to boot the agent ramdisk. 3. Reboots the bare metal node. :param task: a TaskManager object containing the node :param manage_boot: If this is set to True, this method calls the - 'prepare_ramdisk' method of boot interface to boot the agent - ramdisk. If False, it skips preparing the boot agent ramdisk using - boot interface, and assumes that the environment is setup to - automatically boot agent ramdisk every time bare metal node is - rebooted. + 'prepare_ramdisk' method of boot interface to boot the + agent ramdisk. If False, it skips preparing the boot + agent ramdisk using boot interface, and assumes that + the environment is setup to automatically boot agent + ramdisk every time bare metal node is rebooted. :returns: states.CLEANWAIT to signify an asynchronous prepare. :raises: NetworkError, NodeCleaningFailure if the previous cleaning ports - cannot be removed or if new cleaning ports cannot be created. + cannot be removed or if new cleaning ports cannot be created. :raises: InvalidParameterValue if cleaning network UUID config option has - an invalid value. + an invalid value. """ task.driver.network.add_cleaning_network(task) @@ -1157,8 +1159,8 @@ def populate_storage_driver_internal_info(task): """Set node driver_internal_info for boot from volume parameters. :param task: a TaskManager object containing the node. - :raises StorageError when a node has an iSCSI or FibreChannel boot volume - defined but is not capable to support it. + :raises: StorageError when a node has an iSCSI or FibreChannel boot volume + defined but is not capable to support it. """ node = task.node boot_volume = get_remote_boot_volume(task) diff --git a/ironic/drivers/modules/drac/bios.py b/ironic/drivers/modules/drac/bios.py index 1784bebf1e..0ce7ec64b1 100644 --- a/ironic/drivers/modules/drac/bios.py +++ b/ironic/drivers/modules/drac/bios.py @@ -30,9 +30,8 @@ LOG = logging.getLogger(__name__) def get_config(node): """Get the BIOS configuration. - :param node: an ironic node object. - :raises: DracOperationError on an error from python-dracclient. - :returns: a dictionary containing BIOS settings in the form of: + The BIOS settings look like:: + {'EnumAttrib': {'name': 'EnumAttrib', 'current_value': 'Value', 'pending_value': 'New Value', # could also be None @@ -50,38 +49,46 @@ def get_config(node): 'pending_value': None, 'read_only': True, 'lower_bound': 0, - 'upper_bound': 65535} - } + 'upper_bound': 65535}} + + :param node: an ironic node object. + :raises: DracOperationError on an error from python-dracclient. + :returns: a dictionary containing BIOS settings The above values are only examples, of course. BIOS attributes exposed via this API will always be either an enumerated attribute, a string attribute, or an integer attribute. All attributes have the following parameters: - :name: is the name of the BIOS attribute. - :current_value: is the current value of the attribute. - It will always be either an integer or a string. - :pending_value: is the new value that we want the attribute to have. - None means that there is no pending value. - :read_only: indicates whether this attribute can be changed. Trying to - change a read-only value will result in an error. - The read-only flag can change depending on other attributes. - A future version of this call may expose the dependencies - that indicate when that may happen. + + :param name: is the name of the BIOS attribute. + :param current_value: is the current value of the attribute. + It will always be either an integer or a string. + :param pending_value: is the new value that we want the attribute to have. + None means that there is no pending value. + :param read_only: indicates whether this attribute can be changed. + Trying to change a read-only value will result in + an error. The read-only flag can change depending + on other attributes. + A future version of this call may expose the + dependencies that indicate when that may happen. Enumerable attributes also have the following parameters: - :possible_values: is an array of values it is permissible to set - the attribute to. + + :param possible_values: is an array of values it is permissible to set + the attribute to. String attributes also have the following parameters: - :min_length: is the minimum length of the string. - :max_length: is the maximum length of the string. - :pcre_regex: is a PCRE compatible regular expression that the string - must match. It may be None if the string is read only - or if the string does not have to match any particular - regular expression. + + :param min_length: is the minimum length of the string. + :param max_length: is the maximum length of the string. + :param pcre_regex: is a PCRE compatible regular expression that the string + must match. It may be None if the string is read only + or if the string does not have to match any particular + regular expression. Integer attributes also have the following parameters: - :lower_bound: is the minimum value the attribute can have. - :upper_bound: is the maximum value the attribute can have. + + :param lower_bound: is the minimum value the attribute can have. + :param upper_bound: is the maximum value the attribute can have. """ client = drac_common.get_drac_client(node) diff --git a/ironic/drivers/modules/ilo/common.py b/ironic/drivers/modules/ilo/common.py index a851cf2bb2..d528c20c49 100644 --- a/ironic/drivers/modules/ilo/common.py +++ b/ironic/drivers/modules/ilo/common.py @@ -545,15 +545,18 @@ def setup_vmedia(task, iso, ramdisk_options): :param task: a TaskManager instance containing the node to act on. :param iso: a bootable ISO image href to attach to. Should be either - of below: - * A Swift object - It should be of format 'swift:'. - It is assumed that the image object is present in - CONF.ilo.swift_ilo_container; - * A Glance image - It should be format 'glance://' - or just ; - * An HTTP URL. + of below: + + * A Swift object - It should be of format + ``swift:``. + It is assumed that the image object is present in + CONF.ilo.swift_ilo_container; + * A Glance image - It should be format + ``glance://`` + or just ````; + * An HTTP URL. :param ramdisk_options: the options to be passed to the ramdisk in virtual - media floppy. + media floppy. :raises: ImageCreationFailed, if it failed while creating the floppy image. :raises: IloOperationError, if some operation on iLO failed. """ @@ -576,15 +579,18 @@ def setup_vmedia_for_boot(task, boot_iso, parameters=None): :param task: a TaskManager instance containing the node to act on. :param boot_iso: a bootable ISO image to attach to. Should be either - of below: - * A Swift object - It should be of format 'swift:'. - It is assumed that the image object is present in - CONF.ilo.swift_ilo_container; - * A Glance image - It should be format 'glance://' - or just ; - * An HTTP(S) URL. + of below: + + * A Swift object - It should be of format + ``swift:``. + It is assumed that the image object is present in + CONF.ilo.swift_ilo_container; + * A Glance image - It should be format + ``glance://`` + or just ````; + * An HTTP URL. :param parameters: the parameters to pass in the virtual floppy image - in a dictionary. This is optional. + in a dictionary. This is optional. :raises: ImageCreationFailed, if it failed while creating the floppy image. :raises: SwiftOperationError, if any operation with Swift fails. :raises: IloOperationError, if attaching virtual media failed. diff --git a/ironic/drivers/modules/image_cache.py b/ironic/drivers/modules/image_cache.py index 76b55d51d4..3d96655ea2 100644 --- a/ironic/drivers/modules/image_cache.py +++ b/ironic/drivers/modules/image_cache.py @@ -316,7 +316,7 @@ def _clean_up_caches(directory, amount): :param directory: the directory (of the cache) to be freed up. :param amount: amount of space to reclaim. :raises: InsufficientDiskSpace exception, if we cannot free up enough space - after trying all the caches. + after trying all the caches. """ free = _free_disk_space_for(directory) @@ -352,9 +352,9 @@ def clean_up_caches(ctx, directory, images_info): :param ctx: context :param directory: the directory (of the cache) to be freed up. :param images_info: a list of tuples of the form (image_uuid,path) - for which space is to be created in cache. + for which space is to be created in cache. :raises: InsufficientDiskSpace exception, if we cannot free up enough space - after trying all the caches. + after trying all the caches. """ total_size = sum(images.download_size(ctx, uuid) for (uuid, path) in images_info) diff --git a/ironic/drivers/modules/iscsi_deploy.py b/ironic/drivers/modules/iscsi_deploy.py index 90a18a9e0e..081ba3ca0b 100644 --- a/ironic/drivers/modules/iscsi_deploy.py +++ b/ironic/drivers/modules/iscsi_deploy.py @@ -216,14 +216,19 @@ def continue_deploy(task, **kwargs): :raises: InvalidState if the event is not allowed by the associated state machine. :returns: a dictionary containing the following keys: - For partition image: - 'root uuid': UUID of root partition - 'efi system partition uuid': UUID of the uefi system partition - (if boot mode is uefi). - NOTE: If key exists but value is None, it means partition doesn't - exist. - For whole disk image: - 'disk identifier': ID of the disk to which image was deployed. + + For partition image: + + * 'root uuid': UUID of root partition + * 'efi system partition uuid': UUID of the uefi system partition + (if boot mode is uefi). + + .. note:: If key exists but value is None, it means partition + doesn't exist. + + For whole disk image: + + * 'disk identifier': ID of the disk to which image was deployed. """ node = task.node @@ -297,19 +302,25 @@ def do_agent_iscsi_deploy(task, agent_client): :param task: a TaskManager object containing the node. :param agent_client: an instance of agent_client.AgentClient - which will be used during iscsi deploy (for exposing node's - target disk via iSCSI, for install boot loader, etc). + which will be used during iscsi deploy + (for exposing node's target disk via iSCSI, + for install boot loader, etc). :returns: a dictionary containing the following keys: - For partition image: - 'root uuid': UUID of root partition - 'efi system partition uuid': UUID of the uefi system partition - (if boot mode is uefi). - NOTE: If key exists but value is None, it means partition doesn't - exist. - For whole disk image: - 'disk identifier': ID of the disk to which image was deployed. - :raises: InstanceDeployFailure, if it encounters some error - during the deploy. + + For partition image: + + * 'root uuid': UUID of root partition + * 'efi system partition uuid': UUID of the uefi system partition + (if boot mode is uefi). + + .. note:: If key exists but value is None, it means partition + doesn't exist. + + For whole disk image: + + * 'disk identifier': ID of the disk to which image was deployed. + :raises: InstanceDeployFailure if it encounters some error + during the deploy. """ node = task.node i_info = deploy_utils.parse_instance_info(node) diff --git a/ironic/drivers/modules/network/common.py b/ironic/drivers/modules/network/common.py index b39151a810..b60ce7b238 100644 --- a/ironic/drivers/modules/network/common.py +++ b/ironic/drivers/modules/network/common.py @@ -208,8 +208,8 @@ def plug_port_to_tenant_network(task, port_like_obj, client=None): :param task: A TaskManager instance. :param port_like_obj: port-like object to plug. :param client: Neutron client instance. - :raises NetworkError: if failed to update Neutron port. - :raises VifNotAttached if tenant VIF is not associated with port_like_obj. + :raises: NetworkError if failed to update Neutron port. + :raises: VifNotAttached if tenant VIF is not associated with port_like_obj. """ node = task.node @@ -505,8 +505,8 @@ class NeutronVIFPortIDMixin(VIFPortIDMixin): :param task: A TaskManager instance. :param vif_info: a dictionary of information about a VIF. - It must have an 'id' key, whose value is a unique - identifier for that VIF. + It must have an 'id' key, whose value is a unique + identifier for that VIF. :raises: NetworkError, VifAlreadyAttached, NoFreePhysicalPorts :raises: PortgroupPhysnetInconsistent if one of the node's portgroups has ports which are not all assigned the same physical @@ -562,7 +562,7 @@ class NeutronVIFPortIDMixin(VIFPortIDMixin): :param task: A TaskManager instance. :param vif_id: A VIF ID to detach :raises: VifNotAttached if VIF not attached. - :raises: NetworkError: if unbind Neutron port failed. + :raises: NetworkError if unbind Neutron port failed. """ # NOTE(mgoddard): Lookup the port first to check that the VIF is # attached, and fail if not. diff --git a/ironic/drivers/modules/oneview/common.py b/ironic/drivers/modules/oneview/common.py index 137c2b9c75..893fd4bda2 100644 --- a/ironic/drivers/modules/oneview/common.py +++ b/ironic/drivers/modules/oneview/common.py @@ -136,8 +136,8 @@ def _get_ilo_access(remote_console): The Remote Console url has the following format: hplocons://addr=1.2.3.4&sessionkey=a79659e3b3b7c8209c901ac3509a6719 - :param: remote_console: OneView Remote Console object with a - remoteConsoleUrl + :param remote_console: OneView Remote Console object with a + remoteConsoleUrl :returns: A tuple with the Host IP and Token to access ilo, for example: ('1.2.3.4', 'a79659e3b3b7c8209c901ac3509a6719') """ @@ -177,13 +177,13 @@ def get_oneview_info(node): :param: node: node object to get information from :returns: a dictionary containing: - :server_hardware_uri: the uri of the server hardware in OneView - :server_hardware_type_uri: the uri of the server hardware type in - OneView - :enclosure_group_uri: the uri of the enclosure group in OneView - :server_profile_template_uri: the uri of the server profile template in - OneView - :raises OneViewInvalidNodeParameter: if node capabilities are malformed + :param server_hardware_uri: the uri of the server hardware in OneView + :param server_hardware_type_uri: the uri of the server hardware type in + OneView + :param enclosure_group_uri: the uri of the enclosure group in OneView + :server_profile_template_uri: the uri of the server profile template in + OneView + :raises: OneViewInvalidNodeParameter if node capabilities are malformed """ try: @@ -221,7 +221,7 @@ def validate_oneview_resources_compatibility(task): serverProfileTemplateUri, enclosureGroupUri and node ports. If any validation fails, the driver will raise an appropriate OneViewError. - :param: task: a TaskManager instance containing the node to act on. + :param task: a TaskManager instance containing the node to act on. :raises: OneViewError if any validation fails. """ ports = task.ports @@ -305,7 +305,7 @@ def _get_server_hardware_mac_from_ilo(server_hardware): """Get the MAC of Server Hardware's iLO controller. :param: server_hardware: a server hardware uuid or uri - :return: MAC of Server Hardware's iLO controller. + :returns: MAC of Server Hardware's iLO controller. :raises: InvalidParameterValue if required iLO credentials are missing. :raises: OneViewError if can't get mac from a server hardware via iLO or if fails to get JSON object with the default path. @@ -334,8 +334,8 @@ def _get_server_hardware_mac_from_ilo(server_hardware): def _get_server_hardware_mac(server_hardware): """Get the MAC address of the first PXE bootable port of an Ethernet port. - :param: server_hardware: OneView Server Hardware object. - :return: MAC of the first Ethernet and function 'a' port of the + :param server_hardware: OneView Server Hardware object. + :returns: MAC of the first Ethernet and function 'a' port of the Server Hardware object. :raises: OneViewError if there is no Ethernet port on the Server Hardware or if there is no portMap on the Server Hardware requested. @@ -370,8 +370,8 @@ def _get_server_hardware_mac(server_hardware): def _validate_node_server_profile_template(oneview_client, oneview_info): """Validate if the Server Profile Template is consistent. - :param: oneview_client: an instance of the HPE OneView client. - :param: oneview_info: the OneView related info in an Ironic node. + :param oneview_client: an instance of the HPE OneView client. + :param oneview_info: the OneView related info in an Ironic node. :raises: OneViewError if the node's Server Profile Template is not consistent. """ @@ -393,8 +393,8 @@ def _validate_server_profile_template_server_hardware_type( Validate if the Server Profile Template and the Server Hardware have the same Server Hardware Type. - :param: server_profile_template: OneView Server Profile Template object. - :param: server_hardware: OneView Server Hardware object. + :param server_profile_template: OneView Server Profile Template object. + :param server_hardware: OneView Server Hardware object. :raises: OneViewError if the Server Profile Template and the Server Hardware does not have the same Server Hardware Type. """ @@ -416,8 +416,8 @@ def _validate_server_profile_template_server_hardware_type( def _validate_spt_enclosure_group(server_profile_template, server_hardware): """Validate Server Profile Template's Enclosure Group and Hardware's. - :param: server_profile_template: OneView Server Profile Template object. - :param: server_hardware: OneView Server Hardware object. + :param server_profile_template: OneView Server Profile Template object. + :param server_hardware: OneView Server Hardware object. :raises: OneViewError if the Server Profile Template's Enclosure Group does not match the Server Hardware's. """ @@ -436,7 +436,7 @@ def _validate_spt_enclosure_group(server_profile_template, server_hardware): def _validate_server_profile_template_manage_boot(server_profile_template): """Validate if the Server Profile Template allows to manage the boot order. - :param: server_profile_template: OneView Server Profile Template object. + :param server_profile_template: OneView Server Profile Template object. :raises: OneViewError if the Server Profile Template does not allows to manage the boot order. """ @@ -472,8 +472,8 @@ def _validate_node_server_hardware_type(oneview_client, oneview_info): def _validate_node_enclosure_group(oneview_client, oneview_info): """Validate if the node's Enclosure Group matches the Server Hardware's. - :param: oneview_client: an instance of the HPE OneView client. - :param: oneview_info: the OneView related info in an Ironic node. + :param oneview_client: an instance of the HPE OneView client. + :param oneview_info: the OneView related info in an Ironic node. :raises: OneViewError if the node's enclosure group doesn't match the Server Hardware's. """ @@ -499,9 +499,9 @@ def _validate_node_port_mac_server_hardware(oneview_client, oneview_info, ports): """Validate if a port matches the node's Server Hardware's MAC. - :param: oneview_client: an instance of the HPE OneView client. - :param: oneview_info: the OneView related info in an Ironic node. - :param: ports: a list of Ironic node's ports. + :param oneview_client: an instance of the HPE OneView client. + :param oneview_info: the OneView related info in an Ironic node. + :param ports: a list of Ironic node's ports. :raises: OneViewError if there is no port with MAC address matching one in OneView. @@ -539,8 +539,8 @@ def _validate_node_port_mac_server_hardware(oneview_client, def _validate_server_profile_template_mac_type(oneview_client, oneview_info): """Validate if the node's Server Profile Template's MAC type is physical. - :param: oneview_client: an instance of the HPE OneView client. - :param: oneview_info: the OneView related info in an Ironic node. + :param oneview_client: an instance of the HPE OneView client. + :param oneview_info: the OneView related info in an Ironic node. :raises: OneViewError if the node's Server Profile Template's MAC type is not physical. """ diff --git a/tox.ini b/tox.ini index 2118b6b9e0..0738d56c62 100644 --- a/tox.ini +++ b/tox.ini @@ -87,9 +87,7 @@ deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt -# FIXME(TheJulia): we need to add the -W flag back at some point to this command. -# See story https://storyboard.openstack.org/#!/story/2003020 -commands = sphinx-build -b html doc/source doc/build/html +commands = sphinx-build -b html -W doc/source doc/build/html [testenv:api-ref] basepython = python3