service

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BooleanIntegerConversion

func BooleanIntegerConversion(i *float32) bool

func EncodeStringList added in v0.0.8

func EncodeStringList(sl []string) *string

func FormAgentString added in v0.0.8

func FormAgentString(agent bool, fstrim bool, t *string) *string

func FormDiskString added in v0.0.8

func FormDiskString(opts ConfigureVirtualMachineDiskOptions) *string

func FormNetworkInterfaceString added in v0.0.8

func FormNetworkInterfaceString(opts ConfigureVirtualMachineNetworkInterfaceOptions) *string

func FormPCIDeviceString added in v0.0.8

func FormPCIDeviceString() *string

func IntToBool

func IntToBool(i int) bool

func PtrFloatToInt64

func PtrFloatToInt64(i *float32) int64

func PtrInt64ToPtrFloat added in v0.0.8

func PtrInt64ToPtrFloat(i *int64) *float32

func PtrIntToInt

func PtrIntToInt(i *int) int

func PtrIntToPtrFloat added in v0.0.8

func PtrIntToPtrFloat(i *int) *float32

func PtrStringToString

func PtrStringToString(s *string) string

func SliceToStringCommaList

func SliceToStringCommaList(s []string) string

func SliceToStringCommaListPtr added in v0.0.6

func SliceToStringCommaListPtr(s []string) *string

func SliceToStringSemiColonList added in v0.0.8

func SliceToStringSemiColonList(s []string) string

func SliceToStringSemiColonListPtr added in v0.0.8

func SliceToStringSemiColonListPtr(s []string) *string

func StringCommaListToSlice

func StringCommaListToSlice(s string) []string

func StringCommaPtrListToSlice

func StringCommaPtrListToSlice(s *string) []string

func StringListToString added in v0.0.8

func StringListToString(stringList []string) string

func StringSemiColonListToSlice

func StringSemiColonListToSlice(s string) []string

func StringSemiColonPtrListToSlice

func StringSemiColonPtrListToSlice(s *string) []string

func StringSliceToLinedString added in v0.0.8

func StringSliceToLinedString(l []string) string

func StringSliceToLinedStringPtr added in v0.0.8

func StringSliceToLinedStringPtr(l []string) *string

func StringSliceToStringSpacePtr added in v0.0.2

func StringSliceToStringSpacePtr(l []string) *string

func StringSpaceListToSlice

func StringSpaceListToSlice(s string) []string

func StringSpacePtrListToSlice

func StringSpacePtrListToSlice(s *string) []string

Types

type ClientConfig

type ClientConfig struct {
	Endpoint   string
	Token      string
	SkipVerify bool
	Username   string
	Password   string
}

type CloneVirtualMachineInput added in v0.0.8

type CloneVirtualMachineInput struct {
	Node         string
	VmId         int
	Source       int
	FullClone    bool
	Storage      *string
	Description  *string
	Name         *string
	ResourcePool *string
}

type ConfigureVirtualMachineAgentOptions added in v0.0.8

type ConfigureVirtualMachineAgentOptions struct {
	Enabled bool    `json:"enabled"`
	FsTrim  bool    `json:"fsTrim"`
	Type    *string `json:"type,omitempty"`
}

type ConfigureVirtualMachineCloudInitDnsOptions added in v0.0.8

type ConfigureVirtualMachineCloudInitDnsOptions struct {
	Nameserver *string `json:"nameserver,omitempty"`
	Domain     *string `json:"domain,omitempty"`
}

type ConfigureVirtualMachineCloudInitIpConfigOptions added in v0.0.8

type ConfigureVirtualMachineCloudInitIpConfigOptions struct {
	DHCP    bool    `json:"dhcp"`
	Address *string `json:"address,omitempty"`
	Gateway *string `json:"gateway,omitempty"`
	Netmask *string `json:"netmask,omitempty"`
}

type ConfigureVirtualMachineCloudInitIpOptions added in v0.0.8

type ConfigureVirtualMachineCloudInitIpOptions struct {
	Position int                                              `json:"position"`
	V4       *ConfigureVirtualMachineCloudInitIpConfigOptions `json:"v4,omitempty"`
	V6       *ConfigureVirtualMachineCloudInitIpConfigOptions `json:"v6,omitempty"`
}

type ConfigureVirtualMachineCloudInitOptions added in v0.0.8

