storageprovider

package
v4.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DefaultContextPath if not set for on-array csp
	DefaultContextPath = "/csp"
	// DefaultServicePort if not set for on-array csp
	DefaultServicePort = 443
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	Username    string
	Password    string
	Backend     string
	ServicePort int
	ContextPath string
	ServiceName string
}

Credentials defines how a StorageProvider is accessed

func CreateCredentials

func CreateCredentials(secrets map[string]string) (*Credentials, error)

CreateCredentials creates the credentail object from the given secrets

type StorageProvider

type StorageProvider interface {
	SetNodeContext(*model.Node) error
	GetNodeContext(nodeID string) (*model.Node, error)
	GetVolume(id string) (*model.Volume, error)
	GetVolumeByName(name string) (*model.Volume, error)
	GetVolumes() ([]*model.Volume, error)
	CreateVolume(name, description string, size int64, opts map[string]interface{}) (*model.Volume, error)
	CloneVolume(name, description, sourceID, snapshotID string, size int64, opts map[string]interface{}) (*model.Volume, error)
	DeleteVolume(id string, force bool) error
	PublishVolume(id, hostUUID, accessProtocol string) (*model.PublishInfo, error) // Idempotent
	UnpublishVolume(id, hostUUID string) error                                     // Idempotent
	ExpandVolume(id string, requestBytes int64) (*model.Volume, error)
	GetSnapshot(id string) (*model.Snapshot, error)
	GetSnapshotByName(name string, sourceVolID string) (*model.Snapshot, error)
	GetSnapshots(sourceVolID string) ([]*model.Snapshot, error)
	CreateSnapshot(name, description, sourceVolID string, opts map[string]interface{}) (*model.Snapshot, error)
	DeleteSnapshot(id string) error
	EditVolume(id string, opts map[string]interface{}) (*model.Volume, error)
	CreateVolumeGroup(name, description string, opts map[string]interface{}) (*model.VolumeGroup, error)
	DeleteVolumeGroup(id string) error
	CreateSnapshotGroup(name, sourceVolumeGroupID string, opts map[string]interface{}) (*model.SnapshotGroup, error)
	DeleteSnapshotGroup(id string) error
}

StorageProvider defines the interface to any storage related operations required by CSI and hopefully docker

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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