The cinder.volume.drivers.emc.emc_vnx_cli Module

VNX CLI

class AttachSnapTask(name=None, provides=None, requires=None, auto_extract=True, rebind=None, inject=None)

Bases: taskflow.task.Task

Attaches the snapshot to the SMP created before.

Reversion strategy: Detach the SMP.

execute(client, volume, snap_name, *args, **kwargs)
revert(result, client, volume, *args, **kwargs)
class CommandLineHelper(configuration)

Bases: object

CLI_RESP_PATTERN_CG_NOT_FOUND = 'Cannot find'
CLI_RESP_PATTERN_LUN_IN_SG_1 = 'contained in a Storage Group'
CLI_RESP_PATTERN_LUN_IN_SG_2 = 'Host LUN/LUN mapping still exists'
CLI_RESP_PATTERN_LUN_NOT_EXIST = 'The (pool lun) may not exist'
CLI_RESP_PATTERN_LUN_NOT_MIGRATING = 'The specified source LUN is not currently migrating'
CLI_RESP_PATTERN_SG_NAME_IN_USE = 'Storage Group name already in use'
CLI_RESP_PATTERN_SMP_NOT_ATTACHED = 'The specified Snapshot mount point is not currently attached.'
CLI_RESP_PATTERN_SNAP_NOT_FOUND = 'The specified snapshot does not exist'
LUN_ALL = [<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f7610>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f76d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f7c90>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd290>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd550>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecde10>]
LUN_ATTACHEDSNAP = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecde10>
LUN_CAPACITY = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd290>
LUN_ID = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecdb10>
LUN_NAME = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecded0>
LUN_OPERATION = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f7c90>
LUN_OWNER = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd550>
LUN_POOL = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecde50>
LUN_STATE = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f7610>
LUN_STATUS = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f76d0>
LUN_WITH_POOL = [<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f7610>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd290>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd550>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecde10>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecde50>]
MAX_POOL_LUNS = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecddd0>
POOL_ALL = [<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd3d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd5d0>]
POOL_FAST_CACHE = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd650>
POOL_FEATURE_DEFAULT = (<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecddd0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cef4990>)
POOL_FREE_CAPACITY = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd5d0>
POOL_NAME = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd910>
POOL_TOTAL_CAPACITY = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd3d0>
TOTAL_POOL_LUNS = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cef4990>
add_hlu_to_storage_group(hlu, alu, sg_name)

Adds a lun into storage group as specified hlu number.

Return True if the hlu is as specified, otherwise False.

add_lun_to_consistency_group(cg_name, lun_id, poll=False)
attach_mount_point(name, snapshot_name)
check_lun_has_snap(lun_id)
command_execute(*command, **kwargv)

Executes command against the VNX array.

When there is named parameter poll=False, the command will be sent alone with option -np.

connect_host_to_storage_group(hostname, sg_name)
create_cgsnapshot(cgsnapshot)

Create a cgsnapshot (snap group).

create_consistencygroup(context, group)

create the consistency group.

create_lun_by_cmd(cmd, name)
create_lun_with_advance_feature(pool, name, size, provisioning, tiering, consistencygroup_id=None, poll=True)
create_mount_point(primary_lun_name, name)
create_snapshot(lun_id, name)
create_storage_group(name)
delete_cgsnapshot(cgsnapshot)

Delete a cgsnapshot (snap group).

delete_consistencygroup(cg_name)
delete_lun(name)
delete_snapshot(name)
delete_storage_group(name)
deregister_initiator(initiator_uid)

This function tries to deregister initiators on VNX.

detach_mount_point(smp_name)
disconnect_host_from_storage_group(hostname, sg_name)
enable_or_disable_compression_on_lun(volumename, compression)

The function will enable or disable the compression on lun

expand_lun(name, new_size, poll=True)
expand_lun_and_wait(name, new_size)
find_available_iscsi_targets(hostname, preferred_sp, registered_spport_set, all_iscsi_targets, multipath=False)
get_array_serial(poll=False)

return array Serial No for pool backend.