type ConfigureVirtualMachineCloudInitOptions struct {
	User *ConfigureVirtualMachineCloudInitUserOptions `json:"user,omitempty"`
	Ip   []ConfigureVirtualMachineCloudInitIpOptions  `json:"ip"`
	Dns  *ConfigureVirtualMachineCloudInitDnsOptions  `json:"dns,omitempty"`
}

type ConfigureVirtualMachineCloudInitUserOptions added in v0.0.8

type ConfigureVirtualMachineCloudInitUserOptions struct {
	Name       *string  `json:"name,omitempty"`
	Password   *string  `json:"password,omitempty"`
	PublicKeys []string `json:"publicKeys"`
}

type ConfigureVirtualMachineCpuOptions added in v0.0.8

type ConfigureVirtualMachineCpuOptions struct {
	Architecture *string `json:"architecture,omitempty"`
	Cores        *int    `json:"cores,omitempty"`
	Sockets      *int    `json:"sockets,omitempty"`
	EmulatedType *string `json:"emulatedType,omitempty"`
	CpuUnits     *int64  `json:"cpuUnits,omitempty"`
}

type ConfigureVirtualMachineDiskOptions added in v0.0.8

type ConfigureVirtualMachineDiskOptions struct {
	Storage       string                                         `json:"storage"`
	FileFormat    *string                                        `json:"fileFormat,omitempty"`
	Size          int                                            `json:"size"`
	UseIOThreads  bool                                           `json:"useIOThreads"`
	Position      int                                            `json:"position"`
	InterfaceType string                                         `json:"interfaceType"`
	SpeedLimits   *ConfigureVirtualMachineDiskSpeedLimitsOptions `json:"speedLimits,omitempty"`
	SSDEmulation  bool                                           `json:"ssdEmulation"`
	Discard       bool                                           `json:"discard"`
}

type ConfigureVirtualMachineDiskSpeedLimitsOptions added in v0.0.8

type ConfigureVirtualMachineDiskSpeedLimitsOptions struct {
	Read           *int64 `json:"read,omitempty"`
	ReadBurstable  *int64 `json:"readBurstable,omitempty"`
	Write          *int64 `json:"write,omitempty"`
	WriteBurstable *int64 `json:"writeBurstable,omitempty"`
}

type ConfigureVirtualMachineInput added in v0.0.8

type ConfigureVirtualMachineInput struct {
	Node              string                                           `json:"node"`
	VmId              int                                              `json:"vmId"`
	Name              *string                                          `json:"name,omitempty"`
	Tags              []string                                         `json:"tags,omitempty"`
	Delete            []string                                         `json:"delete,omitempty"`
	Description       *string                                          `json:"description,omitempty"`
	Agent             *ConfigureVirtualMachineAgentOptions             `json:"agent,omitempty"`
	Bios              *proxmox.VirtualMachineBios                      `json:"bios,omitempty"`
	CPU               *ConfigureVirtualMachineCpuOptions               `json:"cpu,omitempty"`
	Disks             []ConfigureVirtualMachineDiskOptions             `json:"disks,omitempty"`
	PCIDevices        []ConfigureVirtualPciDeviceOptions               `json:"pciDevices,omitempty"`
	NetworkInterfaces []ConfigureVirtualMachineNetworkInterfaceOptions `json:"networkInterfaces,omitempty"`
	Memory            *ConfigureVirtualMachineMemoryOptions            `json:"memory,omitempty"`
	CloudInit         *ConfigureVirtualMachineCloudInitOptions         `json:"cloudInit,omitempty"`
	OsType            *proxmox.VirtualMachineOperatingSystem           `json:"osType,omitempty"`
	StartOnBoot       bool                                             `json:"startOnBoot,omitempty"`
	MachineType       *string                                          `json:"machineType,omitempty"`
	KVMArguments      *string                                          `json:"kvmArguments,omitempty"`
	KeyboardLayout    *proxmox.VirtualMachineKeyboard                  `json:"keyboardLayout,omitempty"`
}

type ConfigureVirtualMachineMemoryOptions added in v0.0.8

type ConfigureVirtualMachineMemoryOptions struct {
	Dedicated *int64 `json:"dedicated,omitempty"`
	Shared    *int64 `json:"shared,omitempty"`
	Floating  *int64 `json:"floating,omitempty"`
}

type ConfigureVirtualMachineNetworkInterfaceOptions added in v0.0.8

