softlayer_block

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: 23 Imported by: 2

Documentation

Index

Constants

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

	VolumeTypeBlock = provider.VolumeType("block")
)

Variables

View Source
var ENDURANCE_TIERS = map[string]int{
	"0.25": 100,
	"2":    200,
	"4":    300,
	"10":   1000,
}

Functions

func NewProvider

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

NewProvider initialises an instance of an IaaS provider.

Types

type SLBlockProvider

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

SLBlockProvider implements provider.Provider

func (*SLBlockProvider) ContextCredentialsFactory

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

ContextCredentialsFactory ...

func (*SLBlockProvider) OpenSession

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

OpenSession opens a session on the provider

type SLBlockSession

type SLBlockSession struct {
	common.SLSession
}

SLBlockSession implements lib.Session

func (*SLBlockSession) Close

func (*SLBlockSession) Close()

Close at present does nothing

func (*SLBlockSession) CreateVolume

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

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

func (*SLBlockSession) CreateVolumeFromSnapshot

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

Create the volume from snapshot with snapshot tags

func (*SLBlockSession) GetProviderDisplayName

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

GetProviderDisplayName returns the name of the SoftLayer provider DEPRECATED

func (*SLBlockSession) GetVolume

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

GetVolume Get the volume by using ID

func (*SLBlockSession) HandleProvisioning

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

func (*SLBlockSession) ListVolumes

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

Get volume lists by using snapshot tags

func (*SLBlockSession) OrderSnapshot

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

func (*SLBlockSession) ProviderName

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

func (*SLBlockSession) Type

func (sls *SLBlockSession) 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