The cinder.volume.drivers.datera.datera_iscsi
Module¶
-
class
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
- Version history:
1.0 - Initial driver 1.1 - Look for lun-0 instead of lun-1. 2.0 - Update For Datera API v2 2.1 - Multipath, ACL and reorg 2.2 - Capabilites List, Extended Volume-Type Support
Naming convention change, Volume Manage/Unmanage support- 2.3 - Templates, Tenants, Snapshot Polling,
- 2.1 Api Version Support, Restructure
2.3.1 - Scalability bugfixes 2.3.2 - Volume Placement, ACL multi-attach bugfix 2.4.0 - Fast Retype Support
-
CI_WIKI_NAME
= ‘datera-ci’¶
-
HEADER_DATA
= {‘Datera-Driver’: ‘OpenStack-Cinder-2.4.0’}¶
-
VERSION
= ‘2.4.0’¶
-
create_cloned_volume
(*args, **kwargs)¶
-
create_export
(*args, **kwargs)¶
-
create_snapshot
(*args, **kwargs)¶
-
create_volume
(*args, **kwargs)¶ Create a logical volume.
-
create_volume_from_snapshot
(*args, **kwargs)¶
-
delete_snapshot
(*args, **kwargs)¶
-
delete_volume
(*args, **kwargs)¶
-
detach_volume
(*args, **kwargs)¶
-
do_setup
(*args, **kwargs)¶
-
ensure_export
(*args, **kwargs)¶ Gets the associated account, retrieves CHAP info and updates.
-
extend_volume
(*args, **kwargs)¶
-
get_manageable_volumes
(*args, **kwargs)¶ 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: - reference (dictionary): The reference for a volume, which can be
passed to “manage_existing”.- size (int): The size of the volume according to the storage backend, rounded up to the nearest GB.
- safe_to_manage (boolean): Whether or not this volume is safe to manage according to the storage backend. For example, is the volume in use or invalid for any reason.
- reason_not_safe (string): If safe_to_manage is False, the reason why.
- cinder_id (string): If already managed, provide the Cinder ID.
- extra_info (string): Any extra information to return to the user
Parameters: - cinder_volumes – A list of volumes in this host that Cinder currently manages, used to determine if a volume is manageable or not.
- marker – The last item of the previous page; we return the next results after this value (after sorting)
- limit – Maximum number of items to return
- offset – Number of items to skip after marker
- sort_keys – List of keys to sort results by (valid keys are ‘identifier’ and ‘size’)
- sort_dirs – List of directions to sort by, corresponding to sort_keys (valid directions are ‘asc’ and ‘desc’)
-
get_volume_stats
(*args, **kwargs)¶ 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
(*args, **kwargs)¶
-
login
(*args, **kwargs)¶
-
manage_existing
(*args, **kwargs)¶ 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.
- (existing_ref[‘source-name’] ==
- tenant:app_inst_name:storage_inst_name:vol_name)
if using Datera 2.1 API
or
- (existing_ref[‘source-name’] ==
- app_inst_name:storage_inst_name:vol_name)
if using 2.0 API
Parameters: - volume – Cinder volume to manage
- existing_ref – Driver-specific information used to identify a volume
-
manage_existing_get_size
(*args, **kwargs)¶ 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: - volume – Cinder volume to manage
- existing_ref – Driver-specific information used to identify a volume on the Datera backend
-
retype
(*args, **kwargs)¶ Convert the volume to be of the new type.
Returns a boolean indicating whether the retype occurred. :param ctxt: Context :param volume: A dictionary describing the volume to migrate :param new_type: A dictionary describing the volume type to convert to :param diff: A dictionary with the difference between the two types :param 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 (Not Used).
-
unmanage
(*args, **kwargs)¶ Unmanage a currently managed volume in Cinder
Parameters: volume – Cinder volume to unmanage