The cinder.volume.drivers.netapp.utils Module

The cinder.volume.drivers.netapp.utils Module

Utilities for NetApp drivers.

This module contains common utilities to be used by one or more NetApp drivers to achieve the desired functionality.

class BitSet(value=0)

Bases: object

class FeatureState(supported=True, minimum_version=None)

Bases: object

class Features

Bases: object

add_feature(name, supported=True, min_version=None)
class OpenStackInfo

Bases: object

OS/distribution, release, and version.

NetApp uses these fields as content for EMS log entry.

PACKAGE_NAME = 'python-cinder'
check_flags(required_flags, configuration)

Ensure that the flags we care about are set.

check_for_invalid_qos_spec_combination(info, volume_type)

Invalidate QOS spec if both legacy and non-legacy info is present.

get_iscsi_connection_properties(lun_id, volume, iqns, addresses, ports)

Return legacy qos policy information if present in extra specs.


Build the regex for filtering pools by name

Parameters:configuration – The volume driver configuration
Raises:InvalidConfigurationValue – if configured regex pattern is invalid
Returns:A compiled regex for filtering pool names

Return the name of backend QOS policy group based on its volume id.


Return the name of a QOS policy group given qos policy group info.

get_valid_backend_qos_spec_from_volume_type(volume, volume_type)

Given a volume type, return the associated Cinder QoS spec.

get_valid_qos_policy_group_info(volume, extra_specs=None)

Given a volume, return information for QOS provisioning.


Provides extra specs associated with volume.


Provides volume type associated with volume.

class hashabledict

Bases: dict

A hashable dictionary that is comparable (i.e. in unit tests, etc.)


Return an equivalent to the input dictionary with lower-case keys.

map_qos_spec(qos_spec, volume)

Map Cinder QOS spec to limit/throughput-value as used in client API.


Resolves host name to IP address.

round_down(value, precision='0.00')
set_safe_attr(*args, **kwargs)

Sets the attribute in a thread safe manner.

Returns if new val was set on attribute. If attr already had the value then False.


Converts true, yes, y, 1 to True, False otherwise.


Checks if a driver is instantiated other than by the unified driver.

Helps check direct instantiation of netapp drivers. Call this function in every netapp block driver constructor.


Check validity of Cinder qos spec for our backend.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.