metal

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocateIP

func AllocateIP(client *metalgo.Driver, svc v1.Service, namePrefix, project, network, clusterID string) (*models.V1IPResponse, error)

AllocateIP acquires an IP within the given network for a given project.

func FindClusterIPs

func FindClusterIPs(client *metalgo.Driver, projectID, clusterID string) ([]*models.V1IPResponse, error)

FindClusterIPs returns the IPs of the given cluster.

func FindProjectIP

func FindProjectIP(client *metalgo.Driver, projectID, ip string) (*models.V1IPResponse, error)

FindProjectIP returns the IP

func FindProjectIPsWithTag

func FindProjectIPsWithTag(client *metalgo.Driver, projectID, tag string) ([]*models.V1IPResponse, error)

FindProjectIPsWithTag returns the IPs of the given project that also have the given tag.

func FreeIP

func FreeIP(client *metalgo.Driver, ip string) error

FreeIP frees the given IP address.

func GetMachine

func GetMachine(client *metalgo.Driver, id string) (*models.V1MachineResponse, error)

GetMachine returns a metal machine by its ID.

func GetMachineFromNode

func GetMachineFromNode(client *metalgo.Driver, nodeName types.NodeName) (*models.V1MachineResponse, error)

GetMachineFromNode returns a machine where hostname matches the kubernetes node.Name.

func GetMachineFromProviderID

func GetMachineFromProviderID(client *metalgo.Driver, providerID string) (*models.V1MachineResponse, error)

GetMachineFromProviderID uses providerID to get the machine id and returns the machine.

func GetMachinesFromNodes

func GetMachinesFromNodes(client *metalgo.Driver, nodes []v1.Node) ([]*models.V1MachineResponse, error)

GetMachinesFromNodes gets metal machines from K8s nodes.

func IPAddressesOfIPs

func IPAddressesOfIPs(ips []*models.V1IPResponse) []string

IPAddressesOfIPs returns the IP address strings of the given ips.

func ListNetworks

func ListNetworks(client *metalgo.Driver) ([]*models.V1NetworkResponse, error)

ListNetworks returns all networks.

func NetworksByID

func NetworksByID(nws []*models.V1NetworkResponse) map[string]*models.V1NetworkResponse

NetworksByID returns networks as map with their ID as the key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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