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)

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_schema(schema)

Create a custom ZFSSA schema.

create_schemas(schemas)

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.

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

target iqn

delete_lun(pool, project, lun)

delete iscsi lun.

delete_project(pool, project)

Delete a project.

delete_replication_action(action_id)

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.

get_asn()

Returns appliance asn.

get_initiator_initiatorgroup(initiator)

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_pool_details(pool)

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).

get_replication_source(asn)

Return the replication source json which has a matching asn.

get_replication_targets()

Returns all replication targets configured on the appliance.

get_target(alias)

Get an iSCSI target iqn.

login(auth_str)

Login to the appliance

logout()
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_repl_update(action_id)

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

verify_initiator(iqn)

Check whether initiator iqn exists.

verify_pool(pool)

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

verify_target(alias)

Check whether target alias exists.

class ZFSSANfsApi(*args, **kwargs)

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

ZFSSA API proxy class for NFS driver

create_directory(dirname)
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_file(filename)
delete_snapshot(pool, project, share, snapshot)

delete snapshot of a share

delete_snapshot_of_volume_file(src_file='')
disable_service(service)
enable_service(service)
get_share(pool, project, share)

return share properties

get_volume(volume)
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)

Previous topic

The cinder.volume.drivers.zfssa.zfssanfs Module

Next topic

The cinder.volume.flows.api.create_volume Module

Project Source

This Page