The cinder.volume.drivers.zfssa.zfssarest Module

The cinder.volume.drivers.zfssa.zfssarest Module

ZFS Storage Appliance Proxy

class ZFSSAApi

Bases: object

ZFSSA API proxy class

add_to_initiatorgroup(initiator, initiatorgroup)

Add an iSCSI initiator to initiatorgroup

add_to_targetgroup(iqn, targetgroup)

Add an iSCSI target to targetgroup.

clone_snapshot(pool, project, lun, snapshot, clone_proj, clone, specs)

clone ‘snapshot’ to a lun named ‘clone’ in project ‘clone_proj’.

create_initiator(initiator, alias, chapuser=None, chapsecret=None)

Create an iSCSI initiator.

create_lun(pool, project, lun, volsize, targetgroup, specs)

Create a LUN.

specs - contains volume properties (e.g blocksize, compression).

create_project(pool, project, compression=None, logbias=None)

Create a project on a pool.

Check first whether the pool exists.

create_replication_action(host_pool, host_project, tgt_name, tgt_pool, volume)

Create a replication action.


Create a custom ZFSSA schema.


Create multiple custom ZFSSA schemas.

create_snapshot(pool, project, lun, snapshot)

create snapshot.

create_target(alias, interfaces=None, tchapuser=None, tchapsecret=None)

Create an iSCSI target.

  • interfaces – an array with network interfaces
  • tchapsecret (tchapuser,) – target’s chapuser and chapsecret

target iqn

delete_lun(pool, project, lun)

delete iscsi lun.

delete_project(pool, project)

Delete a project.


Delete a replication action.

delete_snapshot(pool, project, lun, snapshot)

delete snapshot.

edit_inherit_replication_flag(pool, project, volume, set=True)

Edit the inherit replication flag for volume.


Returns appliance asn.


Returns the initiator group of the initiator.

get_lun(pool, project, lun)

return iscsi lun properties.

get_lun_snapshot(pool, project, lun, snapshot)

Return iscsi lun snapshot properties.


Get properties of a pool.

get_project_stats(pool, project)

Get project stats.

Get available space and total space of a project returns (avail, total).


Return the replication source json which has a matching asn.


Returns all replication targets configured on the appliance.


Get an iSCSI target iqn.


Login to the appliance

move_volume(pool, project, volume, tgt_project)

Move a LUN from one project to another within the same pool.

num_clones(pool, project, lun, snapshot)

Checks whether snapshot has clones or not.


Send replication update

Send replication update to the target appliance and then wait for it to complete.

set_host(host, timeout=None)
set_lun_initiatorgroup(pool, project, lun, initiatorgroup)

Set the initiatorgroup property of a LUN.

set_lun_props(pool, project, lun, **kargs)

set lun properties.

sever_replication(package, src_name, project=None)

Sever Replication at the destination.

This method will sever the package and move the volume to a project, if project name is not passed in then the package name is selected as the project name


Check whether initiator iqn exists.


Checks whether pool exists.

verify_project(pool, project)

Checks whether project exists.

verify_service(service, status='online')

Checks whether a service is online or not


Check whether target alias exists.

class ZFSSANfsApi(*args, **kwargs)

Bases: cinder.volume.drivers.zfssa.zfssarest.ZFSSAApi

ZFSSA API proxy class for NFS driver

create_share(pool, project, share, args)

Create a share in the specified pool and project

create_snapshot(pool, project, share, snapshot)

create snapshot of a share

create_snapshot_of_volume_file(src_file='', dst_file='')
create_volume_from_snapshot_file(src_file='', dst_file='', method='COPY')
delete_snapshot(pool, project, share, snapshot)

delete snapshot of a share

get_share(pool, project, share)

return share properties

modify_service(service, edit_args=None)

Edit service properties

project_path = '/api/storage/v1/pools/%s/projects/%s'
projects_path = '/api/storage/v1/pools/%s/projects'
rename_volume(src, dst)
services_path = '/api/service/v1/services/'
set_file_props(file, specs)

Set custom properties to a file.

set_webdav(https_path, auth_str)
share_path = '/api/storage/v1/pools/%s/projects/%s/filesystems/%s'
share_snapshot_path = '/api/storage/v1/pools/%s/projects/%s/filesystems/%s/snapshots/%s'
share_snapshots_path = '/api/storage/v1/pools/%s/projects/%s/filesystems/%s/snapshots'
shares_path = '/api/storage/v1/pools/%s/projects/%s/filesystems'
verify_share(pool, project, share)

Checks whether the share exists

factory_restclient(url, **kwargs)
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.