get_consistency_group_by_name(cg_name)
get_enablers_on_array(poll=False)

The function would get all the enabler installed on array.

get_fc_targets()
get_hlus(lun_id, poll=True)
get_iscsi_protocol_endpoints(device_sp)
get_iscsi_targets(poll=True)
get_login_ports(storage_group_name, connector_wwpns)
get_lun_by_id(lunid, properties=[<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f7610>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f76d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f7c90>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd290>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd550>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecde10>], poll=True)
get_lun_by_name(name, properties=[<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f7610>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f76d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f7c90>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd290>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd550>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecde10>], poll=True)
get_lun_properties(filter_option, properties=[<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f7610>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f76d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950c1f7c90>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd290>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd550>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecde10>], poll=True)
get_pool(name, properties=[<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd3d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd5d0>], poll=True)
get_pool_feature_properties(properties=(<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecddd0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cef4990>), poll=True)
get_pool_list(properties=[<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd3d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd5d0>], poll=True)
get_pool_name_of_lun(lun_name, poll=True)
get_pool_properties(filter_option, properties=[<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd3d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x2b950cecd5d0>], poll=True)
get_port_wwn(sp, port_id, allports=None)
get_registered_spport_set(initiator_iqn, sgname, sg_raw_out)
get_status_up_ports(storage_group_name, poll=True)

Function to get ports whose status are up.

get_storage_group(name, poll=True)
is_pool_fastcache_enabled(storage_pool, poll=False)
lun_rename(lun_id, new_name, poll=False)

This function used to rename a lun to match the expected name for the volume.

migrate_lun(src_id, dst_id)
migrate_lun_with_verification(src_id, dst_id=None, dst_name=None)
migration_cancel(src_id)
modify_lun_tiering(name, tiering)

This function used to modify a lun’s tiering policy.

ping_node(target_portal, initiator_ip)
remove_hlu_from_storagegroup(hlu, sg_name, poll=False)
remove_luns_from_consistencygroup(cg_name, remove_ids, poll=False)

Removes LUN(s) from cg

replace_luns_in_consistencygroup(cg_name, new_ids, poll=False)

Replaces LUN(s) with new_ids for cg

class CreateDestLunTask

Bases: taskflow.task.Task

Creates a destination lun for migration.

Reversion strategy: Delete the temp destination lun.

execute(client, pool_name, dest_vol_name, volume_size, provisioning, tiering, *args, **kwargs)
revert(result, client, dest_vol_name, *args, **kwargs)
class CreateSMPTask(name=None, provides=None, requires=None, auto_extract=True, rebind=None, inject=None)

Bases: taskflow.task.Task

Creates a snap mount point (SMP) for the source snapshot.

Reversion strategy: Delete the SMP.

execute(client, volume, source_vol_name, *args, **kwargs)
revert(result, client, volume, *args, **kwargs)
class CreateSnapshotTask(name=None, provides=None, requires=None, auto_extract=True, rebind=None, inject=None)

Bases: taskflow.task.Task

Creates a snapshot/cgsnapshot of a volume.

Reversion Strategy: Delete the created snapshot/cgsnapshot.

execute(client, snapshot, source_lun_id, *args, **kwargs)
revert(result, client, snapshot, *args, **kwargs)
class EMCVnxCliArray(prtcl, configuration)

Bases: cinder.volume.drivers.emc.emc_vnx_cli.EMCVnxCliBase

get_target_storagepool(volume, source_volume=None)
update_volume_stats()

Retrieves stats info.

class EMCVnxCliBase(prtcl, configuration=None)

Bases: object

This class defines the functions to use the native CLI functionality.

VERSION = '05.03.05'
assure_host_access(volume, connector)
assure_host_in_storage_group(hostname, storage_group)
assure_storage_group(storage_group)
auto_register_initiator(connector, sgdata)

Automatically registers available initiators.

Returns True if has registered initiator otherwise returns False.

create_cgsnapshot(driver, context, cgsnapshot)

Creates a cgsnapshot (snap group).

create_cloned_volume(volume, src_vref)

