The cinder.volume.drivers.emc.emc_vnx_cli Module

VNX CLI

class AllowReadWriteOnSnapshotTask(name=None, provides=None, requires=None, auto_extract=True, rebind=None, inject=None, ignore_list=None, revert_rebind=None, revert_requires=None)

Bases: taskflow.task.Task

Task to modify a Snapshot to allow ReadWrite on it.

execute(client, snap_name, *args, **kwargs)
class AttachSnapTask(name=None, provides=None, requires=None, auto_extract=True, rebind=None, inject=None, ignore_list=None, revert_rebind=None, revert_requires=None)

Bases: taskflow.task.Task

Attaches the snapshot to the SMP created before.

Reversion strategy: Detach the SMP.

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

Bases: object

LUN_ALL = [<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860c46790>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f986bc010d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603b6fd0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396050>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396090>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603960d0>]
LUN_ATTACHEDSNAP = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603960d0>
LUN_CAPACITY = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396050>
LUN_ID = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396150>
LUN_NAME = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396110>
LUN_OPERATION = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603b6fd0>
LUN_OWNER = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396090>
LUN_POOL = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396190>
LUN_STATE = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860c46790>
LUN_STATUS = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f986bc010d0>
LUN_WITH_POOL = [<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860c46790>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396050>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396090>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603960d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396190>]
MAX_POOL_LUNS = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396390>
POOL_ALL = [<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396210>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396250>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603961d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396350>]
POOL_FAST_CACHE = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396290>
POOL_FEATURE_DEFAULT = (<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396390>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603963d0>)
POOL_FREE_CAPACITY = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396250>
POOL_FULL_THRESHOLD = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396350>
POOL_NAME = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603962d0>
POOL_STATE = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603961d0>
POOL_SUBSCRIBED_CAPACITY = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396310>
POOL_TOTAL_CAPACITY = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396210>
TOTAL_POOL_LUNS = <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603963d0>
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)
allow_snapshot_readwrite_and_autodelete(snap_name)
attach_mount_point(name, snapshot_name)
check_lun_has_snap(lun_id)
check_snapshot(snap_name, poll=True)

check if a snapshot/cgsnapshot is existed.

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)
copy_snapshot(src_snap_name, new_name)
create_cgsnapshot(cgsnapshot)

Create a cgsnapshot (snap group).

create_consistencygroup(cg_name, members=None, poll=False)

create the consistency group.

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

Delete a cgsnapshot (snap group).

delete_consistencygroup(cg_name)
delete_lun(name)

Deletes a LUN or mount point.

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, registered_spport_set, all_iscsi_targets)

Finds available iscsi targets for a host.

When the iscsi_initiator_map is configured, the driver will find an accessible portal and put it as the first portal in the portal list to ensure the accessible portal will be used when multipath is not used. All the registered portals will be returned for Nova to clean up all the unused devices related to this LUN created by logging into these portals during attaching other LUNs on VNX.

get_array_serial(poll=False)

return array Serial No for pool backend.

get_connection_getport_output()
get_consistency_group_by_name(cg_name)
get_enablers_on_array(poll=False)

The function would get all the enablers installed on array.

get_fc_targets()
get_hlus(lun_id, poll=True)
get_iscsi_targets(poll=False, io_ports=None)
get_login_ports(storage_group_name, connector_wwpns, io_ports=None)
get_lun_by_id(lunid, properties=[<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860c46790>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f986bc010d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603b6fd0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396050>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396090>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603960d0>], poll=True)
get_lun_by_name(name, properties=[<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860c46790>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f986bc010d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603b6fd0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396050>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396090>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603960d0>], poll=True)
get_lun_current_ops_state(name, poll=False)
get_lun_properties(filter_option, properties=[<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860c46790>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f986bc010d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603b6fd0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396050>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396090>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603960d0>], poll=True)
get_pool(name, properties=[<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396210>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396250>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603961d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396350>], poll=True)
get_pool_feature_properties(properties=(<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396390>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603963d0>), poll=True)
get_pool_list(properties=[<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396210>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396250>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603961d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396350>], poll=True)
get_pool_properties(filter_option, properties=[<cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396210>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396250>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f98603961d0>, <cinder.volume.drivers.emc.emc_vnx_cli.PropertyDescriptor object at 0x7f9860396350>], poll=True)
get_port_output()
get_port_wwn(sp, port_id, allports=None)

Returns wwn via sp and port_id

Parameters:
  • sp – should be in this format ‘SP A’
  • port_id – ‘0’ or 0
get_registered_spport_set(initiator_iqn, sgname, sg_raw_out)
get_status_up_ports(storage_group_name, io_ports=None, poll=True)

Function to get ports whose status are up.

