The cinder.volume.drivers.san.hp.hp_lefthand_cliq_proxy Module

HP LeftHand SAN ISCSI Driver.

The driver communicates to the backend aka Cliq via SSH to perform all the operations on the SAN.

class HPLeftHandCLIQProxy(*args, **kwargs)

Bases: cinder.volume.drivers.san.san.SanISCSIDriver

Executes commands relating to HP/LeftHand SAN ISCSI volumes.

We use the CLIQ interface, over SSH.

Rough overview of CLIQ commands used:

CreateVolume:(creates the volume)
DeleteVolume:(deletes the volume)
ModifyVolume:(extends the volume)
CreateSnapshot:(creates the snapshot)
DeleteSnapshot:(deletes the snapshot)
CloneSnapshot:(creates the volume from a snapshot)
GetVolumeInfo:(to discover the IQN etc)
GetSnapshotInfo:
 (to discover the IQN etc)
GetClusterInfo:(to discover the iSCSI target IP address)

The ‘trick’ here is that the HP SAN enforces security by default, so normally a volume mount would need both to configure the SAN in the volume layer and do the mount on the compute layer. Multi-layer operations are not catered for at the moment in the cinder architecture, so instead we share the volume using CHAP at volume creation time. Then the mount need only use those CHAP credentials, so can take place exclusively in the compute layer.

Version history:

1.0.0 - Initial driver 1.1.0 - Added create/delete snapshot, extend volume, create volume

from snapshot support.

1.2.0 - Ported into the new HP LeftHand driver. 1.2.1 - Fixed bug #1279897, HP LeftHand CLIQ proxy may return incorrect

capacity values.

1.2.2 - Fixed driver with Paramiko 1.13.0, bug #1298608. 1.2.3 - Added update_migrated_volume #1493546

VERSION = '1.2.3'
check_for_setup_error()
create_cloned_volume(volume, src_vref)
create_export(context, volume, connector)
create_snapshot(snapshot)

Creates a snapshot.

create_volume(volume)

Creates a volume.

create_volume_from_snapshot(volume, snapshot)

Creates a volume from a snapshot.

delete_snapshot(snapshot)

Deletes a snapshot.

delete_volume(volume)

Deletes a volume.

device_stats = {}
do_setup(context)
ensure_export(context, volume)
extend_volume(volume, new_size)

Extend the size of an existing volume.

get_version_string()
get_volume_stats(refresh=False)
initialize_connection(volume, connector)

Assigns the volume to a server.

Assign any created volume to a compute node/host so that it can be used from that host. HP VSA requires a volume to be assigned to a server.

This driver returns a driver_volume_type of ‘iscsi’. The format of the driver data is defined in _get_iscsi_properties. Example return value:

{

‘driver_volume_type’: ‘iscsi’ ‘data’: {

‘target_discovered’: True, ‘target_iqn’: ‘iqn.2010-10.org.openstack:volume-00000001’, ‘target_protal’: ‘127.0.0.1:3260’, ‘volume_id’: 1,

}

}

local_path(volume)
migrate_volume(ctxt, volume, host)

Migrate the volume to the specified host.

Returns a boolean indicating whether the migration occurred, as well as model_update.

Parameters:
  • ctxt – Context
  • volume – A dictionary describing the volume to migrate
  • host – A dictionary describing the host to migrate to, where host[‘host’] is its name, and host[‘capabilities’] is a dictionary of its reported capabilities.
remove_export(context, volume)
retype(context, volume, new_type, diff, host)

Convert the volume to be of the new type.

Returns a boolean indicating whether the retype occurred.

Parameters:
  • ctxt – Context
  • volume – A dictionary describing the volume to migrate
  • new_type – A dictionary describing the volume type to convert to
  • diff – A dictionary with the difference between the two types
terminate_connection(volume, connector, **kwargs)

Unassign the volume from the host.

update_migrated_volume(context, volume, new_volume, original_volume_status)

Previous topic

The cinder.volume.drivers.san.hp.hp_3par_iscsi Module

Next topic

The cinder.volume.drivers.san.hp.hp_lefthand_iscsi Module

Project Source

This Page