The cinder.volume.drivers.sheepdog Module

SheepDog Volume Driver.

class SheepdogClient(addr, port)

Bases: object

Sheepdog command executor.

DOG_RESP_CLUSTER_NOT_FORMATTED = 'Cluster status: Waiting for cluster to be formatted'
DOG_RESP_CLUSTER_RUNNING = 'Cluster status: running'
DOG_RESP_CLUSTER_WAITING = 'Cluster status: Waiting for other nodes to join cluster'
DOG_RESP_CONNECTION_ERROR = 'failed to connect to'
DOG_RESP_SNAPSHOT_EXISTED = 'tag (%(snapname)s) is existed'
DOG_RESP_SNAPSHOT_NOT_FOUND = ': Failed to find requested tag'
DOG_RESP_SNAPSHOT_VDI_NOT_FOUND = ': No VDI found'
DOG_RESP_VDI_ALREADY_EXISTS = ': VDI exists already'
DOG_RESP_VDI_NOT_FOUND = ': No VDI found'
DOG_RESP_VDI_SHRINK_NOT_SUPPORT = 'Shrinking VDIs is not implemented'
DOG_RESP_VDI_SIZE_TOO_LARGE = 'New VDI size is too large'
QEMU_IMG_RESP_ALREADY_EXISTS = ': VDI exists already'
QEMU_IMG_RESP_CONNECTION_ERROR = 'Failed to connect socket: Connection refused'
QEMU_IMG_RESP_SIZE_TOO_LARGE = 'An image is too large.'
QEMU_IMG_RESP_SNAPSHOT_NOT_FOUND = 'Failed to find the requested tag'
QEMU_IMG_RESP_VDI_NOT_FOUND = 'No vdi found'
QEMU_SHEEPDOG_PREFIX = 'sheepdog:'
check_cluster_status()
clone(src_vdiname, src_snapname, dst_vdiname, size)
create(vdiname, size)
create_snapshot(vdiname, snapname)
delete(vdiname)
delete_snapshot(vdiname, snapname)
get_volume_stats()
resize(vdiname, size)
class SheepdogDriver(*args, **kwargs)

Bases: cinder.volume.driver.VolumeDriver

Executes commands relating to Sheepdog Volumes.

VERSION = '1.0.0'
backup_volume(context, backup, backup_service)

Create a new backup from an existing volume.

check_for_setup_error()
clone_image(context, volume, image_location, image_meta, image_service)

Create a volume efficiently from an existing image.

copy_image_to_volume(context, volume, image_service, image_id)
copy_volume_to_image(context, volume, image_service, image_meta)

Copy the volume to the specified image.

create_cloned_volume(volume, src_vref)

Clone a sheepdog volume from another volume.

create_export(context, volume, connector)

Export a volume.

create_snapshot(snapshot)

Create a sheepdog snapshot.

create_volume(volume)

Create a sheepdog volume.

create_volume_from_snapshot(volume, snapshot)

Create a sheepdog volume from a snapshot.

delete_snapshot(snapshot)

Delete a sheepdog snapshot.

delete_volume(volume)

Delete a logical volume.

ensure_export(context, volume)

Safely and synchronously recreate an export for a logical volume.

extend_volume(volume, new_size)

Extend an Existing Volume.

get_volume_stats(refresh=False)
initialize_connection(volume, connector)
local_path(volume)
remove_export(context, volume)

Remove an export for a logical volume.

restore_backup(context, backup, volume, backup_service)

Restore an existing backup to a new or existing volume.

terminate_connection(volume, connector, **kwargs)
class SheepdogIOWrapper(addr, port, volume, snapshot_name=None)

Bases: io.RawIOBase

File-like object with Sheepdog backend.

fileno()

Sheepdog does not have support for fileno so we raise IOError.

Raising IOError is recommended way to notify caller that interface is not supported - see http://docs.python.org/2/library/io.html#io.IOBase

flush()
read(length=None)
seek(offset, whence=0)
tell()
write(data)

Previous topic

The cinder.volume.drivers.scality Module

Next topic

The cinder.volume.drivers.smbfs Module

Project Source

This Page