cinder.volume.drivers.qnap
Module¶Volume driver for QNAP Storage. This driver supports QNAP Storage for iSCSI.
QnapAPIExecutor
(*args, **kwargs)¶Bases: object
Makes QNAP API calls for ES NAS.
add_target_init
(target_iqn, init_iqn, use_chap_auth, chap_username, chap_password)¶Add target acl.
clone_snapshot
(snapshot_id, new_lunname)¶Execute CGI to clone snapshot as unmap lun.
create_lun
(volume, pool_name, create_lun_name, reserve, ssd_cache, compress, dedup)¶Create lun.
create_snapshot_api
(lun_id, snapshot_name)¶Execute CGI to create snapshot from source lun.
create_target
(target_name, controller_name)¶Create target on nas and return target index.
delete_lun
(vol_id, *args, **kwargs)¶Execute delete lun API.
delete_snapshot_api
(snapshot_id)¶Execute CGI to delete snapshot by snapshot id.
delete_target
(target_index)¶Delete target on nas.
disable_lun
(lun_index, target_index)¶Disable lun from sepecific target.
edit_lun
(lun)¶Extend lun.
es_create_lun_lock
= <Semaphore at 0x7fa880f78860 c=1 _w[0]>¶es_delete_lun_lock
= <Semaphore at 0x7fa880f78898 c=1 _w[0]>¶es_lun_locks
= {}¶execute_login
()¶Login and return sid.
get_all_iscsi_portal_setting
()¶Execute get_all_iscsi_portal_setting API.
get_basic_info
(management_url)¶Get the basic information of NAS.
get_ethernet_ip
(**kwargs)¶Execute get_ethernet_ip API.
get_iscsi_portal_info
()¶Get iscsi portal info.
get_lun_info
(**kwargs)¶Execute get_lun_info API.
get_one_lun_info
(lunID)¶Execute get_one_lun_info API.
get_snapshot_info
(**kwargs)¶Execute get_snapshot_info API.
get_specific_poolinfo
(pool_id)¶Execute get specific poolinfo API.
get_target_info
(target_index)¶Get target info.
get_target_info_by_initiator
(initiatorIQN)¶Get target info by initiatorIQN.
map_lun
(lun_index, target_index)¶Map lun to sepecific target.
remove_target_init
(target_iqn, init_iqn)¶Remote target acl.
unmap_lun
(lun_index, target_index)¶Unmap lun from sepecific target.
QnapAPIExecutorTES
(*args, **kwargs)¶Bases: cinder.volume.drivers.qnap.QnapAPIExecutor
Makes QNAP API calls for TES NAS.
create_lun
(volume, pool_name, create_lun_name, reserve, ssd_cache, compress, dedup)¶Create lun.
get_ethernet_ip
(**kwargs)¶Execute get_ethernet_ip API.
tes_create_lun_lock
= <Semaphore at 0x7fa880f78e10 c=1 _w[0]>¶QnapAPIExecutorTS
(*args, **kwargs)¶Bases: cinder.volume.drivers.qnap.QnapAPIExecutor
Makes QNAP API calls for TS NAS.
create_lun
(volume, pool_name, create_lun_name, reserve, ssd_cache, compress, dedup)¶Create lun.
create_lun_lock
= <Semaphore at 0x7fa880f788d0 c=1 _w[0]>¶create_target
(target_name, controller_name)¶Create target on nas and return target index.
delete_lun
(vol_id, *args, **kwargs)¶Execute delete lun API.
delete_lun_lock
= <Semaphore at 0x7fa880f78da0 c=1 _w[0]>¶delete_target
(target_index)¶Delete target on nas.
disable_lun
(lun_index, target_index)¶Disable lun from sepecific target.
get_ethernet_ip
(**kwargs)¶Execute get_ethernet_ip API.
get_snapshot_info
(**kwargs)¶Execute get_snapshot_info API.
get_target_info
(target_index)¶Get nas target info.
lun_locks
= {}¶map_lun
(lun_index, target_index)¶Map lun to sepecific target.
remove_target_init
(target_iqn, init_iqn)¶Remove target acl.
unmap_lun
(lun_index, target_index)¶Unmap lun from sepecific target.
QnapISCSIDriver
(*args, **kwargs)¶Bases: cinder.volume.drivers.san.san.SanISCSIDriver
QNAP iSCSI based cinder driver
Version History:
1.0.0:
Initial driver (Only iSCSI).
1.2.001:
Add supports for Thin Provisioning, SSD Cache, Deduplication
, Compression and CHAP.
1.2.002:
Add support for QES fw 2.0.0.
CI_WIKI_NAME
= 'QNAP_CI'¶TIME_INTERVAL
= 3¶VERSION
= '1.2.002'¶check_for_setup_error
()¶Check the status of setup.
create_api_executor
()¶Create api executor by nas model.
create_cloned_volume
(volume, src_vref)¶Create a clone of the specified volume.
create_export
(context, volume, connector)¶Exports the volume.
create_snapshot
(snapshot)¶Create a snapshot.
create_volume
(volume)¶Create a new volume.
create_volume_from_snapshot
(volume, snapshot)¶Create a volume from a snapshot.
delete_snapshot
(snapshot)¶Delete a snapshot.
delete_volume
(volume)¶Delete the specified volume.
do_setup
(context)¶Setup the QNAP Cinder volume driver.
enum
(*sequential, **named)¶Enum method.
extend_volume
(volume, new_size)¶Extend an existing volume.
get_volume_stats
(refresh=False)¶Get volume stats. This is more of getting group stats.
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,
}
}
terminate_connection
(volume, connector, **kwargs)¶Driver entry point to unattach a volume from an instance.
update_migrated_volume
(context, volume, new_volume, original_volume_status)¶Return model update for migrated volume.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.