get_storage_group(name, poll=True)
migrate_lun(src_id, dst_id)
migrate_lun_with_verification(src_id, dst_id, dst_name=None)
migrate_lun_without_verification(src_id, dst_id, 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

rename_lun(lun_id, new_name, poll=False)
replace_luns_in_consistencygroup(cg_name, new_ids, poll=False)

Replaces LUN(s) with new_ids for cg

verify_lun_migration(src_id)
wait_until_lun_ready_for_ops(name)
class CopySnapshotTask(name=None, provides=None, requires=None, auto_extract=True, rebind=None, inject=None, ignore_list=None, revert_rebind=None, revert_requires=None)

Bases: taskflow.task.Task

Task to copy a volume snapshot/consistency group snapshot.

Reversion Strategy: Delete the copied snapshot/cgsnapshot

execute(client, src_snap_name, snap_name, *args, **kwargs)
revert(result, client, src_snap_name, snap_name, *args, **kwargs)
class CreateConsistencyGroupTask(lun_id_key_template, num_of_members)

Bases: taskflow.task.Task

Task to create a consistency group.

execute(client, group, *args, **kwargs)
class CreateDestLunTask(name=None, providers='lun_data', inject=None)

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, ignore_pool_full_threshold, *args, **kwargs)
revert(result, client, dest_vol_name, *args, **kwargs)
class CreateSMPTask(name=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, ignore_list=None, revert_rebind=None, revert_requires=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 EMCVnxCliBase(prtcl, configuration=None)

Bases: object

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

VERSION = '06.00.00'
assure_host_access(volume, connector)
assure_host_in_storage_group(hostname, storage_group)
assure_storage_group(storage_group)
auto_register_initiator(connector, sgdata, io_ports_filter=None)

Automatically register available initiators.

Returns:True if has registered initiator otherwise return False
auto_register_initiator_to_all(connector, sgdata)

Automatically registers available initiators.

Returns True if has registered initiator otherwise returns False.

auto_register_with_io_port_filter(connector, sgdata, io_port_filter)

Automatically register specific IO ports to storage group.

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_consistencygroup_from_src(context, group, volumes, cgsnapshot=None, snapshots=None)

Creates a consistency group from cgsnapshot.

create_export_snapshot(context, snapshot, connector)

Creates mount point for a snapshot.

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. (Skipped if copytype:snap=’true’)
  4. Start a migration between the SMP and the temp lun. (Skipped if copytype:snap=’true’)
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, force_delete=False)

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)
get_array_serial()
get_initiator_target_map(fc_initiators, fc_targets)
get_login_ports(connector, io_ports=None)
get_lun_id(volume)
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_status_up_ports(connector, io_ports=None)
get_target_storagepool(volume, source_volume=None)
get_volumetype_extraspecs(volume)
initialize_connection(volume, connector)

Initializes the connection and returns connection info.

initialize_connection_snapshot(snapshot, connector, **kwargs)

Initializes connection for mount point.

manage_existing(volume, manage_existing_ref)

Imports the existing backend storage object as a volume.

manage_existing_ref:{
‘source-id’:<lun id in VNX>

} or manage_existing_ref:{

‘source-name’:<lun name in VNX>

}

manage_existing_get_size(volume, existing_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.

remove_export_snapshot(context, snapshot)

Removes mount point for a snapshot.

retype(ctxt, volume, new_type, diff, host)
snap_as_vol_prefix = 'snap-as-vol-'
stats = {'driver_version': '06.00.00', 'thin_provisioning_support': False, 'deduplication_support': 'False', 'fast_support': 'False', 'thick_provisioning_support': True, 'vendor_name': 'EMC', 'volume_backend_name': None, 'compression_support': 'False', 'storage_protocol': None}
terminate_connection(volume, connector)

Disallow connection from connector.

terminate_connection_snapshot(snapshot, connector, **kwargs)

Disallows connection for mount point.

tmp_cgsnap_prefix = 'tmp-cgsnapshot-'
tmp_smp_for_backup_prefix = 'tmp-smp-'
tmp_snap_prefix = 'tmp-snap-'
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_enabler_in_volume_stats()

Updates the enabler information in stats.

update_migrated_volume(context, volume, new_volume, original_volume_status)
update_volume_stats()

Retrieves stats info.

vnx_get_fc_properties(connector, device_number)
vnx_get_iscsi_properties(volume, connector, hlu, sg_raw_output)
class MigrateLunTask(name=None, providers='new_lun_id', inject=None, rebind=None, wait_for_completion=True)

Bases: taskflow.task.Task

Starts a migration between the SMP and the temp lun.

Reversion strategy: None

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

Bases: object

class VNXError

Bases: object

CG_EXISTED = 1903001633
CG_IS_DELETING = 1898809345
CG_SNAP_NAME_EXISTED = 1903001605
GENERAL_NOT_FOUND = 'cannot find|may not exist|does not exist'
LUN_ALREADY_EXPANDED = 1898810884
LUN_EXISTED = 1898810628
LUN_IN_SG = 'contained in a Storage Group|LUN mapping still exists'
LUN_IS_NOT_SMP = 'it is not a snapshot mount point'
LUN_IS_PREPARING = 1898810894
LUN_NOT_MIGRATING = 'The specified source LUN is not currently migrating'
SG_NAME_IN_USE = 'Storage Group name already in use'
SNAP_ALREADY_MOUNTED = 1903001685
SNAP_NAME_EXISTED = 1903001605
SNAP_NAME_IN_USE = 1903001603
SNAP_NOT_ATTACHED = 'The specified Snapshot mount point is not currently attached.'
classmethod get_all()
classmethod has_error(output, *error_codes)
class WaitMigrationsCompleteTask(lun_id_key_template, num_of_members)

Bases: taskflow.task.Task

Task to wait migrations to be completed.

execute(client, *args, **kwargs)
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.scaleio Module

Project Source

This Page