The cinder.volume.drivers.openvstorage Module

OpenStack Cinder driver - interface to Open vStorage - uses Open vStorage library calls (VDiskController) - uses Cinder logging

class OVSVolumeDriver(*args, **kwargs)

Bases: cinder.volume.driver.VolumeDriver

Open vStorage Volume Driver plugin for Cinder

VERSION = '1.0.5'
attach_volume(context, volume, instance_uuid, host_name, mountpoint)

Callback for volume attached to instance or host.

check_for_setup_error()

Validate driver setup

copy_image_to_volume(context, volume, image_service, image_id)

Copy image to volume Called on “nova volume-create –image-id ...” or “cinder create –image-id” Downloads image from glance server into local .raw :param volume: volume reference (sqlalchemy Model)

copy_volume_to_image(context, volume, image_service, image_meta)

Copy the volume to the specified image. Called on “cinder upload-to-image ...volume... ...image-name...” :param volume: volume reference (sqlalchemy Model)

create_cloned_volume(volume, src_vref)

Create a cloned volume from another volume. Called on “cinder create –source-volid ... “

Parameters:
  • volume – volume reference - target volume (sqlalchemy Model)
  • src_vref – volume reference - source volume (sqlalchemy Model)
OVS: Create clone from template if the source is a template
Create volume from snapshot if the source is a volume - create snapshot of source volume if it doesn’t have snapshots
create_export(context, volume)

Exports the volume. The volume is a .raw file on a virtual filesystem. Nothing to export.

create_snapshot(snapshot)

Creates a snapshot. Called on “nova image-create ” or “cinder snapshot-create ” :param snapshot: snapshot reference (sqlalchemy Model)

create_volume(volume)

Creates a volume. Called on “cinder create ...” or “nova volume-create ...” :param volume: volume reference (sqlalchemy Model)

create_volume_from_snapshot(volume, snapshot)

Creates a volume from a snapshot. Called on “cinder create –snapshot-id ...” :param snapshot: snapshot reference (sqlalchemy Model) :param volume: volume reference (sqlalchemy Model)

Volume here is just a ModelObject, it doesn’t exist physically,
it will be created by OVS.
Diskguid to be passed to the clone method is the ovs diskguid of the
parent of the snapshot with snapshot.id

OVS: Clone from arbitrary volume, requires volumedriver 3.6 release > 15.08.2014

delete_snapshot(snapshot)

Deletes a snapshot. :param snapshot: snapshot reference (sqlalchemy Model)

delete_volume(volume)

Deletes a logical volume. Called on “cinder delete ... ” :param volume: volume reference (sqlalchemy Model)

detach_volume(context, volume, attachment=None)

Callback for volume detached.

do_setup(context)

Any initialization the volume driver does while starting

ensure_export(context, volume)

Synchronously recreates an export for a volume. The volume is a .raw file on a virtual filesystem. Nothing to export.

extend_volume(volume, size_gb)

Extend volume to new size size_gb

get_volume_stats(refresh=False)

Get volumedriver stats Refresh not implemented

initialize_connection(volume, connector)

Allow connection to connector and return connection info. Volume is a .raw file on a virtual filesystem. No specific action required, connection is allowed based on POSIX permissions

remove_export(context, volume)

Removes an export for a volume. The volume is a .raw file on a virtual filesystem. Removed when delete is called.

terminate_connection(volume, connector, force)

Disallow connection from connector The volume is a .raw file on a virtual filesystem. Connection is always allowed based on POSIX permissions.

Previous topic

The cinder.volume.drivers.nimble Module

Next topic

The cinder.volume.drivers.prophetstor.dpl_fc Module

This Page