type ConfigureVirtualMachineNetworkInterfaceOptions struct {
	Bridge    string `json:"bridge"`
	Enabled   bool   `json:"enabled"`
	Firewall  bool   `json:"firewall"`
	MAC       string `json:"mac"`
	Model     string `json:"model"`
	RateLimit *int64 `json:"rateLimit,omitempty"`
	VLAN      *int   `json:"vlan,omitempty"`
	MTU       *int64 `json:"mtu,omitempty"`
	Position  int    `json:"position"`
}

type ConfigureVirtualPciDeviceOptions added in v0.0.8

type ConfigureVirtualPciDeviceOptions struct {
	DeviceName *string `json:"deviceName,omitempty"`
	DeviceId   *string `json:"deviceId,omitempty"`
	PCIe       bool    `json:"pcie,omitempty"`
	Mdev       *string `json:"mdev,omitempty"`
}

type CreateLVMInput added in v0.0.5

type CreateLVMInput struct {
	Node   string
	Name   string
	Device string
}

type CreateLVMStorageClassInput added in v0.0.6

type CreateLVMStorageClassInput struct {
	Id           string
	VolumeGroup  string
	Nodes        []string
	ContentTypes []string
}

type CreateLVMThinStorageClassInput added in v0.0.6

type CreateLVMThinStorageClassInput struct {
	Id           string
	VolumeGroup  string
	Thinpool     string
	Nodes        []string
	ContentTypes []string
}

type CreateLVMThinpoolInput added in v0.0.5

type CreateLVMThinpoolInput struct {
	Node   string
	Name   string
	Device string
}

type CreateNFSStorageClassInput added in v0.0.6

type CreateNFSStorageClassInput struct {
	Id           string
	Server       string
	Export       string
	Nodes        []string
	ContentTypes []string
}

type CreateNetworkBondInput added in v0.0.2

type CreateNetworkBondInput struct {
	Interfaces []string
	Name       string
	Node       string
	Mode       proxmox.NetworkInterfaceBondMode
	// optional
	HashPolicy  *proxmox.NetworkInterfaceBondHashPolicy
	BondPrimary *string
	AutoStart   *bool
	IPv4        *IP
	IPv6        *IP
	IPv4Gateway *string
	IPv6Gateway *string
	Comments    *string
}

type CreateNetworkBridgeInput added in v0.0.3

type CreateNetworkBridgeInput struct {
	Interfaces []string
	Name       string
	Node       string
	// optional
	IPv4        *IP
	IPv6        *IP
	IPv4Gateway *string
	IPv6Gateway *string
	VLANAware   *bool
	AutoStart   *bool
	Comments    *string
}

type CreatePoolInput

type CreatePoolInput struct {
	PoolId  string
	Comment *string
}

type CreateVirtualMachineIsoInput added in v0.0.8

type CreateVirtualMachineIsoInput struct {
	Node         string
	VmId         int
	IsoStorage   string
	IsoImage     string
	Name         *string
	Description  *string
	ResourcePool *string
}

type CreateZFSPoolInput added in v0.0.4

type CreateZFSPoolInput struct {
	Node      string
	Name      string
	Disks     []string
	RaidLevel proxmox.ZFSRaidLevel
}

type CreateZFSStorageClassInput added in v0.0.6

type CreateZFSStorageClassInput struct {
	Id           string
	Nodes        []string
	ContentTypes []string
	Pool         string
}

type Disk

type Disk struct {
	Device string
	IDLink string
	Size   int64
	Model  string
	Serial string
	Vendor string
	Type   proxmox.DiskType
}

type IP added in v0.0.3

type IP struct {
	Address string
	Netmask string
}

func Ipv4FromInterface

func Ipv4FromInterface(iface proxmox.NetworkInterfaceSummary) *IP

func Ipv6FromInterface

func Ipv6FromInterface(iface proxmox.NetworkInterfaceSummary) *IP

type LVM added in v0.0.5

type LVM struct {
	Name   string
	Node   string
	Size   int64
	Device string
}

type LVMNodeStorage added in v0.0.7

type LVMNodeStorage struct {
	Id           string
	Node         string
	Storage      string
	ContentTypes []string
	Size         int64
	VolumeGroup  string
}

type LVMStorageClass added in v0.0.6

type LVMStorageClass struct {
	Id          string
	VolumeGroup string
	Nodes       []string
	Content     []string
}

type LVMThinNodeStorage added in v0.0.7

type LVMThinNodeStorage struct {
	Id           string
	Node         string
	Storage      string
	ContentTypes []string
	Size         int64
	VolumeGroup  string
	Thinpool     string
}

