Back to godoc.org

Package softlayer_block

v0.0.2
Latest Go to latest

The latest major version is .

Published: Jul 15, 2019 | License: Apache-2.0 | Module: github.com/IBM/ibmcloud-storage-volume-lib

Index

Constants

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

	VolumeTypeBlock = provider.VolumeType("block")
)

Variables

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

func NewProvider

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

NewProvider initialises an instance of an IaaS provider.

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier