cloud

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cleanup

type Cleanup struct {
	// contains filtered or unexported fields
}

func NewCleanup

func NewCleanup(clients *Clients, clusterName string) (*Cleanup, error)

func (*Cleanup) DeleteLBReservation

func (c *Cleanup) DeleteLBReservation() error

func (*Cleanup) DeleteLBVirtualRouter

func (c *Cleanup) DeleteLBVirtualRouter() error

func (*Cleanup) DeleteVRReservation

func (c *Cleanup) DeleteVRReservation() error

type Clients

type Clients struct {
	RPC2 *goca.Client
}

func NewClients

func NewClients(ctx context.Context, c client.Client, oneCluster *infrav1.ONECluster) (*Clients, error)

type Images added in v0.1.1

type Images struct {
	// contains filtered or unexported fields
}

func NewImages added in v0.1.1

func NewImages(clients *Clients) (*Images, error)

func (*Images) CreateImage added in v0.1.1

func (i *Images) CreateImage(imageName, imageContent string) error

func (*Images) ImageReady added in v0.1.1

func (i *Images) ImageReady(imageName string) (bool, error)

type Machine

type Machine struct {
	ID       int
	Name     string
	RouterID int
	Address4 string
	// contains filtered or unexported fields
}

func NewMachine

func NewMachine(clients *Clients, options ...MachineOption) (*Machine, error)

func (*Machine) ByID

func (m *Machine) ByID(vmID int) error

func (*Machine) ByName

func (m *Machine) ByName(vmName string) error

func (*Machine) Delete

func (m *Machine) Delete() error

func (*Machine) Exists

func (m *Machine) Exists() bool

func (*Machine) FromTemplate

func (m *Machine) FromTemplate(
	templateName string, userData *string,
	network *infrav1.ONEVirtualNetwork, router *infrav1.ONEVirtualRouter) error

func (*Machine) NodeName

func (m *Machine) NodeName() (string, error)

func (*Machine) ProviderID

func (m *Machine) ProviderID() *string

type MachineOption added in v0.1.1

type MachineOption func(*Machine)

func WithMachineName added in v0.1.1

func WithMachineName(name string) MachineOption

func WithMachineRouterID added in v0.1.5

func WithMachineRouterID(routerID int) MachineOption

type Router

type Router struct {
	ID          int
	Name        string
	Replicas    int
	FloatingIPs []string
	// contains filtered or unexported fields
}

func NewRouter

func NewRouter(clients *Clients, options ...RouterOption) (*Router, error)

func (*Router) ByID

func (r *Router) ByID(vrID int) error

func (*Router) ByName

func (r *Router) ByName(vrName string) error

func (*Router) Delete

func (r *Router) Delete() error

func (*Router) Exists

func (r *Router) Exists() bool

func (*Router) FromTemplate

func (r *Router) FromTemplate(
	virtualRouter *infrav1.ONEVirtualRouter,
	publicNetwork, privateNetwork *infrav1.ONEVirtualNetwork) error

type RouterOption added in v0.1.5

type RouterOption func(*Router)

func WithRouterName added in v0.1.5

func WithRouterName(name string) RouterOption

func WithRouterReplicas added in v0.1.5

func WithRouterReplicas(replicas int) RouterOption

type Templates added in v0.1.1

type Templates struct {
	// contains filtered or unexported fields
}

func NewTemplates added in v0.1.1

func NewTemplates(clients *Clients, clusterUID string) (*Templates, error)

func (*Templates) CreateTemplate added in v0.1.1

func (t *Templates) CreateTemplate(templateName, templateContent string) error

Jump to

Keyboard shortcuts

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