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

is_set(bit)
set(bit)
unset(bit)
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'
info()
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_backend_qos_spec_from_volume_type(volume_type)
get_iscsi_connection_properties(lun_id, volume, iqn, address, port)
get_legacy_qos_policy(extra_specs)

Return legacy qos policy information if present in extra specs.

get_pool_name_filter_regex(configuration)

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
get_qos_policy_group_name(volume)

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

get_qos_policy_group_name_from_info(qos_policy_group_info)

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.

get_volume_extra_specs(volume)

Provides extra specs associated with volume.

get_volume_type_from_volume(volume)

Provides volume type associated with volume.

class hashabledict

Bases: dict

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

log_extra_spec_warnings(extra_specs)
map_dict_to_lower(input_dict)

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.

resolve_hostname(hostname)

Resolves host name to IP address.

round_down(value, precision)
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.

to_bool(val)

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

validate_instantiation(**kwargs)

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.

validate_qos_spec(qos_spec)

Check validity of Cinder qos spec for our backend.

Previous topic

The cinder.volume.drivers.netapp.options Module

Next topic

The cinder.volume.drivers.nexenta.iscsi Module

Project Source

This Page