softlayer_file

package
v1.0.2-beta Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Softlayer storage provider
	SoftLayer            = provider.VolumeProvider("SOFTLAYER-FILE")
	SoftLayerEndurance   = provider.VolumeProviderType("SOFTLAYER_ENDURANCE")
	SoftLayerPerformance = provider.VolumeProviderType("SOFTLAYER_PERFORMANCE")

	VolumeTypeFile = provider.VolumeType("file")
)

Variables

View Source
var ENDURANCE_TIERS = map[string]int{
	"0.25": 100,
	"2":    200,
	"4":    300,
	"10":   1000,
}
View Source
var (
	VOLUME_DELETE_REASON = "deleted by ibm-volume-lib on behalf of user request"
)

Functions

func NewProvider

func NewProvider(conf *config.Config, logger *zap.Logger) (local.Provider, error)

NewProvider initialises an instance of an IaaS provider.

Types

type SLFileProvider

type SLFileProvider struct {
	NewBackendSession func(url string, credentials provider.ContextCredentials, httpClient *http.Client, debug bool, logger *zap.Logger) backend.Session
	// contains filtered or unexported fields
}

SLFileProvider implements provider.Provider

func (*SLFileProvider) ContextCredentialsFactory

func (slp *SLFileProvider) ContextCredentialsFactory(zone *string) (local.ContextCredentialsFactory, error)

ContextCredentialsFactory ...

func (*SLFileProvider) OpenSession

func (slp *SLFileProvider) OpenSession(ctx context.Context, contextCredentials provider.ContextCredentials, logger *zap.Logger) (provider.Session, error)

OpenSession opens a session on the provider

type SLFileSession

type SLFileSession struct {
	common.SLSession
}

SLFileSession implements lib.Session

func (*SLFileSession) Close

func (*SLFileSession) Close()

Close at present does nothing

func (*SLFileSession) CreateVolume

func (sls *SLFileSession) CreateVolume(volumeRequest provider.Volume) (*provider.Volume, error)

Create Volume along with snapshot space allocation TESTED: SAAS offering for endurance and Performance TODO: test Enterprise volumeOrdering with endurance and performance

func (*SLFileSession) CreateVolumeFromSnapshot

func (sls *SLFileSession) CreateVolumeFromSnapshot(snapshot provider.Snapshot, tags map[string]string) (*provider.Volume, error)

Create the volume from snapshot with snapshot tags

func (*SLFileSession) GetProviderDisplayName

func (sls *SLFileSession) GetProviderDisplayName() provider.VolumeProvider

GetProviderDisplayName returns the name of the SoftLayer provider DEPRECATED

func (*SLFileSession) GetVolume

func (sls *SLFileSession) GetVolume(id string) (*provider.Volume, error)

GetVolume Get the volume by using ID

func (*SLFileSession) HandleProvisioning

func (sls *SLFileSession) HandleProvisioning(orderID int) (*provider.Volume, error)

func (*SLFileSession) ListVolumes

func (sls *SLFileSession) ListVolumes(tags map[string]string) ([]*provider.Volume, error)

Get volume lists by using snapshot tags

func (*SLFileSession) OrderSnapshot

func (sls *SLFileSession) OrderSnapshot(volumeRequest provider.Volume) error

func (*SLFileSession) ProviderName

func (sls *SLFileSession) ProviderName() provider.VolumeProvider

func (*SLFileSession) Type

func (sls *SLFileSession) Type() provider.VolumeType

Type returns the underlying volume type

Jump to

Keyboard shortcuts

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