type LVMThinStorageClass added in v0.0.6

type LVMThinStorageClass struct {
	Id          string
	VolumeGroup string
	Thinpool    string
	Nodes       []string
	Content     []string
}

type LVMThinpool added in v0.0.5

type LVMThinpool struct {
	Name         string
	Node         string
	Size         int64
	MetadataSize int64
	VolumeGroup  string
	Device       string
}

type ModifyLVMStorageClassInput added in v0.0.6

type ModifyLVMStorageClassInput struct {
	Nodes        []string
	ContentTypes []string
}

type ModifyLVMThinStorageClassInput added in v0.0.6

type ModifyLVMThinStorageClassInput struct {
	Nodes        []string
	ContentTypes []string
}

type ModifyNFSStorageClassInput added in v0.0.6

type ModifyNFSStorageClassInput struct {
	Nodes        []string
	ContentTypes []string
}

type ModifyZFSStorageClassInput added in v0.0.6

type ModifyZFSStorageClassInput struct {
	Nodes        []string
	ContentTypes []string
}

type NFSNodeStorage added in v0.0.7

type NFSNodeStorage struct {
	Id           string
	Node         string
	Storage      string
	ContentTypes []string
	Size         int64
	Server       string
	Mount        string
	Export       string
}

type NFSStorageClass added in v0.0.6

type NFSStorageClass struct {
	Id      string
	Server  string
	Nodes   []string
	Content []string
	Mount   string
	Export  string
}

type NetworkBond

type NetworkBond struct {
	Active      bool
	Autostart   bool
	HashPolicy  *proxmox.NetworkInterfaceBondHashPolicy
	BondPrimary *string
	Mode        proxmox.NetworkInterfaceBondMode
	MiiMon      *string
	Interfaces  []string
	Name        string
	Node        string
	IPv4        *IP
	IPv6        *IP
	IPv4Gateway *string
	IPv6Gateway *string
	Comments    *string
}

type NetworkBridge

type NetworkBridge struct {
	Active      bool
	Autostart   bool
	VLANAware   bool
	Interfaces  []string
	Name        string
	Node        string
	IPv4        *IP
	IPv6        *IP
	IPv4Gateway *string
	IPv6Gateway *string
	Comments    *string
}

type NetworkInterface

type NetworkInterface struct {
	Name string
}

type Node

type Node struct {
	Id                string
	Node              string
	Cores             int
	SslFingerprint    string
	Memory            int64
	DiskSpace         int64
	Disks             []Disk
	NetworkInterfaces []NetworkInterface
}

type Pool

type Pool struct {
	Id      string
	Comment string
	Members []PoolMember
}

type PoolMember

type PoolMember struct {
	Id   string
	Type proxmox.PoolMemberType
}

type Proxmox

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

func New

func New(c ClientConfig) (*Proxmox, error)

func (*Proxmox) AddVirtualMachineToResourcePool added in v0.0.8

func (c *Proxmox) AddVirtualMachineToResourcePool(ctx context.Context, vmId int, pool string) error

func (*Proxmox) ApplyChanges added in v0.0.2

func (c *Proxmox) ApplyChanges(ctx context.Context, node string) error

func (*Proxmox) CloneVirtualMachine added in v0.0.8

func (c *Proxmox) CloneVirtualMachine(ctx context.Context, input *CloneVirtualMachineInput) error

func (*Proxmox) ConfigureVirtualMachine added in v0.0.8

func (c *Proxmox) ConfigureVirtualMachine(ctx context.Context, input *ConfigureVirtualMachineInput) error

func (*Proxmox) CreateLVM added in v0.0.5

func (c *Proxmox) CreateLVM(ctx context.Context, input *CreateLVMInput) error

func (*Proxmox) CreateLVMStorageClass added in v0.0.6

func (c *Proxmox) CreateLVMStorageClass(ctx context.Context, input *CreateLVMStorageClassInput) error

func (*Proxmox) CreateLVMThinStorageClass added in v0.0.6

func (c *Proxmox) CreateLVMThinStorageClass(ctx context.Context, input *CreateLVMThinStorageClassInput) error

func (*Proxmox) CreateLVMThinpool added in v0.0.5

func (c *Proxmox) CreateLVMThinpool(ctx context.Context, input *CreateLVMThinpoolInput) error

func (*Proxmox) CreateNFSStorageClass added in v0.0.6

