clients

package
v0.0.0-...-7cc618d Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCloud

func GetCloud(kubeClient kubernetes.Interface, machine *machinev1.Machine) (clientconfig.Cloud, []byte, error)

GetCloud fetches cloud credentials from a secret and return a parsed Cloud structure and optional CA cert

func GetProviderClient

func GetProviderClient(ctx context.Context, cloud clientconfig.Cloud, cert []byte) (*gophercloud.ProviderClient, error)

GetProviderClient returns an authenticated provider client based on values in the cloud structure

func MachineSpecFromProviderSpec

func MachineSpecFromProviderSpec(providerSpec machinev1.ProviderSpec) (*machinev1alpha1.OpenstackProviderSpec, error)

MachineSpecFromProviderSpec unmarshals a provider status into an OpenStack Machine Status type

Types

type InstanceService

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

func NewInstanceService

func NewInstanceService(ctx context.Context) (*InstanceService, error)

func NewInstanceServiceFromCloud

func NewInstanceServiceFromCloud(ctx context.Context, cloud clientconfig.Cloud, cert []byte) (*InstanceService, error)

func NewInstanceServiceFromMachine

func NewInstanceServiceFromMachine(ctx context.Context, kubeClient kubernetes.Interface, machine *machinev1.Machine) (*InstanceService, error)

TODO: Eventually we'll have a NewInstanceServiceFromCluster too

func (*InstanceService) CreateServerGroup

func (is *InstanceService) CreateServerGroup(ctx context.Context, name string) (*servergroups.ServerGroup, error)

func (*InstanceService) DoesAvailabilityZoneExist

func (is *InstanceService) DoesAvailabilityZoneExist(ctx context.Context, azName string) error

DoesAvailabilityZoneExist return an error if AZ with the given name doesn't exist, and nil otherwise

func (*InstanceService) DoesFlavorExist

func (is *InstanceService) DoesFlavorExist(ctx context.Context, flavorName string) error

DoesFlavorExist returns nil if exactly one flavor exists with the given name.

func (*InstanceService) DoesImageExist

func (is *InstanceService) DoesImageExist(ctx context.Context, imageName string) error

DoesImageExist returns nil if exactly one image exists with the given name.

func (*InstanceService) GetFlavorID

func (is *InstanceService) GetFlavorID(ctx context.Context, flavorName string) (string, error)

func (*InstanceService) GetFlavorInfo

func (is *InstanceService) GetFlavorInfo(ctx context.Context, flavorID string) (flavor *flavors.Flavor, err error)

func (*InstanceService) GetImageID

func (is *InstanceService) GetImageID(ctx context.Context, imageName string) (string, error)

func (*InstanceService) GetServerGroupByID

func (is *InstanceService) GetServerGroupByID(ctx context.Context, id string) (*servergroups.ServerGroup, error)

func (*InstanceService) GetServerGroupsByName

func (is *InstanceService) GetServerGroupsByName(ctx context.Context, name string) ([]servergroups.ServerGroup, error)

Jump to

Keyboard shortcuts

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