service

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 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 IntToBool

func IntToBool(i int) bool

func PtrFloatToInt64

func PtrFloatToInt64(i *float32) int64

func PtrIntToInt

func PtrIntToInt(i *int) int

func PtrStringToString

func PtrStringToString(s *string) string

func SliceToStringCommaList

func SliceToStringCommaList(s []string) string

func StringCommaListToSlice

func StringCommaListToSlice(s string) []string

func StringCommaPtrListToSlice

func StringCommaPtrListToSlice(s *string) []string

func StringSemiColonListToSlice

func StringSemiColonListToSlice(s string) []string

func StringSemiColonPtrListToSlice

func StringSemiColonPtrListToSlice(s *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 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 Disk

type Disk struct {
	Device 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 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) ApplyChanges added in v0.0.2

func (c *Proxmox) ApplyChanges(ctx context.Context, node string) 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) 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) DescribeLocalStorage

func (c *Proxmox) DescribeLocalStorage(ctx context.Context) ([]Storage, 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)

func (*Proxmox) DescribeTemplates

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

func (*Proxmox) DescribeVirtualMachines

func (c *Proxmox) DescribeVirtualMachines(ctx context.Context, node string) ([]vm.VirtualMachine, 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) 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)

func (*Proxmox) GetVirtualMachineConfiguration

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

func (*Proxmox) ListDisks

func (c *Proxmox) ListDisks(ctx context.Context, node string) ([]Disk, 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) 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) 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 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     []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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