volume

package
v0.3.12-test Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCreateVolumeInput

func GenerateCreateVolumeInput(cr *v1alpha1.Volume) (*sdkgo.Volume, error)

GenerateCreateVolumeInput returns sdkgo.Volume based on the CR spec

func GenerateUpdateVolumeInput

func GenerateUpdateVolumeInput(cr *v1alpha1.Volume, properties *sdkgo.VolumeProperties) (*sdkgo.VolumeProperties, error)

GenerateUpdateVolumeInput returns sdkgo.VolumeProperties based on the CR spec modifications

func IsVolumeUpToDate

func IsVolumeUpToDate(cr *v1alpha1.Volume, volume *sdkgo.Volume) bool

IsVolumeUpToDate returns true if the Volume is up-to-date or false if it does not

Types

type APIClient

type APIClient struct {
	*clients.IonosServices
}

APIClient is a wrapper around IONOS Service

func (*APIClient) CheckDuplicateVolume

func (cp *APIClient) CheckDuplicateVolume(ctx context.Context, datacenterID, volumeName, storageType, availabilityZone, licenceType, image string) (*sdkgo.Volume, error)

CheckDuplicateVolume based on datacenterID, volumeName

func (*APIClient) CreateVolume

func (cp *APIClient) CreateVolume(ctx context.Context, datacenterID string, volume sdkgo.Volume) (sdkgo.Volume, *sdkgo.APIResponse, error)

CreateVolume based on Volume properties

func (*APIClient) DeleteVolume

func (cp *APIClient) DeleteVolume(ctx context.Context, datacenterID, volumeID string) (*sdkgo.APIResponse, error)

DeleteVolume based on datacenterID, volumeID

func (*APIClient) GetAPIClient

func (cp *APIClient) GetAPIClient() *sdkgo.APIClient

GetAPIClient gets the APIClient

func (*APIClient) GetServerNameByID added in v1.1.3

func (cp *APIClient) GetServerNameByID(ctx context.Context, datacenterID, serverID string) (string, error)

GetServerNameByID based on boot server ID

func (*APIClient) GetVolume

func (cp *APIClient) GetVolume(ctx context.Context, datacenterID, volumeID string) (sdkgo.Volume, *sdkgo.APIResponse, error)

GetVolume based on datacenterID and volumeID

func (*APIClient) GetVolumeID

func (cp *APIClient) GetVolumeID(volume *sdkgo.Volume) (string, error)

GetVolumeID based on volume

func (*APIClient) UpdateVolume

func (cp *APIClient) UpdateVolume(ctx context.Context, datacenterID, volumeID string, volume sdkgo.VolumeProperties) (sdkgo.Volume, *sdkgo.APIResponse, error)

UpdateVolume based on datacenterID, volumeID and Volume properties

type Client

type Client interface {
	CheckDuplicateVolume(ctx context.Context, datacenterID, volumeName, storageType, availabilityZone, licenceType, image string) (*sdkgo.Volume, error)
	GetVolumeID(datacenter *sdkgo.Volume) (string, error)
	GetVolume(ctx context.Context, datacenterID, volumeID string) (sdkgo.Volume, *sdkgo.APIResponse, error)
	CreateVolume(ctx context.Context, datacenterID string, volume sdkgo.Volume) (sdkgo.Volume, *sdkgo.APIResponse, error)
	UpdateVolume(ctx context.Context, datacenterID, volumeID string, volume sdkgo.VolumeProperties) (sdkgo.Volume, *sdkgo.APIResponse, error)
	DeleteVolume(ctx context.Context, datacenterID, volumeID string) (*sdkgo.APIResponse, error)
	GetAPIClient() *sdkgo.APIClient
	GetServerNameByID(ctx context.Context, datacenterID, serverID string) (string, error)
}

Client is a wrapper around IONOS Service Volume methods

Jump to

Keyboard shortcuts

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