Documentation ¶
Index ¶
- Constants
- Variables
- func NewProvider(conf *config.Config, logger *zap.Logger) (local.Provider, error)
- type SLBlockProvider
- type SLBlockSession
- func (*SLBlockSession) Close()
- func (sls *SLBlockSession) CreateVolume(volumeRequest provider.Volume) (*provider.Volume, error)
- func (sls *SLBlockSession) CreateVolumeFromSnapshot(snapshot provider.Snapshot, tags map[string]string) (*provider.Volume, error)
- func (sls *SLBlockSession) GetProviderDisplayName() provider.VolumeProvider
- func (sls *SLBlockSession) GetVolume(id string) (*provider.Volume, error)
- func (sls *SLBlockSession) HandleProvisioning(orderID int) (*provider.Volume, error)
- func (sls *SLBlockSession) ListVolumes(tags map[string]string) ([]*provider.Volume, error)
- func (sls *SLBlockSession) OrderSnapshot(volumeRequest provider.Volume) error
- func (sls *SLBlockSession) ProviderName() provider.VolumeProvider
- func (sls *SLBlockSession) Type() provider.VolumeType
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 ¶
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 ¶
SLBlockSession implements lib.Session
func (*SLBlockSession) CreateVolume ¶
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 ¶
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
Click to show internal directories.
Click to hide internal directories.