Documentation ¶
Index ¶
- type EnvironmentBrowser
- func (b *EnvironmentBrowser) DefaultDevices(ctx context.Context, key string, host *object.HostSystem) (object.VirtualDeviceList, error)
- func (b *EnvironmentBrowser) OSFamily(ctx context.Context, guest string) (string, error)
- func (b *EnvironmentBrowser) QueryConfigOptionDescriptor(ctx context.Context) ([]types.VirtualMachineConfigOptionDescriptor, error)
- func (b *EnvironmentBrowser) SystemId(ctx context.Context, host *types.ManagedObjectReference) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnvironmentBrowser ¶
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 ¶
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.
func (*EnvironmentBrowser) SystemId ¶ added in v1.21.0
func (b *EnvironmentBrowser) SystemId(ctx context.Context, host *types.ManagedObjectReference) (string, error)
SystemId fetches the host SystemId which is used in creating PCI passthrough devices.