drivers

package
v0.0.0-...-295c363 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSupportHostBasedReplication

func IsSupportHostBasedReplication(resourceType string) bool

Types

type MetricDriver

type MetricDriver interface {
	//Any initialization the metric driver does while starting.
	Setup() error
	//Any operation the metric driver does while stopping.
	Teardown() error

	CollectMetrics(metricList []string, instanceID string) ([]*model.MetricSpec, error)
	ValidateMetricsSupportList(metricList []string, resourceType string) ([]string, error)
}

func InitMetricDriver

func InitMetricDriver(resourceType string) MetricDriver

Init

type ReplicationDriver

type ReplicationDriver interface {
	// Any initialization the replication driver does while starting.
	Setup() error
	// Any operation the replication driver does while stopping.
	Unset() error

	CreateReplication(opt *pb.CreateReplicationOpts) (*model.ReplicationSpec, error)
	DeleteReplication(opt *pb.DeleteReplicationOpts) error
	EnableReplication(opt *pb.EnableReplicationOpts) error
	DisableReplication(opt *pb.DisableReplicationOpts) error
	FailoverReplication(opt *pb.FailoverReplicationOpts) error
}

ReplicationDriver is an interface for exposing some operations of different replication drivers, currently supporting DRBD.

func CleanReplicationDriver

func CleanReplicationDriver(d ReplicationDriver) ReplicationDriver

Clean

func InitReplicationDriver

func InitReplicationDriver(resourceType string) (ReplicationDriver, error)

Init

type VolumeDriver

type VolumeDriver interface {
	//Any initialization the volume driver does while starting.
	Setup() error
	//Any operation the volume driver does while stopping.
	Unset() error

	CreateVolume(opt *pb.CreateVolumeOpts) (*model.VolumeSpec, error)

	PullVolume(volIdentifier string) (*model.VolumeSpec, error)

	DeleteVolume(opt *pb.DeleteVolumeOpts) error

	ExtendVolume(opt *pb.ExtendVolumeOpts) (*model.VolumeSpec, error)

	InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error)

	TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error

	CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (*model.VolumeSnapshotSpec, error)

	PullSnapshot(snapIdentifier string) (*model.VolumeSnapshotSpec, error)

	DeleteSnapshot(opt *pb.DeleteVolumeSnapshotOpts) error

	InitializeSnapshotConnection(opt *pb.CreateSnapshotAttachmentOpts) (*model.ConnectionInfo, error)

	TerminateSnapshotConnection(opt *pb.DeleteSnapshotAttachmentOpts) error

	// NOTE Parameter vg means complete volume group information, because driver
	// may use it to do something and return volume group status.
	CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*model.VolumeGroupSpec, error)

	// NOTE Parameter addVolumesRef or removeVolumesRef means complete volume
	// information that will be added or removed from group. Driver may use
	// them to do some related operations and return their status.
	UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*model.VolumeGroupSpec, error)

	// NOTE Parameter volumes means volumes deleted from group, driver may use
	// their compelete information to do some related operations and return
	// their status.
	DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts) error

	ListPools() ([]*model.StoragePoolSpec, error)
}

VolumeDriver is an interface for exposing some operations of different volume drivers, currently support sample, lvm, ceph, cinder and so forth.

func Clean

func Clean(d VolumeDriver) VolumeDriver

Clean

func Init

func Init(resourceType string) VolumeDriver

Init

Directories

Path Synopsis
huawei
lvm
openstack
utils

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL