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
Click to show internal directories.
Click to hide internal directories.