Documentation ¶
Index ¶
- func AllocateCiNetConfig(position int, config *string, ...) error
- func AllocateDiskConfig(t string, position int, config *string, ...) error
- func AllocateNetworkInterfaceConfig(position int, config *string, ...) error
- func BytesToStr(bytes int64) string
- func DetermineBios(b *proxmox.VirtualMachineBios) proxmox.VirtualMachineBios
- func DetermineKeyboardLayout(k *proxmox.VirtualMachineKeyboard) *proxmox.VirtualMachineKeyboard
- func DetermineMachineType(sum proxmox.VirtualMachineConfigurationSummary) *string
- func DetermineOsType(sum proxmox.VirtualMachineConfigurationSummary) *proxmox.VirtualMachineOperatingSystem
- func GenerateMAC() string
- func GigabytesToStr(gb int64) string
- type VirtualBios
- type VirtualDisk
- type VirtualDiskType
- type VirtualMachine
- type VirtualMachineAgent
- type VirtualMachineCloudInit
- type VirtualMachineCloudInitDns
- type VirtualMachineCloudInitIp
- type VirtualMachineCloudInitIpConfig
- type VirtualMachineCloudInitUser
- type VirtualMachineCpu
- type VirtualMachineDisk
- type VirtualMachineDiskSpeedLimits
- type VirtualMachineMemory
- type VirtualMachineNetworkInterface
- type VirtualMachinePCIDevice
- type VirtualNetworkDevice
- type VirtualNetworkDeviceModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllocateCiNetConfig ¶ added in v0.0.8
func AllocateCiNetConfig(position int, config *string, input *proxmox.ApplyVirtualMachineConfigurationSyncRequestContent) error
func AllocateDiskConfig ¶ added in v0.0.8
func AllocateNetworkInterfaceConfig ¶ added in v0.0.8
func AllocateNetworkInterfaceConfig(position int, config *string, input *proxmox.ApplyVirtualMachineConfigurationSyncRequestContent) error
func BytesToStr ¶ added in v0.0.8
func DetermineBios ¶ added in v0.0.8
func DetermineBios(b *proxmox.VirtualMachineBios) proxmox.VirtualMachineBios
func DetermineKeyboardLayout ¶ added in v0.0.8
func DetermineKeyboardLayout(k *proxmox.VirtualMachineKeyboard) *proxmox.VirtualMachineKeyboard
func DetermineMachineType ¶ added in v0.0.8
func DetermineMachineType(sum proxmox.VirtualMachineConfigurationSummary) *string
func DetermineOsType ¶ added in v0.0.8
func DetermineOsType(sum proxmox.VirtualMachineConfigurationSummary) *proxmox.VirtualMachineOperatingSystem
func GenerateMAC ¶ added in v0.0.8
func GenerateMAC() string
func GigabytesToStr ¶ added in v0.0.8
Types ¶
type VirtualBios ¶
type VirtualBios string
const ( VIRTUAL_BIOS_SEABIOS VirtualBios = "seabios" VIRTUAL_BIOS_OVMF VirtualBios = "ovmf" )
func (*VirtualBios) IsValid ¶
func (e *VirtualBios) IsValid() bool
type VirtualDisk ¶
type VirtualDisk struct { Storage string Type VirtualDiskType Position string //virtio0, virtio1, scsi0, scsi1, ide0, ide1, sata0, sata1, etc Size int64 Discard bool }
func ExtractDisksFromConfig ¶
func ExtractDisksFromConfig(cfg *proxmox.VirtualMachineConfigurationSummary) ([]VirtualDisk, error)
doing some janky stuff here to get the disks out of the config refator this later to use go routines
type VirtualDiskType ¶
type VirtualDiskType string
const ( VIRTUAL_DISK_SCSI VirtualDiskType = "scsi" VIRTUAL_DISK_VIRTIO_D VirtualDiskType = "virtio" VIRTUAL_DISK_SATA VirtualDiskType = "sata" VIRTUAL_DISK_IDE VirtualDiskType = "ide" )
func (*VirtualDiskType) IsValid ¶
func (e *VirtualDiskType) IsValid() bool
type VirtualMachine ¶
type VirtualMachine struct { Id int Agent bool Node string Name string Memory int64 Cores int Tags []string VirtualDisks []VirtualDisk VirtualNetworkDevices []VirtualNetworkDevice }
type VirtualMachineAgent ¶ added in v0.0.8
func DetermineAgentConfig ¶ added in v0.0.8
func DetermineAgentConfig(a *string) *VirtualMachineAgent
type VirtualMachineCloudInit ¶ added in v0.0.8
type VirtualMachineCloudInit struct { User *VirtualMachineCloudInitUser Ip []VirtualMachineCloudInitIp Dns *VirtualMachineCloudInitDns }
func DetermineCloudInitConfiguration ¶ added in v0.0.8
func DetermineCloudInitConfiguration(sum proxmox.VirtualMachineConfigurationSummary) *VirtualMachineCloudInit
type VirtualMachineCloudInitDns ¶ added in v0.0.8
type VirtualMachineCloudInitIp ¶ added in v0.0.8
type VirtualMachineCloudInitIp struct { Position int V4 *VirtualMachineCloudInitIpConfig V6 *VirtualMachineCloudInitIpConfig }
type VirtualMachineCloudInitIpConfig ¶ added in v0.0.8
type VirtualMachineCloudInitUser ¶ added in v0.0.8
type VirtualMachineCpu ¶ added in v0.0.8
type VirtualMachineCpu struct { Architecture string Cores int Sockets int EmulatedType *string CpuUnits *int64 }
func DetermineCPUConfiguration ¶ added in v0.0.8
func DetermineCPUConfiguration(sum proxmox.VirtualMachineConfigurationSummary) VirtualMachineCpu
type VirtualMachineDisk ¶ added in v0.0.8
type VirtualMachineDisk struct { Storage string FileFormat *string Size int64 UseIOThreads bool Position int InterfaceType string SpeedLimits *VirtualMachineDiskSpeedLimits SSDEmulation bool Discard bool Name string }
func DetermineDiskConfiguration ¶ added in v0.0.8
func DetermineDiskConfiguration(cfg *proxmox.VirtualMachineConfigurationSummary) ([]VirtualMachineDisk, error)
take 2 of the vm_disk_extraction from previous data source, I'll need to consolidate these at some point
type VirtualMachineDiskSpeedLimits ¶ added in v0.0.8
type VirtualMachineMemory ¶ added in v0.0.8
func DetermineMemoryConfiguration ¶ added in v0.0.8
func DetermineMemoryConfiguration(sum proxmox.VirtualMachineConfigurationSummary) VirtualMachineMemory
type VirtualMachineNetworkInterface ¶ added in v0.0.8
type VirtualMachineNetworkInterface struct { Bridge string Enabled bool Firewall bool MAC string Model string RateLimit *int64 VLAN *int MTU *int64 Position int }
func DetermineNetworkDevicesFromConfig ¶ added in v0.0.8
func DetermineNetworkDevicesFromConfig(cfg *proxmox.VirtualMachineConfigurationSummary) ([]VirtualMachineNetworkInterface, error)
type VirtualMachinePCIDevice ¶ added in v0.0.8
type VirtualNetworkDevice ¶
type VirtualNetworkDevice struct { Bridge string Vlan int Model VirtualNetworkDeviceModel Mac string Position string FirewallEnabled bool }
func ExtractNicsFromConfig ¶
func ExtractNicsFromConfig(cfg *proxmox.VirtualMachineConfigurationSummary) ([]VirtualNetworkDevice, error)
type VirtualNetworkDeviceModel ¶
type VirtualNetworkDeviceModel string
const ( VIRTUAL_NIC_INTEL_E1000 VirtualNetworkDeviceModel = "e1000" VIRTUAL_NIC_VIRTIO VirtualNetworkDeviceModel = "virtio" VIRTUAL_NIC_REALTEK_RTL8139 VirtualNetworkDeviceModel = "rtl8139" VIRTUAL_NIC_VMWARE_VMXNET3 VirtualNetworkDeviceModel = "vmxnet3" )
func (*VirtualNetworkDeviceModel) IsValid ¶
func (e *VirtualNetworkDeviceModel) IsValid() bool
Click to show internal directories.
Click to hide internal directories.