nic

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCreateNicInput

func GenerateCreateNicInput(cr *v1alpha1.Nic, ips []string) (*sdkgo.Nic, error)

GenerateCreateNicInput returns sdkgo.Nic based on the CR spec

func GenerateUpdateNicInput

func GenerateUpdateNicInput(cr *v1alpha1.Nic, ips []string) (*sdkgo.NicProperties, error)

GenerateUpdateNicInput returns sdkgo.NicProperties based on the CR spec modifications

func IsNicUpToDate

func IsNicUpToDate(cr *v1alpha1.Nic, nic sdkgo.Nic, ips []string) bool

IsNicUpToDate returns true if the Nic is up-to-date or false if it does not

func LateInitializer

func LateInitializer(in *v1alpha1.NicParameters, sg *sdkgo.Nic)

LateInitializer fills the empty fields in *v1alpha1.NicParameters with the values seen in sdkgo.Nic.

func LateStatusInitializer added in v1.0.9

func LateStatusInitializer(in *v1alpha1.NicObservation, nic *sdkgo.Nic)

LateStatusInitializer fills the empty fields in *v1alpha1.NicObservation with the values seen in sdkgo.Nic.

Types

type APIClient

type APIClient struct {
	*clients.IonosServices
}

APIClient is a wrapper around IONOS Service

func (*APIClient) CheckDuplicateNic

func (cp *APIClient) CheckDuplicateNic(ctx context.Context, datacenterID, serverID, nicName string) (*sdkgo.Nic, error)

CheckDuplicateNic based on datacenterID, serverID, nicName and the immutable property location

func (*APIClient) CreateNic

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

CreateNic based on Nic properties, using datacenterID and serverID

func (*APIClient) DeleteNic

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

DeleteNic based on datacenterID, serverID, nicID

func (*APIClient) GetAPIClient

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

GetAPIClient gets the APIClient

func (*APIClient) GetNic

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

GetNic based on datacenterID, serverID, nicID

func (*APIClient) GetNicID

func (cp *APIClient) GetNicID(nic *sdkgo.Nic) (string, error)

GetNicID based on nic

func (*APIClient) UpdateNic

func (cp *APIClient) UpdateNic(ctx context.Context, datacenterID, serverID, nicID string, nicProperties sdkgo.NicProperties) (sdkgo.Nic, *sdkgo.APIResponse, error)

UpdateNic based on datacenterID, serverID, nicID and Nic properties

type Client

type Client interface {
	CheckDuplicateNic(ctx context.Context, datacenterID, serverID, nicName string) (*sdkgo.Nic, error)
	GetNicID(nic *sdkgo.Nic) (string, error)
	GetNic(ctx context.Context, datacenterID, serverID, nicID string) (sdkgo.Nic, *sdkgo.APIResponse, error)
	CreateNic(ctx context.Context, datacenterID, serverID string, nic sdkgo.Nic) (sdkgo.Nic, *sdkgo.APIResponse, error)
	UpdateNic(ctx context.Context, datacenterID, serverID, nicID string, nicProperties sdkgo.NicProperties) (sdkgo.Nic, *sdkgo.APIResponse, error)
	DeleteNic(ctx context.Context, datacenterID, serverID, nicID string) (*sdkgo.APIResponse, error)
	GetAPIClient() *sdkgo.APIClient
}

Client is a wrapper around IONOS Service Nic methods

Jump to

Keyboard shortcuts

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