The cinder.volume.drivers.dell_emc.unity.utils Module

assure_cleanup(*args, **kwds)

Assures the resource is cleaned up. Used as a context.

Parameters:
  • enter_func – the function to execute when entering the context.
  • exit_func – the function to execute when leaving the context.
  • use_enter_return – the flag indicates whether to pass the return value of enter_func in to the exit_func.
build_provider_location(system, lun_type, lun_id, version)

Builds provider_location for volume or snapshot.

Parameters:
  • system – Unity serial number
  • lun_id – LUN ID in Unity
  • lun_type – ‘lun’
  • version – driver version
byte_to_gib(byte)
byte_to_mib(byte)
convert_ip_to_portal(ip)
convert_to_itor_tgt_map(zone_mapping)

Function to process data from lookup service.

Parameters:zone_mapping
mapping is the data from the zone lookup service
with below format
{
<San name>: {
‘initiator_port_wwn_list’: (‘200000051e55a100’, ‘200000051e55a121’..) ‘target_port_wwn_list’: (‘100000051e55a100’, ‘100000051e55a121’..)

}

}

create_lookup_service()
dump_provider_location(location_dict)
extract_fc_uids(connector)
extract_iscsi_uids(connector)
extract_provider_location(provider_location, key)

Extracts value of the specified field from provider_location string.

Parameters:
  • provider_location – provider_location string
  • key – field name of the value that to be extracted
Returns:

value of the specified field if it exists, otherwise, None is returned

get_backend_qos_specs(volume)
get_extra_spec(volume, spec_key)
get_pool_name(volume)
gib_to_mib(gib)
ignore_exception(func, *args, **kwargs)
is_before_4_1(ver)
lock_if(condition, lock_name)
match_any(full, patterns)
remove_empty(option, value_list)
validate_pool_names(conf_pools, array_pools)