func (c *Proxmox) CreateNFSStorageClass(ctx context.Context, input *CreateNFSStorageClassInput) error

func (*Proxmox) CreateNetworkBond added in v0.0.2

func (c *Proxmox) CreateNetworkBond(ctx context.Context, input *CreateNetworkBondInput) error

func (*Proxmox) CreateNetworkBridge added in v0.0.3

func (c *Proxmox) CreateNetworkBridge(ctx context.Context, input *CreateNetworkBridgeInput) error

func (*Proxmox) CreatePool

func (c *Proxmox) CreatePool(ctx context.Context, input *CreatePoolInput) error

func (*Proxmox) CreateVirtualMachineIso added in v0.0.8

func (c *Proxmox) CreateVirtualMachineIso(ctx context.Context, input *CreateVirtualMachineIsoInput) error

func (*Proxmox) CreateZFSPool added in v0.0.4

func (c *Proxmox) CreateZFSPool(ctx context.Context, input *CreateZFSPoolInput) error

func (*Proxmox) CreateZFSStorageClass added in v0.0.6

func (c *Proxmox) CreateZFSStorageClass(ctx context.Context, input *CreateZFSStorageClassInput) error

func (*Proxmox) DeleteLVM added in v0.0.5

func (c *Proxmox) DeleteLVM(ctx context.Context, node string, pool string) error

func (*Proxmox) DeleteLVMSStorageClass added in v0.0.6

func (c *Proxmox) DeleteLVMSStorageClass(ctx context.Context, name string) error

func (*Proxmox) DeleteLVMThinSStorageClass added in v0.0.6

func (c *Proxmox) DeleteLVMThinSStorageClass(ctx context.Context, name string) error

func (*Proxmox) DeleteLVMThinpool added in v0.0.5

func (c *Proxmox) DeleteLVMThinpool(ctx context.Context, node string, pool string, vg string) error

func (*Proxmox) DeleteNFSSStorageClass added in v0.0.6

func (c *Proxmox) DeleteNFSSStorageClass(ctx context.Context, name string) error

func (*Proxmox) DeleteNetworkInterface added in v0.0.3

func (c *Proxmox) DeleteNetworkInterface(ctx context.Context, node string, name string) error

func (*Proxmox) DeletePool

func (c *Proxmox) DeletePool(ctx context.Context, poolId string) error

func (*Proxmox) DeleteVirtualMachine added in v0.0.8

func (c *Proxmox) DeleteVirtualMachine(ctx context.Context, node string, vmid int) error

func (*Proxmox) DeleteZFSPool added in v0.0.4

func (c *Proxmox) DeleteZFSPool(ctx context.Context, node string, pool string) error

func (*Proxmox) DeleteZFSSStorageClass added in v0.0.6

func (c *Proxmox) DeleteZFSSStorageClass(ctx context.Context, name string) error

func (*Proxmox) DescribeLVMNodeStorage added in v0.0.7

func (c *Proxmox) DescribeLVMNodeStorage(ctx context.Context, node string) ([]*LVMNodeStorage, error)

func (*Proxmox) DescribeLVMThinNodeStorage added in v0.0.7

func (c *Proxmox) DescribeLVMThinNodeStorage(ctx context.Context, node string) ([]*LVMThinNodeStorage, error)

func (*Proxmox) DescribeLocalStorage

func (c *Proxmox) DescribeLocalStorage(ctx context.Context) ([]Storage, error)

deprecated

func (*Proxmox) DescribeNFSNodeStorage added in v0.0.7

func (c *Proxmox) DescribeNFSNodeStorage(ctx context.Context, node string) ([]*NFSNodeStorage, error)

func (*Proxmox) DescribeNetworkBonds

func (c *Proxmox) DescribeNetworkBonds(ctx context.Context, node string) ([]NetworkBond, error)

func (*Proxmox) DescribeNetworkBridges

func (c *Proxmox) DescribeNetworkBridges(ctx context.Context, node string) ([]NetworkBridge, error)

func (*Proxmox) DescribeNode

func (c *Proxmox) DescribeNode(ctx context.Context, node string) (Node, error)

func (*Proxmox) DescribePools

func (c *Proxmox) DescribePools(ctx context.Context) ([]Pool, error)

func (*Proxmox) DescribeStorage

func (c *Proxmox) DescribeStorage(ctx context.Context) ([]Storage, error)

deprecated

func (*Proxmox) DescribeTemplate added in v0.0.9

