vm

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRole

func AddRole(ctx context.Context, client *vim25.Client, params *jt.VMAddRoleParams) error

AddRole adds role to specific VM

func Delete added in v0.3.0

func Delete(ctx context.Context, client *vim25.Client, params *jt.VMDeleteParams) error

func DeleteSnapshot

func DeleteSnapshot(ctx context.Context, client *vim25.Client, params *jt.VMSnapshotDeleteParams) error

DeleteSnapshot deletes snapshot

func Find

func Find(ctx context.Context, client *vim25.Client, params *jt.VMFindParams) (*jt.VMFound, error)

Find search Virtual Machine from given Datacenter and Path

func FindByPath

func FindByPath(ctx context.Context, client *vim25.Client, DCname, path string) (*object.VirtualMachine, error)

FindByPath find and returns VM by Inventory Path

func FindByUUID

func FindByUUID(ctx context.Context, client *vim25.Client, DCName, uuid string) (*object.VirtualMachine, error)

FindByUUID find and returns VM by its UUID

func Info

func Info(ctx context.Context, client *vim25.Client, params *jt.VMInfoParams) (*jt.VMSummary, error)

Info returns summary information about Virtual Machines

func IsVMExist

func IsVMExist(ctx context.Context, c *vim25.Client, params *jt.VMDeployParams) (bool, error)

func List

func List(ctx context.Context, c *vim25.Client, params *jt.VMListParams) (map[string]string, error)

List returns a list of VM names and its UUIDs

func PowerON

func PowerON(ctx context.Context, vm *object.VirtualMachine) error

func RestoreFromSnapshot

func RestoreFromSnapshot(ctx context.Context, client *vim25.Client, params *jt.VMRestoreFromSnapshotParams) error

RestoreFromSnapshot restore VM from snapshot

func RolesList

func RolesList(ctx context.Context, client *vim25.Client, params *jt.VMRolesListParams) ([]jt.Role, error)

RolesList get VM roles

func SnapshotCreate

func SnapshotCreate(ctx context.Context, client *vim25.Client, params *jt.SnapshotCreateParams) (int32, error)

SnapshotCreate creates VM snapshot

func SnapshotsList

func SnapshotsList(ctx context.Context, client *vim25.Client, params *jt.VMSnapshotsListParams) ([]jt.Snapshot, error)

SnapshotsList return a list of VM snapshots

func WaitForIP

func WaitForIP(ctx context.Context, vm *object.VirtualMachine) ([]string, error)

Types

type Deployment

type Deployment struct {
	Client *vim25.Client
	Finder *find.Finder
	// contains filtered or unexported fields
}

func NewDeployment

func NewDeployment(ctx context.Context, c *vim25.Client, params *jt.VMDeployParams, l log.Logger, cfg *config.Config) (*Deployment, error)

NewDeployment create a new deployment object. It choose needed resources

func (*Deployment) Import

func (o *Deployment) Import(ctx context.Context, OVAURL string, anno string) (*types.ManagedObjectReference, error)

func (*Deployment) Upload

func (o *Deployment) Upload(ctx context.Context, lease *nfc.Lease, item nfc.FileItem) error

type Network

type Network struct {
	Name    string
	Network string
}

Network defines a mapping from each network inside the OVF to a ESXi network. The networks must be presented on the ESXi host.

Jump to

Keyboard shortcuts

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