Documentation ¶
Index ¶
- Constants
- Variables
- func StringAfter(str string, char string) string
- func StringBefore(str string, char string) string
- type CallbackWaitSSHReady
- type InstanceCreateInput
- type InstanceStatus
- type MacAddress
- type MachineCharacteristic
- type MachineCharacteristics
- type Network
- func (vnet *Network) Clone(controlPlane bool, nodeIndex int) *Network
- func (vnet *Network) ConfigurationDidLoad()
- func (vnet *Network) ConfigureManagedNetwork(managed []v1alpha2.ManagedNetworkInterface)
- func (vnet *Network) GetCloudInitNetwork(useMacAddress bool) *cloudinit.NetworkDeclare
- func (vnet *Network) GetDeclaredExistingInterfaces() []*NetworkInterface
- func (vnet *Network) InterfaceByName(networkName string) *NetworkInterface
- func (vnet *Network) PrimaryAddressIP() (address string)
- func (vnet *Network) PrimaryInterface() *NetworkInterface
- func (vnet *Network) UpdateMacAddressTable() error
- type NetworkInterface
- func (inet *NetworkInterface) AttachMacAddress(address string)
- func (inet *NetworkInterface) CreateIt() bool
- func (inet *NetworkInterface) GetMacAddress() string
- func (inet *NetworkInterface) IsEnabled() bool
- func (inet *NetworkInterface) IsExisting() bool
- func (inet *NetworkInterface) IsUseRoutes() bool
- func (inet *NetworkInterface) Usable() bool
- type ProviderConfiguration
- type ProviderHandler
Constants ¶
View Source
const ( AwsCloudProviderName = "aws" VSphereCloudProviderName = "vsphere" VMWareWorkstationProviderName = "desktop" MultipassProviderName = "multipass" OpenStackProviderName = "openstack" CloudStackProviderName = "cloudstack" LxdProviderName = "lxd" )
Variables ¶
View Source
var FALSE bool = false
View Source
var SupportedCloudProviders = []string{ AwsCloudProviderName, VSphereCloudProviderName, VMWareWorkstationProviderName, MultipassProviderName, OpenStackProviderName, CloudStackProviderName, LxdProviderName, }
View Source
var TRUE bool = true
Functions ¶
func StringAfter ¶ added in v1.30.5
func StringBefore ¶ added in v1.30.5
Types ¶
type CallbackWaitSSHReady ¶
CallbackWaitSSHReady callback to test if ssh become ready or return timeout error
type InstanceCreateInput ¶
type InstanceStatus ¶
type MacAddress ¶
type MachineCharacteristic ¶
type MachineCharacteristic struct { Price float64 `json:"price"` // VM price in usd Memory int `json:"memsize"` // VM Memory size in megabytes Vcpu int `json:"vcpus"` // VM number of cpus DiskSize *int `json:"disksize,omitempty"` // VM disk size in megabytes }
MachineCharacteristic defines VM kind
func (*MachineCharacteristic) GetDiskSize ¶
func (m *MachineCharacteristic) GetDiskSize() int
type MachineCharacteristics ¶
type MachineCharacteristics map[string]*MachineCharacteristic
type Network ¶
type Network struct { Domain string `json:"domain,omitempty" yaml:"domain,omitempty"` Interfaces []*NetworkInterface `json:"interfaces,omitempty" yaml:"interfaces,omitempty"` DNS *cloudinit.NetworkResolv `json:"dns,omitempty" yaml:"dns,omitempty"` // contains filtered or unexported fields }
func (*Network) ConfigurationDidLoad ¶
func (vnet *Network) ConfigurationDidLoad()
func (*Network) ConfigureManagedNetwork ¶ added in v1.30.5
func (vnet *Network) ConfigureManagedNetwork(managed []v1alpha2.ManagedNetworkInterface)
func (*Network) GetCloudInitNetwork ¶
func (vnet *Network) GetCloudInitNetwork(useMacAddress bool) *cloudinit.NetworkDeclare
GetCloudInitNetwork create cloud-init object
func (*Network) GetDeclaredExistingInterfaces ¶
func (vnet *Network) GetDeclaredExistingInterfaces() []*NetworkInterface
GetDeclaredExistingInterfaces return the declared existing interfaces
func (*Network) InterfaceByName ¶
func (vnet *Network) InterfaceByName(networkName string) *NetworkInterface
func (*Network) PrimaryAddressIP ¶
func (*Network) PrimaryInterface ¶
func (vnet *Network) PrimaryInterface() *NetworkInterface
func (*Network) UpdateMacAddressTable ¶
type NetworkInterface ¶
type NetworkInterface struct { Enabled *bool `json:"enabled,omitempty" yaml:"primary,omitempty"` Primary bool `json:"primary,omitempty" yaml:"primary,omitempty"` Existing *bool `json:"exists,omitempty" yaml:"exists,omitempty"` ConnectionType string `default:"nat" json:"type,omitempty" yaml:"type,omitempty"` BsdName string `json:"bsd-name,omitempty" yaml:"bsd-name,omitempty"` DisplayName string `json:"display-name,omitempty" yaml:"display-name,omitempty"` NetworkName string `json:"network,omitempty" yaml:"network,omitempty"` Adapter string `json:"adapter,omitempty" yaml:"adapter,omitempty"` MacAddress string `json:"mac-address,omitempty" yaml:"mac-address,omitempty"` NicName string `json:"nic,omitempty" yaml:"nic,omitempty"` DHCP bool `json:"dhcp,omitempty" yaml:"dhcp,omitempty"` UseDhcpRoutes *bool `json:"use-dhcp-routes,omitempty" yaml:"use-dhcp-routes,omitempty"` IPAddress string `json:"address,omitempty" yaml:"address,omitempty"` Netmask string `json:"netmask,omitempty" yaml:"netmask,omitempty"` Routes []v1alpha2.NetworkRoutes `json:"routes,omitempty" yaml:"routes,omitempty"` // contains filtered or unexported fields }
func (*NetworkInterface) AttachMacAddress ¶
func (inet *NetworkInterface) AttachMacAddress(address string)
func (*NetworkInterface) CreateIt ¶
func (inet *NetworkInterface) CreateIt() bool
func (*NetworkInterface) GetMacAddress ¶
func (inet *NetworkInterface) GetMacAddress() string
GetMacAddress return a macaddress
func (*NetworkInterface) IsEnabled ¶
func (inet *NetworkInterface) IsEnabled() bool
func (*NetworkInterface) IsExisting ¶
func (inet *NetworkInterface) IsExisting() bool
func (*NetworkInterface) IsUseRoutes ¶
func (inet *NetworkInterface) IsUseRoutes() bool
func (*NetworkInterface) Usable ¶
func (inet *NetworkInterface) Usable() bool
type ProviderConfiguration ¶
type ProviderConfiguration interface { AttachInstance(instanceName string, controlPlane bool, nodeIndex int) (ProviderHandler, error) CreateInstance(instanceName, instanceType string, controlPlane bool, nodeIndex int) (ProviderHandler, error) GetAvailableGpuTypes() map[string]string InstanceExists(name string) bool UUID(name string) (string, error) SetMode(test bool) }
type ProviderHandler ¶
type ProviderHandler interface { GetTimeout() time.Duration ConfigureNetwork(network v1alpha2.ManagedNetworkConfig) RetrieveNetworkInfos() error UpdateMacAddressTable() error GenerateProviderID() string GetTopologyLabels() map[string]string InstanceCreate(input *InstanceCreateInput) (string, error) InstanceWaitReady(callback CallbackWaitSSHReady) (string, error) InstancePrimaryAddressIP() string InstanceID() (string, error) InstanceAutoStart() error InstancePowerOn() error InstancePowerOff() error InstanceShutdownGuest() error InstanceDelete() error InstanceCreated() bool InstanceStatus() (InstanceStatus, error) InstanceWaitForPowered() error InstanceWaitForToolsRunning() (bool, error) InstanceMaxPods(desiredMaxPods int) (int, error) PrivateDNSName() (string, error) RegisterDNS(address string) error UnregisterDNS(address string) error UUID(name string) (string, error) }
Click to show internal directories.
Click to hide internal directories.