envbrowse

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2017 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvironmentBrowser

type EnvironmentBrowser struct {
	object.Common
}

EnvironmentBrowser is a higher-level interface to a specific object's environment browser.

This essentially fills the role of such functionality lacking in govmomi at this point in time and may serve as the basis for a respective PR at a later point in time.

func NewEnvironmentBrowser

func NewEnvironmentBrowser(c *vim25.Client, ref types.ManagedObjectReference) *EnvironmentBrowser

NewEnvironmentBrowser initializes a new EnvironmentBrowser based off the supplied managed object reference.

func (*EnvironmentBrowser) DefaultDevices

func (b *EnvironmentBrowser) DefaultDevices(ctx context.Context, key string, host *object.HostSystem) (object.VirtualDeviceList, error)

DefaultDevices loads a satisfactory default device list for the optionally supplied host and descriptor key. The result is returned as a higher-level VirtualDeviceList object. This can be used as an initial VirtualDeviceList when building a device list and VirtualDeviceConfigSpec list for new virtual machines.

Appropriate options for key can be loaded by running QueryConfigOptionDescriptor, which will return a list of VirtualMachineConfigOptionDescriptor which will contain the appropriate key for the virtual machine version needed. If no key is supplied, the results generally reflect the most recent VM hardware version.

func (*EnvironmentBrowser) OSFamily

func (b *EnvironmentBrowser) OSFamily(ctx context.Context, guest string) (string, error)

OSFamily fetches the operating system family for the supplied guest ID.

func (*EnvironmentBrowser) QueryConfigOptionDescriptor

func (b *EnvironmentBrowser) QueryConfigOptionDescriptor(ctx context.Context) ([]types.VirtualMachineConfigOptionDescriptor, error)

QueryConfigOptionDescriptor returns a list the list of ConfigOption keys available on the environment that this browser targets. The keys can be used as query options for DefaultDevices and other functions, facilitating the specification of results specific to a certain VM version.

Jump to

Keyboard shortcuts

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