Creates a clone of the specified volume.

create_consistencygroup(context, group)

Creates a consistency group.

create_snapshot(snapshot)

Creates a snapshot.

create_volume(volume)

Creates a EMC volume.

create_volume_from_snapshot(volume, snapshot)

Constructs a work flow to create a volume from snapshot.

This flow will do the following:

  1. Create a snap mount point (SMP) for the snapshot.
  2. Attach the snapshot to the SMP created in the first step.
  3. Create a temporary lun prepare for migration.
  4. Start a migration between the SMP and the temp lun.
delete_cgsnapshot(driver, context, cgsnapshot)

Deletes a cgsnapshot (snap group).

delete_consistencygroup(driver, context, group)

Deletes a consistency group.

delete_snapshot(snapshot)

Deletes a snapshot.

delete_volume(volume)

Deletes an EMC volume.

determine_all_enablers_exist(enablers)

Determine all wanted enablers whether exist.

determine_changes_when_retype(volume, new_type, host)
dumps_provider_location(pl_dict)
enablers = []
extend_volume(volume, new_size)

Extends an EMC volume.

filter_available_hlu_set(used_hlus)
find_iscsi_protocol_endpoints(device_sp)

Returns the iSCSI initiators for a SP.

get_array_serial()
get_initiator_target_map(fc_initiators, fc_targets)
get_login_ports(connector)
get_lun_id(volume)
get_lun_id_by_name(volume_name)
get_lun_map(storage_group)
get_lun_owner(volume)

Returns SP owner of the volume.

get_pool(volume)

Returns the pool name of a volume.

get_specific_extra_spec(specs, key)
get_status_up_ports(connector)
get_storage_group_uid(name)
get_target_storagepool(volume, source_volume=None)
get_volumetype_extraspecs(volume)
initialize_connection(volume, connector)
manage_existing(volume, ref)

Imports the existing backend storage object as a volume.

Renames the backend storage object so that it matches the, volume[‘name’] which is how drivers traditionally map between a cinder volume and the associated backend storage object.

existing_ref:{
‘id’:lun_id

}

manage_existing_get_size(volume, ref)

Returns size of volume to be managed by manage_existing.

migrate_volume(ctxt, volume, host, new_type=None)

Leverage the VNX on-array migration functionality.

This method is invoked at the source backend.

retype(ctxt, volume, new_type, diff, host)
stats = {'driver_version': '05.03.05', 'deduplication_support': 'False', 'fast_support': 'False', 'thinprovisioning_support': 'False', 'vendor_name': 'EMC', 'volume_backend_name': None, 'compression_support': 'False', 'storage_protocol': None}
terminate_connection(volume, connector)

Disallow connection from connector.

unmanage(volume)

Unmanages a volume

update_consistencygroup(context, group, add_volumes, remove_volumes)

Adds or removes LUN(s) to/from an existing consistency group

update_volume_stats()

Gets the common stats shared by pool and array backend.

vnx_get_fc_properties(connector, device_number)
vnx_get_iscsi_properties(volume, connector, hlu, sg_raw_output)
class EMCVnxCliPool(prtcl, configuration)

Bases: cinder.volume.drivers.emc.emc_vnx_cli.EMCVnxCliBase

get_target_storagepool(volume, source_volume=None)
update_volume_stats()

Retrieves stats info.

class MigrateLunTask

Bases: taskflow.task.Task

Starts a migration between the SMP and the temp lun.

Reversion strategy: None

execute(client, dest_vol_name, volume, lun_data, *args, **kwargs)
revert(*args, **kwargs)
class PropertyDescriptor(option, label, key, converter=None)

Bases: object

decorate_all_methods(method_decorator)

Applies decorator on the methods of a class.

This is a class decorator, which will apply method decorator referred by method_decorator to all the public methods (without underscore as the prefix) in a class.

getEMCVnxCli(prtcl, configuration=None)
log_enter_exit(func)

Previous topic

The cinder.volume.drivers.emc.emc_vmax_utils Module

Next topic

The cinder.volume.drivers.emc.xtremio Module

This Page