server

package
v0.3.6-test Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCreateCubeServerInput

func GenerateCreateCubeServerInput(cr *v1alpha1.CubeServer, templateID string) (*sdkgo.Server, error)

GenerateCreateCubeServerInput returns CreateServerRequest based on the CR spec

func GenerateCreateServerInput

func GenerateCreateServerInput(cr *v1alpha1.Server) *sdkgo.Server

GenerateCreateServerInput returns sdkgo.Server based on the CR spec

func GenerateUpdateCubeServerInput

func GenerateUpdateCubeServerInput(cr *v1alpha1.CubeServer) (*sdkgo.ServerProperties, error)

GenerateUpdateCubeServerInput returns PatchServerRequest based on the CR spec modifications

func GenerateUpdateServerInput

func GenerateUpdateServerInput(cr *v1alpha1.Server) *sdkgo.ServerProperties

GenerateUpdateServerInput returns sdkgo.ServerProperties based on the CR spec modifications

func GenerateUpdateVolumeInput

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

GenerateUpdateVolumeInput returns VolumeProperties based on the CR spec modifications

func IsCubeServerUpToDate

func IsCubeServerUpToDate(cr *v1alpha1.CubeServer, server sdkgo.Server) bool

IsCubeServerUpToDate returns true if the Server is up-to-date or false if it does not

func IsServerUpToDate

func IsServerUpToDate(cr *v1alpha1.Server, server sdkgo.Server) bool

IsServerUpToDate returns true if the Server is up-to-date or false if it does not

func LateInitializer

func LateInitializer(in *v1alpha1.ServerParameters, sg *sdkgo.Server)

LateInitializer fills the empty fields in *v1alpha1.ServerParameters with the values seen in sdkgo.Server.

func LateInitializerCube

func LateInitializerCube(in *v1alpha1.CubeServerProperties, sg *sdkgo.Server)

LateInitializerCube fills the empty fields in *v1alpha1.CubeServerProperties with the values seen in sdkgo.Server.

func LateStatusInitializer

func LateStatusInitializer(in *v1alpha1.ServerObservation, sg *sdkgo.Server)

LateStatusInitializer fills the empty fields in *v1alpha1.ServerParameters with the values seen in sdkgo.Server.

Types

type APIClient

type APIClient struct {
	*clients.IonosServices
}

APIClient is a wrapper around IONOS Service

func (*APIClient) AttachCdrom

func (cp *APIClient) AttachCdrom(ctx context.Context, datacenterID, serverID string, cdrom sdkgo.Image) (sdkgo.Image, *sdkgo.APIResponse, error)

AttachCdrom based on datacenterID, serverID, and image

func (*APIClient) AttachVolume

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

AttachVolume based on datacenterID, serverID, and volume

func (*APIClient) CheckDuplicateCubeServer

func (cp *APIClient) CheckDuplicateCubeServer(ctx context.Context, datacenterID, serverName, templateID string) (string, error)

CheckDuplicateCubeServer based on serverName, and on the immutable properties

func (*APIClient) CheckDuplicateServer

func (cp *APIClient) CheckDuplicateServer(ctx context.Context, datacenterID, serverName, cpuFamily string) (*sdkgo.Server, error)

CheckDuplicateServer based on serverName, and the immutable property location

func (*APIClient) CreateServer

func (cp *APIClient) CreateServer(ctx context.Context, datacenterID string, server sdkgo.Server) (sdkgo.Server, *sdkgo.APIResponse, error)

CreateServer based on Server properties

func (*APIClient) DeleteServer

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

DeleteServer based on datacenterID, serverID

func (*APIClient) DetachCdrom

func (cp *APIClient) DetachCdrom(ctx context.Context, datacenterID, serverID, imageID string) (*sdkgo.APIResponse, error)

DetachCdrom based on datacenterID, serverID, and imageId

func (*APIClient) DetachVolume

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

DetachVolume based on datacenterID, serverID, and volume

func (*APIClient) GetAPIClient

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

GetAPIClient gets the APIClient

func (*APIClient) GetServer

func (cp *APIClient) GetServer(ctx context.Context, datacenterID, serverID string) (sdkgo.Server, *sdkgo.APIResponse, error)

GetServer based on datacenterID and serverID

func (*APIClient) GetServerID

func (cp *APIClient) GetServerID(server *sdkgo.Server) (string, error)

GetServerID based on datacenter

func (*APIClient) IsVolumeAttached added in v1.1.0

func (cp *APIClient) IsVolumeAttached(ctx context.Context, datacenterID, serverID string, volumeID string) (bool, error)

IsVolumeAttached based on datacenterID, serverID, and volume

func (*APIClient) UpdateServer

func (cp *APIClient) UpdateServer(ctx context.Context, datacenterID, serverID string, server sdkgo.ServerProperties) (sdkgo.Server, *sdkgo.APIResponse, error)

UpdateServer based on datacenterID, serverID and Server properties

type Client

type Client interface {
	CheckDuplicateServer(ctx context.Context, datacenterID, serverName, cpuFamily string) (*sdkgo.Server, error)
	CheckDuplicateCubeServer(ctx context.Context, datacenterID, serverName, templateID string) (string, error)
	GetServer(ctx context.Context, datacenterID, serverID string) (sdkgo.Server, *sdkgo.APIResponse, error)
	CreateServer(ctx context.Context, datacenterID string, server sdkgo.Server) (sdkgo.Server, *sdkgo.APIResponse, error)
	UpdateServer(ctx context.Context, datacenterID, serverID string, server sdkgo.ServerProperties) (sdkgo.Server, *sdkgo.APIResponse, error)
	DeleteServer(ctx context.Context, datacenterID, serverID string) (*sdkgo.APIResponse, error)
	IsVolumeAttached(ctx context.Context, datacenterID, serverID, volumeID string) (bool, error)
	AttachVolume(ctx context.Context, datacenterID, serverID string, volume sdkgo.Volume) (sdkgo.Volume, *sdkgo.APIResponse, error)
	DetachVolume(ctx context.Context, datacenterID, serverID, volumeID string) (*sdkgo.APIResponse, error)
	AttachCdrom(ctx context.Context, datacenterID, serverID string, cdrom sdkgo.Image) (sdkgo.Image, *sdkgo.APIResponse, error)
	DetachCdrom(ctx context.Context, datacenterID, serverID, imageID string) (*sdkgo.APIResponse, error)
	GetAPIClient() *sdkgo.APIClient
	GetServerID(server *sdkgo.Server) (string, error)
}

Client is a wrapper around IONOS Service Server methods

Jump to

Keyboard shortcuts

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