The cinder.volume.drivers.synology.synology_common Module

class AESCipher(password, key_length=32)

Bases: object

Encrypt with OpenSSL-compatible way

SALT_MAGIC = ‘Salted__’
encrypt(text)
class APIRequest(host, port, username, password, https=False, ssl_verify=True, one_time_pass=None, device_id=None)

Bases: object

new_session()
request(*args, **kwargs)
class Session(host, port, username, password, https=False, ssl_verify=True, one_time_pass=None, device_id=None)

Bases: object

did()
query(api)
sid()
url_prefix()
class SynoCommon(config, driver_type)

Bases: object

Manage Cinder volumes on Synology storage

CINDER_LUN = ‘CINDER’
METADATA_DS_SNAPSHOT_UUID = ‘ds_snapshot_UUID’
TARGET_NAME_PREFIX = ‘Cinder-Target-‘
check_for_setup_error()
check_response(out, **kwargs)
check_value_valid(obj, key_array, value_type=None)
create_cloned_volume(volume, src_vref)
create_iscsi_export(volume_name, identifier)
create_snapshot(snapshot)
create_volume(volume)
create_volume_from_snapshot(volume, snapshot)
delete_snapshot(snapshot)
delete_volume(volume)
exec_webapi(api, method, version, **kwargs)
extend_volume(volume, new_size)
get_ip()
get_iqn_and_trgid(location)
get_iscsi_properties(volume)
get_provider_location(iqn, trg_id)
is_lun_mapped(lun_name)
remove_iscsi_export(volume_name, trg_id)
update_migrated_volume(volume, new_volume)
update_volume_stats()

Update volume statistics.

Three kinds of data are stored on the Synology backend pool: 1. Thin volumes (LUNs on the pool), 2. Thick volumes (LUNs on the pool), 3. Other user data.

other_user_data_gb is the size of the 3rd one. lun_provisioned_gb is the summation of all thin/thick volume provisioned size.

Only thin type is available for Cinder volumes.