virtualmachine

package
v1.2.112 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UpdateFunctor added in v0.10.8

type UpdateFunctor interface {
	Update(context.Context, *compute.VirtualMachine) (*compute.VirtualMachine, error)
}

type VirtualMachineClient

type VirtualMachineClient struct {
	compute.BaseClient
	// contains filtered or unexported fields
}

func NewVirtualMachineClient

func NewVirtualMachineClient(cloudFQDN string, authorizer auth.Authorizer) (*VirtualMachineClient, error)

func (*VirtualMachineClient) CreateOrUpdate

func (c *VirtualMachineClient) CreateOrUpdate(ctx context.Context, group, name string, compute *compute.VirtualMachine) (*compute.VirtualMachine, error)

CreateOrUpdate methods invokes create or update on the client

func (*VirtualMachineClient) Delete

func (c *VirtualMachineClient) Delete(ctx context.Context, group string, name string) error

Delete methods invokes delete of the compute resource

func (*VirtualMachineClient) DiskAttach

func (c *VirtualMachineClient) DiskAttach(ctx context.Context, group string, vmName, diskName string) (err error)

func (*VirtualMachineClient) DiskDetach

func (c *VirtualMachineClient) DiskDetach(ctx context.Context, group string, vmName, diskName string) (err error)

func (*VirtualMachineClient) Get

func (c *VirtualMachineClient) Get(ctx context.Context, group, name string) (*[]compute.VirtualMachine, error)

Get methods invokes the client Get method

func (*VirtualMachineClient) GetByComputerName added in v0.10.5

func (c *VirtualMachineClient) GetByComputerName(ctx context.Context, group string, computerName string) (*[]compute.VirtualMachine, error)

Get the Virtual Machine by querying for the specified computer name

func (*VirtualMachineClient) ListIPs added in v0.10.12

func (c *VirtualMachineClient) ListIPs(ctx context.Context, group, name string) ([]string, error)

ListIPs for specified VM

func (*VirtualMachineClient) NetworkInterfaceAdd

func (c *VirtualMachineClient) NetworkInterfaceAdd(ctx context.Context, group string, vmName, nicName string) (err error)

func (*VirtualMachineClient) NetworkInterfaceRemove

func (c *VirtualMachineClient) NetworkInterfaceRemove(ctx context.Context, group string, vmName, nicName string) (err error)

func (*VirtualMachineClient) Pause added in v0.14.0

func (c *VirtualMachineClient) Pause(ctx context.Context, group string, name string) (err error)

Pause the Virtual Machine

func (*VirtualMachineClient) Precheck added in v0.19.1

func (c *VirtualMachineClient) Precheck(ctx context.Context, group string, vms []*compute.VirtualMachine) (bool, error)

Prechecks whether the system is able to create specified virtual machines. Returns true with virtual machine placement in mapping from virtual machine names to node names; or false with reason in error message.

func (*VirtualMachineClient) Query added in v0.10.5

func (c *VirtualMachineClient) Query(ctx context.Context, group, query string) (*[]compute.VirtualMachine, error)

Query method invokes the client Get method and uses the provided query to filter the returned results

func (*VirtualMachineClient) RepairGuestAgent added in v0.10.31

func (c *VirtualMachineClient) RepairGuestAgent(ctx context.Context, group, vmName string) (err error)

func (*VirtualMachineClient) Resize

func (c *VirtualMachineClient) Resize(ctx context.Context, group string, vmName string, newSize compute.VirtualMachineSizeTypes, newCustomSize *compute.VirtualMachineCustomSize) (err error)

Resize the Virtual Machine

func (*VirtualMachineClient) ResizeEx added in v0.19.4

func (c *VirtualMachineClient) ResizeEx(ctx context.Context, group string, vmName string, newSize compute.VirtualMachineSizeTypes, newCustomSize *compute.VirtualMachineCustomSize, newVirtualMachineGPUs []*compute.VirtualMachineGPU) (err error)

Resize the Virtual Machine with GPUs

func (*VirtualMachineClient) Restart

func (c *VirtualMachineClient) Restart(ctx context.Context, group string, name string) (err error)

Restart the Virtual Machine

func (*VirtualMachineClient) RunCommand added in v0.10.11

func (*VirtualMachineClient) Save added in v0.14.0

func (c *VirtualMachineClient) Save(ctx context.Context, group string, name string) (err error)

Save the Virtual Machine

func (*VirtualMachineClient) Start

func (c *VirtualMachineClient) Start(ctx context.Context, group string, name string) (err error)

Start the Virtual Machine

func (*VirtualMachineClient) Stop

func (c *VirtualMachineClient) Stop(ctx context.Context, group string, name string) (err error)

Stop the Virtual Machine

func (*VirtualMachineClient) Update added in v0.10.8

func (c *VirtualMachineClient) Update(ctx context.Context, group string, vmName string, updateFunctor UpdateFunctor) (err error)

Update the VM with a retry

func (*VirtualMachineClient) Validate added in v0.10.27

func (c *VirtualMachineClient) Validate(ctx context.Context, group, name string) error

Validate methods invokes the validate Get method

Jump to

Keyboard shortcuts

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