func (c *Proxmox) DescribeTemplate(ctx context.Context, node string, vmId int) (*VirtualMachine, error)

func (*Proxmox) DescribeTemplateFromName added in v0.0.9

func (c *Proxmox) DescribeTemplateFromName(ctx context.Context, node string, name string) (*VirtualMachine, error)

func (*Proxmox) DescribeTemplates

func (c *Proxmox) DescribeTemplates(ctx context.Context, node string) ([]*VirtualMachine, error)

func (*Proxmox) DescribeVirtualMachine added in v0.0.8

func (c *Proxmox) DescribeVirtualMachine(ctx context.Context, node string, vmid int) (*VirtualMachine, error)

func (*Proxmox) DescribeVirtualMachines

func (c *Proxmox) DescribeVirtualMachines(ctx context.Context, node string) ([]*VirtualMachine, error)

func (*Proxmox) DescribeVirtualMachinesOld added in v0.0.8

func (c *Proxmox) DescribeVirtualMachinesOld(ctx context.Context, node string) ([]vm.VirtualMachine, error)

func (*Proxmox) DescribeZFSNodeStorage added in v0.0.5

func (c *Proxmox) DescribeZFSNodeStorage(ctx context.Context, node string) ([]*ZFSNodeStorage, error)

func (*Proxmox) DescribeZFSPool added in v0.0.4

func (c *Proxmox) DescribeZFSPool(ctx context.Context, node string, pool string) (*ZFSPool, error)

An unefficient method of getting a single ZFS pool

func (*Proxmox) DescribeZFSPools added in v0.0.4

func (c *Proxmox) DescribeZFSPools(ctx context.Context, node string) ([]ZFSPool, error)

Describes a ZFS pool and the disks that makes it up This chains several API calls togther to build a ZFSPool struct

Process flow is:

  1. Get a list of all ZFS pools
  2. Get the status of each pool
  3. Get a list of all disks on node
  4. Match the disks to the pool
  5. Build a ZFSPool struct and append to a list
  6. Return a list of ZFSPool structs

func (*Proxmox) DetermineVirtualMachineResourcePool added in v0.0.8

func (c *Proxmox) DetermineVirtualMachineResourcePool(ctx context.Context, vmId int) (bool, string, error)

func (*Proxmox) GetLVM added in v0.0.5

func (c *Proxmox) GetLVM(ctx context.Context, node string, pool string) (*LVM, error)

func (*Proxmox) GetLVMStorageClass added in v0.0.6

func (c *Proxmox) GetLVMStorageClass(ctx context.Context, name string) (*LVMStorageClass, error)

func (*Proxmox) GetLVMThinStorageClass added in v0.0.6

func (c *Proxmox) GetLVMThinStorageClass(ctx context.Context, name string) (*LVMThinStorageClass, error)

func (*Proxmox) GetLVMThinpool added in v0.0.5

func (c *Proxmox) GetLVMThinpool(ctx context.Context, node string, pool string) (*LVMThinpool, error)

func (*Proxmox) GetNFSStorageClass added in v0.0.6

func (c *Proxmox) GetNFSStorageClass(ctx context.Context, name string) (*NFSStorageClass, error)

func (*Proxmox) GetNetworkBond added in v0.0.2

func (c *Proxmox) GetNetworkBond(ctx context.Context, node string, name string) (*NetworkBond, error)

func (*Proxmox) GetNetworkBridge added in v0.0.3

func (c *Proxmox) GetNetworkBridge(ctx context.Context, node string, name string) (*NetworkBridge, error)

func (*Proxmox) GetNode

func (c *Proxmox) GetNode(ctx context.Context, node string) (*proxmox.NodeSummary, error)

func (*Proxmox) GetNodeStorage added in v0.0.5

func (c *Proxmox) GetNodeStorage(ctx context.Context, node string, storage string) (*proxmox.NodeStorageSummary, error)

func (*Proxmox) GetPool

func (c *Proxmox) GetPool(ctx context.Context, poolId string) (*proxmox.PoolConfigurationSummary, error)

func (*Proxmox) GetStorage

func (c *Proxmox) GetStorage(ctx context.Context, node string, storage string) (*proxmox.NodeStorageSummary, error)

deprecated

func (*Proxmox) GetStorageClass added in v0.0.5

func (c *Proxmox) GetStorageClass(ctx context.Context, storage string) (*proxmox.StorageSummary, error)

func (*Proxmox) GetVirtualMachineConfiguration

