Versions in this module Expand all Collapse all v0 v0.2.0 Sep 16, 2015 Changes in this version + const DeviceTypeCdrom + const DeviceTypeDisk + const DeviceTypeEthernet + const DeviceTypeFloppy + const PropRuntimePowerState + var ErrKeyNameNotFound = errors.New("key name not found") + var ErrNotSupported = errors.New("custom fields not supported") + type ClusterComputeResource struct + InventoryPath string + func NewClusterComputeResource(c *vim25.Client, ref types.ManagedObjectReference) *ClusterComputeResource + func (c ClusterComputeResource) AddHost(ctx context.Context, spec types.HostConnectSpec, asConnected bool, ...) (*Task, error) + func (c ClusterComputeResource) Destroy(ctx context.Context) (*Task, error) + func (c ClusterComputeResource) ReconfigureCluster(ctx context.Context, spec types.ClusterConfigSpec) (*Task, error) + type Common struct + func NewCommon(c *vim25.Client, r types.ManagedObjectReference) Common + func (c Common) Client() *vim25.Client + func (c Common) Properties(ctx context.Context, r types.ManagedObjectReference, ps []string, ...) error + func (c Common) Reference() types.ManagedObjectReference + func (c Common) String() string + type ComputeResource struct + InventoryPath string + func NewComputeResource(c *vim25.Client, ref types.ManagedObjectReference) *ComputeResource + func (c ComputeResource) Datastores(ctx context.Context) ([]*Datastore, error) + func (c ComputeResource) Destroy(ctx context.Context) (*Task, error) + func (c ComputeResource) Hosts(ctx context.Context) ([]types.ManagedObjectReference, error) + func (c ComputeResource) ResourcePool(ctx context.Context) (*ResourcePool, error) + type CustomFieldsManager struct + func GetCustomFieldsManager(c *vim25.Client) (*CustomFieldsManager, error) + func NewCustomFieldsManager(c *vim25.Client) *CustomFieldsManager + func (m CustomFieldsManager) Add(ctx context.Context, name string, moType string, ...) (*types.CustomFieldDef, error) + func (m CustomFieldsManager) Field(ctx context.Context) ([]types.CustomFieldDef, error) + func (m CustomFieldsManager) FindKey(ctx context.Context, key string) (int, error) + func (m CustomFieldsManager) Remove(ctx context.Context, key int) error + func (m CustomFieldsManager) Rename(ctx context.Context, key int, name string) error + func (m CustomFieldsManager) Set(ctx context.Context, entity types.ManagedObjectReference, key int, ...) error + type CustomizationSpecManager struct + func NewCustomizationSpecManager(c *vim25.Client) *CustomizationSpecManager + func (cs CustomizationSpecManager) CreateCustomizationSpec(ctx context.Context, item types.CustomizationSpecItem) error + func (cs CustomizationSpecManager) CustomizationSpecItemToXml(ctx context.Context, item types.CustomizationSpecItem) (string, error) + func (cs CustomizationSpecManager) DeleteCustomizationSpec(ctx context.Context, name string) error + func (cs CustomizationSpecManager) DoesCustomizationSpecExist(ctx context.Context, name string) (bool, error) + func (cs CustomizationSpecManager) DuplicateCustomizationSpec(ctx context.Context, name string, newName string) error + func (cs CustomizationSpecManager) GetCustomizationSpec(ctx context.Context, name string) (*types.CustomizationSpecItem, error) + func (cs CustomizationSpecManager) OverwriteCustomizationSpec(ctx context.Context, item types.CustomizationSpecItem) error + func (cs CustomizationSpecManager) RenameCustomizationSpec(ctx context.Context, name string, newName string) error + func (cs CustomizationSpecManager) XmlToCustomizationSpecItem(ctx context.Context, xml string) (*types.CustomizationSpecItem, error) + type Datacenter struct + func NewDatacenter(c *vim25.Client, ref types.ManagedObjectReference) *Datacenter + func (d *Datacenter) Folders(ctx context.Context) (*DatacenterFolders, error) + func (d Datacenter) Destroy(ctx context.Context) (*Task, error) + type DatacenterFolders struct + DatastoreFolder *Folder + HostFolder *Folder + NetworkFolder *Folder + VmFolder *Folder + type Datastore struct + InventoryPath string + func NewDatastore(c *vim25.Client, ref types.ManagedObjectReference) *Datastore + func (d Datastore) Browser(ctx context.Context) (*HostDatastoreBrowser, error) + func (d Datastore) Name() string + func (d Datastore) Path(path string) string + func (d Datastore) URL(ctx context.Context, dc *Datacenter, path string) (*url.URL, error) + type DistributedVirtualPortgroup struct + InventoryPath string + func NewDistributedVirtualPortgroup(c *vim25.Client, ref types.ManagedObjectReference) *DistributedVirtualPortgroup + func (p DistributedVirtualPortgroup) EthernetCardBackingInfo(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) + func (p DistributedVirtualPortgroup) Name() string + type DistributedVirtualSwitch struct + func NewDistributedVirtualSwitch(c *vim25.Client, ref types.ManagedObjectReference) *DistributedVirtualSwitch + type FileManager struct + func NewFileManager(c *vim25.Client) *FileManager + func (f FileManager) CopyDatastoreFile(ctx context.Context, sourceName string, sourceDatacenter *Datacenter, ...) (*Task, error) + func (f FileManager) DeleteDatastoreFile(ctx context.Context, name string, dc *Datacenter) (*Task, error) + func (f FileManager) MakeDirectory(ctx context.Context, name string, dc *Datacenter, createParentDirectories bool) error + func (f FileManager) MoveDatastoreFile(ctx context.Context, sourceName string, sourceDatacenter *Datacenter, ...) (*Task, error) + type Folder struct + func NewFolder(c *vim25.Client, ref types.ManagedObjectReference) *Folder + func NewRootFolder(c *vim25.Client) *Folder + func (f Folder) AddStandaloneHost(ctx context.Context, spec types.HostConnectSpec, addConnected bool, ...) (*Task, error) + func (f Folder) Children(ctx context.Context) ([]Reference, error) + func (f Folder) CreateCluster(ctx context.Context, cluster string, spec types.ClusterConfigSpecEx) (*ClusterComputeResource, error) + func (f Folder) CreateDatacenter(ctx context.Context, datacenter string) (*Datacenter, error) + func (f Folder) CreateFolder(ctx context.Context, name string) (*Folder, error) + func (f Folder) CreateVM(ctx context.Context, config types.VirtualMachineConfigSpec, pool *ResourcePool, ...) (*Task, error) + func (f Folder) RegisterVM(ctx context.Context, path string, name string, asTemplate bool, ...) (*Task, error) + type HistoryCollector struct + func NewHistoryCollector(c *vim25.Client, ref types.ManagedObjectReference) *HistoryCollector + func (h HistoryCollector) Destroy(ctx context.Context) error + func (h HistoryCollector) Reset(ctx context.Context) error + func (h HistoryCollector) Rewind(ctx context.Context) error + func (h HistoryCollector) SetPageSize(ctx context.Context, maxCount int) error + type HostConfigManager struct + func NewHostConfigManager(c *vim25.Client, ref types.ManagedObjectReference) *HostConfigManager + func (m HostConfigManager) NetworkSystem(ctx context.Context) (*HostNetworkSystem, error) + type HostDatastoreBrowser struct + func NewHostDatastoreBrowser(c *vim25.Client, ref types.ManagedObjectReference) *HostDatastoreBrowser + func (b HostDatastoreBrowser) SearchDatastore(ctx context.Context, datastorePath string, ...) (*Task, error) + func (b HostDatastoreBrowser) SearchDatastoreSubFolders(ctx context.Context, datastorePath string, ...) (*Task, error) + type HostNetworkSystem struct + func NewHostNetworkSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostNetworkSystem + func (o HostNetworkSystem) AddPortGroup(ctx context.Context, portgrp types.HostPortGroupSpec) error + func (o HostNetworkSystem) AddServiceConsoleVirtualNic(ctx context.Context, portgroup string, nic types.HostVirtualNicSpec) (string, error) + func (o HostNetworkSystem) AddVirtualNic(ctx context.Context, portgroup string, nic types.HostVirtualNicSpec) (string, error) + func (o HostNetworkSystem) AddVirtualSwitch(ctx context.Context, vswitchName string, spec *types.HostVirtualSwitchSpec) error + func (o HostNetworkSystem) QueryNetworkHint(ctx context.Context, device []string) error + func (o HostNetworkSystem) RefreshNetworkSystem(ctx context.Context) error + func (o HostNetworkSystem) RemovePortGroup(ctx context.Context, pgName string) error + func (o HostNetworkSystem) RemoveServiceConsoleVirtualNic(ctx context.Context, device string) error + func (o HostNetworkSystem) RemoveVirtualNic(ctx context.Context, device string) error + func (o HostNetworkSystem) RemoveVirtualSwitch(ctx context.Context, vswitchName string) error + func (o HostNetworkSystem) RestartServiceConsoleVirtualNic(ctx context.Context, device string) error + func (o HostNetworkSystem) UpdateConsoleIpRouteConfig(ctx context.Context, config types.BaseHostIpRouteConfig) error + func (o HostNetworkSystem) UpdateDnsConfig(ctx context.Context, config types.BaseHostDnsConfig) error + func (o HostNetworkSystem) UpdateIpRouteConfig(ctx context.Context, config types.BaseHostIpRouteConfig) error + func (o HostNetworkSystem) UpdateIpRouteTableConfig(ctx context.Context, config types.HostIpRouteTableConfig) error + func (o HostNetworkSystem) UpdateNetworkConfig(ctx context.Context, config types.HostNetworkConfig, changeMode string) (*types.HostNetworkConfigResult, error) + func (o HostNetworkSystem) UpdatePhysicalNicLinkSpeed(ctx context.Context, device string, linkSpeed *types.PhysicalNicLinkInfo) error + func (o HostNetworkSystem) UpdatePortGroup(ctx context.Context, pgName string, portgrp types.HostPortGroupSpec) error + func (o HostNetworkSystem) UpdateServiceConsoleVirtualNic(ctx context.Context, device string, nic types.HostVirtualNicSpec) error + func (o HostNetworkSystem) UpdateVirtualNic(ctx context.Context, device string, nic types.HostVirtualNicSpec) error + func (o HostNetworkSystem) UpdateVirtualSwitch(ctx context.Context, vswitchName string, spec types.HostVirtualSwitchSpec) error + type HostSystem struct + InventoryPath string + func NewHostSystem(c *vim25.Client, ref types.ManagedObjectReference) *HostSystem + func (h HostSystem) ConfigManager() *HostConfigManager + func (h HostSystem) ManagementIPs(ctx context.Context) ([]net.IP, error) + func (h HostSystem) Name(ctx context.Context) (string, error) + func (h HostSystem) ResourcePool(ctx context.Context) (*ResourcePool, error) + func (h HostSystem) String() string + type HttpNfcLease struct + func NewHttpNfcLease(c *vim25.Client, ref types.ManagedObjectReference) *HttpNfcLease + func (o HttpNfcLease) HttpNfcLeaseAbort(ctx context.Context, fault *types.LocalizedMethodFault) error + func (o HttpNfcLease) HttpNfcLeaseComplete(ctx context.Context) error + func (o HttpNfcLease) HttpNfcLeaseGetManifest(ctx context.Context) error + func (o HttpNfcLease) HttpNfcLeaseProgress(ctx context.Context, percent int) error + func (o HttpNfcLease) Wait(ctx context.Context) (*types.HttpNfcLeaseInfo, error) + type Network struct + InventoryPath string + func NewNetwork(c *vim25.Client, ref types.ManagedObjectReference) *Network + func (n Network) EthernetCardBackingInfo(_ context.Context) (types.BaseVirtualDeviceBackingInfo, error) + func (n Network) Name() string + type NetworkReference interface + EthernetCardBackingInfo func(ctx context.Context) (types.BaseVirtualDeviceBackingInfo, error) + type OvfManager struct + func NewOvfManager(c *vim25.Client) *OvfManager + func (o OvfManager) CreateDescriptor(ctx context.Context, obj Reference, cdp types.OvfCreateDescriptorParams) (*types.OvfCreateDescriptorResult, error) + func (o OvfManager) CreateImportSpec(ctx context.Context, ovfDescriptor string, resourcePool Reference, ...) (*types.OvfCreateImportSpecResult, error) + func (o OvfManager) ParseDescriptor(ctx context.Context, ovfDescriptor string, pdp types.OvfParseDescriptorParams) (*types.OvfParseDescriptorResult, error) + func (o OvfManager) ValidateHost(ctx context.Context, ovfDescriptor string, host Reference, ...) (*types.OvfValidateHostResult, error) + type Reference interface + Reference func() types.ManagedObjectReference + func NewReference(c *vim25.Client, e types.ManagedObjectReference) Reference + type ResourcePool struct + InventoryPath string + func NewResourcePool(c *vim25.Client, ref types.ManagedObjectReference) *ResourcePool + func (p ResourcePool) Create(ctx context.Context, name string, spec types.ResourceConfigSpec) (*ResourcePool, error) + func (p ResourcePool) CreateVApp(ctx context.Context, name string, resSpec types.ResourceConfigSpec, ...) (*VirtualApp, error) + func (p ResourcePool) Destroy(ctx context.Context) (*Task, error) + func (p ResourcePool) DestroyChildren(ctx context.Context) error + func (p ResourcePool) ImportVApp(ctx context.Context, spec types.BaseImportSpec, folder *Folder, ...) (*HttpNfcLease, error) + func (p ResourcePool) Name(ctx context.Context) (string, error) + func (p ResourcePool) String() string + func (p ResourcePool) UpdateConfig(ctx context.Context, name string, config *types.ResourceConfigSpec) error + type SearchIndex struct + func NewSearchIndex(c *vim25.Client) *SearchIndex + func (s SearchIndex) FindByDatastorePath(ctx context.Context, dc *Datacenter, path string) (Reference, error) + func (s SearchIndex) FindByDnsName(ctx context.Context, dc *Datacenter, dnsName string, vmSearch bool) (Reference, error) + func (s SearchIndex) FindByInventoryPath(ctx context.Context, path string) (Reference, error) + func (s SearchIndex) FindByIp(ctx context.Context, dc *Datacenter, ip string, vmSearch bool) (Reference, error) + func (s SearchIndex) FindByUuid(ctx context.Context, dc *Datacenter, uuid string, vmSearch bool) (Reference, error) + func (s SearchIndex) FindChild(ctx context.Context, entity Reference, name string) (Reference, error) + type StoragePod struct + type StorageResourceManager struct + func NewStorageResourceManager(c *vim25.Client) *StorageResourceManager + func (sr StorageResourceManager) ApplyStorageDrsRecommendation(ctx context.Context, key []string) (*Task, error) + func (sr StorageResourceManager) ApplyStorageDrsRecommendationToPod(ctx context.Context, pod *StoragePod, key string) (*Task, error) + func (sr StorageResourceManager) CancelStorageDrsRecommendation(ctx context.Context, key []string) error + func (sr StorageResourceManager) ConfigureDatastoreIORM(ctx context.Context, datastore *Datastore, spec types.StorageIORMConfigSpec, ...) (*Task, error) + func (sr StorageResourceManager) ConfigureStorageDrsForPod(ctx context.Context, pod *StoragePod, spec types.StorageDrsConfigSpec, ...) (*Task, error) + func (sr StorageResourceManager) QueryDatastorePerformanceSummary(ctx context.Context, datastore *Datastore) ([]types.StoragePerformanceSummary, error) + func (sr StorageResourceManager) QueryIORMConfigOption(ctx context.Context, host *HostSystem) (*types.StorageIORMConfigOption, error) + func (sr StorageResourceManager) RecommendDatastores(ctx context.Context, storageSpec types.StoragePlacementSpec) (*types.StoragePlacementResult, error) + func (sr StorageResourceManager) RefreshStorageDrsRecommendation(ctx context.Context, pod *StoragePod) error + type Task struct + func NewTask(c *vim25.Client, ref types.ManagedObjectReference) *Task + func (t *Task) Wait(ctx context.Context) error + func (t *Task) WaitForResult(ctx context.Context, s progress.Sinker) (*types.TaskInfo, error) + type VirtualApp struct + func NewVirtualApp(c *vim25.Client, ref types.ManagedObjectReference) *VirtualApp + func (p VirtualApp) CreateChildVM_Task(ctx context.Context, config types.VirtualMachineConfigSpec, host *HostSystem) (*Task, error) + func (p VirtualApp) Name(ctx context.Context) (string, error) + func (p VirtualApp) PowerOffVApp_Task(ctx context.Context, force bool) error + func (p VirtualApp) PowerOnVApp_Task(ctx context.Context) error + func (p VirtualApp) String() string + func (p VirtualApp) SuspendVApp_Task(ctx context.Context) error + func (p VirtualApp) UpdateVAppConfig(ctx context.Context, spec types.VAppConfigSpec) error + type VirtualDeviceList []types.BaseVirtualDevice + func EthernetCardTypes() VirtualDeviceList + func SCSIControllerTypes() VirtualDeviceList + func (l VirtualDeviceList) AssignController(device types.BaseVirtualDevice, c types.BaseVirtualController) + func (l VirtualDeviceList) BootOrder(order []string) []types.BaseVirtualMachineBootOptionsBootableDevice + func (l VirtualDeviceList) ChildDisk(parent *types.VirtualDisk) *types.VirtualDisk + func (l VirtualDeviceList) Connect(device types.BaseVirtualDevice) error + func (l VirtualDeviceList) ConnectSerialPort(device *types.VirtualSerialPort, uri string, client bool) *types.VirtualSerialPort + func (l VirtualDeviceList) CreateCdrom(c *types.VirtualIDEController) (*types.VirtualCdrom, error) + func (l VirtualDeviceList) CreateDisk(c types.BaseVirtualController, name string) *types.VirtualDisk + func (l VirtualDeviceList) CreateEthernetCard(name string, backing types.BaseVirtualDeviceBackingInfo) (types.BaseVirtualDevice, error) + func (l VirtualDeviceList) CreateFloppy() (*types.VirtualFloppy, error) + func (l VirtualDeviceList) CreateSCSIController(name string) (types.BaseVirtualDevice, error) + func (l VirtualDeviceList) CreateSerialPort() (*types.VirtualSerialPort, error) + func (l VirtualDeviceList) Disconnect(device types.BaseVirtualDevice) error + func (l VirtualDeviceList) DisconnectSerialPort(device *types.VirtualSerialPort) *types.VirtualSerialPort + func (l VirtualDeviceList) EjectImg(device *types.VirtualFloppy) *types.VirtualFloppy + func (l VirtualDeviceList) EjectIso(device *types.VirtualCdrom) *types.VirtualCdrom + func (l VirtualDeviceList) Find(name string) types.BaseVirtualDevice + func (l VirtualDeviceList) FindByKey(key int) types.BaseVirtualDevice + func (l VirtualDeviceList) FindCdrom(name string) (*types.VirtualCdrom, error) + func (l VirtualDeviceList) FindDiskController(name string) (types.BaseVirtualController, error) + func (l VirtualDeviceList) FindFloppy(name string) (*types.VirtualFloppy, error) + func (l VirtualDeviceList) FindIDEController(name string) (*types.VirtualIDEController, error) + func (l VirtualDeviceList) FindSCSIController(name string) (*types.VirtualSCSIController, error) + func (l VirtualDeviceList) FindSerialPort(name string) (*types.VirtualSerialPort, error) + func (l VirtualDeviceList) InsertImg(device *types.VirtualFloppy, img string) *types.VirtualFloppy + func (l VirtualDeviceList) InsertIso(device *types.VirtualCdrom, iso string) *types.VirtualCdrom + func (l VirtualDeviceList) Name(device types.BaseVirtualDevice) string + func (l VirtualDeviceList) PickController(kind types.BaseVirtualController) types.BaseVirtualController + func (l VirtualDeviceList) PrimaryMacAddress() string + func (l VirtualDeviceList) Select(f func(device types.BaseVirtualDevice) bool) VirtualDeviceList + func (l VirtualDeviceList) SelectBootOrder(order []types.BaseVirtualMachineBootOptionsBootableDevice) VirtualDeviceList + func (l VirtualDeviceList) SelectByBackingInfo(backing types.BaseVirtualDeviceBackingInfo) VirtualDeviceList + func (l VirtualDeviceList) SelectByType(deviceType types.BaseVirtualDevice) VirtualDeviceList + func (l VirtualDeviceList) Type(device types.BaseVirtualDevice) string + func (l VirtualDeviceList) TypeName(device types.BaseVirtualDevice) string + type VirtualDiskManager struct + func NewVirtualDiskManager(c *vim25.Client) *VirtualDiskManager + func (m VirtualDiskManager) CopyVirtualDisk(ctx context.Context, sourceName string, sourceDatacenter *Datacenter, ...) (*Task, error) + func (m VirtualDiskManager) CreateVirtualDisk(ctx context.Context, name string, datacenter *Datacenter, ...) (*Task, error) + func (m VirtualDiskManager) DeleteVirtualDisk(ctx context.Context, name string, dc *Datacenter) (*Task, error) + func (m VirtualDiskManager) MoveVirtualDisk(ctx context.Context, sourceName string, sourceDatacenter *Datacenter, ...) (*Task, error) + type VirtualMachine struct + InventoryPath string + func NewVirtualMachine(c *vim25.Client, ref types.ManagedObjectReference) *VirtualMachine + func (v VirtualMachine) AddDevice(ctx context.Context, device ...types.BaseVirtualDevice) error + func (v VirtualMachine) Answer(ctx context.Context, id, answer string) error + func (v VirtualMachine) BootOptions(ctx context.Context) (*types.VirtualMachineBootOptions, error) + func (v VirtualMachine) Clone(ctx context.Context, folder *Folder, name string, ...) (*Task, error) + func (v VirtualMachine) Destroy(ctx context.Context) (*Task, error) + func (v VirtualMachine) Device(ctx context.Context) (VirtualDeviceList, error) + func (v VirtualMachine) EditDevice(ctx context.Context, device ...types.BaseVirtualDevice) error + func (v VirtualMachine) HostSystem(ctx context.Context) (*HostSystem, error) + func (v VirtualMachine) IsToolsRunning(ctx context.Context) (bool, error) + func (v VirtualMachine) MarkAsTemplate(ctx context.Context) error + func (v VirtualMachine) MarkAsVirtualMachine(ctx context.Context, pool ResourcePool, host *HostSystem) error + func (v VirtualMachine) Name(ctx context.Context) (string, error) + func (v VirtualMachine) PowerOff(ctx context.Context) (*Task, error) + func (v VirtualMachine) PowerOn(ctx context.Context) (*Task, error) + func (v VirtualMachine) RebootGuest(ctx context.Context) error + func (v VirtualMachine) Reconfigure(ctx context.Context, config types.VirtualMachineConfigSpec) (*Task, error) + func (v VirtualMachine) Relocate(ctx context.Context, config types.VirtualMachineRelocateSpec, ...) (*Task, error) + func (v VirtualMachine) RemoveDevice(ctx context.Context, device ...types.BaseVirtualDevice) error + func (v VirtualMachine) Reset(ctx context.Context) (*Task, error) + func (v VirtualMachine) ResourcePool(ctx context.Context) (*ResourcePool, error) + func (v VirtualMachine) SetBootOptions(ctx context.Context, options *types.VirtualMachineBootOptions) error + func (v VirtualMachine) ShutdownGuest(ctx context.Context) error + func (v VirtualMachine) String() string + func (v VirtualMachine) Suspend(ctx context.Context) (*Task, error) + func (v VirtualMachine) WaitForIP(ctx context.Context) (string, error) + func (v VirtualMachine) WaitForPowerState(ctx context.Context, state types.VirtualMachinePowerState) error + type VmwareDistributedVirtualSwitch struct