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