common

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2019 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Index

Constants

View Source
const SnapshotMask = "" /* 337-byte string literal not displayed */

Variables

View Source
var (
	VolumeDeleteReason = "deleted by ibmcloud-storage-volume-lib on behalf of user request"
)

Functions

This section is empty.

Types

type SLSession

type SLSession struct {
	SLAccountID        int
	Url                string
	Backend            backend.Session
	Logger             *zap.Logger
	Config             *config.SoftlayerConfig
	ContextCredentials provider.ContextCredentials
	VolumeType         provider.VolumeType
	Provider           provider.VolumeProvider
	SLSessionCommonInterface
}

SLSession implements lib.Session

func (*SLSession) AttachVolume

AttachVolume ...

func (*SLSession) AuthorizeVolume

func (sls *SLSession) AuthorizeVolume(volumeAuthorization provider.VolumeAuthorization) error

AuthorizeVolume based on given volumeAuthorization

func (*SLSession) CreateSnapshot

func (sls *SLSession) CreateSnapshot(volume *provider.Volume, tags map[string]string) (*provider.Snapshot, error)

Create the snapshot from the volume

func (*SLSession) DeleteSnapshot

func (sls *SLSession) DeleteSnapshot(del *provider.Snapshot) error

Delete the snapshot

func (*SLSession) DeleteVolume

func (sls *SLSession) DeleteVolume(vol *provider.Volume) error

Delete the volume

func (*SLSession) DetachVolume

func (sls *SLSession) DetachVolume(detachRequest provider.VolumeAttachmentRequest) (*http.Response, error)

DetachVolume detaches the volume/ fileset from the pod

func (*SLSession) GetSnapshot

func (sls *SLSession) GetSnapshot(snapshotId string) (*provider.Snapshot, error)

Get the snapshot

func (*SLSession) GetSnapshotWithVolumeID

func (sls *SLSession) GetSnapshotWithVolumeID(volumeID string, snapshotID string) (*provider.Snapshot, error)

Get the snapshot with volume ID

func (*SLSession) GetVolumeAttachment

func (sls *SLSession) GetVolumeAttachment(detachRequest provider.VolumeAttachmentRequest) (*provider.VolumeAttachmentResponse, error)

GetVolumeAttachment ...

func (*SLSession) GetVolumeByName

func (sls *SLSession) GetVolumeByName(name string) (*provider.Volume, error)

GetVolumeByName ...

func (*SLSession) GetVolumeByRequestID

func (sls *SLSession) GetVolumeByRequestID(requestID string) (*provider.Volume, error)

GetVolumeByRequestID getvolume by request ID. The request ID the identifier returned after placing the order

func (*SLSession) HandleProvisioning

func (sls *SLSession) HandleProvisioning(orderID int) (*int, error)

HandleProvisioning

func (*SLSession) ListAllSnapshots

func (sls *SLSession) ListAllSnapshots(volumeID string) ([]*provider.Snapshot, error)

List all the snapshots for a given volume

func (*SLSession) ListSnapshots

func (sls *SLSession) ListSnapshots() ([]*provider.Snapshot, error)

Snapshot list by using tags

func (*SLSession) UpdateStorage

func (sls *SLSession) UpdateStorage(volume *provider.Volume) error

func (*SLSession) WaitForAttachVolume

func (sls *SLSession) WaitForAttachVolume(volumeAttachmentTemplate provider.VolumeAttachmentRequest) (*provider.VolumeAttachmentResponse, error)

WaitForAttachVolume ...

func (*SLSession) WaitForDetachVolume

func (sls *SLSession) WaitForDetachVolume(volumeAttachmentTemplate provider.VolumeAttachmentRequest) error

WaitForDetachVolume ...

type SLSessionCommonInterface

type SLSessionCommonInterface interface {
	// Get the volume by using ID  //
	GetVolume(id string) (*provider.Volume, error)
}

Jump to

Keyboard shortcuts

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