storageprovider

package
v4.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
	// DefaultCSPClientTimeout if not set for off-array csp
	DefaultCSPClientTimeout = 60
)

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
	CspClientTimeout int64
}

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