session

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: Apache-2.0, Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	*govmomi.Client
	Datacenters    []*object.Datacenter
	VsphereVersion string
}

Session is a vSphere session with a configured Finder.

func GetOrCreate

func GetOrCreate(
	ctx context.Context,
	server string, datacenters []string, username, password, thumbprint string) (*Session, error)

GetOrCreate gets a cached session or creates a new one if one does not already exist.

type VirtualMachine

type VirtualMachine struct {
	*object.VirtualMachine
	Datacenter *object.Datacenter
}

func GetVMByIP

func GetVMByIP(ctx context.Context, ipAddy string, datacenters []*object.Datacenter) (*VirtualMachine, error)

Jump to

Keyboard shortcuts

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