ceph

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2016 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// BackendName is string for ceph storage backend
	BackendName = "ceph"
)

Variables

This section is empty.

Functions

func NewCRUDDriver

func NewCRUDDriver() (storage.CRUDDriver, error)

NewCRUDDriver is a generator for Driver structs. It is used by the storage framework to yield new drivers on every creation.

func NewMountDriver

func NewMountDriver(mountpath string) (storage.MountDriver, error)

NewMountDriver is a generator for Driver structs. It is used by the storage framework to yield new drivers on every creation.

func NewSnapshotDriver

func NewSnapshotDriver() (storage.SnapshotDriver, error)

NewSnapshotDriver is a generator for Driver structs. It is used by the storage framework to yield new drivers on every creation.

Types

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver implements a ceph backed storage driver for volplugin.

-- Pool naming

All ceph operations require a pool name (specified as `pool`) for them to work. Therefore, if no pool is specified, the best error condition will be raised.

func (*Driver) CopySnapshot

func (c *Driver) CopySnapshot(do storage.DriverOptions, snapName, newName string) error

CopySnapshot copies a snapshot into a new volume. Takes a DriverOptions, snap and volume name (string). Returns error on failure.

func (*Driver) Create

func (c *Driver) Create(do storage.DriverOptions) error

Create a volume.

func (*Driver) CreateSnapshot

func (c *Driver) CreateSnapshot(snapName string, do storage.DriverOptions) error

CreateSnapshot creates a named snapshot for the volume. Any error will be returned.

func (*Driver) Destroy

func (c *Driver) Destroy(do storage.DriverOptions) error

Destroy a volume.

func (*Driver) Exists

func (c *Driver) Exists(do storage.DriverOptions) (bool, error)

Exists returns true if the volume already exists.

func (*Driver) Format

func (c *Driver) Format(do storage.DriverOptions) error

Format formats a created volume.

func (*Driver) List

func (c *Driver) List(lo storage.ListOptions) ([]storage.Volume, error)

List all volumes.

func (*Driver) ListSnapshots

func (c *Driver) ListSnapshots(do storage.DriverOptions) ([]string, error)

ListSnapshots returns an array of snapshot names provided a maximum number of snapshots to be returned. Any error will be returned.

func (*Driver) Mount

func (c *Driver) Mount(do storage.DriverOptions) (*storage.Mount, error)

Mount a volume. Returns the rbd device and mounted filesystem path. If you pass in the params what filesystem to use as `filesystem`, it will prefer that to `ext4` which is the default.

func (*Driver) MountPath

func (c *Driver) MountPath(do storage.DriverOptions) (string, error)

MountPath returns the path of a mount for a pool/volume.

func (*Driver) Mounted

func (c *Driver) Mounted(timeout time.Duration) ([]*storage.Mount, error)

Mounted describes all the volumes currently mapped on to the host.

func (*Driver) Name

func (c *Driver) Name() string

Name returns the ceph backend string

func (*Driver) RemoveSnapshot

func (c *Driver) RemoveSnapshot(snapName string, do storage.DriverOptions) error

RemoveSnapshot removes a named snapshot for the volume. Any error will be returned.

func (*Driver) Unmount

func (c *Driver) Unmount(do storage.DriverOptions) error

Unmount a volume.

func (*Driver) Validate

func (c *Driver) Validate(do *storage.DriverOptions) error

Validate validates the driver options to ensure they are compatible with the Ceph storage driver.

Jump to

Keyboard shortcuts

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