cinder.volume.drivers.datera.datera_iscsi
Module¶DateraDriver
(*args, **kwargs)¶Bases: cinder.volume.drivers.san.san.SanISCSIDriver
, cinder.volume.drivers.datera.datera_api2.DateraApi
, cinder.volume.drivers.datera.datera_api21.DateraApi
The OpenStack Datera Driver
CI_WIKI_NAME
= 'datera-ci'¶HEADER_DATA
= {'Datera-Driver': 'OpenStack-Cinder-2.4.0'}¶VERSION
= '2.4.0'¶create_cloned_volume
(volume, src_vref)¶Creates a clone of the specified volume.
If volume_type extra specs includes ‘replication: <is> True’ the driver needs to create a volume replica (secondary) and setup replication between the newly created volume and the secondary volume.
create_export
(context, volume, connector)¶Exports the volume.
create_snapshot
(snapshot)¶Creates a snapshot.
create_volume
(volume)¶Create a logical volume.
create_volume_from_snapshot
(volume, snapshot)¶Creates a volume from a snapshot.
If volume_type extra specs includes ‘replication: <is> True’ the driver needs to create a volume replica (secondary), and setup replication between the newly created volume and the secondary volume.
delete_snapshot
(snapshot)¶Deletes a snapshot.
delete_volume
(volume)¶Deletes a volume.
If volume_type extra specs includes ‘replication: <is> True’ then the driver needs to delete the volume replica too.
detach_volume
(context, volume, attachment=None)¶Callback for volume detached.
do_setup
(context)¶Any initialization the volume driver does while starting.
ensure_export
(context, volume, connector=None)¶Gets the associated account, retrieves CHAP info and updates.
extend_volume
(volume, new_size)¶get_manageable_volumes
(cinder_volumes, marker, limit, offset, sort_keys, sort_dirs)¶List volumes on the backend available for management by Cinder.
Returns a list of dictionaries, each specifying a volume in the host, with the following keys:
Parameters: |
|
---|
get_volume_stats
(refresh=False)¶Get volume stats.
If ‘refresh’ is True, run update first. The name is a bit misleading as the majority of the data here is cluster data.
initialize_connection
(volume, connector)¶Initializes the connection and returns connection info.
The iscsi 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_portal': '127.0.0.0.1:3260',
'volume_id': 1,
'discard': False,
}
}
If the backend driver supports multiple connections for multipath and for single path with failover, “target_portals”, “target_iqns”, “target_luns” are also populated:
{
'driver_volume_type': 'iscsi',
'data': {
'target_discovered': False,
'target_iqn': 'iqn.2010-10.org.openstack:volume1',
'target_iqns': ['iqn.2010-10.org.openstack:volume1',
'iqn.2010-10.org.openstack:volume1-2'],
'target_portal': '10.0.0.1:3260',
'target_portals': ['10.0.0.1:3260', '10.0.1.1:3260'],
'target_lun': 1,
'target_luns': [1, 1],
'volume_id': 1,
'discard': False,
}
}
login
()¶manage_existing
(volume, existing_ref)¶Manage an existing volume on the Datera backend
The existing_ref must be either the current name or Datera UUID of an app_instance on the Datera backend in a colon separated list with the storage instance name and volume name. This means only single storage instances and single volumes are supported for managing by cinder.
Eg.
if using Datera 2.1 API
or
if using 2.0 API
Parameters: |
|
---|
manage_existing_get_size
(volume, existing_ref)¶Get the size of an unmanaged volume on the Datera backend
The existing_ref must be either the current name or Datera UUID of an app_instance on the Datera backend in a colon separated list with the storage instance name and volume name. This means only single storage instances and single volumes are supported for managing by cinder.
Eg.
existing_ref == app_inst_name:storage_inst_name:vol_name
Parameters: |
|
---|
retype
(ctxt, volume, new_type, diff, host)¶Convert the volume to be of the new type.
Returns a boolean indicating whether the retype occurred.
Parameters: |
|
---|
unmanage
(volume)¶Unmanage a currently managed volume in Cinder
Parameters: | volume – Cinder volume to unmanage |
---|
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.