func (c *Proxmox) GetVirtualMachineConfiguration(ctx context.Context, node string, vmId int) (*proxmox.VirtualMachineConfigurationSummary, error)

func (*Proxmox) GetVirtualMachineStatus added in v0.0.8

func (c *Proxmox) GetVirtualMachineStatus(ctx context.Context, node string, vmid int) (*proxmox.VirtualMachineStatusSummary, error)

func (*Proxmox) GetZFSPoolStatus added in v0.0.4

func (c *Proxmox) GetZFSPoolStatus(ctx context.Context, node string, pool string) (proxmox.ZFSPoolStatusSummary, error)

func (*Proxmox) GetZFSStorageClass added in v0.0.5

func (c *Proxmox) GetZFSStorageClass(ctx context.Context, name string) (*ZFSStorageClass, error)

func (*Proxmox) ListDisks

func (c *Proxmox) ListDisks(ctx context.Context, node string) ([]Disk, error)

func (*Proxmox) ListLVMStorageClasses added in v0.0.6

func (c *Proxmox) ListLVMStorageClasses(ctx context.Context) ([]LVMStorageClass, error)

func (*Proxmox) ListLVMThinStorageClasses added in v0.0.6

func (c *Proxmox) ListLVMThinStorageClasses(ctx context.Context) ([]LVMThinStorageClass, error)

func (*Proxmox) ListLVMThinpools added in v0.0.5

func (c *Proxmox) ListLVMThinpools(ctx context.Context, node string) ([]LVMThinpool, error)

func (*Proxmox) ListLVMs added in v0.0.5

func (c *Proxmox) ListLVMs(ctx context.Context, node string) ([]LVM, error)

func (*Proxmox) ListNFSStorageClasses added in v0.0.6

func (c *Proxmox) ListNFSStorageClasses(ctx context.Context) ([]NFSStorageClass, error)

func (*Proxmox) ListNetworkBonds

func (c *Proxmox) ListNetworkBonds(ctx context.Context, node string) ([]proxmox.NetworkInterfaceSummary, error)

func (*Proxmox) ListNetworkBridges

func (c *Proxmox) ListNetworkBridges(ctx context.Context, node string) ([]proxmox.NetworkInterfaceSummary, error)

func (*Proxmox) ListNetworkInterfaces

func (c *Proxmox) ListNetworkInterfaces(ctx context.Context, node string) ([]NetworkInterface, error)

func (*Proxmox) ListNodeStorage

func (c *Proxmox) ListNodeStorage(ctx context.Context, node string) ([]proxmox.NodeStorageSummary, error)

func (*Proxmox) ListNodes

func (c *Proxmox) ListNodes(ctx context.Context) ([]proxmox.NodeSummary, error)

func (*Proxmox) ListNodesNames added in v0.0.6

func (c *Proxmox) ListNodesNames(ctx context.Context) ([]string, error)

func (*Proxmox) ListPools

func (c *Proxmox) ListPools(ctx context.Context) ([]proxmox.PoolSummary, error)

func (*Proxmox) ListStorage

func (c *Proxmox) ListStorage(ctx context.Context) ([]proxmox.StorageSummary, error)

func (*Proxmox) ListTemplates

func (c *Proxmox) ListTemplates(ctx context.Context, node string) ([]proxmox.VirtualMachineSummary, error)

func (*Proxmox) ListVirtualMachines

func (c *Proxmox) ListVirtualMachines(ctx context.Context, node string) ([]proxmox.VirtualMachineSummary, error)

func (*Proxmox) ListZFSPools added in v0.0.4

func (c *Proxmox) ListZFSPools(ctx context.Context, node string) ([]proxmox.ZFSPoolSummary, error)

func (*Proxmox) ListZFSStorageClasses added in v0.0.5

func (c *Proxmox) ListZFSStorageClasses(ctx context.Context) ([]ZFSStorageClass, error)

func (*Proxmox) ModifyLVMStorageClass added in v0.0.6

func (c *Proxmox) ModifyLVMStorageClass(ctx context.Context, name string, input *ModifyLVMStorageClassInput) error

func (*Proxmox) ModifyLVMThinStorageClass added in v0.0.6

func (c *Proxmox) ModifyLVMThinStorageClass(ctx context.Context, name string, input *ModifyLVMThinStorageClassInput) error

func (*Proxmox) ModifyNFSStorageClass added in v0.0.6

