Documentation ¶
Index ¶
- func GenerateCreateCubeServerInput(cr *v1alpha1.CubeServer, templateID string) (*sdkgo.Server, error)
- func GenerateCreateServerInput(cr *v1alpha1.Server) *sdkgo.Server
- func GenerateUpdateCubeServerInput(cr *v1alpha1.CubeServer) (*sdkgo.ServerProperties, error)
- func GenerateUpdateServerInput(cr *v1alpha1.Server) *sdkgo.ServerProperties
- func GenerateUpdateVolumeInput(cr *v1alpha1.CubeServer) (*sdkgo.VolumeProperties, error)
- func IsCubeServerUpToDate(cr *v1alpha1.CubeServer, server sdkgo.Server) bool
- func IsServerUpToDate(cr *v1alpha1.Server, server sdkgo.Server) bool
- func LateInitializer(in *v1alpha1.ServerParameters, sg *sdkgo.Server)
- func LateInitializerCube(in *v1alpha1.CubeServerProperties, sg *sdkgo.Server)
- func LateStatusInitializer(in *v1alpha1.ServerObservation, sg *sdkgo.Server)
- type APIClient
- func (cp *APIClient) AttachCdrom(ctx context.Context, datacenterID, serverID string, cdrom sdkgo.Image) (sdkgo.Image, *sdkgo.APIResponse, error)
- func (cp *APIClient) AttachVolume(ctx context.Context, datacenterID, serverID string, volume sdkgo.Volume) (sdkgo.Volume, *sdkgo.APIResponse, error)
- func (cp *APIClient) CheckDuplicateCubeServer(ctx context.Context, datacenterID, serverName, templateID string) (string, error)
- func (cp *APIClient) CheckDuplicateServer(ctx context.Context, datacenterID, serverName, cpuFamily string) (*sdkgo.Server, error)
- func (cp *APIClient) CreateServer(ctx context.Context, datacenterID string, server sdkgo.Server) (sdkgo.Server, *sdkgo.APIResponse, error)
- func (cp *APIClient) DeleteServer(ctx context.Context, datacenterID, serverID string) (*sdkgo.APIResponse, error)
- func (cp *APIClient) DetachCdrom(ctx context.Context, datacenterID, serverID, imageID string) (*sdkgo.APIResponse, error)
- func (cp *APIClient) DetachVolume(ctx context.Context, datacenterID, serverID, volumeID string) (*sdkgo.APIResponse, error)
- func (cp *APIClient) GetAPIClient() *sdkgo.APIClient
- func (cp *APIClient) GetServer(ctx context.Context, datacenterID, serverID string) (sdkgo.Server, *sdkgo.APIResponse, error)
- func (cp *APIClient) GetServerID(server *sdkgo.Server) (string, error)
- func (cp *APIClient) IsVolumeAttached(ctx context.Context, datacenterID, serverID string, volumeID string) (bool, error)
- func (cp *APIClient) UpdateServer(ctx context.Context, datacenterID, serverID string, ...) (sdkgo.Server, *sdkgo.APIResponse, error)
- type Client
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 ¶
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 ¶
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 ¶
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 ¶
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