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.
FeatureState
(supported=True, minimum_version=None)¶Bases: object
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_export_host_junction_path
(share)¶get_iscsi_connection_properties
(lun_id, volume, iqns, addresses, ports)¶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.
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='0.00')¶set_safe_attr
(instance, attr, val)¶Sets the attribute in a thread safe manner.
Returns if new val was set on attribute. If attr already had the value then False.
setup_api_trace_pattern
(api_trace_pattern)¶to_bool
(val)¶Converts true, yes, y, 1 to True, False otherwise.
trace_filter_func_api
(all_args)¶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.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.