func (c *Proxmox) ModifyNFSStorageClass(ctx context.Context, name string, input *ModifyNFSStorageClassInput) error

func (*Proxmox) ModifyZFSStorageClass added in v0.0.6

func (c *Proxmox) ModifyZFSStorageClass(ctx context.Context, name string, input *ModifyZFSStorageClassInput) error

func (*Proxmox) RemoveVirtualMachineFromResourcePool added in v0.0.8

func (c *Proxmox) RemoveVirtualMachineFromResourcePool(ctx context.Context, vmId int, pool string) error

func (*Proxmox) ResizeVirtualMachineDisk added in v0.0.8

func (c *Proxmox) ResizeVirtualMachineDisk(ctx context.Context, input *ResizeVirtualMachineDiskInput) error

func (*Proxmox) StartVirtualMachine added in v0.0.8

func (c *Proxmox) StartVirtualMachine(ctx context.Context, node string, vmid int) error

func (*Proxmox) StopVirtualMachine added in v0.0.8

func (c *Proxmox) StopVirtualMachine(ctx context.Context, node string, vmid int) error

func (*Proxmox) UpdateNetworkBond added in v0.0.2

func (c *Proxmox) UpdateNetworkBond(ctx context.Context, input *UpdateNetworkBondInput) error

func (*Proxmox) UpdateNetworkBridge added in v0.0.3

func (c *Proxmox) UpdateNetworkBridge(ctx context.Context, input *UpdateNetworkBridgeInput) error

func (*Proxmox) UpdatePool

func (c *Proxmox) UpdatePool(ctx context.Context, input *UpdatePoolInput) error

type ResizeVirtualMachineDiskInput added in v0.0.8

type ResizeVirtualMachineDiskInput struct {
	Node string
	VmId int
	Disk string
	Size int64
}

type Storage

type Storage struct {
	Id          string
	SharedNodes []string
	Shared      bool
	Local       bool
	Size        int64
	Source      string
	Content     []string
	Type        proxmox.StorageType
}

type UpdateNetworkBondInput added in v0.0.2

type UpdateNetworkBondInput struct {
	Interfaces []string
	Name       string
	Node       string
	Mode       proxmox.NetworkInterfaceBondMode
	// optional
	IPv4        *IP
	IPv6        *IP
	IPv4Gateway *string
	IPv6Gateway *string
	HashPolicy  *proxmox.NetworkInterfaceBondHashPolicy
	BondPrimary *string
	AutoStart   *bool
	Comments    *string
}

type UpdateNetworkBridgeInput added in v0.0.3

type UpdateNetworkBridgeInput struct {
	Interfaces []string
	Name       string
	Node       string
	// optional
	IPv4        *IP
	IPv6        *IP
	IPv4Gateway *string
	IPv6Gateway *string
	VLANAware   *bool
	AutoStart   *bool
	Comments    *string
}

type UpdatePoolInput

type UpdatePoolInput struct {
	PoolId  string
	Comment *string
	Delete  bool
	Storage []string
	Vms     []int
}

type VirtualMachine added in v0.0.8

type VirtualMachine struct {
	Node              string
	VmId              int
	Tags              []string
	Name              *string
	Description       *string
	Agent             *vm.VirtualMachineAgent
	Bios              proxmox.VirtualMachineBios
	CPU               vm.VirtualMachineCpu
	Disks             []vm.VirtualMachineDisk
	NetworkInterfaces []vm.VirtualMachineNetworkInterface
	PCIDevices        []vm.VirtualMachinePCIDevice
	Memory            vm.VirtualMachineMemory
	CloudInit         *vm.VirtualMachineCloudInit
	OsType            *proxmox.VirtualMachineOperatingSystem
	MachineType       *string
	KVMArguments      *string
	StartOnBoot       bool
	KeyboardLayout    *proxmox.VirtualMachineKeyboard
}

type ZFSNodeStorage added in v0.0.5

type ZFSNodeStorage struct {
	Id           string
	Node         string
	Storage      string
	ContentTypes []string
	Size         int64
	ZFSPool      string
	Mount        string
}

type ZFSPool added in v0.0.4

type ZFSPool struct {
	Name      string
	Node      string
	Size      int64
	Health    string
	Disks     []string
	RaidLevel proxmox.ZFSRaidLevel
}

type ZFSStorageClass added in v0.0.5

type ZFSStorageClass struct {
	Id      string
	Nodes   []string
	Content []string
	ZFSPool string
	Mount   string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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