service

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 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 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 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 NetworkBond

type NetworkBond struct {
	Active     bool
	Autostart  bool
	HashPolicy proxmox.NetworkInterfaceBondHashPolicy
	Mode       proxmox.NetworkInterfaceBondMode
	MiiMon     string
	Interfaces []string
	Name       string
	Node       string
}

type NetworkBridge

type NetworkBridge struct {
	Active     bool
	Autostart  bool
	VLANAware  bool
	Interfaces []string
	Name       string
	Node       string
	IPv4       *NetworkInterfaceIpv4
	IPv6       *NetworkInterfaceIpv6
}

type NetworkInterface

type NetworkInterface struct {
	Name string
}

type NetworkInterfaceIpv4

type NetworkInterfaceIpv4 struct {
	Address string
	Netmask string
	Gateway string
}

type NetworkInterfaceIpv6

type NetworkInterfaceIpv6 struct {
	Address string
	Netmask string
	Gateway 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) CreatePool

func (c *Proxmox) CreatePool(ctx context.Context, input *CreatePoolInput) 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) 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) 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 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