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

build_provider_location(system, lun_type, lun_id, base_lun_name, version)

Builds provider_location for volume or snapshot.

Parameters:
  • system – VNX serial number
  • lun_id – LUN ID in VNX
  • lun_type – ‘lun’ or ‘smp’
  • base_lun_name – primary LUN name, it will be used when creating snap lun
  • version – driver version
calc_migrate_and_provision(volume)

Returns a tuple of async migrate and provision type.

The first element is the flag whether to enable async migrate, the second is the provision type (thin or thick).

construct_mirror_name(volume)

Constructs MirrorView name for volume.

construct_smp_name(snap_id)
construct_snap_name(volume)

Return snapshot name.

construct_tmp_cg_snap_name(cg_name)

Return CG snapshot name.

construct_tmp_lun_name(lun_name)

Constructs a time-based temporary LUN name.

convert_to_tgt_list_and_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’..)

}

}

dump_provider_location(location_dict)
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_base_lun_name(volume)

Returns base LUN name for LUN/snapcopy LUN.

get_metadata(volume)
get_migration_rate(volume)
get_original_status(volume)
get_pool_from_host(host)
get_remote_pool(config, volume)

Select remote pool name for replication.

Prefer configured remote pool name, or same pool name as the source volume.

init_ops(configuration)
is_async_migrate_enabled(volume)
is_image_cache_volume(volume)
is_snapcopy_enabled(volume)
is_volume_smp(volume)
require_consistent_group_snapshot_enabled(func)
retype_need_change_tier(old_tier, new_tier)
retype_need_migration(volume, old_provision, new_provision, host)
retype_need_turn_on_compression(old_provision, new_provision)
sift_port_white_list(port_white_list, registered_io_ports)

Filters out the unregistered ports.

Goes through the port_white_list, and filters out the ones not registered (that is not in registered_io_ports).

truncate_fc_port_wwn(wwn)
update_provider_location(provider_location, items)

Updates provider_location with new dict items.

Parameters:
  • provider_location – volume’s provider_location.
  • items – dict items for updating.
update_res_with_poll(res)
update_res_without_poll(res)
validate_storage_migration(volume, target_host, src_serial, src_protocol)
wait_until(condition, timeout=None, interval=5, reraise_arbiter=<function <lambda>>, *args, **kwargs)