Documentation

Overview

    Package simulator is a mock framework for the vSphere API.

    See also: https://github.com/vmware/govmomi/blob/master/vcsim/README.md

    Example

      Example of extending the simulator to inject faults.

      Output:
      
      welcome 2 the machine poweredOn
      
      Example (RunContainer)

        Tie a docker container to the lifecycle of a vcsim VM

        Output:
        
        0 diff
        
        Example (SetVirtualMachineProperties)

          Set VM properties that the API cannot change in a real vCenter.

          Output:
          
          ip is 10.0.0.42
          
          Example (UsernamePasswordLogin)

            Custom username + password authentication

            Output:
            
            login to VirtualCenter as my-username:my-password
            

            Index

            Examples

            Constants

            This section is empty.

            Variables

            View Source
            var (
            	// Trace when set to true, writes SOAP traffic to stderr
            	Trace = false
            
            	// TraceFile is the output file when Trace = true
            	TraceFile = os.Stderr
            
            	// DefaultLogin for authentication
            	DefaultLogin = url.UserPassword("user", "pass")
            )
            View Source
            var DefaultCustomizationSpec = []types.CustomizationSpecItem{
            	types.CustomizationSpecItem{
            		Info: types.CustomizationSpecInfo{
            			Name:           "vcsim-linux",
            			Description:    "",
            			Type:           "Linux",
            			ChangeVersion:  "1569965707",
            			LastUpdateTime: types.NewTime(time.Now()),
            		},
            		Spec: types.CustomizationSpec{
            			Options: &types.CustomizationLinuxOptions{},
            			Identity: &types.CustomizationLinuxPrep{
            				CustomizationIdentitySettings: types.CustomizationIdentitySettings{},
            				HostName:                      &types.CustomizationVirtualMachineName{},
            				Domain:                        "eng.vmware.com",
            				TimeZone:                      "Pacific/Apia",
            				HwClockUTC:                    types.NewBool(true),
            			},
            			GlobalIPSettings: types.CustomizationGlobalIPSettings{
            				DnsSuffixList: nil,
            				DnsServerList: []string{"127.0.1.1"},
            			},
            			NicSettingMap: []types.CustomizationAdapterMapping{
            				{
            					MacAddress: "",
            					Adapter: types.CustomizationIPSettings{
            						Ip:            &types.CustomizationDhcpIpGenerator{},
            						SubnetMask:    "",
            						Gateway:       nil,
            						IpV6Spec:      (*types.CustomizationIPSettingsIpV6AddressSpec)(nil),
            						DnsServerList: nil,
            						DnsDomain:     "",
            						PrimaryWINS:   "",
            						SecondaryWINS: "",
            						NetBIOS:       "",
            					},
            				},
            			},
            			EncryptionKey: nil,
            		},
            	},
            	types.CustomizationSpecItem{
            		Info: types.CustomizationSpecInfo{
            			Name:           "vcsim-linux-static",
            			Description:    "",
            			Type:           "Linux",
            			ChangeVersion:  "1569969598",
            			LastUpdateTime: types.NewTime(time.Now()),
            		},
            		Spec: types.CustomizationSpec{
            			Options: &types.CustomizationLinuxOptions{},
            			Identity: &types.CustomizationLinuxPrep{
            				CustomizationIdentitySettings: types.CustomizationIdentitySettings{},
            				HostName: &types.CustomizationPrefixName{
            					CustomizationName: types.CustomizationName{},
            					Base:              "vcsim",
            				},
            				Domain:     "eng.vmware.com",
            				TimeZone:   "Africa/Cairo",
            				HwClockUTC: types.NewBool(true),
            			},
            			GlobalIPSettings: types.CustomizationGlobalIPSettings{
            				DnsSuffixList: nil,
            				DnsServerList: []string{"127.0.1.1"},
            			},
            			NicSettingMap: []types.CustomizationAdapterMapping{
            				{
            					MacAddress: "",
            					Adapter: types.CustomizationIPSettings{
            						Ip:            &types.CustomizationUnknownIpGenerator{},
            						SubnetMask:    "255.255.255.0",
            						Gateway:       []string{"10.0.0.1"},
            						IpV6Spec:      (*types.CustomizationIPSettingsIpV6AddressSpec)(nil),
            						DnsServerList: nil,
            						DnsDomain:     "",
            						PrimaryWINS:   "",
            						SecondaryWINS: "",
            						NetBIOS:       "",
            					},
            				},
            			},
            			EncryptionKey: nil,
            		},
            	},
            	types.CustomizationSpecItem{
            		Info: types.CustomizationSpecInfo{
            			Name:           "vcsim-windows-static",
            			Description:    "",
            			Type:           "Windows",
            			ChangeVersion:  "1569978029",
            			LastUpdateTime: types.NewTime(time.Now()),
            		},
            		Spec: types.CustomizationSpec{
            			Options: &types.CustomizationWinOptions{
            				CustomizationOptions: types.CustomizationOptions{},
            				ChangeSID:            true,
            				DeleteAccounts:       false,
            				Reboot:               "",
            			},
            			Identity: &types.CustomizationSysprep{
            				CustomizationIdentitySettings: types.CustomizationIdentitySettings{},
            				GuiUnattended: types.CustomizationGuiUnattended{
            					Password:       (*types.CustomizationPassword)(nil),
            					TimeZone:       2,
            					AutoLogon:      false,
            					AutoLogonCount: 1,
            				},
            				UserData: types.CustomizationUserData{
            					FullName:     "vcsim",
            					OrgName:      "VMware",
            					ComputerName: &types.CustomizationVirtualMachineName{},
            					ProductId:    "",
            				},
            				GuiRunOnce: (*types.CustomizationGuiRunOnce)(nil),
            				Identification: types.CustomizationIdentification{
            					JoinWorkgroup:       "WORKGROUP",
            					JoinDomain:          "",
            					DomainAdmin:         "",
            					DomainAdminPassword: (*types.CustomizationPassword)(nil),
            				},
            				LicenseFilePrintData: &types.CustomizationLicenseFilePrintData{
            					AutoMode:  "perServer",
            					AutoUsers: 5,
            				},
            			},
            			GlobalIPSettings: types.CustomizationGlobalIPSettings{},
            			NicSettingMap: []types.CustomizationAdapterMapping{
            				{
            					MacAddress: "",
            					Adapter: types.CustomizationIPSettings{
            						Ip:            &types.CustomizationUnknownIpGenerator{},
            						SubnetMask:    "255.255.255.0",
            						Gateway:       []string{"10.0.0.1"},
            						IpV6Spec:      (*types.CustomizationIPSettingsIpV6AddressSpec)(nil),
            						DnsServerList: nil,
            						DnsDomain:     "",
            						PrimaryWINS:   "",
            						SecondaryWINS: "",
            						NetBIOS:       "",
            					},
            				},
            			},
            			EncryptionKey: []uint8{0x30},
            		},
            	},
            	types.CustomizationSpecItem{
            		Info: types.CustomizationSpecInfo{
            			Name:           "vcsim-windows-domain",
            			Description:    "",
            			Type:           "Windows",
            			ChangeVersion:  "1569970234",
            			LastUpdateTime: types.NewTime(time.Now()),
            		},
            		Spec: types.CustomizationSpec{
            			Options: &types.CustomizationWinOptions{
            				CustomizationOptions: types.CustomizationOptions{},
            				ChangeSID:            true,
            				DeleteAccounts:       false,
            				Reboot:               "",
            			},
            			Identity: &types.CustomizationSysprep{
            				CustomizationIdentitySettings: types.CustomizationIdentitySettings{},
            				GuiUnattended: types.CustomizationGuiUnattended{
            					Password: &types.CustomizationPassword{
            						Value:     "3Gs...==",
            						PlainText: false,
            					},
            					TimeZone:       15,
            					AutoLogon:      false,
            					AutoLogonCount: 1,
            				},
            				UserData: types.CustomizationUserData{
            					FullName:     "dougm",
            					OrgName:      "VMware",
            					ComputerName: &types.CustomizationVirtualMachineName{},
            					ProductId:    "",
            				},
            				GuiRunOnce: (*types.CustomizationGuiRunOnce)(nil),
            				Identification: types.CustomizationIdentification{
            					JoinWorkgroup: "",
            					JoinDomain:    "DOMAIN",
            					DomainAdmin:   "vcsim",
            					DomainAdminPassword: &types.CustomizationPassword{
            						Value:     "H3g...==",
            						PlainText: false,
            					},
            				},
            				LicenseFilePrintData: &types.CustomizationLicenseFilePrintData{
            					AutoMode:  "perServer",
            					AutoUsers: 5,
            				},
            			},
            			GlobalIPSettings: types.CustomizationGlobalIPSettings{},
            			NicSettingMap: []types.CustomizationAdapterMapping{
            				{
            					MacAddress: "",
            					Adapter: types.CustomizationIPSettings{
            						Ip:            &types.CustomizationUnknownIpGenerator{},
            						SubnetMask:    "255.255.255.0",
            						Gateway:       []string{"10.0.0.1"},
            						IpV6Spec:      (*types.CustomizationIPSettingsIpV6AddressSpec)(nil),
            						DnsServerList: nil,
            						DnsDomain:     "",
            						PrimaryWINS:   "",
            						SecondaryWINS: "",
            						NetBIOS:       "",
            					},
            				},
            			},
            			EncryptionKey: []uint8{0x30},
            		},
            	},
            }
            View Source
            var DefaultUserGroup = []*types.UserSearchResult{
            	{FullName: "root", Group: true, Principal: "root"},
            	{FullName: "root", Group: false, Principal: "root"},
            	{FullName: "administrator", Group: false, Principal: "admin"},
            }
            View Source
            var EvalLicense = types.LicenseManagerLicenseInfo{
            	LicenseKey: "00000-00000-00000-00000-00000",
            	EditionKey: "eval",
            	Name:       "Evaluation Mode",
            	Properties: []types.KeyAnyValue{
            		{
            			Key: "feature",
            			Value: types.KeyValue{
            				Key:   "serialuri:2",
            				Value: "Remote virtual Serial Port Concentrator",
            			},
            		},
            		{
            			Key: "feature",
            			Value: types.KeyValue{
            				Key:   "dvs",
            				Value: "vSphere Distributed Switch",
            			},
            		},
            	},
            }

              EvalLicense is the default license

              View Source
              var GuestID = []types.VirtualMachineGuestOsIdentifier{}/* 148 elements not displayed */
              

                GuestID is the list of valid types.VirtualMachineGuestOsIdentifier

                View Source
                var Map = NewRegistry()

                  Map is the default Registry instance.

                  View Source
                  var (
                  	// SessionIdleTimeout duration used to expire idle sessions
                  	SessionIdleTimeout time.Duration
                  )
                  View Source
                  var StatusSDK = http.StatusOK

                    StatusSDK can be used to simulate an /sdk HTTP response code other than 200. The value of StatusSDK is restored to http.StatusOK after 1 response. This can be useful to test vim25.Retry() for example.

                    View Source
                    var TaskDelay = DelayConfig{}

                      TaskDelay applies to all tasks. Names for DelayConfig.MethodDelay will differ for task and api delays. API level names often look like PowerOff_Task, whereas the task name is simply PowerOff.

                      Functions

                      func CreateDefaultESX

                      func CreateDefaultESX(ctx *Context, f *Folder)

                        CreateDefaultESX creates a standalone ESX Adds objects of type: Datacenter, Network, ComputeResource, ResourcePool and HostSystem

                        func DisableRuleset

                        func DisableRuleset(info *types.HostFirewallInfo, id string) bool

                        func EnableRuleset

                        func EnableRuleset(info *types.HostFirewallInfo, id string) bool

                        func Fault

                        func Fault(msg string, fault types.BaseMethodFault) *soap.Fault

                          Fault wraps the given message and fault in a soap.Fault

                          func FindReference

                            FindReference returns the 1st match found in refs, or nil if not found.

                            func NewPropertyCollector

                            func NewPropertyCollector(ref types.ManagedObjectReference) object.Reference

                            func NewVAppConfigSpec

                            func NewVAppConfigSpec() types.VAppConfigSpec

                            func RegisterEndpoint

                            func RegisterEndpoint(endpoint func(*Service, *Registry))

                              RegisterEndpoint funcs are called after the Server is initialized if Service.RegisterEndpoints=true. Such a func would typically register a SOAP endpoint via Service.RegisterSDK or REST endpoint via Service.Handle

                              func RemoveReference

                              func RemoveReference(field *[]types.ManagedObjectReference, ref types.ManagedObjectReference)

                                RemoveReference removes ref from the given field.

                                func RenameTask

                                func RenameTask(ctx *Context, e mo.Entity, r *types.Rename_Task) soap.HasFault

                                func Run

                                func Run(f func(context.Context, *vim25.Client) error, model ...*Model)

                                  Run calls Model.Run for each model and will panic if f returns an error. If no model is specified, the VPX Model is used by default.

                                  func ServeGuest

                                  func ServeGuest(w http.ResponseWriter, r *http.Request)

                                    ServeGuest handles container guest file upload/download

                                    func ServeNFC

                                    func ServeNFC(w http.ResponseWriter, r *http.Request)

                                      ServeNFC handles NFC file upload/download

                                      func SessionIdleWatch

                                      func SessionIdleWatch(ctx context.Context, id string, expired func(string, time.Time) bool)

                                        SessionIdleWatch starts a goroutine that calls func expired() at SessionIdleTimeout intervals. The goroutine exits if the func returns true.

                                        func SetCustomValue

                                        func SetCustomValue(ctx *Context, req *types.SetCustomValue) soap.HasFault

                                        func Test

                                        func Test(f func(context.Context, *vim25.Client), model ...*Model)

                                          Test calls Run and expects the caller propagate any errors, via testing.T for example.

                                          Example

                                            Test simplifies startup/cleanup of a simulator instance for testing purposes.

                                            Output:
                                            
                                            user
                                            

                                            Types

                                            type AuthorizationManager

                                            type AuthorizationManager struct {
                                            	mo.AuthorizationManager
                                            	// contains filtered or unexported fields
                                            }

                                            func (*AuthorizationManager) AddAuthorizationRole

                                            func (m *AuthorizationManager) AddAuthorizationRole(req *types.AddAuthorizationRole) soap.HasFault

                                            func (*AuthorizationManager) FetchUserPrivilegeOnEntities

                                            func (m *AuthorizationManager) FetchUserPrivilegeOnEntities(req *types.FetchUserPrivilegeOnEntities) soap.HasFault

                                            func (*AuthorizationManager) HasPrivilegeOnEntities

                                            func (m *AuthorizationManager) HasPrivilegeOnEntities(req *types.HasPrivilegeOnEntities) soap.HasFault

                                            func (*AuthorizationManager) HasPrivilegeOnEntity

                                            func (m *AuthorizationManager) HasPrivilegeOnEntity(req *types.HasPrivilegeOnEntity) soap.HasFault

                                            func (*AuthorizationManager) HasUserPrivilegeOnEntities

                                            func (m *AuthorizationManager) HasUserPrivilegeOnEntities(req *types.HasUserPrivilegeOnEntities) soap.HasFault

                                            func (*AuthorizationManager) RemoveAuthorizationRole

                                            func (m *AuthorizationManager) RemoveAuthorizationRole(req *types.RemoveAuthorizationRole) soap.HasFault

                                            func (*AuthorizationManager) RemoveEntityPermission

                                            func (m *AuthorizationManager) RemoveEntityPermission(req *types.RemoveEntityPermission) soap.HasFault

                                            func (*AuthorizationManager) RetrieveAllPermissions

                                            func (m *AuthorizationManager) RetrieveAllPermissions(req *types.RetrieveAllPermissions) soap.HasFault

                                            func (*AuthorizationManager) RetrieveEntityPermissions

                                            func (m *AuthorizationManager) RetrieveEntityPermissions(req *types.RetrieveEntityPermissions) soap.HasFault

                                            func (*AuthorizationManager) RetrieveRolePermissions

                                            func (m *AuthorizationManager) RetrieveRolePermissions(req *types.RetrieveRolePermissions) soap.HasFault

                                            func (*AuthorizationManager) SetEntityPermissions

                                            func (m *AuthorizationManager) SetEntityPermissions(req *types.SetEntityPermissions) soap.HasFault

                                            func (*AuthorizationManager) UpdateAuthorizationRole

                                            func (m *AuthorizationManager) UpdateAuthorizationRole(req *types.UpdateAuthorizationRole) soap.HasFault

                                            type ClusterComputeResource

                                            type ClusterComputeResource struct {
                                            	mo.ClusterComputeResource
                                            	// contains filtered or unexported fields
                                            }

                                            func (*ClusterComputeResource) AddHostTask

                                            func (c *ClusterComputeResource) AddHostTask(ctx *Context, add *types.AddHost_Task) soap.HasFault

                                            func (*ClusterComputeResource) PlaceVm

                                            func (c *ClusterComputeResource) PlaceVm(ctx *Context, req *types.PlaceVm) soap.HasFault

                                            func (*ClusterComputeResource) ReconfigureComputeResourceTask

                                            func (c *ClusterComputeResource) ReconfigureComputeResourceTask(ctx *Context, req *types.ReconfigureComputeResource_Task) soap.HasFault

                                            func (*ClusterComputeResource) RenameTask

                                            func (c *ClusterComputeResource) RenameTask(ctx *Context, req *types.Rename_Task) soap.HasFault

                                            type ContainerView

                                            type ContainerView struct {
                                            	mo.ContainerView
                                            	// contains filtered or unexported fields
                                            }

                                            func (*ContainerView) DestroyView

                                            func (v *ContainerView) DestroyView(ctx *Context, c *types.DestroyView) soap.HasFault

                                            func (*ContainerView) PutObject

                                            func (v *ContainerView) PutObject(obj mo.Reference)

                                            func (*ContainerView) RemoveObject

                                            func (v *ContainerView) RemoveObject(ctx *Context, obj types.ManagedObjectReference)

                                            func (*ContainerView) UpdateObject

                                            func (*ContainerView) UpdateObject(mo.Reference, []types.PropertyChange)

                                            type Context

                                            type Context struct {
                                            	context.Context
                                            	Session *Session
                                            	Header  soap.Header
                                            	Caller  *types.ManagedObjectReference
                                            	Map     *Registry
                                            	// contains filtered or unexported fields
                                            }

                                              Context provides per-request Session management.

                                              func SpoofContext

                                              func SpoofContext() *Context

                                                When simulator code needs to call other simulator code, it typically passes whatever context is associated with the request it's servicing. Model code isn't servicing a request, but still needs a context, so we spoof one for the purposes of calling simulator code. Test code also tends to do this.

                                                func (*Context) SetSession

                                                func (c *Context) SetSession(session Session, login bool)

                                                  SetSession should be called after successful authentication.

                                                  func (*Context) WithLock

                                                  func (c *Context) WithLock(obj mo.Reference, f func())

                                                    WithLock holds a lock for the given object while then given function is run. It will skip locking if this context already holds the given object's lock.

                                                    type CustomFieldsManager

                                                    type CustomFieldsManager struct {
                                                    	mo.CustomFieldsManager
                                                    	// contains filtered or unexported fields
                                                    }

                                                    func (*CustomFieldsManager) AddCustomFieldDef

                                                    func (c *CustomFieldsManager) AddCustomFieldDef(ctx *Context, req *types.AddCustomFieldDef) soap.HasFault

                                                    func (*CustomFieldsManager) RemoveCustomFieldDef

                                                    func (c *CustomFieldsManager) RemoveCustomFieldDef(ctx *Context, req *types.RemoveCustomFieldDef) soap.HasFault

                                                    func (*CustomFieldsManager) RenameCustomFieldDef

                                                    func (c *CustomFieldsManager) RenameCustomFieldDef(ctx *Context, req *types.RenameCustomFieldDef) soap.HasFault

                                                    func (*CustomFieldsManager) SetField

                                                    func (c *CustomFieldsManager) SetField(ctx *Context, req *types.SetField) soap.HasFault

                                                    type CustomizationSpecManager

                                                    type CustomizationSpecManager struct {
                                                    	mo.CustomizationSpecManager
                                                    	// contains filtered or unexported fields
                                                    }

                                                    func (*CustomizationSpecManager) CreateCustomizationSpec

                                                    func (m *CustomizationSpecManager) CreateCustomizationSpec(ctx *Context, req *types.CreateCustomizationSpec) soap.HasFault

                                                    func (*CustomizationSpecManager) DoesCustomizationSpecExist

                                                    func (m *CustomizationSpecManager) DoesCustomizationSpecExist(ctx *Context, req *types.DoesCustomizationSpecExist) soap.HasFault

                                                    func (*CustomizationSpecManager) Get

                                                    func (*CustomizationSpecManager) GetCustomizationSpec

                                                    func (m *CustomizationSpecManager) GetCustomizationSpec(ctx *Context, req *types.GetCustomizationSpec) soap.HasFault

                                                    func (*CustomizationSpecManager) OverwriteCustomizationSpec

                                                    func (m *CustomizationSpecManager) OverwriteCustomizationSpec(ctx *Context, req *types.OverwriteCustomizationSpec) soap.HasFault

                                                    type Datacenter

                                                    type Datacenter struct {
                                                    	mo.Datacenter
                                                    	// contains filtered or unexported fields
                                                    }

                                                    func NewDatacenter

                                                    func NewDatacenter(ctx *Context, f *mo.Folder) *Datacenter

                                                      NewDatacenter creates a Datacenter and its child folders.

                                                      func (*Datacenter) DestroyTask

                                                      func (d *Datacenter) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault

                                                      func (*Datacenter) PowerOnMultiVMTask

                                                      func (dc *Datacenter) PowerOnMultiVMTask(ctx *Context, req *types.PowerOnMultiVM_Task) soap.HasFault

                                                      func (*Datacenter) RenameTask

                                                      func (dc *Datacenter) RenameTask(ctx *Context, r *types.Rename_Task) soap.HasFault

                                                      type Datastore

                                                      type Datastore struct {
                                                      	mo.Datastore
                                                      }

                                                      func (*Datastore) DestroyTask

                                                      func (ds *Datastore) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault

                                                      func (*Datastore) RefreshDatastore

                                                      func (ds *Datastore) RefreshDatastore(*types.RefreshDatastore) soap.HasFault

                                                      type DelayConfig

                                                      type DelayConfig struct {
                                                      	// Delay specifies the number of milliseconds to delay serving a SOAP call. 0 means no delay.
                                                      	// This can be used to simulate a poorly performing vCenter or network lag.
                                                      	Delay int
                                                      
                                                      	// Delay specifies the number of milliseconds to delay serving a specific method.
                                                      	// Each entry in the map represents the name of a method and its associated delay in milliseconds,
                                                      	// This can be used to simulate a poorly performing vCenter or network lag.
                                                      	MethodDelay map[string]int
                                                      
                                                      	// DelayJitter defines the delay jitter as a coefficient of variation (stddev/mean).
                                                      	// This can be used to simulate unpredictable delay. 0 means no jitter, i.e. all invocations get the same delay.
                                                      	DelayJitter float64
                                                      }

                                                      type DistributedVirtualPortgroup

                                                      type DistributedVirtualPortgroup struct {
                                                      	mo.DistributedVirtualPortgroup
                                                      }

                                                      func (*DistributedVirtualPortgroup) DestroyTask

                                                      func (*DistributedVirtualPortgroup) ReconfigureDVPortgroupTask

                                                      func (s *DistributedVirtualPortgroup) ReconfigureDVPortgroupTask(ctx *Context, req *types.ReconfigureDVPortgroup_Task) soap.HasFault

                                                      type DistributedVirtualSwitch

                                                      type DistributedVirtualSwitch struct {
                                                      	mo.DistributedVirtualSwitch
                                                      
                                                      	types.FetchDVPortsResponse
                                                      }

                                                      func (*DistributedVirtualSwitch) AddDVPortgroupTask

                                                      func (s *DistributedVirtualSwitch) AddDVPortgroupTask(ctx *Context, c *types.AddDVPortgroup_Task) soap.HasFault
                                                      Example

                                                        AddDVPortgroup against vcsim can create both standard and nsx backed DistributedVirtualPortgroup networks

                                                        Output:
                                                        
                                                        my-nsx-dvpg: nsx my-nsx-id
                                                        

                                                        func (*DistributedVirtualSwitch) DestroyTask

                                                        func (s *DistributedVirtualSwitch) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault

                                                        func (*DistributedVirtualSwitch) FetchDVPorts

                                                        func (*DistributedVirtualSwitch) ReconfigureDvsTask

                                                        func (s *DistributedVirtualSwitch) ReconfigureDvsTask(ctx *Context, req *types.ReconfigureDvs_Task) soap.HasFault

                                                        type DistributedVirtualSwitchManager

                                                        type DistributedVirtualSwitchManager struct {
                                                        	mo.DistributedVirtualSwitchManager
                                                        }

                                                        func (*DistributedVirtualSwitchManager) DVSManagerLookupDvPortGroup

                                                        func (m *DistributedVirtualSwitchManager) DVSManagerLookupDvPortGroup(ctx *Context, req *types.DVSManagerLookupDvPortGroup) soap.HasFault

                                                        type Element

                                                        type Element struct {
                                                        	// contains filtered or unexported fields
                                                        }

                                                          Element can be used to defer decoding of an XML node.

                                                          func (*Element) Decode

                                                          func (e *Element) Decode(val interface{}) error

                                                          func (*Element) UnmarshalXML

                                                          func (e *Element) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

                                                          type EnvironmentBrowser

                                                          type EnvironmentBrowser struct {
                                                          	mo.EnvironmentBrowser
                                                          
                                                          	types.QueryConfigOptionResponse
                                                          }

                                                          func (*EnvironmentBrowser) QueryConfigOption

                                                          func (b *EnvironmentBrowser) QueryConfigOption(req *types.QueryConfigOption) soap.HasFault

                                                          func (*EnvironmentBrowser) QueryConfigOptionDescriptor

                                                          func (b *EnvironmentBrowser) QueryConfigOptionDescriptor(ctx *Context, req *types.QueryConfigOptionDescriptor) soap.HasFault

                                                          func (*EnvironmentBrowser) QueryConfigOptionEx

                                                          func (b *EnvironmentBrowser) QueryConfigOptionEx(req *types.QueryConfigOptionEx) soap.HasFault

                                                          func (*EnvironmentBrowser) QueryConfigTarget

                                                          func (b *EnvironmentBrowser) QueryConfigTarget(ctx *Context, req *types.QueryConfigTarget) soap.HasFault

                                                          type EventHistoryCollector

                                                          type EventHistoryCollector struct {
                                                          	mo.EventHistoryCollector
                                                          	// contains filtered or unexported fields
                                                          }

                                                          func (*EventHistoryCollector) DestroyCollector

                                                          func (c *EventHistoryCollector) DestroyCollector(ctx *Context, req *types.DestroyCollector) soap.HasFault

                                                          func (*EventHistoryCollector) Get

                                                          func (*EventHistoryCollector) GetLatestPage

                                                          func (c *EventHistoryCollector) GetLatestPage() []types.BaseEvent

                                                          func (*EventHistoryCollector) ReadNextEvents

                                                          func (c *EventHistoryCollector) ReadNextEvents(ctx *Context, req *types.ReadNextEvents) soap.HasFault

                                                          func (*EventHistoryCollector) ReadPreviousEvents

                                                          func (c *EventHistoryCollector) ReadPreviousEvents(ctx *Context, req *types.ReadPreviousEvents) soap.HasFault

                                                          func (*EventHistoryCollector) ResetCollector

                                                          func (c *EventHistoryCollector) ResetCollector(ctx *Context, req *types.ResetCollector) soap.HasFault

                                                          func (*EventHistoryCollector) RewindCollector

                                                          func (c *EventHistoryCollector) RewindCollector(ctx *Context, req *types.RewindCollector) soap.HasFault

                                                          func (*EventHistoryCollector) SetCollectorPageSize

                                                          func (c *EventHistoryCollector) SetCollectorPageSize(ctx *Context, req *types.SetCollectorPageSize) soap.HasFault

                                                          type EventManager

                                                          type EventManager struct {
                                                          	mo.EventManager
                                                          	// contains filtered or unexported fields
                                                          }

                                                          func (*EventManager) CreateCollectorForEvents

                                                          func (m *EventManager) CreateCollectorForEvents(ctx *Context, req *types.CreateCollectorForEvents) soap.HasFault

                                                          func (*EventManager) PostEvent

                                                          func (m *EventManager) PostEvent(ctx *Context, req *types.PostEvent) soap.HasFault

                                                          func (*EventManager) QueryEvents

                                                          func (m *EventManager) QueryEvents(ctx *Context, req *types.QueryEvents) soap.HasFault

                                                          type FileManager

                                                          type FileManager struct {
                                                          	mo.FileManager
                                                          }

                                                          func (*FileManager) CopyDatastoreFileTask

                                                          func (f *FileManager) CopyDatastoreFileTask(ctx *Context, req *types.CopyDatastoreFile_Task) soap.HasFault

                                                          func (*FileManager) DeleteDatastoreFileTask

                                                          func (f *FileManager) DeleteDatastoreFileTask(ctx *Context, req *types.DeleteDatastoreFile_Task) soap.HasFault

                                                          func (*FileManager) MakeDirectory

                                                          func (f *FileManager) MakeDirectory(req *types.MakeDirectory) soap.HasFault

                                                          func (*FileManager) MoveDatastoreFileTask

                                                          func (f *FileManager) MoveDatastoreFileTask(ctx *Context, req *types.MoveDatastoreFile_Task) soap.HasFault

                                                          type Folder

                                                          type Folder struct {
                                                          	mo.Folder
                                                          }

                                                          func (*Folder) AddOpaqueNetwork

                                                          func (f *Folder) AddOpaqueNetwork(ctx *Context, summary types.OpaqueNetworkSummary) error

                                                            AddOpaqueNetwork adds an OpaqueNetwork type to the inventory, with default backing to that of an nsx.LogicalSwitch. The vSphere API does not have a method to add this directly, so it must either be called directly or via Model.OpaqueNetwork setting.

                                                            Example

                                                              Folder.AddOpaqueNetwork can be used to create an NSX backed OpaqueNetwork.

                                                              Output:
                                                              
                                                              my-nsx-network: my-nsx-id
                                                              

                                                              func (*Folder) AddStandaloneHostTask

                                                              func (f *Folder) AddStandaloneHostTask(ctx *Context, a *types.AddStandaloneHost_Task) soap.HasFault

                                                              func (*Folder) CreateClusterEx

                                                              func (f *Folder) CreateClusterEx(ctx *Context, c *types.CreateClusterEx) soap.HasFault

                                                              func (*Folder) CreateDVSTask

                                                              func (f *Folder) CreateDVSTask(ctx *Context, req *types.CreateDVS_Task) soap.HasFault

                                                              func (*Folder) CreateDatacenter

                                                              func (f *Folder) CreateDatacenter(ctx *Context, c *types.CreateDatacenter) soap.HasFault

                                                              func (*Folder) CreateFolder

                                                              func (f *Folder) CreateFolder(ctx *Context, c *types.CreateFolder) soap.HasFault

                                                              func (*Folder) CreateStoragePod

                                                              func (f *Folder) CreateStoragePod(ctx *Context, c *types.CreateStoragePod) soap.HasFault

                                                              func (*Folder) CreateVMTask

                                                              func (f *Folder) CreateVMTask(ctx *Context, c *types.CreateVM_Task) soap.HasFault

                                                              func (*Folder) DestroyTask

                                                              func (f *Folder) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault

                                                              func (*Folder) MoveIntoFolderTask

                                                              func (f *Folder) MoveIntoFolderTask(ctx *Context, c *types.MoveIntoFolder_Task) soap.HasFault

                                                              func (*Folder) RegisterVMTask

                                                              func (f *Folder) RegisterVMTask(ctx *Context, c *types.RegisterVM_Task) soap.HasFault

                                                              func (*Folder) RenameTask

                                                              func (f *Folder) RenameTask(ctx *Context, r *types.Rename_Task) soap.HasFault

                                                              type GuestFileManager

                                                              type GuestFileManager struct {
                                                              	mo.GuestFileManager
                                                              }

                                                              func (*GuestFileManager) InitiateFileTransferFromGuest

                                                              func (m *GuestFileManager) InitiateFileTransferFromGuest(ctx *Context, req *types.InitiateFileTransferFromGuest) soap.HasFault

                                                              func (*GuestFileManager) InitiateFileTransferToGuest

                                                              func (m *GuestFileManager) InitiateFileTransferToGuest(ctx *Context, req *types.InitiateFileTransferToGuest) soap.HasFault

                                                              type GuestOperationsManager

                                                              type GuestOperationsManager struct {
                                                              	mo.GuestOperationsManager
                                                              }

                                                              type GuestProcessManager

                                                              type GuestProcessManager struct {
                                                              	mo.GuestProcessManager
                                                              }

                                                              type HostDatastoreBrowser

                                                              type HostDatastoreBrowser struct {
                                                              	mo.HostDatastoreBrowser
                                                              }

                                                              func (*HostDatastoreBrowser) SearchDatastoreSubFoldersTask

                                                              func (b *HostDatastoreBrowser) SearchDatastoreSubFoldersTask(ctx *Context, s *types.SearchDatastoreSubFolders_Task) soap.HasFault

                                                              func (*HostDatastoreBrowser) SearchDatastoreTask

                                                              func (b *HostDatastoreBrowser) SearchDatastoreTask(ctx *Context, s *types.SearchDatastore_Task) soap.HasFault

                                                              type HostDatastoreSystem

                                                              type HostDatastoreSystem struct {
                                                              	mo.HostDatastoreSystem
                                                              
                                                              	Host *mo.HostSystem
                                                              }

                                                              func (*HostDatastoreSystem) CreateLocalDatastore

                                                              func (dss *HostDatastoreSystem) CreateLocalDatastore(ctx *Context, c *types.CreateLocalDatastore) soap.HasFault

                                                              func (*HostDatastoreSystem) CreateNasDatastore

                                                              func (dss *HostDatastoreSystem) CreateNasDatastore(ctx *Context, c *types.CreateNasDatastore) soap.HasFault

                                                              type HostFirewallSystem

                                                              type HostFirewallSystem struct {
                                                              	mo.HostFirewallSystem
                                                              }

                                                              func NewHostFirewallSystem

                                                              func NewHostFirewallSystem(_ *mo.HostSystem) *HostFirewallSystem

                                                              func (*HostFirewallSystem) DisableRuleset

                                                              func (s *HostFirewallSystem) DisableRuleset(req *types.DisableRuleset) soap.HasFault

                                                              func (*HostFirewallSystem) EnableRuleset

                                                              func (s *HostFirewallSystem) EnableRuleset(req *types.EnableRuleset) soap.HasFault

                                                              type HostLocalAccountManager

                                                              type HostLocalAccountManager struct {
                                                              	mo.HostLocalAccountManager
                                                              }

                                                              func (*HostLocalAccountManager) CreateUser

                                                              func (*HostLocalAccountManager) RemoveUser

                                                              func (*HostLocalAccountManager) UpdateUser

                                                              type HostNetworkSystem

                                                              type HostNetworkSystem struct {
                                                              	mo.HostNetworkSystem
                                                              
                                                              	Host *mo.HostSystem
                                                              }

                                                              func NewHostNetworkSystem

                                                              func NewHostNetworkSystem(host *mo.HostSystem) *HostNetworkSystem

                                                              func (*HostNetworkSystem) AddPortGroup

                                                              func (s *HostNetworkSystem) AddPortGroup(ctx *Context, c *types.AddPortGroup) soap.HasFault

                                                              func (*HostNetworkSystem) AddVirtualSwitch

                                                              func (s *HostNetworkSystem) AddVirtualSwitch(c *types.AddVirtualSwitch) soap.HasFault

                                                              func (*HostNetworkSystem) QueryNetworkHint

                                                              func (s *HostNetworkSystem) QueryNetworkHint(req *types.QueryNetworkHint) soap.HasFault

                                                              func (*HostNetworkSystem) RemovePortGroup

                                                              func (s *HostNetworkSystem) RemovePortGroup(ctx *Context, c *types.RemovePortGroup) soap.HasFault

                                                              func (*HostNetworkSystem) RemoveVirtualSwitch

                                                              func (s *HostNetworkSystem) RemoveVirtualSwitch(c *types.RemoveVirtualSwitch) soap.HasFault

                                                              func (*HostNetworkSystem) UpdateNetworkConfig

                                                              func (s *HostNetworkSystem) UpdateNetworkConfig(req *types.UpdateNetworkConfig) soap.HasFault

                                                              type HostStorageSystem

                                                              type HostStorageSystem struct {
                                                              	mo.HostStorageSystem
                                                              
                                                              	Host *mo.HostSystem
                                                              	HBA  []types.BaseHostHostBusAdapter
                                                              }

                                                              func NewHostStorageSystem

                                                              func NewHostStorageSystem(h *mo.HostSystem) *HostStorageSystem

                                                              func (*HostStorageSystem) RefreshStorageSystem

                                                              func (s *HostStorageSystem) RefreshStorageSystem(*Context, *types.RefreshStorageSystem) soap.HasFault

                                                              func (*HostStorageSystem) RescanAllHba

                                                              func (s *HostStorageSystem) RescanAllHba(ctx *Context, _ *types.RescanAllHba) soap.HasFault

                                                                RescanAllHba swaps HostStorageSystem.HBA and StorageDeviceInfo.HostBusAdapter. This allows testing HBA with and without Fibre Channel data.

                                                                func (*HostStorageSystem) RescanVmfs

                                                                type HostSystem

                                                                type HostSystem struct {
                                                                	mo.HostSystem
                                                                }

                                                                func CreateStandaloneHost

                                                                func CreateStandaloneHost(ctx *Context, f *Folder, spec types.HostConnectSpec) (*HostSystem, types.BaseMethodFault)

                                                                  CreateStandaloneHost uses esx.HostSystem as a template, applying the given spec and creating the ComputeResource parent and ResourcePool sibling.

                                                                  func NewHostSystem

                                                                  func NewHostSystem(host mo.HostSystem) *HostSystem

                                                                  func (*HostSystem) DestroyTask

                                                                  func (h *HostSystem) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault

                                                                  func (*HostSystem) EnterMaintenanceModeTask

                                                                  func (h *HostSystem) EnterMaintenanceModeTask(ctx *Context, spec *types.EnterMaintenanceMode_Task) soap.HasFault

                                                                  func (*HostSystem) ExitMaintenanceModeTask

                                                                  func (h *HostSystem) ExitMaintenanceModeTask(ctx *Context, spec *types.ExitMaintenanceMode_Task) soap.HasFault

                                                                  type HttpNfcLease

                                                                  type HttpNfcLease struct {
                                                                  	mo.HttpNfcLease
                                                                  	// contains filtered or unexported fields
                                                                  }

                                                                  func NewHttpNfcLease

                                                                  func NewHttpNfcLease(ctx *Context, entity types.ManagedObjectReference) *HttpNfcLease

                                                                  func (*HttpNfcLease) HttpNfcLeaseAbort

                                                                  func (l *HttpNfcLease) HttpNfcLeaseAbort(ctx *Context, req *types.HttpNfcLeaseAbort) soap.HasFault

                                                                  func (*HttpNfcLease) HttpNfcLeaseComplete

                                                                  func (l *HttpNfcLease) HttpNfcLeaseComplete(ctx *Context, req *types.HttpNfcLeaseComplete) soap.HasFault

                                                                  func (*HttpNfcLease) HttpNfcLeaseProgress

                                                                  func (l *HttpNfcLease) HttpNfcLeaseProgress(ctx *Context, req *types.HttpNfcLeaseProgress) soap.HasFault

                                                                  type IpPool

                                                                  type IpPool struct {
                                                                  	// contains filtered or unexported fields
                                                                  }

                                                                  func MustNewIpPool

                                                                  func MustNewIpPool(config *types.IpPool) *IpPool

                                                                  func NewIpPool

                                                                  func NewIpPool(config *types.IpPool) (*IpPool, error)

                                                                  func (*IpPool) AllocateIPv4

                                                                  func (p *IpPool) AllocateIPv4(allocation string) (string, error)

                                                                  func (*IpPool) AllocateIpv6

                                                                  func (p *IpPool) AllocateIpv6(allocation string) (string, error)

                                                                  func (*IpPool) ReleaseIpv4

                                                                  func (p *IpPool) ReleaseIpv4(allocation string) error

                                                                  func (*IpPool) ReleaseIpv6

                                                                  func (p *IpPool) ReleaseIpv6(allocation string) error

                                                                  type IpPoolManager

                                                                  type IpPoolManager struct {
                                                                  	mo.IpPoolManager
                                                                  	// contains filtered or unexported fields
                                                                  }

                                                                    IpPoolManager implements a simple IP Pool manager in which all pools are shared across different datacenters.

                                                                    func (*IpPoolManager) AllocateIpv4Address

                                                                    func (m *IpPoolManager) AllocateIpv4Address(req *types.AllocateIpv4Address) soap.HasFault

                                                                    func (*IpPoolManager) AllocateIpv6Address

                                                                    func (m *IpPoolManager) AllocateIpv6Address(req *types.AllocateIpv6Address) soap.HasFault

                                                                    func (*IpPoolManager) CreateIpPool

                                                                    func (m *IpPoolManager) CreateIpPool(req *types.CreateIpPool) soap.HasFault

                                                                    func (*IpPoolManager) DestroyIpPool

                                                                    func (m *IpPoolManager) DestroyIpPool(req *types.DestroyIpPool) soap.HasFault

                                                                    func (*IpPoolManager) QueryIPAllocations

                                                                    func (m *IpPoolManager) QueryIPAllocations(req *types.QueryIPAllocations) soap.HasFault

                                                                    func (*IpPoolManager) QueryIpPools

                                                                    func (m *IpPoolManager) QueryIpPools(req *types.QueryIpPools) soap.HasFault

                                                                    func (*IpPoolManager) ReleaseIpAllocation

                                                                    func (m *IpPoolManager) ReleaseIpAllocation(req *types.ReleaseIpAllocation) soap.HasFault

                                                                    func (*IpPoolManager) UpdateIpPool

                                                                    func (m *IpPoolManager) UpdateIpPool(req *types.UpdateIpPool) soap.HasFault

                                                                    type LicenseAssignmentManager

                                                                    type LicenseAssignmentManager struct {
                                                                    	mo.LicenseAssignmentManager
                                                                    }

                                                                    func (*LicenseAssignmentManager) QueryAssignedLicenses

                                                                    func (m *LicenseAssignmentManager) QueryAssignedLicenses(req *types.QueryAssignedLicenses) soap.HasFault

                                                                    type LicenseManager

                                                                    type LicenseManager struct {
                                                                    	mo.LicenseManager
                                                                    }

                                                                    func (*LicenseManager) AddLicense

                                                                    func (m *LicenseManager) AddLicense(req *types.AddLicense) soap.HasFault

                                                                    func (*LicenseManager) RemoveLicense

                                                                    func (m *LicenseManager) RemoveLicense(req *types.RemoveLicense) soap.HasFault

                                                                    func (*LicenseManager) UpdateLicenseLabel

                                                                    func (m *LicenseManager) UpdateLicenseLabel(req *types.UpdateLicenseLabel) soap.HasFault

                                                                    type ListView

                                                                    type ListView struct {
                                                                    	mo.ListView
                                                                    }

                                                                    func (*ListView) DestroyView

                                                                    func (v *ListView) DestroyView(ctx *Context, c *types.DestroyView) soap.HasFault

                                                                    func (*ListView) ModifyListView

                                                                    func (v *ListView) ModifyListView(req *types.ModifyListView) soap.HasFault

                                                                    func (*ListView) ResetListView

                                                                    func (v *ListView) ResetListView(req *types.ResetListView) soap.HasFault

                                                                    type Method

                                                                    type Method struct {
                                                                    	Name   string
                                                                    	This   types.ManagedObjectReference
                                                                    	Header soap.Header
                                                                    	Body   types.AnyType
                                                                    }

                                                                      Method encapsulates a decoded SOAP client request

                                                                      func UnmarshalBody

                                                                      func UnmarshalBody(typeFunc func(string) (reflect.Type, bool), data []byte) (*Method, error)

                                                                        UnmarshalBody extracts the Body from a soap.Envelope and unmarshals to the corresponding govmomi type

                                                                        type Model

                                                                        type Model struct {
                                                                        	Service *Service `json:"-"`
                                                                        
                                                                        	ServiceContent types.ServiceContent `json:"-"`
                                                                        	RootFolder     mo.Folder            `json:"-"`
                                                                        
                                                                        	// Autostart will power on Model created VMs when true
                                                                        	Autostart bool `json:"-"`
                                                                        
                                                                        	// Datacenter specifies the number of Datacenter entities to create
                                                                        	// Name prefix: DC, vcsim flag: -dc
                                                                        	Datacenter int
                                                                        
                                                                        	// Portgroup specifies the number of DistributedVirtualPortgroup entities to create per Datacenter
                                                                        	// Name prefix: DVPG, vcsim flag: -pg
                                                                        	Portgroup int
                                                                        
                                                                        	// PortgroupNSX specifies the number NSX backed DistributedVirtualPortgroup entities to create per Datacenter
                                                                        	// Name prefix: NSXPG, vcsim flag: -nsx-pg
                                                                        	PortgroupNSX int
                                                                        
                                                                        	// OpaqueNetwork specifies the number of OpaqueNetwork entities to create per Datacenter,
                                                                        	// with Summary.OpaqueNetworkType set to nsx.LogicalSwitch and Summary.OpaqueNetworkId to a random uuid.
                                                                        	// Name prefix: NSX, vcsim flag: -nsx
                                                                        	OpaqueNetwork int
                                                                        
                                                                        	// Host specifies the number of standalone HostSystems entities to create per Datacenter
                                                                        	// Name prefix: H, vcsim flag: -standalone-host
                                                                        	Host int `json:",omitempty"`
                                                                        
                                                                        	// Cluster specifies the number of ClusterComputeResource entities to create per Datacenter
                                                                        	// Name prefix: C, vcsim flag: -cluster
                                                                        	Cluster int
                                                                        
                                                                        	// ClusterHost specifies the number of HostSystems entities to create within a Cluster
                                                                        	// Name prefix: H, vcsim flag: -host
                                                                        	ClusterHost int `json:",omitempty"`
                                                                        
                                                                        	// Pool specifies the number of ResourcePool entities to create per Cluster
                                                                        	// Note that every cluster has a root ResourcePool named "Resources", as real vCenter does.
                                                                        	// For example: /DC0/host/DC0_C0/Resources
                                                                        	// The root ResourcePool is named "RP0" within other object names.
                                                                        	// When Model.Pool is set to 1 or higher, this creates child ResourcePools under the root pool.
                                                                        	// For example: /DC0/host/DC0_C0/Resources/DC0_C0_RP1
                                                                        	// Name prefix: RP, vcsim flag: -pool
                                                                        	Pool int
                                                                        
                                                                        	// Datastore specifies the number of Datastore entities to create
                                                                        	// Each Datastore will have temporary local file storage and will be mounted
                                                                        	// on every HostSystem created by the ModelConfig
                                                                        	// Name prefix: LocalDS, vcsim flag: -ds
                                                                        	Datastore int
                                                                        
                                                                        	// Machine specifies the number of VirtualMachine entities to create per ResourcePool
                                                                        	// Name prefix: VM, vcsim flag: -vm
                                                                        	Machine int
                                                                        
                                                                        	// Folder specifies the number of Datacenter to place within a Folder.
                                                                        	// This includes a folder for the Datacenter itself and its host, vm, network and datastore folders.
                                                                        	// All resources for the Datacenter are placed within these folders, rather than the top-level folders.
                                                                        	// Name prefix: F, vcsim flag: -folder
                                                                        	Folder int
                                                                        
                                                                        	// App specifies the number of VirtualApp to create per Cluster
                                                                        	// Name prefix: APP, vcsim flag: -app
                                                                        	App int
                                                                        
                                                                        	// Pod specifies the number of StoragePod to create per Cluster
                                                                        	// Name prefix: POD, vcsim flag: -pod
                                                                        	Pod int
                                                                        
                                                                        	// Delay configurations
                                                                        	DelayConfig DelayConfig `json:"-"`
                                                                        	// contains filtered or unexported fields
                                                                        }

                                                                          Model is used to populate a Model with an initial set of managed entities. This is a simple helper for tests running against a simulator, to populate an inventory with commonly used models. The inventory names generated by a Model have a string prefix per-type and integer suffix per-instance. The names are concatenated with their ancestor names and delimited by '_', making the generated names unique.

                                                                          Example

                                                                            Example for starting a simulator with empty inventory, similar to a fresh install of vCenter.

                                                                            Output:
                                                                            
                                                                            VirtualCenter with 0 hosts
                                                                            

                                                                            func ESX

                                                                            func ESX() *Model

                                                                              ESX is the default Model for a standalone ESX instance

                                                                              Example

                                                                                Example boilerplate for starting a simulator initialized with an ESX model.

                                                                                Output:
                                                                                
                                                                                HostAgent with 1 host
                                                                                

                                                                                func VPX

                                                                                func VPX() *Model

                                                                                  VPX is the default Model for a vCenter instance

                                                                                  Example

                                                                                    Example boilerplate for starting a simulator initialized with a vCenter model.

                                                                                    Output:
                                                                                    
                                                                                    VirtualCenter with 4 hosts
                                                                                    

                                                                                    func (*Model) Count

                                                                                    func (m *Model) Count() Model

                                                                                      Count returns a Model with total number of each existing type

                                                                                      func (*Model) Create

                                                                                      func (m *Model) Create() error

                                                                                        Create populates the Model with the given ModelConfig

                                                                                        func (*Model) Load

                                                                                        func (m *Model) Load(dir string) error

                                                                                          Load Model from the given directory, as created by the 'govc object.save' command.

                                                                                          func (*Model) Remove

                                                                                          func (m *Model) Remove()

                                                                                            Remove cleans up items created by the Model, such as local datastore directories

                                                                                            func (*Model) Run

                                                                                            func (m *Model) Run(f func(context.Context, *vim25.Client) error) error

                                                                                              Run calls f with a Client connected to a simulator server instance, which is stopped after f returns.

                                                                                              Example

                                                                                                Run simplifies startup/cleanup of a simulator instance for example or testing purposes.

                                                                                                Output:
                                                                                                
                                                                                                user
                                                                                                

                                                                                                type OptionManager

                                                                                                type OptionManager struct {
                                                                                                	mo.OptionManager
                                                                                                }

                                                                                                func (*OptionManager) QueryOptions

                                                                                                func (m *OptionManager) QueryOptions(req *types.QueryOptions) soap.HasFault

                                                                                                func (*OptionManager) UpdateOptions

                                                                                                func (m *OptionManager) UpdateOptions(req *types.UpdateOptions) soap.HasFault

                                                                                                type OvfManager

                                                                                                type OvfManager struct {
                                                                                                	mo.OvfManager
                                                                                                }

                                                                                                func (*OvfManager) CreateImportSpec

                                                                                                func (m *OvfManager) CreateImportSpec(ctx *Context, req *types.CreateImportSpec) soap.HasFault

                                                                                                type PerformanceManager

                                                                                                type PerformanceManager struct {
                                                                                                	mo.PerformanceManager
                                                                                                	// contains filtered or unexported fields
                                                                                                }

                                                                                                func (*PerformanceManager) QueryAvailablePerfMetric

                                                                                                func (p *PerformanceManager) QueryAvailablePerfMetric(ctx *Context, req *types.QueryAvailablePerfMetric) soap.HasFault

                                                                                                func (*PerformanceManager) QueryPerf

                                                                                                func (p *PerformanceManager) QueryPerf(ctx *Context, req *types.QueryPerf) soap.HasFault

                                                                                                func (*PerformanceManager) QueryPerfCounter

                                                                                                func (p *PerformanceManager) QueryPerfCounter(ctx *Context, req *types.QueryPerfCounter) soap.HasFault

                                                                                                func (*PerformanceManager) QueryPerfProviderSummary

                                                                                                func (p *PerformanceManager) QueryPerfProviderSummary(ctx *Context, req *types.QueryPerfProviderSummary) soap.HasFault

                                                                                                type PropertyCollector

                                                                                                type PropertyCollector struct {
                                                                                                	mo.PropertyCollector
                                                                                                	// contains filtered or unexported fields
                                                                                                }

                                                                                                func (*PropertyCollector) CancelWaitForUpdates

                                                                                                func (pc *PropertyCollector) CancelWaitForUpdates(r *types.CancelWaitForUpdates) soap.HasFault

                                                                                                func (*PropertyCollector) CreateFilter

                                                                                                func (pc *PropertyCollector) CreateFilter(ctx *Context, c *types.CreateFilter) soap.HasFault

                                                                                                func (*PropertyCollector) CreatePropertyCollector

                                                                                                func (pc *PropertyCollector) CreatePropertyCollector(ctx *Context, c *types.CreatePropertyCollector) soap.HasFault

                                                                                                func (*PropertyCollector) DestroyPropertyCollector

                                                                                                func (pc *PropertyCollector) DestroyPropertyCollector(ctx *Context, c *types.DestroyPropertyCollector) soap.HasFault

                                                                                                func (*PropertyCollector) Fetch

                                                                                                func (pc *PropertyCollector) Fetch(ctx *Context, req *internal.Fetch) soap.HasFault

                                                                                                  Fetch is not documented in the vSphere SDK, but ovftool depends on it. A Fetch request is converted to a RetrievePropertiesEx method call by vcsim.

                                                                                                  func (*PropertyCollector) Lock

                                                                                                  func (*PropertyCollector) Lock()

                                                                                                  func (*PropertyCollector) PutObject

                                                                                                  func (pc *PropertyCollector) PutObject(o mo.Reference)

                                                                                                  func (*PropertyCollector) RemoveObject

                                                                                                  func (pc *PropertyCollector) RemoveObject(_ *Context, ref types.ManagedObjectReference)

                                                                                                  func (*PropertyCollector) RetrieveProperties

                                                                                                  func (pc *PropertyCollector) RetrieveProperties(ctx *Context, r *types.RetrieveProperties) soap.HasFault

                                                                                                    RetrieveProperties is deprecated, but govmomi is still using it at the moment.

                                                                                                    func (*PropertyCollector) RetrievePropertiesEx

                                                                                                    func (pc *PropertyCollector) RetrievePropertiesEx(ctx *Context, r *types.RetrievePropertiesEx) soap.HasFault

                                                                                                    func (*PropertyCollector) Unlock

                                                                                                    func (*PropertyCollector) Unlock()

                                                                                                    func (*PropertyCollector) UpdateObject

                                                                                                    func (pc *PropertyCollector) UpdateObject(o mo.Reference, changes []types.PropertyChange)

                                                                                                    func (*PropertyCollector) WaitForUpdates

                                                                                                    func (pc *PropertyCollector) WaitForUpdates(ctx *Context, r *types.WaitForUpdates) soap.HasFault

                                                                                                      WaitForUpdates is deprecated, but pyvmomi is still using it at the moment.

                                                                                                      func (*PropertyCollector) WaitForUpdatesEx

                                                                                                      func (pc *PropertyCollector) WaitForUpdatesEx(ctx *Context, r *types.WaitForUpdatesEx) soap.HasFault

                                                                                                      type PropertyFilter

                                                                                                      type PropertyFilter struct {
                                                                                                      	mo.PropertyFilter
                                                                                                      	// contains filtered or unexported fields
                                                                                                      }

                                                                                                      func (*PropertyFilter) DestroyPropertyFilter

                                                                                                      func (f *PropertyFilter) DestroyPropertyFilter(ctx *Context, c *types.DestroyPropertyFilter) soap.HasFault

                                                                                                      type RegisterObject

                                                                                                      type RegisterObject interface {
                                                                                                      	mo.Reference
                                                                                                      	PutObject(mo.Reference)
                                                                                                      	UpdateObject(mo.Reference, []types.PropertyChange)
                                                                                                      	RemoveObject(*Context, types.ManagedObjectReference)
                                                                                                      }

                                                                                                        RegisterObject interface supports callbacks when objects are created, updated and deleted from the Registry

                                                                                                        type Registry

                                                                                                        type Registry struct {
                                                                                                        	Namespace string
                                                                                                        	Path      string
                                                                                                        	// contains filtered or unexported fields
                                                                                                        }

                                                                                                          Registry manages a map of mo.Reference objects

                                                                                                          func NewRegistry

                                                                                                          func NewRegistry() *Registry

                                                                                                            NewRegistry creates a new instances of Registry

                                                                                                            func (*Registry) AcquireLock

                                                                                                            func (r *Registry) AcquireLock(onBehalfOf *Context, obj mo.Reference) func()

                                                                                                              AcquireLock acquires the lock for onBehalfOf then returns. The lock MUST be released by calling the returned function. WithLock should be preferred wherever possible.

                                                                                                              func (*Registry) AddHandler

                                                                                                              func (r *Registry) AddHandler(h RegisterObject)

                                                                                                                AddHandler adds a RegisterObject handler to the Registry.

                                                                                                                func (*Registry) AddReference

                                                                                                                func (r *Registry) AddReference(ctx *Context, obj mo.Reference, field *[]types.ManagedObjectReference, ref types.ManagedObjectReference)

                                                                                                                  AddReference appends ref to field if not already in the given field.

                                                                                                                  func (*Registry) All

                                                                                                                  func (r *Registry) All(kind string) []mo.Entity

                                                                                                                    All returns all entities of type specified by kind. If kind is empty - all entities will be returned.

                                                                                                                    func (*Registry) Any

                                                                                                                    func (r *Registry) Any(kind string) mo.Entity

                                                                                                                      Any returns the first instance of entity type specified by kind.

                                                                                                                      func (*Registry) AppendReference

                                                                                                                      func (r *Registry) AppendReference(ctx *Context, obj mo.Reference, field *[]types.ManagedObjectReference, ref ...types.ManagedObjectReference)

                                                                                                                        AppendReference appends the given refs to field.

                                                                                                                        func (*Registry) AtomicUpdate

                                                                                                                        func (r *Registry) AtomicUpdate(ctx *Context, obj mo.Reference, changes []types.PropertyChange)

                                                                                                                        func (*Registry) CustomFieldsManager

                                                                                                                        func (r *Registry) CustomFieldsManager() *CustomFieldsManager

                                                                                                                          CustomFieldsManager returns CustomFieldsManager singleton

                                                                                                                          func (*Registry) EventManager

                                                                                                                          func (r *Registry) EventManager() *EventManager

                                                                                                                            EventManager returns the EventManager singleton

                                                                                                                            func (*Registry) FileManager

                                                                                                                            func (r *Registry) FileManager() *FileManager

                                                                                                                              FileManager returns the FileManager singleton

                                                                                                                              func (*Registry) FindByName

                                                                                                                              func (r *Registry) FindByName(name string, refs []types.ManagedObjectReference) mo.Entity

                                                                                                                                FindByName returns the first mo.Entity of the given refs whose Name field is equal to the given name. If there is no match, nil is returned. This method is useful for cases where objects are required to have a unique name, such as Datastore with a HostStorageSystem or HostSystem within a ClusterComputeResource.

                                                                                                                                func (*Registry) Get

                                                                                                                                  Get returns the object for the given reference.

                                                                                                                                  func (*Registry) IsESX

                                                                                                                                  func (r *Registry) IsESX() bool

                                                                                                                                    IsESX returns true if this Registry maps an ESX model

                                                                                                                                    func (*Registry) IsVPX

                                                                                                                                    func (r *Registry) IsVPX() bool

                                                                                                                                      IsVPX returns true if this Registry maps a VPX model

                                                                                                                                      func (*Registry) MarshalJSON

                                                                                                                                      func (r *Registry) MarshalJSON() ([]byte, error)

                                                                                                                                      func (*Registry) NewEntity

                                                                                                                                      func (r *Registry) NewEntity(item mo.Entity) mo.Entity

                                                                                                                                        NewEntity sets Entity().Self with a new, unique Value. Useful for creating object instances from templates.

                                                                                                                                        func (*Registry) OptionManager

                                                                                                                                        func (r *Registry) OptionManager() *OptionManager

                                                                                                                                          OptionManager returns the OptionManager singleton

                                                                                                                                          func (*Registry) Put

                                                                                                                                          func (r *Registry) Put(item mo.Reference) mo.Reference

                                                                                                                                            Put adds a new object to Registry, generating a ManagedObjectReference if not already set.

                                                                                                                                            func (*Registry) PutEntity

                                                                                                                                            func (r *Registry) PutEntity(parent mo.Entity, item mo.Entity) mo.Entity

                                                                                                                                              PutEntity sets item.Parent to that of parent.Self before adding item to the Registry.

                                                                                                                                              func (*Registry) Remove

                                                                                                                                              func (r *Registry) Remove(ctx *Context, item types.ManagedObjectReference)

                                                                                                                                                Remove removes an object from the Registry.

                                                                                                                                                func (*Registry) RemoveHandler

                                                                                                                                                func (r *Registry) RemoveHandler(h RegisterObject)

                                                                                                                                                  RemoveHandler removes a RegisterObject handler from the Registry.

                                                                                                                                                  func (*Registry) RemoveReference

                                                                                                                                                  func (r *Registry) RemoveReference(ctx *Context, obj mo.Reference, field *[]types.ManagedObjectReference, ref types.ManagedObjectReference)

                                                                                                                                                    RemoveReference removes ref from the given field.

                                                                                                                                                    func (*Registry) SearchIndex

                                                                                                                                                    func (r *Registry) SearchIndex() *SearchIndex

                                                                                                                                                      SearchIndex returns the SearchIndex singleton

                                                                                                                                                      func (*Registry) SessionManager

                                                                                                                                                      func (r *Registry) SessionManager() *SessionManager

                                                                                                                                                        SessionManager returns the SessionManager singleton

                                                                                                                                                        func (*Registry) Update

                                                                                                                                                        func (r *Registry) Update(obj mo.Reference, changes []types.PropertyChange)

                                                                                                                                                          Update dispatches object property changes to RegisterObject handlers, such as any PropertyCollector instances with in-progress WaitForUpdates calls. The changes are also applied to the given object via mo.ApplyPropertyChange, so there is no need to set object fields directly.

                                                                                                                                                          func (*Registry) UserDirectory

                                                                                                                                                          func (r *Registry) UserDirectory() *UserDirectory

                                                                                                                                                            UserDirectory returns the UserDirectory singleton

                                                                                                                                                            func (*Registry) ViewManager

                                                                                                                                                            func (r *Registry) ViewManager() *ViewManager

                                                                                                                                                              ViewManager returns the ViewManager singleton

                                                                                                                                                              func (*Registry) VirtualDiskManager

                                                                                                                                                              func (r *Registry) VirtualDiskManager() VirtualDiskManagerInterface

                                                                                                                                                                VirtualDiskManager returns the VirtualDiskManager singleton

                                                                                                                                                                func (*Registry) WithLock

                                                                                                                                                                func (r *Registry) WithLock(onBehalfOf *Context, obj mo.Reference, f func())

                                                                                                                                                                  WithLock holds a lock for the given object while then given function is run.

                                                                                                                                                                  type ResourcePool

                                                                                                                                                                  type ResourcePool struct {
                                                                                                                                                                  	mo.ResourcePool
                                                                                                                                                                  }

                                                                                                                                                                  func NewResourcePool

                                                                                                                                                                  func NewResourcePool() *ResourcePool

                                                                                                                                                                  func (*ResourcePool) CreateResourcePool

                                                                                                                                                                  func (p *ResourcePool) CreateResourcePool(c *types.CreateResourcePool) soap.HasFault

                                                                                                                                                                  func (*ResourcePool) CreateVApp

                                                                                                                                                                  func (p *ResourcePool) CreateVApp(req *types.CreateVApp) soap.HasFault

                                                                                                                                                                  func (*ResourcePool) DestroyChildren

                                                                                                                                                                  func (p *ResourcePool) DestroyChildren(ctx *Context, req *types.DestroyChildren) soap.HasFault

                                                                                                                                                                  func (*ResourcePool) DestroyTask

                                                                                                                                                                  func (p *ResourcePool) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault

                                                                                                                                                                  func (*ResourcePool) ImportVApp

                                                                                                                                                                  func (p *ResourcePool) ImportVApp(ctx *Context, req *types.ImportVApp) soap.HasFault

                                                                                                                                                                  func (*ResourcePool) UpdateConfig

                                                                                                                                                                  func (p *ResourcePool) UpdateConfig(c *types.UpdateConfig) soap.HasFault

                                                                                                                                                                  type SearchIndex

                                                                                                                                                                  type SearchIndex struct {
                                                                                                                                                                  	mo.SearchIndex
                                                                                                                                                                  }

                                                                                                                                                                  func (*SearchIndex) FindAllByDnsName

                                                                                                                                                                  func (s *SearchIndex) FindAllByDnsName(req *types.FindAllByDnsName) soap.HasFault

                                                                                                                                                                  func (*SearchIndex) FindAllByIp

                                                                                                                                                                  func (s *SearchIndex) FindAllByIp(req *types.FindAllByIp) soap.HasFault

                                                                                                                                                                  func (*SearchIndex) FindByDatastorePath

                                                                                                                                                                  func (s *SearchIndex) FindByDatastorePath(r *types.FindByDatastorePath) soap.HasFault

                                                                                                                                                                  func (*SearchIndex) FindByDnsName

                                                                                                                                                                  func (s *SearchIndex) FindByDnsName(req *types.FindByDnsName) soap.HasFault

                                                                                                                                                                  func (*SearchIndex) FindByInventoryPath

                                                                                                                                                                  func (s *SearchIndex) FindByInventoryPath(req *types.FindByInventoryPath) soap.HasFault

                                                                                                                                                                  func (*SearchIndex) FindByIp

                                                                                                                                                                  func (s *SearchIndex) FindByIp(req *types.FindByIp) soap.HasFault

                                                                                                                                                                  func (*SearchIndex) FindByUuid

                                                                                                                                                                  func (s *SearchIndex) FindByUuid(req *types.FindByUuid) soap.HasFault

                                                                                                                                                                  func (*SearchIndex) FindChild

                                                                                                                                                                  func (s *SearchIndex) FindChild(req *types.FindChild) soap.HasFault

                                                                                                                                                                  type Server

                                                                                                                                                                  type Server struct {
                                                                                                                                                                  	*internal.Server
                                                                                                                                                                  	URL    *url.URL
                                                                                                                                                                  	Tunnel int
                                                                                                                                                                  	// contains filtered or unexported fields
                                                                                                                                                                  }

                                                                                                                                                                    Server provides a simulator Service over HTTP

                                                                                                                                                                    func (*Server) Certificate

                                                                                                                                                                    func (s *Server) Certificate() *x509.Certificate

                                                                                                                                                                      Certificate returns the TLS certificate for the Server if started with TLS enabled. This method will panic if TLS is not enabled for the server.

                                                                                                                                                                      func (*Server) CertificateFile

                                                                                                                                                                      func (s *Server) CertificateFile() (string, error)

                                                                                                                                                                        CertificateFile returns a file name, where the file contains the PEM encoded Server.Certificate. The temporary file is removed when Server.Close() is called.

                                                                                                                                                                        func (*Server) CertificateInfo

                                                                                                                                                                        func (s *Server) CertificateInfo() *object.HostCertificateInfo

                                                                                                                                                                          CertificateInfo returns Server.Certificate() as object.HostCertificateInfo

                                                                                                                                                                          func (*Server) Close

                                                                                                                                                                          func (s *Server) Close()

                                                                                                                                                                            Close shuts down the server and blocks until all outstanding requests on this server have completed.

                                                                                                                                                                            func (*Server) StartTunnel

                                                                                                                                                                            func (s *Server) StartTunnel() error

                                                                                                                                                                              StartTunnel runs an HTTP proxy for tunneling SDK requests that require TLS client certificate authentication.

                                                                                                                                                                              type Service

                                                                                                                                                                              type Service struct {
                                                                                                                                                                              	Listen   *url.URL
                                                                                                                                                                              	TLS      *tls.Config
                                                                                                                                                                              	ServeMux *http.ServeMux
                                                                                                                                                                              	// RegisterEndpoints will initialize any endpoints added via RegisterEndpoint
                                                                                                                                                                              	RegisterEndpoints bool
                                                                                                                                                                              	// contains filtered or unexported fields
                                                                                                                                                                              }

                                                                                                                                                                                Service decodes incoming requests and dispatches to a Handler

                                                                                                                                                                                func New

                                                                                                                                                                                func New(instance *ServiceInstance) *Service

                                                                                                                                                                                  New returns an initialized simulator Service instance

                                                                                                                                                                                  func (*Service) About

                                                                                                                                                                                  func (s *Service) About(w http.ResponseWriter, r *http.Request)

                                                                                                                                                                                    About generates some info about the simulator.

                                                                                                                                                                                    func (*Service) Handle

                                                                                                                                                                                    func (s *Service) Handle(pattern string, handler http.Handler)

                                                                                                                                                                                      Handle registers the handler for the given pattern with Service.ServeMux.

                                                                                                                                                                                      func (*Service) HandleFunc

                                                                                                                                                                                      func (s *Service) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))

                                                                                                                                                                                        HandleFunc dispatches to http.ServeMux.HandleFunc after all endpoints have been registered. This allows dispatching to an endpoint's HandleFunc impl, such as vapi/simulator for example.

                                                                                                                                                                                        func (*Service) NewServer

                                                                                                                                                                                        func (s *Service) NewServer() *Server

                                                                                                                                                                                          NewServer returns an http Server instance for the given service

                                                                                                                                                                                          func (*Service) RegisterSDK

                                                                                                                                                                                          func (s *Service) RegisterSDK(r *Registry)

                                                                                                                                                                                            RegisterSDK adds an HTTP handler for the Registry's Path and Namespace. If r.Path is already registered, r's objects are added to the existing Registry.

                                                                                                                                                                                            func (*Service) RoundTrip

                                                                                                                                                                                            func (s *Service) RoundTrip(ctx context.Context, request, response soap.HasFault) error

                                                                                                                                                                                              RoundTrip implements the soap.RoundTripper interface in process. Rather than encode/decode SOAP over HTTP, this implementation uses reflection.

                                                                                                                                                                                              func (*Service) ServeDatastore

                                                                                                                                                                                              func (s *Service) ServeDatastore(w http.ResponseWriter, r *http.Request)

                                                                                                                                                                                                ServeDatastore handler for Datastore access via /folder path.

                                                                                                                                                                                                func (*Service) ServeSDK

                                                                                                                                                                                                func (s *Service) ServeSDK(w http.ResponseWriter, r *http.Request)

                                                                                                                                                                                                  ServeSDK implements the http.Handler interface

                                                                                                                                                                                                  func (*Service) ServiceVersions

                                                                                                                                                                                                  func (s *Service) ServiceVersions(w http.ResponseWriter, r *http.Request)

                                                                                                                                                                                                    ServiceVersions handler for the /sdk/vimServiceVersions.xml path.

                                                                                                                                                                                                    type ServiceInstance

                                                                                                                                                                                                    type ServiceInstance struct {
                                                                                                                                                                                                    	mo.ServiceInstance
                                                                                                                                                                                                    }

                                                                                                                                                                                                    func NewServiceInstance

                                                                                                                                                                                                    func NewServiceInstance(ctx *Context, content types.ServiceContent, folder mo.Folder) *ServiceInstance

                                                                                                                                                                                                    func (*ServiceInstance) CurrentTime

                                                                                                                                                                                                    func (*ServiceInstance) RetrieveInternalContent

                                                                                                                                                                                                    func (s *ServiceInstance) RetrieveInternalContent(*internal.RetrieveInternalContent) soap.HasFault

                                                                                                                                                                                                    func (*ServiceInstance) RetrieveServiceContent

                                                                                                                                                                                                    func (s *ServiceInstance) RetrieveServiceContent(*types.RetrieveServiceContent) soap.HasFault

                                                                                                                                                                                                    type Session

                                                                                                                                                                                                    type Session struct {
                                                                                                                                                                                                    	types.UserSession
                                                                                                                                                                                                    	*Registry
                                                                                                                                                                                                    }

                                                                                                                                                                                                      Session combines a UserSession and a Registry for per-session managed objects.

                                                                                                                                                                                                      func (*Session) Get

                                                                                                                                                                                                        Get wraps Registry.Get, session-izing singleton objects such as SessionManager and the root PropertyCollector.

                                                                                                                                                                                                        func (*Session) Put

                                                                                                                                                                                                        func (s *Session) Put(item mo.Reference) mo.Reference

                                                                                                                                                                                                          Put wraps Registry.Put, setting the moref value to include the session key.

                                                                                                                                                                                                          type SessionManager

                                                                                                                                                                                                          type SessionManager struct {
                                                                                                                                                                                                          	mo.SessionManager
                                                                                                                                                                                                          
                                                                                                                                                                                                          	ServiceHostName string
                                                                                                                                                                                                          	TLSCert         func() string
                                                                                                                                                                                                          	// contains filtered or unexported fields
                                                                                                                                                                                                          }

                                                                                                                                                                                                          func (*SessionManager) AcquireCloneTicket

                                                                                                                                                                                                          func (s *SessionManager) AcquireCloneTicket(ctx *Context, _ *types.AcquireCloneTicket) soap.HasFault

                                                                                                                                                                                                          func (*SessionManager) AcquireGenericServiceTicket

                                                                                                                                                                                                          func (s *SessionManager) AcquireGenericServiceTicket(ticket *types.AcquireGenericServiceTicket) soap.HasFault

                                                                                                                                                                                                          func (*SessionManager) CloneSession

                                                                                                                                                                                                          func (s *SessionManager) CloneSession(ctx *Context, ticket *types.CloneSession) soap.HasFault

                                                                                                                                                                                                          func (*SessionManager) Lock

                                                                                                                                                                                                          func (*SessionManager) Lock()

                                                                                                                                                                                                          func (*SessionManager) Login

                                                                                                                                                                                                          func (s *SessionManager) Login(ctx *Context, req *types.Login) soap.HasFault

                                                                                                                                                                                                          func (*SessionManager) LoginByToken

                                                                                                                                                                                                          func (s *SessionManager) LoginByToken(ctx *Context, req *types.LoginByToken) soap.HasFault

                                                                                                                                                                                                          func (*SessionManager) LoginExtensionByCertificate

                                                                                                                                                                                                          func (s *SessionManager) LoginExtensionByCertificate(ctx *Context, req *types.LoginExtensionByCertificate) soap.HasFault

                                                                                                                                                                                                          func (*SessionManager) Logout

                                                                                                                                                                                                          func (s *SessionManager) Logout(ctx *Context, _ *types.Logout) soap.HasFault

                                                                                                                                                                                                          func (*SessionManager) SessionIsActive

                                                                                                                                                                                                          func (s *SessionManager) SessionIsActive(ctx *Context, req *types.SessionIsActive) soap.HasFault

                                                                                                                                                                                                          func (*SessionManager) TerminateSession

                                                                                                                                                                                                          func (s *SessionManager) TerminateSession(ctx *Context, req *types.TerminateSession) soap.HasFault

                                                                                                                                                                                                          func (*SessionManager) Unlock

                                                                                                                                                                                                          func (*SessionManager) Unlock()

                                                                                                                                                                                                          type StoragePod

                                                                                                                                                                                                          type StoragePod struct {
                                                                                                                                                                                                          	mo.StoragePod
                                                                                                                                                                                                          }

                                                                                                                                                                                                            StoragePod aka "Datastore Cluster"

                                                                                                                                                                                                            func (*StoragePod) MoveIntoFolderTask

                                                                                                                                                                                                            func (p *StoragePod) MoveIntoFolderTask(ctx *Context, c *types.MoveIntoFolder_Task) soap.HasFault

                                                                                                                                                                                                            type StorageResourceManager

                                                                                                                                                                                                            type StorageResourceManager struct {
                                                                                                                                                                                                            	mo.StorageResourceManager
                                                                                                                                                                                                            }

                                                                                                                                                                                                            func (*StorageResourceManager) ConfigureStorageDrsForPodTask

                                                                                                                                                                                                            func (m *StorageResourceManager) ConfigureStorageDrsForPodTask(ctx *Context, req *types.ConfigureStorageDrsForPod_Task) soap.HasFault

                                                                                                                                                                                                            func (*StorageResourceManager) RecommendDatastores

                                                                                                                                                                                                            func (m *StorageResourceManager) RecommendDatastores(req *types.RecommendDatastores) soap.HasFault

                                                                                                                                                                                                            type Task

                                                                                                                                                                                                            type Task struct {
                                                                                                                                                                                                            	mo.Task
                                                                                                                                                                                                            
                                                                                                                                                                                                            	Execute func(*Task) (types.AnyType, types.BaseMethodFault)
                                                                                                                                                                                                            	// contains filtered or unexported fields
                                                                                                                                                                                                            }

                                                                                                                                                                                                            func CreateTask

                                                                                                                                                                                                            func CreateTask(e mo.Reference, name string, run func(*Task) (types.AnyType, types.BaseMethodFault)) *Task

                                                                                                                                                                                                            func NewTask

                                                                                                                                                                                                            func NewTask(runner TaskRunner) *Task

                                                                                                                                                                                                            func (*Task) Run

                                                                                                                                                                                                            func (*Task) RunBlocking

                                                                                                                                                                                                            func (t *Task) RunBlocking(ctx *Context)

                                                                                                                                                                                                              RunBlocking() should only be used when an async simulator task needs to wait on another async simulator task. It polls for task completion to avoid the need to set up a PropertyCollector.

                                                                                                                                                                                                              func (*Task) Wait

                                                                                                                                                                                                              func (t *Task) Wait()

                                                                                                                                                                                                                Wait blocks until the task is complete.

                                                                                                                                                                                                                type TaskManager

                                                                                                                                                                                                                type TaskManager struct {
                                                                                                                                                                                                                	mo.TaskManager
                                                                                                                                                                                                                	sync.Mutex
                                                                                                                                                                                                                }

                                                                                                                                                                                                                func (*TaskManager) PutObject

                                                                                                                                                                                                                func (m *TaskManager) PutObject(obj mo.Reference)

                                                                                                                                                                                                                func (*TaskManager) RemoveObject

                                                                                                                                                                                                                func (*TaskManager) UpdateObject

                                                                                                                                                                                                                func (*TaskManager) UpdateObject(mo.Reference, []types.PropertyChange)

                                                                                                                                                                                                                type TaskRunner

                                                                                                                                                                                                                type TaskRunner interface {
                                                                                                                                                                                                                	mo.Reference
                                                                                                                                                                                                                
                                                                                                                                                                                                                	Run(*Task) (types.AnyType, types.BaseMethodFault)
                                                                                                                                                                                                                }

                                                                                                                                                                                                                type UserDirectory

                                                                                                                                                                                                                type UserDirectory struct {
                                                                                                                                                                                                                	mo.UserDirectory
                                                                                                                                                                                                                	// contains filtered or unexported fields
                                                                                                                                                                                                                }

                                                                                                                                                                                                                func (*UserDirectory) RetrieveUserGroups

                                                                                                                                                                                                                func (u *UserDirectory) RetrieveUserGroups(req *types.RetrieveUserGroups) soap.HasFault

                                                                                                                                                                                                                type VcenterVStorageObjectManager

                                                                                                                                                                                                                type VcenterVStorageObjectManager struct {
                                                                                                                                                                                                                	mo.VcenterVStorageObjectManager
                                                                                                                                                                                                                	// contains filtered or unexported fields
                                                                                                                                                                                                                }

                                                                                                                                                                                                                func (*VcenterVStorageObjectManager) AttachTagToVStorageObject

                                                                                                                                                                                                                func (m *VcenterVStorageObjectManager) AttachTagToVStorageObject(ctx *Context, req *types.AttachTagToVStorageObject) soap.HasFault

                                                                                                                                                                                                                func (*VcenterVStorageObjectManager) CreateDiskTask

                                                                                                                                                                                                                func (*VcenterVStorageObjectManager) DeleteSnapshotTask

                                                                                                                                                                                                                func (m *VcenterVStorageObjectManager) DeleteSnapshotTask(ctx *Context, req *types.DeleteSnapshot_Task) soap.HasFault

                                                                                                                                                                                                                func (*VcenterVStorageObjectManager) DeleteVStorageObjectTask

                                                                                                                                                                                                                func (m *VcenterVStorageObjectManager) DeleteVStorageObjectTask(ctx *Context, req *types.DeleteVStorageObject_Task) soap.HasFault

                                                                                                                                                                                                                func (*VcenterVStorageObjectManager) DetachTagFromVStorageObject

                                                                                                                                                                                                                func (m *VcenterVStorageObjectManager) DetachTagFromVStorageObject(ctx *Context, req *types.DetachTagFromVStorageObject) soap.HasFault

                                                                                                                                                                                                                func (*VcenterVStorageObjectManager) ListTagsAttachedToVStorageObject

                                                                                                                                                                                                                func (m *VcenterVStorageObjectManager) ListTagsAttachedToVStorageObject(ctx *Context, req *types.ListTagsAttachedToVStorageObject) soap.HasFault

                                                                                                                                                                                                                func (*VcenterVStorageObjectManager) ListVStorageObject

                                                                                                                                                                                                                func (*VcenterVStorageObjectManager) ListVStorageObjectsAttachedToTag

                                                                                                                                                                                                                func (m *VcenterVStorageObjectManager) ListVStorageObjectsAttachedToTag(ctx *Context, req *types.ListVStorageObjectsAttachedToTag) soap.HasFault

                                                                                                                                                                                                                func (*VcenterVStorageObjectManager) ReconcileDatastoreInventoryTask

                                                                                                                                                                                                                func (m *VcenterVStorageObjectManager) ReconcileDatastoreInventoryTask(ctx *Context, req *types.ReconcileDatastoreInventory_Task) soap.HasFault

                                                                                                                                                                                                                func (*VcenterVStorageObjectManager) RegisterDisk

                                                                                                                                                                                                                func (*VcenterVStorageObjectManager) RetrieveSnapshotInfo

                                                                                                                                                                                                                func (*VcenterVStorageObjectManager) RetrieveVStorageObject

                                                                                                                                                                                                                func (m *VcenterVStorageObjectManager) RetrieveVStorageObject(ctx *Context, req *types.RetrieveVStorageObject) soap.HasFault

                                                                                                                                                                                                                func (*VcenterVStorageObjectManager) VStorageObjectCreateSnapshotTask

                                                                                                                                                                                                                func (m *VcenterVStorageObjectManager) VStorageObjectCreateSnapshotTask(ctx *Context, req *types.VStorageObjectCreateSnapshot_Task) soap.HasFault

                                                                                                                                                                                                                type ViewManager

                                                                                                                                                                                                                type ViewManager struct {
                                                                                                                                                                                                                	mo.ViewManager
                                                                                                                                                                                                                	// contains filtered or unexported fields
                                                                                                                                                                                                                }

                                                                                                                                                                                                                func (*ViewManager) CreateContainerView

                                                                                                                                                                                                                func (m *ViewManager) CreateContainerView(ctx *Context, req *types.CreateContainerView) soap.HasFault

                                                                                                                                                                                                                func (*ViewManager) CreateListView

                                                                                                                                                                                                                func (m *ViewManager) CreateListView(ctx *Context, req *types.CreateListView) soap.HasFault

                                                                                                                                                                                                                type VirtualApp

                                                                                                                                                                                                                type VirtualApp struct {
                                                                                                                                                                                                                	mo.VirtualApp
                                                                                                                                                                                                                }

                                                                                                                                                                                                                func (*VirtualApp) CloneVAppTask

                                                                                                                                                                                                                func (a *VirtualApp) CloneVAppTask(ctx *Context, req *types.CloneVApp_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualApp) CreateChildVMTask

                                                                                                                                                                                                                func (a *VirtualApp) CreateChildVMTask(ctx *Context, req *types.CreateChildVM_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualApp) CreateVApp

                                                                                                                                                                                                                func (a *VirtualApp) CreateVApp(req *types.CreateVApp) soap.HasFault

                                                                                                                                                                                                                func (*VirtualApp) DestroyTask

                                                                                                                                                                                                                func (a *VirtualApp) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualApp) ImportVApp

                                                                                                                                                                                                                func (a *VirtualApp) ImportVApp(ctx *Context, req *types.ImportVApp) soap.HasFault

                                                                                                                                                                                                                type VirtualDiskManager

                                                                                                                                                                                                                type VirtualDiskManager struct {
                                                                                                                                                                                                                	mo.VirtualDiskManager
                                                                                                                                                                                                                }

                                                                                                                                                                                                                func (*VirtualDiskManager) CopyVirtualDiskTask

                                                                                                                                                                                                                func (m *VirtualDiskManager) CopyVirtualDiskTask(ctx *Context, req *types.CopyVirtualDisk_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualDiskManager) CreateVirtualDiskTask

                                                                                                                                                                                                                func (m *VirtualDiskManager) CreateVirtualDiskTask(ctx *Context, req *types.CreateVirtualDisk_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualDiskManager) DeleteVirtualDiskTask

                                                                                                                                                                                                                func (m *VirtualDiskManager) DeleteVirtualDiskTask(ctx *Context, req *types.DeleteVirtualDisk_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualDiskManager) MO

                                                                                                                                                                                                                func (*VirtualDiskManager) MoveVirtualDiskTask

                                                                                                                                                                                                                func (m *VirtualDiskManager) MoveVirtualDiskTask(ctx *Context, req *types.MoveVirtualDisk_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualDiskManager) QueryVirtualDiskUuid

                                                                                                                                                                                                                func (m *VirtualDiskManager) QueryVirtualDiskUuid(_ *Context, req *types.QueryVirtualDiskUuid) soap.HasFault

                                                                                                                                                                                                                func (*VirtualDiskManager) SetVirtualDiskUuid

                                                                                                                                                                                                                func (m *VirtualDiskManager) SetVirtualDiskUuid(_ *Context, req *types.SetVirtualDiskUuid) soap.HasFault

                                                                                                                                                                                                                type VirtualDiskManagerInterface

                                                                                                                                                                                                                type VirtualDiskManagerInterface interface {
                                                                                                                                                                                                                	mo.Reference
                                                                                                                                                                                                                	MO() mo.VirtualDiskManager
                                                                                                                                                                                                                	CreateVirtualDiskTask(*Context, *types.CreateVirtualDisk_Task) soap.HasFault
                                                                                                                                                                                                                	DeleteVirtualDiskTask(*Context, *types.DeleteVirtualDisk_Task) soap.HasFault
                                                                                                                                                                                                                	MoveVirtualDiskTask(*Context, *types.MoveVirtualDisk_Task) soap.HasFault
                                                                                                                                                                                                                	CopyVirtualDiskTask(*Context, *types.CopyVirtualDisk_Task) soap.HasFault
                                                                                                                                                                                                                	QueryVirtualDiskUuid(*Context, *types.QueryVirtualDiskUuid) soap.HasFault
                                                                                                                                                                                                                	SetVirtualDiskUuid(*Context, *types.SetVirtualDiskUuid) soap.HasFault
                                                                                                                                                                                                                }

                                                                                                                                                                                                                type VirtualMachine

                                                                                                                                                                                                                type VirtualMachine struct {
                                                                                                                                                                                                                	mo.VirtualMachine
                                                                                                                                                                                                                	// contains filtered or unexported fields
                                                                                                                                                                                                                }

                                                                                                                                                                                                                func (*VirtualMachine) CloneVMTask

                                                                                                                                                                                                                func (vm *VirtualMachine) CloneVMTask(ctx *Context, req *types.CloneVM_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) CreateSnapshotTask

                                                                                                                                                                                                                func (vm *VirtualMachine) CreateSnapshotTask(ctx *Context, req *types.CreateSnapshot_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) CustomizeVMTask

                                                                                                                                                                                                                func (vm *VirtualMachine) CustomizeVMTask(ctx *Context, req *types.CustomizeVM_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) DestroyTask

                                                                                                                                                                                                                func (vm *VirtualMachine) DestroyTask(ctx *Context, req *types.Destroy_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) MarkAsTemplate

                                                                                                                                                                                                                func (vm *VirtualMachine) MarkAsTemplate(req *types.MarkAsTemplate) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) MarkAsVirtualMachine

                                                                                                                                                                                                                func (vm *VirtualMachine) MarkAsVirtualMachine(req *types.MarkAsVirtualMachine) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) PowerOffVMTask

                                                                                                                                                                                                                func (vm *VirtualMachine) PowerOffVMTask(ctx *Context, c *types.PowerOffVM_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) PowerOnVMTask

                                                                                                                                                                                                                func (vm *VirtualMachine) PowerOnVMTask(ctx *Context, c *types.PowerOnVM_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) RebootGuest

                                                                                                                                                                                                                func (vm *VirtualMachine) RebootGuest(ctx *Context, req *types.RebootGuest) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) ReconfigVMTask

                                                                                                                                                                                                                func (vm *VirtualMachine) ReconfigVMTask(ctx *Context, req *types.ReconfigVM_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) RefreshStorageInfo

                                                                                                                                                                                                                func (vm *VirtualMachine) RefreshStorageInfo(ctx *Context, req *types.RefreshStorageInfo) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) Reload

                                                                                                                                                                                                                func (*VirtualMachine) RelocateVMTask

                                                                                                                                                                                                                func (vm *VirtualMachine) RelocateVMTask(ctx *Context, req *types.RelocateVM_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) RemoveAllSnapshotsTask

                                                                                                                                                                                                                func (vm *VirtualMachine) RemoveAllSnapshotsTask(ctx *Context, req *types.RemoveAllSnapshots_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) RenameTask

                                                                                                                                                                                                                func (o *VirtualMachine) RenameTask(ctx *Context, r *types.Rename_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) ResetVMTask

                                                                                                                                                                                                                func (vm *VirtualMachine) ResetVMTask(ctx *Context, req *types.ResetVM_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) RevertToCurrentSnapshotTask

                                                                                                                                                                                                                func (vm *VirtualMachine) RevertToCurrentSnapshotTask(ctx *Context, req *types.RevertToCurrentSnapshot_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) SetCustomValue

                                                                                                                                                                                                                func (vm *VirtualMachine) SetCustomValue(ctx *Context, req *types.SetCustomValue) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) ShutdownGuest

                                                                                                                                                                                                                func (vm *VirtualMachine) ShutdownGuest(ctx *Context, c *types.ShutdownGuest) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) SuspendVMTask

                                                                                                                                                                                                                func (vm *VirtualMachine) SuspendVMTask(ctx *Context, req *types.SuspendVM_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) UnregisterVM

                                                                                                                                                                                                                func (vm *VirtualMachine) UnregisterVM(ctx *Context, c *types.UnregisterVM) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachine) UpgradeVMTask

                                                                                                                                                                                                                func (vm *VirtualMachine) UpgradeVMTask(ctx *Context, req *types.UpgradeVM_Task) soap.HasFault

                                                                                                                                                                                                                type VirtualMachineSnapshot

                                                                                                                                                                                                                type VirtualMachineSnapshot struct {
                                                                                                                                                                                                                	mo.VirtualMachineSnapshot
                                                                                                                                                                                                                }

                                                                                                                                                                                                                func (*VirtualMachineSnapshot) RemoveSnapshotTask

                                                                                                                                                                                                                func (v *VirtualMachineSnapshot) RemoveSnapshotTask(ctx *Context, req *types.RemoveSnapshot_Task) soap.HasFault

                                                                                                                                                                                                                func (*VirtualMachineSnapshot) RevertToSnapshotTask

                                                                                                                                                                                                                func (v *VirtualMachineSnapshot) RevertToSnapshotTask(ctx *Context, req *types.RevertToSnapshot_Task) soap.HasFault

                                                                                                                                                                                                                Directories

                                                                                                                                                                                                                Path Synopsis
                                                                                                                                                                                                                Package esx contains SOAP responses from an ESX server, captured using `govc ...
                                                                                                                                                                                                                Package esx contains SOAP responses from an ESX server, captured using `govc ...
                                                                                                                                                                                                                Package vpx contains SOAP responses from a vCenter server, captured using `govc ...
                                                                                                                                                                                                                Package vpx contains SOAP responses from a vCenter server, captured using `govc ...